From aff8e204d205b5d424d2c39a5d9e004caaa1eab1 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 14:48:36 -0700 Subject: Checkpoint new GLSL compiler back-end to produce fp/vp-style assembly instructions. --- src/mesa/shader/slang/slang_assemble.c | 480 ++++---- src/mesa/shader/slang/slang_assemble.h | 27 +- src/mesa/shader/slang/slang_assemble_assignment.c | 11 +- src/mesa/shader/slang/slang_assemble_constructor.c | 25 +- src/mesa/shader/slang/slang_assemble_typeinfo.c | 74 +- src/mesa/shader/slang/slang_codegen.c | 1272 ++++++++++++++++++++ src/mesa/shader/slang/slang_codegen.h | 39 + src/mesa/shader/slang/slang_compile.c | 248 +++- src/mesa/shader/slang/slang_compile.h | 4 +- src/mesa/shader/slang/slang_compile_function.c | 33 +- src/mesa/shader/slang/slang_compile_function.h | 4 + src/mesa/shader/slang/slang_compile_operation.c | 102 +- src/mesa/shader/slang/slang_compile_operation.h | 19 +- src/mesa/shader/slang/slang_compile_variable.c | 18 +- src/mesa/shader/slang/slang_compile_variable.h | 7 +- src/mesa/shader/slang/slang_emit.c | 1027 ++++++++++++++++ src/mesa/shader/slang/slang_emit.h | 56 + src/mesa/shader/slang/slang_error.c | 77 ++ src/mesa/shader/slang/slang_error.h | 85 ++ src/mesa/shader/slang/slang_execute.c | 25 + src/mesa/shader/slang/slang_ir.h | 115 ++ src/mesa/shader/slang/slang_link.h | 8 + src/mesa/shader/slang/slang_link2.c | 226 ++++ src/mesa/shader/slang/slang_print.c | 1136 +++++++++++++++++ src/mesa/shader/slang/slang_print.h | 38 + src/mesa/shader/slang/slang_simplify.c | 170 +++ src/mesa/shader/slang/slang_simplify.h | 12 + src/mesa/shader/slang/slang_utility.c | 13 + src/mesa/shader/slang/slang_utility.h | 4 + 29 files changed, 5016 insertions(+), 339 deletions(-) create mode 100644 src/mesa/shader/slang/slang_codegen.c create mode 100644 src/mesa/shader/slang/slang_codegen.h create mode 100644 src/mesa/shader/slang/slang_emit.c create mode 100644 src/mesa/shader/slang/slang_emit.h create mode 100644 src/mesa/shader/slang/slang_error.c create mode 100644 src/mesa/shader/slang/slang_error.h create mode 100644 src/mesa/shader/slang/slang_ir.h create mode 100644 src/mesa/shader/slang/slang_link2.c create mode 100644 src/mesa/shader/slang/slang_print.c create mode 100644 src/mesa/shader/slang/slang_print.h create mode 100644 src/mesa/shader/slang/slang_simplify.c create mode 100644 src/mesa/shader/slang/slang_simplify.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 0cba5d5d00..617249487f 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.2 * * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. * @@ -32,6 +32,10 @@ #include "slang_assemble.h" #include "slang_compile.h" #include "slang_storage.h" +#include "slang_error.h" + +#include "slang_print.h" +/*#include "assemble2.c"*/ /* slang_assembly */ @@ -99,6 +103,9 @@ push_gen(slang_assembly_file * file, slang_assembly_type type, { slang_assembly *assem; +#if 0 + printf("Gen %s %f %d %d\n", slang_asm_string(type), literal, label, size); +#endif if (!push_new(file)) return GL_FALSE; assem = &file->code[file->count - 1]; @@ -169,7 +176,7 @@ slang_assembly_file_restore_point_load(slang_assembly_file * file, /* utility functions */ static GLboolean -sizeof_variable(slang_assemble_ctx * A, slang_type_specifier * spec, +sizeof_variable(const slang_assemble_ctx * A, slang_type_specifier * spec, slang_type_qualifier qual, GLuint array_len, GLuint * size) { slang_storage_aggregate agg; @@ -177,9 +184,9 @@ sizeof_variable(slang_assemble_ctx * A, slang_type_specifier * spec, /* calculate the size of the variable's aggregate */ if (!slang_storage_aggregate_construct(&agg)) return GL_FALSE; - if (!_slang_aggregate_variable - (&agg, spec, array_len, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) { + if (!_slang_aggregate_variable(&agg, spec, array_len, A->space.funcs, + A->space.structs, A->space.vars, A->mach, + A->file, A->atoms)) { slang_storage_aggregate_destruct(&agg); return GL_FALSE; } @@ -231,33 +238,39 @@ collect_locals(slang_assemble_ctx * A, slang_operation * op, GLuint * size) /* _slang_locate_function() */ +/** + * Locate a function by comparing actual arguments against formal parameters. + */ slang_function * _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, - const slang_operation * params, GLuint num_params, + const slang_operation * args, GLuint num_args, const slang_assembly_name_space * space, slang_atom_pool * atoms) { GLuint i; for (i = 0; i < funcs->num_functions; i++) { - GLuint j; slang_function *f = &funcs->functions[i]; + const GLuint haveRetValue = _slang_function_has_return_value(f); + GLuint j; if (a_name != f->header.a_name) continue; - if (f->param_count != num_params) + if (f->param_count - haveRetValue != num_args) continue; - for (j = 0; j < num_params; j++) { + + /* compare parameter / argument types */ + for (j = 0; j < num_args; j++) { slang_assembly_typeinfo ti; if (!slang_assembly_typeinfo_construct(&ti)) return NULL; - if (!_slang_typeof_operation_(¶ms[j], space, &ti, atoms)) { + if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { slang_assembly_typeinfo_destruct(&ti); return NULL; } - if (!slang_type_specifier_equal - (&ti.spec, &f->parameters->variables[j].type.specifier)) { + if (!slang_type_specifier_equal(&ti.spec, + &f->parameters->variables[j/* + haveRetValue*/].type.specifier)) { slang_assembly_typeinfo_destruct(&ti); break; } @@ -265,26 +278,30 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ if (!ti.can_be_referenced && - (f->parameters->variables[j].type.qualifier == slang_qual_out || - f->parameters->variables[j].type.qualifier == slang_qual_inout)) + (f->parameters->variables[j/* + haveRetValue*/].type.qualifier == slang_qual_out || + f->parameters->variables[j/* + haveRetValue*/].type.qualifier == slang_qual_inout)) break; } - if (j == num_params) + if (j == num_args) return f; } if (funcs->outer_scope != NULL) - return _slang_locate_function(funcs->outer_scope, a_name, params, - num_params, space, atoms); + return _slang_locate_function(funcs->outer_scope, a_name, args, + num_args, space, atoms); return NULL; } -/* _slang_assemble_function() */ + +/** + * Generate assembly for a parsed function. + */ GLboolean _slang_assemble_function(slang_assemble_ctx * A, slang_function * fun) { GLuint param_size, local_size; GLuint skip, cleanup; + const GLuint haveRetValue = _slang_function_has_return_value(fun); fun->address = A->file->count; @@ -293,9 +310,9 @@ _slang_assemble_function(slang_assemble_ctx * A, slang_function * fun) * the instruction to fixup table */ if (!slang_fixup_save(&fun->fixups, fun->address)) - return GL_FALSE; + RETURN_NIL(); if (!PUSH(A->file, slang_asm_jump)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); return GL_TRUE; } else { @@ -316,16 +333,18 @@ _slang_assemble_function(slang_assemble_ctx * A, slang_function * fun) /* calculate return value size */ param_size = 0; - if (fun->header.type.specifier.type != slang_spec_void) - if (!sizeof_variable - (A, &fun->header.type.specifier, slang_qual_none, 0, ¶m_size)) - return GL_FALSE; + if (fun->header.type.specifier.type != slang_spec_void) { + if (!sizeof_variable(A, &fun->header.type.specifier, + slang_qual_none, 0, ¶m_size)) + RETURN_NIL(); + } A->local.ret_size = param_size; /* calculate formal parameter list size */ - if (!sizeof_variables - (A, fun->parameters, 0, fun->param_count, ¶m_size)) - return GL_FALSE; + if (!sizeof_variables(A, fun->parameters, + 0, + fun->param_count - haveRetValue, ¶m_size)) + RETURN_NIL(); /* calculate local variables size - take into account the four-byte * return address and temporaries for various tasks (4 for addr and @@ -335,52 +354,52 @@ _slang_assemble_function(slang_assemble_ctx * A, slang_function * fun) A->local.addr_tmp = param_size + 4; A->local.swizzle_tmp = param_size + 4 + 4; local_size = param_size + 4 + 4 + 16; - if (!sizeof_variables - (A, fun->parameters, fun->param_count, fun->parameters->num_variables, - &local_size)) - return GL_FALSE; + if (!sizeof_variables(A, fun->parameters, fun->param_count, + fun->parameters->num_variables, &local_size)) { + RETURN_OUT_OF_MEMORY(); + } if (!collect_locals(A, fun->body, &local_size)) - return GL_FALSE; + RETURN_NIL(); /* allocate local variable storage */ if (!PLAB(A->file, slang_asm_local_alloc, local_size - param_size - 4)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); /* mark a new frame for function variable storage */ if (!PLAB(A->file, slang_asm_enter, local_size)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); /* jump directly to the actual code */ skip = A->file->count; if (!push_new(A->file)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); A->file->code[skip].type = slang_asm_jump; /* all "return" statements will be directed here */ A->flow.function_end = A->file->count; cleanup = A->file->count; if (!push_new(A->file)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); A->file->code[cleanup].type = slang_asm_jump; /* execute the function body */ A->file->code[skip].param[0] = A->file->count; - if (!_slang_assemble_operation - (A, fun->body, /*slang_ref_freelance */ slang_ref_forbid)) - return GL_FALSE; + if (!_slang_assemble_operation(A, fun->body, + /*slang_ref_freelance */ slang_ref_forbid)) + RETURN_NIL(); /* this is the end of the function - restore the old function frame */ A->file->code[cleanup].param[0] = A->file->count; if (!PUSH(A->file, slang_asm_leave)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); /* free local variable storage */ if (!PLAB(A->file, slang_asm_local_free, local_size - param_size - 4)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); /* return from the function */ if (!PUSH(A->file, slang_asm_return)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); return GL_TRUE; } @@ -488,23 +507,19 @@ dereference_aggregate(slang_assemble_ctx * A, for (j = arr->length; j > 0; j--) { if (arr->type == slang_stor_aggregate) { - if (!dereference_aggregate - (A, arr->aggregate, size, swz, is_swizzled)) + if (!dereference_aggregate(A, arr->aggregate, size, + swz, is_swizzled)) return GL_FALSE; } else { if (is_swizzled && arr->type == slang_stor_vec4) { - if (!dereference_basic - (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; - if (!dereference_basic - (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; - if (!dereference_basic - (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; - if (!dereference_basic - (A, slang_stor_float, size, swz, is_swizzled)) + if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) return GL_FALSE; } else { @@ -535,9 +550,9 @@ _slang_dereference(slang_assemble_ctx * A, slang_operation * op) /* construct aggregate from the type info */ if (!slang_storage_aggregate_construct(&agg)) goto end1; - if (!_slang_aggregate_variable - (&agg, &ti.spec, ti.array_len, A->space.funcs, A->space.structs, - A->space.vars, A->mach, A->file, A->atoms)) + if (!_slang_aggregate_variable(&agg, &ti.spec, ti.array_len, A->space.funcs, + A->space.structs, A->space.vars, A->mach, + A->file, A->atoms)) goto end; /* dereference the resulting aggregate */ @@ -551,6 +566,10 @@ _slang_dereference(slang_assemble_ctx * A, slang_operation * op) return result; } + +/** + * Assemble a function call, given a pointer to the actual function to call. + */ GLboolean _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, slang_operation * params, GLuint param_count, @@ -559,6 +578,9 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, GLuint i; slang_swizzle p_swz[64]; slang_ref_type p_ref[64]; + /* + const GLuint haveRetValue = _slang_function_has_return_value(fun); + */ /* TODO: fix this, allocate dynamically */ if (param_count > 64) @@ -568,8 +590,8 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, if (fun->header.type.specifier.type != slang_spec_void) { GLuint ret_size = 0; - if (!sizeof_variable - (A, &fun->header.type.specifier, slang_qual_none, 0, &ret_size)) + if (!sizeof_variable(A, &fun->header.type.specifier, + slang_qual_none, 0, &ret_size)) return GL_FALSE; if (!PLAB(A->file, slang_asm_local_alloc, ret_size)) return GL_FALSE; @@ -577,8 +599,8 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, /* push the actual parameters on the stack */ for (i = 0; i < param_count; i++) { - if (fun->parameters->variables[i].type.qualifier == slang_qual_inout || - fun->parameters->variables[i].type.qualifier == slang_qual_out) { + if (fun->parameters->variables[i /*+ haveRetValue*/].type.qualifier == slang_qual_inout || + fun->parameters->variables[i /*+ haveRetValue*/].type.qualifier == slang_qual_out) { if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) return GL_FALSE; /* TODO: optimize the "out" parameter case */ @@ -609,6 +631,10 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, } /* call the function */ +#if 0 + printf("CALL FUNCTION %s\n", (char*) fun->header.a_name); + slang_print_var_scope(fun->parameters, fun->param_count); +#endif if (!PLAB(A->file, slang_asm_call, fun->address)) return GL_FALSE; @@ -618,8 +644,8 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, A->swz = p_swz[j]; A->ref = p_ref[j]; - if (fun->parameters->variables[j].type.qualifier == slang_qual_inout || - fun->parameters->variables[j].type.qualifier == slang_qual_out) { + if (fun->parameters->variables[j /*+ haveRetValue*/].type.qualifier == slang_qual_inout || + fun->parameters->variables[j/* + haveRetValue*/].type.qualifier == slang_qual_out) { /* for output parameter copy the contents of the formal parameter * back to the original actual parameter */ @@ -639,6 +665,11 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, return GL_TRUE; } + +/** + * Assemble a function call, given the name of the function to call and a + * list of parameters. + */ GLboolean _slang_assemble_function_call_name(slang_assemble_ctx * A, const char *name, slang_operation * params, @@ -653,6 +684,12 @@ _slang_assemble_function_call_name(slang_assemble_ctx * A, const char *name, fun = _slang_locate_function(A->space.funcs, atom, params, param_count, &A->space, A->atoms); + { + char *s = (char *) name; + if (strcmp(name, "vec4") == 0) + printf("LLLLLLLLLLLLLLL locate %s %p\n", s, (void*) fun); + } + if (fun == NULL) return GL_FALSE; return _slang_assemble_function_call(A, fun, params, param_count, @@ -682,18 +719,25 @@ static const struct } inst[] = { /* core */ {"float_add", slang_asm_float_add, slang_asm_float_copy}, + {"float_subtract", slang_asm_float_subtract, slang_asm_float_copy}, {"float_multiply", slang_asm_float_multiply, slang_asm_float_copy}, {"float_divide", slang_asm_float_divide, slang_asm_float_copy}, {"float_negate", slang_asm_float_negate, slang_asm_float_copy}, + {"float_min", slang_asm_float_min, slang_asm_float_copy}, + {"float_max", slang_asm_float_max, slang_asm_float_copy}, {"float_less", slang_asm_float_less, slang_asm_bool_copy}, {"float_equal", slang_asm_float_equal_exp, slang_asm_bool_copy}, {"float_to_int", slang_asm_float_to_int, slang_asm_int_copy}, {"float_sine", slang_asm_float_sine, slang_asm_float_copy}, + {"float_cosine", slang_asm_float_cosine, slang_asm_float_copy}, {"float_arcsine", slang_asm_float_arcsine, slang_asm_float_copy}, {"float_arctan", slang_asm_float_arctan, slang_asm_float_copy}, {"float_power", slang_asm_float_power, slang_asm_float_copy}, + {"float_exp", slang_asm_float_exp, slang_asm_float_copy}, + {"float_exp2", slang_asm_float_exp2, slang_asm_float_copy}, + {"float_rsq", slang_asm_float_rsq, slang_asm_float_copy}, + {"float_rcp", slang_asm_float_rcp, slang_asm_float_copy}, {"float_log2", slang_asm_float_log2, slang_asm_float_copy}, - {"float_floor", slang_asm_float_floor, slang_asm_float_copy}, {"float_ceil", slang_asm_float_ceil, slang_asm_float_copy}, {"float_noise1", slang_asm_float_noise1, slang_asm_float_copy}, {"float_noise2", slang_asm_float_noise2, slang_asm_float_copy}, @@ -712,12 +756,24 @@ static const struct {"bool_print", slang_asm_bool_deref, slang_asm_bool_print}, /* vec4 */ {"float_to_vec4", slang_asm_float_to_vec4, slang_asm_none}, - {"vec4_add", slang_asm_vec4_add, slang_asm_none}, - {"vec4_subtract", slang_asm_vec4_subtract, slang_asm_none}, - {"vec4_multiply", slang_asm_vec4_multiply, slang_asm_none}, + {"vec4_add", slang_asm_vec4_add, slang_asm_float_copy}, + {"vec4_subtract", slang_asm_vec4_subtract, slang_asm_float_copy}, + {"vec4_multiply", slang_asm_vec4_multiply, slang_asm_float_copy}, + {"vec4_min", slang_asm_vec4_min, slang_asm_float_copy}, + {"vec4_max", slang_asm_vec4_max, slang_asm_float_copy}, + {"vec4_seq", slang_asm_vec4_seq, slang_asm_float_copy}, + {"vec4_sne", slang_asm_vec4_sne, slang_asm_float_copy}, + {"vec4_sge", slang_asm_vec4_sge, slang_asm_float_copy}, + {"vec4_sgt", slang_asm_vec4_sgt, slang_asm_float_copy}, + {"vec4_floor", slang_asm_vec4_floor, slang_asm_float_copy}, + {"vec4_frac", slang_asm_vec4_frac, slang_asm_float_copy}, + {"vec4_abs", slang_asm_vec4_abs, slang_asm_float_copy}, + {"vec4_divide", slang_asm_vec4_divide, slang_asm_none}, {"vec4_negate", slang_asm_vec4_negate, slang_asm_none}, - {"vec4_dot", slang_asm_vec4_dot, slang_asm_none}, + {"vec4_dot", slang_asm_vec4_dot, slang_asm_float_copy}, + {"vec3_dot", slang_asm_vec3_dot, slang_asm_float_copy}, + {"vec3_cross", slang_asm_vec3_cross, slang_asm_float_copy}, {NULL, slang_asm_none, slang_asm_none} }; @@ -767,15 +823,14 @@ equality_aggregate(slang_assemble_ctx * A, else { #if defined(USE_X86_ASM) || defined(SLANG_X86) if (arr->type == slang_stor_vec4) { - if (!PLAB2 - (A->file, slang_asm_vec4_equal_int, size + *index, *index)) + if (!PLAB2(A->file, slang_asm_vec4_equal_int, + size + *index, *index)) return GL_FALSE; } else #endif - if (!PLAB2 - (A->file, slang_asm_float_equal_int, size + *index, - *index)) + if (!PLAB2(A->file, slang_asm_float_equal_int, + size + *index, *index)) return GL_FALSE; *index += _slang_sizeof_type(arr->type); @@ -799,19 +854,21 @@ equality(slang_assemble_ctx * A, slang_operation * op, GLboolean equal) /* get type of operation */ if (!slang_assembly_typeinfo_construct(&ti)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!_slang_typeof_operation(A, op, &ti)) goto end1; /* convert it to an aggregate */ if (!slang_storage_aggregate_construct(&agg)) goto end1; - if (!_slang_aggregate_variable - (&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, + A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) goto end; - /* compute the size of the agregate - there are two such aggregates on the stack */ + /* compute the size of the agregate - there are two such aggregates + * on the stack + */ size = _slang_sizeof_aggregate(&agg); /* jump to the actual data-comparison code */ @@ -840,10 +897,12 @@ equality(slang_assemble_ctx * A, slang_operation * op, GLboolean equal) A->file->code[skip_jump].param[0] = A->file->count; - /* compare the data on stack, it will eventually jump either to true or false label */ + /* compare the data on stack, it will eventually jump either to + * true or false label + */ index = 0; - if (!equality_aggregate - (A, &agg, &index, size, equal ? false_label : true_label)) + if (!equality_aggregate(A, &agg, &index, size, + equal ? false_label : true_label)) goto end; if (!PLAB(A->file, slang_asm_jump, equal ? true_label : false_label)) goto end; @@ -869,8 +928,8 @@ handle_subscript(slang_assemble_ctx * A, slang_assembly_typeinfo * tie, /* get type info of the master expression (matrix, vector or an array */ if (!_slang_typeof_operation(A, &op->children[0], tia)) return GL_FALSE; - if (!sizeof_variable - (A, &tia->spec, slang_qual_none, tia->array_len, &asize)) + if (!sizeof_variable(A, &tia->spec, slang_qual_none, + tia->array_len, &asize)) return GL_FALSE; /* get type info of the result (matrix column, vector row or array element) */ @@ -944,8 +1003,8 @@ handle_subscript(slang_assemble_ctx * A, slang_assembly_typeinfo * tie, /* move the selected element to the beginning of the master expression */ for (i = 0; i < esize; i += 4) - if (!PLAB2 - (A->file, slang_asm_float_move, asize - esize + i + 4, i + 4)) + if (!PLAB2(A->file, slang_asm_float_move, + asize - esize + i + 4, i + 4)) return GL_FALSE; if (!PLAB(A->file, slang_asm_local_free, 4)) return GL_FALSE; @@ -965,20 +1024,20 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, { /* get type info of the result (field or swizzle) */ if (!_slang_typeof_operation(A, op, tia)) - return GL_FALSE; + RETURN_NIL(); /* get type info of the master expression being accessed (struct or vector) */ if (!_slang_typeof_operation(A, &op->children[0], tib)) - return GL_FALSE; + RETURN_NIL(); /* if swizzling a vector in-place, the swizzle temporary is needed */ if (ref == slang_ref_forbid && tia->is_swizzled) if (!PLAB2(A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); /* assemble the master expression */ if (!_slang_assemble_operation(A, &op->children[0], ref)) - return GL_FALSE; + RETURN_NIL(); /* assemble the field expression */ if (tia->is_swizzled) { @@ -989,9 +1048,9 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, * the selected component */ if (!PLAB(file, slang_asm_addr_push, tia->swz.swizzle[0] * 4)) - return 0; + RETURN_OUT_OF_MEMORY(); if (!PUSH(file, slang_asm_addr_add)) - return 0; + RETURN_OUT_OF_MEMORY(); } else #endif @@ -1005,9 +1064,9 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, } else { /* swizzle the vector in-place using the swizzle temporary */ - if (!_slang_assemble_constructor_from_swizzle - (A, &tia->swz, &tia->spec, &tib->spec)) - return GL_FALSE; + if (!_slang_assemble_constructor_from_swizzle(A, &tia->swz, + &tia->spec, &tib->spec)) + RETURN_NIL(); } } else { @@ -1023,12 +1082,13 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, field = &tib->spec._struct->fields->variables[i]; if (!slang_storage_aggregate_construct(&agg)) - return GL_FALSE; - if (!_slang_aggregate_variable - (&agg, &field->type.specifier, field->array_len, A->space.funcs, - A->space.structs, A->space.vars, A->mach, A->file, A->atoms)) { + RETURN_NIL(); + if (!_slang_aggregate_variable(&agg, &field->type.specifier, + field->array_len, A->space.funcs, + A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) { slang_storage_aggregate_destruct(&agg); - return GL_FALSE; + RETURN_NIL(); } size = _slang_sizeof_aggregate(&agg); slang_storage_aggregate_destruct(&agg); @@ -1051,9 +1111,9 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, if (shift) { if (!PLAB(A->file, slang_asm_addr_push, field_offset)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!PUSH(A->file, slang_asm_addr_add)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } } else { @@ -1079,12 +1139,11 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, * Do it in reverse order to avoid overwriting itself. */ if (!PLAB(A->file, slang_asm_addr_push, field_offset)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); for (i = field_size; i > 0; i -= 4) - if (!PLAB2 - (A->file, slang_asm_float_move, - struct_size - field_size + i, i)) - return GL_FALSE; + if (!PLAB2(A->file, slang_asm_float_move, + struct_size - field_size + i, i)) + RETURN_OUT_OF_MEMORY(); free_b += 4; } @@ -1095,7 +1154,7 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, if (free_b) { if (!PLAB(A->file, slang_asm_local_free, free_b)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } } } @@ -1118,12 +1177,11 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, GLuint i; for (i = 0; i < op->num_children; i++) { - if (!_slang_assemble_operation - (A, &op->children[i], - slang_ref_forbid /*slang_ref_freelance */ )) - return GL_FALSE; + if (!_slang_assemble_operation(A, &op->children[i], + slang_ref_forbid /*slang_ref_freelance */ )) + RETURN_NIL(); if (!_slang_cleanup_stack(A, &op->children[i])) - return GL_FALSE; + RETURN_NIL(); } } break; @@ -1135,21 +1193,19 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, /* Construct assignment expression placeholder. */ if (!slang_operation_construct(&assign)) - return GL_FALSE; + RETURN_NIL(); assign.type = slang_oper_assign; - assign.children = - (slang_operation *) slang_alloc_malloc(2 * - sizeof(slang_operation)); + assign.children = slang_operation_new(2); if (assign.children == NULL) { slang_operation_destruct(&assign); - return GL_FALSE; + RETURN_NIL(); } for (assign.num_children = 0; assign.num_children < 2; assign.num_children++) - if (!slang_operation_construct - (&assign.children[assign.num_children])) { + if (!slang_operation_construct(&assign.children + [assign.num_children])) { slang_operation_destruct(&assign); - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } result = GL_TRUE; @@ -1177,99 +1233,98 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, } slang_operation_destruct(&assign); if (!result) - return GL_FALSE; + RETURN_NIL(); } break; case slang_oper_asm: { GLuint i; if (!_slang_assemble_operation(A, &op->children[0], slang_ref_force)) - return GL_FALSE; + RETURN_NIL(); for (i = 1; i < op->num_children; i++) - if (!_slang_assemble_operation - (A, &op->children[i], slang_ref_forbid)) - return GL_FALSE; + if (!_slang_assemble_operation(A, &op->children[i], + slang_ref_forbid)) + RETURN_NIL(); if (!call_asm_instruction(A, op->a_id)) - return GL_FALSE; + RETURN_ERROR2("Unknown __asm call", (char*) op->a_id, 0); } break; case slang_oper_break: if (!PLAB(A->file, slang_asm_jump, A->flow.loop_end)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); break; case slang_oper_continue: if (!PLAB(A->file, slang_asm_jump, A->flow.loop_start)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); break; case slang_oper_discard: if (!PUSH(A->file, slang_asm_discard)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!PUSH(A->file, slang_asm_exit)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); break; case slang_oper_return: if (A->local.ret_size != 0) { /* push the result's address */ if (!PLAB2(A->file, slang_asm_local_addr, 0, A->local.ret_size)) - return GL_FALSE; - if (!_slang_assemble_operation - (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); + if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) + RETURN_NIL(); A->swz.num_components = 0; /* assign the operation to the function result (it was reserved on the stack) */ if (!_slang_assemble_assignment(A, op->children)) - return GL_FALSE; + RETURN_NIL(); if (!PLAB(A->file, slang_asm_local_free, 4)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } if (!PLAB(A->file, slang_asm_jump, A->flow.function_end)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); break; case slang_oper_expression: if (ref == slang_ref_force) - return GL_FALSE; + RETURN_NIL(); if (!_slang_assemble_operation(A, &op->children[0], ref)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_if: if (!_slang_assemble_if(A, op)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_while: if (!_slang_assemble_while(A, op)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_do: if (!_slang_assemble_do(A, op)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_for: if (!_slang_assemble_for(A, op)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_void: break; case slang_oper_literal_bool: if (ref == slang_ref_force) - return GL_FALSE; - if (!PLIT(A->file, slang_asm_bool_push, op->literal)) - return GL_FALSE; + RETURN_NIL(); + if (!PLIT(A->file, slang_asm_bool_push, op->literal[0])) + RETURN_OUT_OF_MEMORY(); A->ref = slang_ref_forbid; break; case slang_oper_literal_int: if (ref == slang_ref_force) - return GL_FALSE; - if (!PLIT(A->file, slang_asm_int_push, op->literal)) - return GL_FALSE; + RETURN_NIL(); + if (!PLIT(A->file, slang_asm_int_push, op->literal[0])) + RETURN_OUT_OF_MEMORY(); A->ref = slang_ref_forbid; break; case slang_oper_literal_float: if (ref == slang_ref_force) - return GL_FALSE; - if (!PLIT(A->file, slang_asm_float_push, op->literal)) - return GL_FALSE; + RETURN_NIL(); + if (!PLIT(A->file, slang_asm_float_push, op->literal[0])) + RETURN_OUT_OF_MEMORY(); A->ref = slang_ref_forbid; break; case slang_oper_identifier: @@ -1280,68 +1335,67 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, /* find the variable and calculate its size */ var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); if (var == NULL) - return GL_FALSE; + RETURN_ERROR2("undefined variable", (char *) op->a_id, 0); size = 0; - if (!sizeof_variable - (A, &var->type.specifier, slang_qual_none, var->array_len, - &size)) - return GL_FALSE; + if (!sizeof_variable(A, &var->type.specifier, slang_qual_none, + var->array_len, &size)) + RETURN_OUT_OF_MEMORY(); /* prepare stack for dereferencing */ if (ref == slang_ref_forbid) if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); /* push the variable's address */ if (var->global) { if (!PLAB(A->file, slang_asm_global_addr, var->address)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } else { if (!PLAB2(A->file, slang_asm_local_addr, var->address, size)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } /* perform the dereference */ if (ref == slang_ref_forbid) { if (!PUSH(A->file, slang_asm_addr_copy)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!PLAB(A->file, slang_asm_local_free, 4)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!_slang_dereference(A, op)) - return GL_FALSE; + RETURN_NIL(); } } break; case slang_oper_sequence: if (ref == slang_ref_force) - return GL_FALSE; + RETURN_NIL(); if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid /*slang_ref_freelance */ )) - return GL_FALSE; + RETURN_NIL(); if (!_slang_cleanup_stack(A, &op->children[0])) - return GL_FALSE; + RETURN_NIL(); if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_assign: if (!_slang_assemble_assign(A, op, "=", ref)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_addassign: if (!_slang_assemble_assign(A, op, "+=", ref)) - return GL_FALSE; + RETURN_NIL(); A->ref = ref; break; case slang_oper_subassign: if (!_slang_assemble_assign(A, op, "-=", ref)) - return GL_FALSE; + RETURN_NIL(); A->ref = ref; break; case slang_oper_mulassign: if (!_slang_assemble_assign(A, op, "*=", ref)) - return GL_FALSE; + RETURN_NIL(); A->ref = ref; break; /*case slang_oper_modassign: */ @@ -1352,27 +1406,27 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, /*case slang_oper_andassign: */ case slang_oper_divassign: if (!_slang_assemble_assign(A, op, "/=", ref)) - return GL_FALSE; + RETURN_NIL(); A->ref = ref; break; case slang_oper_select: if (!_slang_assemble_select(A, op)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_logicalor: if (!_slang_assemble_logicalor(A, op)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_logicaland: if (!_slang_assemble_logicaland(A, op)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_logicalxor: if (!_slang_assemble_function_call_name(A, "^^", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; /*case slang_oper_bitor: */ @@ -1380,91 +1434,89 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, /*case slang_oper_bitand: */ case slang_oper_less: if (!_slang_assemble_function_call_name(A, "<", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_greater: if (!_slang_assemble_function_call_name(A, ">", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_lessequal: if (!_slang_assemble_function_call_name(A, "<=", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_greaterequal: if (!_slang_assemble_function_call_name(A, ">=", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; /*case slang_oper_lshift: */ /*case slang_oper_rshift: */ case slang_oper_add: if (!_slang_assemble_function_call_name(A, "+", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_subtract: if (!_slang_assemble_function_call_name(A, "-", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_multiply: if (!_slang_assemble_function_call_name(A, "*", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; /*case slang_oper_modulus: */ case slang_oper_divide: if (!_slang_assemble_function_call_name(A, "/", op->children, 2, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_equal: if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; + RETURN_NIL(); if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; + RETURN_NIL(); if (!equality(A, op->children, GL_TRUE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_notequal: if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; + RETURN_NIL(); if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; + RETURN_NIL(); if (!equality(A, op->children, GL_FALSE)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_preincrement: if (!_slang_assemble_assign(A, op, "++", ref)) - return GL_FALSE; + RETURN_NIL(); A->ref = ref; break; case slang_oper_predecrement: if (!_slang_assemble_assign(A, op, "--", ref)) - return GL_FALSE; + RETURN_NIL(); A->ref = ref; break; case slang_oper_plus: if (!_slang_dereference(A, op)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_minus: - if (!_slang_assemble_function_call_name - (A, "-", op->children, 1, GL_FALSE)) - return GL_FALSE; + if (!_slang_assemble_function_call_name(A, "-", op->children, 1, GL_FALSE)) + RETURN_NIL(); A->ref = slang_ref_forbid; break; /*case slang_oper_complement: */ case slang_oper_not: - if (!_slang_assemble_function_call_name - (A, "!", op->children, 1, GL_FALSE)) - return GL_FALSE; + if (!_slang_assemble_function_call_name(A, "!", op->children, 1, GL_FALSE)) + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_subscript: @@ -1472,15 +1524,15 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, slang_assembly_typeinfo ti_arr, ti_elem; if (!slang_assembly_typeinfo_construct(&ti_arr)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!slang_assembly_typeinfo_construct(&ti_elem)) { slang_assembly_typeinfo_destruct(&ti_arr); - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } if (!handle_subscript(A, &ti_elem, &ti_arr, op, ref)) { slang_assembly_typeinfo_destruct(&ti_arr); slang_assembly_typeinfo_destruct(&ti_elem); - return GL_FALSE; + RETURN_NIL(); } slang_assembly_typeinfo_destruct(&ti_arr); slang_assembly_typeinfo_destruct(&ti_elem); @@ -1488,19 +1540,17 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, break; case slang_oper_call: { - slang_function *fun; - - fun = - _slang_locate_function(A->space.funcs, op->a_id, op->children, - op->num_children, &A->space, A->atoms); + slang_function *fun + = _slang_locate_function(A->space.funcs, op->a_id, op->children, + op->num_children, &A->space, A->atoms); if (fun == NULL) { if (!_slang_assemble_constructor(A, op)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } else { - if (!_slang_assemble_function_call - (A, fun, op->children, op->num_children, GL_FALSE)) - return GL_FALSE; + if (!_slang_assemble_function_call(A, fun, op->children, + op->num_children, GL_FALSE)) + RETURN_NIL(); } A->ref = slang_ref_forbid; } @@ -1510,15 +1560,15 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, slang_assembly_typeinfo ti_after, ti_before; if (!slang_assembly_typeinfo_construct(&ti_after)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!slang_assembly_typeinfo_construct(&ti_before)) { slang_assembly_typeinfo_destruct(&ti_after); - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); } if (!handle_field(A, &ti_after, &ti_before, op, ref)) { slang_assembly_typeinfo_destruct(&ti_after); slang_assembly_typeinfo_destruct(&ti_before); - return GL_FALSE; + RETURN_NIL(); } slang_assembly_typeinfo_destruct(&ti_after); slang_assembly_typeinfo_destruct(&ti_before); @@ -1526,16 +1576,16 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, break; case slang_oper_postincrement: if (!assemble_function_call_name_dummyint(A, "++", op->children)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; case slang_oper_postdecrement: if (!assemble_function_call_name_dummyint(A, "--", op->children)) - return GL_FALSE; + RETURN_NIL(); A->ref = slang_ref_forbid; break; default: - return GL_FALSE; + RETURN_NIL(); } return GL_TRUE; diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index d004e66500..d507fc0161 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -25,6 +25,8 @@ #ifndef SLANG_ASSEMBLE_H #define SLANG_ASSEMBLE_H +#include "imports.h" +#include "mtypes.h" #include "slang_utility.h" #if defined __cplusplus @@ -43,6 +45,7 @@ typedef enum slang_assembly_type_ slang_asm_float_push, slang_asm_float_deref, slang_asm_float_add, /* a = pop(); b = pop(); push(a + b); */ + slang_asm_float_subtract, slang_asm_float_multiply, slang_asm_float_divide, slang_asm_float_negate, /* push(-pop()) */ @@ -51,11 +54,17 @@ typedef enum slang_assembly_type_ slang_asm_float_equal_int, slang_asm_float_to_int, /* push(floatToInt(pop())) */ slang_asm_float_sine, /* push(sin(pop()) */ + slang_asm_float_cosine, slang_asm_float_arcsine, slang_asm_float_arctan, slang_asm_float_power, /* push(pow(pop(), pop())) */ + slang_asm_float_exp, + slang_asm_float_exp2, + slang_asm_float_rsq, + slang_asm_float_rcp, slang_asm_float_log2, - slang_asm_float_floor, + slang_asm_float_min, + slang_asm_float_max, slang_asm_float_ceil, slang_asm_float_noise1, /* push(noise1(pop()) */ slang_asm_float_noise2, /* push(noise2(pop(), pop())) */ @@ -114,7 +123,19 @@ typedef enum slang_assembly_type_ slang_asm_vec4_multiply, slang_asm_vec4_divide, slang_asm_vec4_negate, + slang_asm_vec4_min, + slang_asm_vec4_max, + slang_asm_vec4_seq, + slang_asm_vec4_sne, + slang_asm_vec4_sge, + slang_asm_vec4_sgt, slang_asm_vec4_dot, + slang_asm_vec3_dot, + slang_asm_vec3_cross, + slang_asm_vec4_floor, + slang_asm_vec4_frac, + slang_asm_vec4_abs, + slang_asm_vec4_copy, slang_asm_vec4_deref, slang_asm_vec4_equal_int, @@ -231,6 +252,7 @@ typedef struct slang_assemble_ctx_ slang_assembly_local_info local; slang_ref_type ref; slang_swizzle swz; + struct gl_program *program; } slang_assemble_ctx; extern struct slang_function_ * @@ -243,9 +265,6 @@ _slang_locate_function(const struct slang_function_scope_ *funcs, extern GLboolean _slang_assemble_function(slang_assemble_ctx *, struct slang_function_ *); -extern GLboolean -_slang_assemble_function2(slang_assemble_ctx * , struct slang_function_ *); - extern GLboolean _slang_cleanup_stack(slang_assemble_ctx *, struct slang_operation_ *); diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c index a1038671c4..dbcc4bcf9d 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.c +++ b/src/mesa/shader/slang/slang_assemble_assignment.c @@ -31,6 +31,7 @@ #include "imports.h" #include "slang_assemble.h" #include "slang_storage.h" +#include "slang_error.h" /* * _slang_assemble_assignment() @@ -95,9 +96,9 @@ assign_basic(slang_assemble_ctx * A, slang_storage_type type, GLuint * index, */ dst_addr_loc = size - *index; - if (!slang_assembly_file_push_label2 - (A->file, ty, dst_addr_loc, dst_offset)) - return GL_FALSE; + if (!slang_assembly_file_push_label2(A->file, ty, dst_addr_loc, dst_offset)) + RETURN_NIL(); + *index += _slang_sizeof_type(type); return GL_TRUE; @@ -155,7 +156,7 @@ _slang_assemble_assignment(slang_assemble_ctx * A, const slang_operation * op) GLuint index, size; if (!slang_assembly_typeinfo_construct(&ti)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); if (!_slang_typeof_operation(A, op, &ti)) goto end1; @@ -174,6 +175,8 @@ _slang_assemble_assignment(slang_assemble_ctx * A, const slang_operation * op) slang_storage_aggregate_destruct(&agg); end: slang_assembly_typeinfo_destruct(&ti); + if (!result) + RETURN_NIL(); return result; } diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c index 6cd320d446..a411597130 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.c +++ b/src/mesa/shader/slang/slang_assemble_constructor.c @@ -46,6 +46,10 @@ _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) GLuint i; GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; + /* init to default */ + for (i = 0; i < 4; i++) + swz->swizzle[i] = i; + /* the swizzle can be at most 4-component long */ swz->num_components = slang_string_length(field); if (swz->num_components > 4) @@ -109,6 +113,12 @@ _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) return GL_FALSE; + if (swz->num_components == 1) { + /* smear */ + swz->swizzle[3] = + swz->swizzle[2] = + swz->swizzle[1] = swz->swizzle[0]; + } return GL_TRUE; } @@ -301,6 +311,18 @@ _slang_assemble_constructor(slang_assemble_ctx * A, const slang_operation * op) /* check if there are too few arguments */ if (arg_sums[1] < size) { /* TODO: info log: too few arguments in constructor list */ + /* DEBUG */ + { + if (!slang_storage_aggregate_construct(&agg)) + goto end1; + if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, + A->space.structs, A->space.vars, + A->mach, A->file, A->atoms)) + goto end2; + + /* calculate size of the constructor */ + size = _slang_sizeof_aggregate(&agg); + } goto end; } @@ -316,8 +338,7 @@ _slang_assemble_constructor(slang_assemble_ctx * A, const slang_operation * op) else garbage_size = 0; - if (!constructor_aggregate - (A, &flat, &op->children[i - 1], garbage_size)) + if (!constructor_aggregate(A, &flat, &op->children[i - 1], garbage_size)) goto end; } diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c index 265e417dad..21b31091ea 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.c +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c @@ -31,10 +31,8 @@ #include "imports.h" #include "slang_assemble.h" #include "slang_compile.h" +#include "slang_error.h" -/* - * slang_type_specifier - */ GLvoid slang_type_specifier_ctr(slang_type_specifier * self) @@ -113,7 +111,6 @@ slang_type_specifier_equal(const slang_type_specifier * x, return 1; } -/* slang_assembly_typeinfo */ GLboolean slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) @@ -129,7 +126,6 @@ slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) slang_type_specifier_dtr(&ti->spec); } -/* _slang_typeof_operation() */ /** * Determine the return type of a function. @@ -209,7 +205,7 @@ _slang_typeof_operation_(const slang_operation * op, case slang_oper_preincrement: case slang_oper_predecrement: if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - return 0; + return GL_FALSE; break; case slang_oper_literal_bool: case slang_oper_logicalor: @@ -233,12 +229,11 @@ _slang_typeof_operation_(const slang_operation * op, case slang_oper_identifier: { slang_variable *var; - var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); if (var == NULL) - return GL_FALSE; + RETURN_ERROR2("undefined variable", (char *) op->a_id, 0); if (!slang_type_specifier_copy(&ti->spec, &var->type.specifier)) - return GL_FALSE; + RETURN_OUT_OF_MEMORY(); ti->can_be_referenced = GL_TRUE; ti->array_len = var->array_len; } @@ -246,7 +241,7 @@ _slang_typeof_operation_(const slang_operation * op, case slang_oper_sequence: /* TODO: check [0] and [1] if they match */ if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) - return GL_FALSE; + RETURN_NIL(); ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; @@ -259,7 +254,7 @@ _slang_typeof_operation_(const slang_operation * op, case slang_oper_select: /* TODO: check [1] and [2] if they match */ if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) - return GL_FALSE; + RETURN_NIL(); ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; @@ -271,34 +266,34 @@ _slang_typeof_operation_(const slang_operation * op, case slang_oper_add: if (!typeof_existing_function("+", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_subtract: if (!typeof_existing_function("-", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_multiply: if (!typeof_existing_function("*", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; + RETURN_NIL(); break; case slang_oper_divide: if (!typeof_existing_function("/", op->children, 2, space, &ti->spec, atoms)) - return GL_FALSE; + RETURN_NIL(); break; /*case slang_oper_modulus: */ case slang_oper_plus: if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - return GL_FALSE; + RETURN_NIL(); ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; case slang_oper_minus: - if (!typeof_existing_function - ("-", op->children, 1, space, &ti->spec, atoms)) - return GL_FALSE; + if (!typeof_existing_function("-", op->children, 1, space, + &ti->spec, atoms)) + RETURN_NIL(); break; /*case slang_oper_complement: */ case slang_oper_subscript: @@ -306,23 +301,23 @@ _slang_typeof_operation_(const slang_operation * op, slang_assembly_typeinfo _ti; if (!slang_assembly_typeinfo_construct(&_ti)) - return GL_FALSE; + RETURN_NIL(); if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_NIL(); } ti->can_be_referenced = _ti.can_be_referenced; if (_ti.spec.type == slang_spec_array) { if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_NIL(); } } else { if (!_slang_type_is_vector(_ti.spec.type) && !_slang_type_is_matrix(_ti.spec.type)) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_ERROR("cannot index a non-array type", 0); } ti->spec.type = _slang_type_base(_ti.spec.type); } @@ -335,7 +330,7 @@ _slang_typeof_operation_(const slang_operation * op, if (!_slang_typeof_function(op->a_id, op->children, op->num_children, space, &ti->spec, &exists, atoms)) - return GL_FALSE; + RETURN_NIL(); if (!exists) { slang_struct *s = slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); @@ -344,14 +339,14 @@ _slang_typeof_operation_(const slang_operation * op, ti->spec._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); if (ti->spec._struct == NULL) - return GL_FALSE; + RETURN_NIL(); if (!slang_struct_construct(ti->spec._struct)) { slang_alloc_free(ti->spec._struct); ti->spec._struct = NULL; - return GL_FALSE; + RETURN_NIL(); } if (!slang_struct_copy(ti->spec._struct, s)) - return GL_FALSE; + RETURN_NIL(); } else { const char *name; @@ -360,7 +355,7 @@ _slang_typeof_operation_(const slang_operation * op, name = slang_atom_pool_id(atoms, op->a_id); type = slang_type_specifier_type_from_string(name); if (type == slang_spec_void) - return GL_FALSE; + RETURN_ERROR2("function not found", name, 0); ti->spec.type = type; } } @@ -371,24 +366,23 @@ _slang_typeof_operation_(const slang_operation * op, slang_assembly_typeinfo _ti; if (!slang_assembly_typeinfo_construct(&_ti)) - return GL_FALSE; + RETURN_NIL(); if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_NIL(); } if (_ti.spec.type == slang_spec_struct) { slang_variable *field; - field = - _slang_locate_variable(_ti.spec._struct->fields, op->a_id, - GL_FALSE); + field = _slang_locate_variable(_ti.spec._struct->fields, op->a_id, + GL_FALSE); if (field == NULL) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_NIL(); } if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_NIL(); } ti->can_be_referenced = _ti.can_be_referenced; } @@ -398,15 +392,17 @@ _slang_typeof_operation_(const slang_operation * op, slang_type_specifier_type base; /* determine the swizzle of the field expression */ +#if 000 if (!_slang_type_is_vector(_ti.spec.type)) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_ERROR("Can't swizzle scalar expression", 0); } +#endif rows = _slang_type_dim(_ti.spec.type); swizzle = slang_atom_pool_id(atoms, op->a_id); if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { slang_assembly_typeinfo_destruct(&_ti); - return GL_FALSE; + RETURN_ERROR("Bad swizzle", 0); } ti->is_swizzled = GL_TRUE; ti->can_be_referenced = _ti.can_be_referenced @@ -478,12 +474,12 @@ _slang_typeof_operation_(const slang_operation * op, case slang_oper_postincrement: case slang_oper_postdecrement: if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - return GL_FALSE; + RETURN_NIL(); ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; default: - return GL_FALSE; + RETURN_NIL(); } return GL_TRUE; diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c new file mode 100644 index 0000000000..e428209ec4 --- /dev/null +++ b/src/mesa/shader/slang/slang_codegen.c @@ -0,0 +1,1272 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_codegen.c + * Mesa GLSL code generator. Convert AST to IR tree. + * \author Brian Paul + */ + +#include "imports.h" +#include "macros.h" +#include "slang_assemble.h" +#include "slang_codegen.h" +#include "slang_compile.h" +#include "slang_storage.h" +#include "slang_error.h" +#include "slang_simplify.h" +#include "slang_emit.h" +#include "slang_ir.h" +#include "mtypes.h" +#include "program.h" +#include "slang_print.h" + + +static slang_function *CurFunction = NULL; + + +static slang_ir_node * +slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper); + + + +/** + * Allocate storage for given variable, attach it to 'ir'. + */ +static GLboolean +slang_alloc_var_storage(slang_variable *variable, slang_ir_node *ir) +{ + slang_ir_storage *store; + + assert(variable); + + /*assert(!variable->aux);*/ + + if (variable->aux) { + store = (slang_ir_storage *) variable->aux; + ir->Store = store; + if (store) + store->Size = -12; + } + else { + /* alloc storage */ + store = (slang_ir_storage *) _mesa_calloc(sizeof(*store)); + store->File = PROGRAM_TEMPORARY; + store->Index = -1; + store->Size = -10; + variable->aux = store; + ir->Store = store; + } + return GL_TRUE; +} + + +static slang_ir_node * +new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) +{ + slang_ir_node *n = (slang_ir_node *) calloc(1, sizeof(slang_ir_node)); + if (n) { + n->Opcode = op; + n->Children[0] = left; + n->Children[1] = right; + n->Swizzle = SWIZZLE_NOOP; + n->Writemask = WRITEMASK_XYZW; + } + return n; +} + +static slang_ir_node * +new_seq(slang_ir_node *left, slang_ir_node *right) +{ + assert(left); + assert(right); + return new_node(IR_SEQ, left, right); +} + +static slang_ir_node * +new_label(const char *name) +{ + slang_ir_node *n = new_node(IR_LABEL, NULL, NULL); + n->Target = _mesa_strdup(name); + return n; +} + +static slang_ir_node * +new_float_literal(float x, float y, float z, float w) +{ + slang_ir_node *n = new_node(IR_FLOAT, NULL, NULL); + n->Value[0] = x; + n->Value[1] = y; + n->Value[2] = z; + n->Value[3] = w; + return n; +} + +static slang_ir_node * +new_cjump(slang_ir_node *cond, const char *target) +{ + slang_ir_node *n = new_node(IR_CJUMP, cond, NULL); + n->Target = _mesa_strdup(target); + return n; +} + +static slang_ir_node * +new_jump(const char *target) +{ + slang_ir_node *n = new_node(IR_JUMP, NULL, NULL); + if (n) { + n->Target = _mesa_strdup(target); + } + return n; +} + + +/** + * New IR_VAR_DECL node - allocate storage for a new variable. + */ +static slang_ir_node * +new_var_decl(slang_assemble_ctx *A, slang_variable *v) +{ + slang_ir_node *n = new_node(IR_VAR_DECL, NULL, NULL); + if (n) { + n->Var = v; + v->declared = GL_TRUE; + } + return n; +} + + +/** + * New IR_VAR node - a reference to a previously declared variable. + */ +static slang_ir_node * +new_var(slang_assemble_ctx *A, slang_operation *oper, + slang_atom name, GLuint swizzle) +{ + slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE); + slang_ir_node *n = new_node(IR_VAR, NULL, NULL); + if (!v) { + printf("VAR NOT FOUND %s\n", (char *) name); + assert(v); + } + /** + assert(v->declared); + **/ + assert(!oper->var || oper->var == v); + v->used = GL_TRUE; + oper->var = v; + n->Swizzle = swizzle; + n->Var = v; + slang_resolve_storage(NULL, n, A->program); + return n; +} + + +static GLboolean +slang_is_writemask(const char *field, GLuint *mask) +{ + const GLuint n = 4; + GLuint i, bit, c = 0; + + for (i = 0; i < n && field[i]; i++) { + switch (field[i]) { + case 'x': + case 'r': + bit = WRITEMASK_X; + break; + case 'y': + case 'g': + bit = WRITEMASK_Y; + break; + case 'z': + case 'b': + bit = WRITEMASK_Z; + break; + case 'w': + case 'a': + bit = WRITEMASK_W; + break; + default: + return GL_FALSE; + } + if (c & bit) + return GL_FALSE; + c |= bit; + } + *mask = c; + return GL_TRUE; +} + + +static slang_ir_node * +slang_assemble_return(slang_assemble_ctx * A, slang_operation *oper) +{ + if (oper->num_children == 0) { + /* Convert to: + * goto __endOfFunction; + */ + oper->type = slang_oper_goto; + oper->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + } + else { + /* + * Convert from: + * return expr; + * To: + * __retVal = expr; + * goto __endOfFunction; + */ + slang_operation *block, *assign, *jump; + slang_atom a_retVal; + + a_retVal = slang_atom_pool_atom(A->atoms, "__retVal"); + assert(a_retVal); + +#if 1 + { + slang_variable *v + = _slang_locate_variable(oper->locals, a_retVal, GL_TRUE); + assert(v); + } +#endif + + block = slang_operation_new(1); + block->type = slang_oper_block_no_new_scope; + block->num_children = 2; + block->children = slang_operation_new(2); + assert(block->locals); + block->locals->outer_scope = oper->locals->outer_scope; + + /* child[0]: __retVal = expr; */ + assign = &block->children[0]; + assign->type = slang_oper_assign; + assign->locals->outer_scope = block->locals; + assign->num_children = 2; + assign->children = slang_operation_new(2); + /* lhs */ + assign->children[0].type = slang_oper_identifier; + assign->children[0].a_id = a_retVal; + assign->children[0].locals->outer_scope = assign->locals; + /* rhs */ +#if 0 + assign->children[1] = oper->children[0]; /* XXX copy */ +#else + slang_operation_copy(&assign->children[1], &oper->children[0]); +#endif + + + /* child[1]: goto __endOfFunction */ + jump = &block->children[1]; + jump->type = slang_oper_goto; + assert(CurFunction->end_label); + jump->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + +#if 00 + printf("NEW RETURN:\n"); + slang_print_tree(block, 0); +#endif + + slang_operation_copy(oper, block); + /* XXX destruct block */ + } + + /* assemble the new code */ + return slang_assemble_operation(A, oper); +} + + + +/** + * Check if the given function is really just a wrapper for an + * basic assembly instruction. + */ +static GLboolean +slang_is_asm_function(const slang_function *fun) +{ + if (fun->body->type == slang_oper_block_no_new_scope && + fun->body->num_children == 1 && + fun->body->children[0].type == slang_oper_asm) { + return GL_TRUE; + } + return GL_FALSE; +} + + +/** + * Produce inline code for a call to an assembly instruction. + */ +static slang_operation * +slang_inline_asm_function(slang_assemble_ctx *A, + slang_function *fun, slang_operation *oper) +{ + const int numArgs = oper->num_children; + const slang_operation *args = oper->children; + GLuint i; + slang_operation *inlined = slang_operation_new(1); + + /*assert(oper->type == slang_oper_call); or vec4_add, etc */ + + inlined->type = fun->body->children[0].type; + inlined->a_id = fun->body->children[0].a_id; + inlined->num_children = numArgs; + inlined->children = slang_operation_new(numArgs); +#if 0 + inlined->locals = slang_variable_scope_copy(oper->locals); +#else + assert(inlined->locals); + inlined->locals->outer_scope = oper->locals->outer_scope; +#endif + + for (i = 0; i < numArgs; i++) { + slang_operation_copy(inlined->children + i, args + i); + } + + return inlined; +} + + +static void +slang_resolve_variable(slang_operation *oper) +{ + if (oper->type != slang_oper_identifier) + return; + if (!oper->var) { + oper->var = _slang_locate_variable(oper->locals, + (const slang_atom) oper->a_id, + GL_TRUE); + if (oper->var) + oper->var->used = GL_TRUE; + } +} + + +/** + * Replace particular variables (slang_oper_identifier) with new expressions. + */ +static void +slang_substitute(slang_assemble_ctx *A, slang_operation *oper, + GLuint substCount, slang_variable **substOld, + slang_operation **substNew, GLboolean isLHS) +{ + switch (oper->type) { + case slang_oper_variable_decl: + { + slang_variable *v = _slang_locate_variable(oper->locals, + oper->a_id, GL_TRUE); + assert(v); + if (v->initializer && oper->num_children == 0) { + /* set child of oper to copy of initializer */ + oper->num_children = 1; + oper->children = slang_operation_new(1); + slang_operation_copy(&oper->children[0], v->initializer); + } + if (oper->num_children == 1) { + /* the initializer */ + slang_substitute(A, &oper->children[0], substCount, substOld, substNew, GL_FALSE); + } + } + break; + case slang_oper_identifier: + assert(oper->num_children == 0); + if (1/**!isLHS XXX FIX */) { + slang_atom id = oper->a_id; + slang_variable *v; + GLuint i; + v = _slang_locate_variable(oper->locals, id, GL_TRUE); + if (!v) { + printf("var %s not found!\n", (char *) oper->a_id); + break; + } + + /* look for a substitution */ + for (i = 0; i < substCount; i++) { + if (v == substOld[i]) { + /* OK, replace this slang_oper_identifier with a new expr */ + assert(substNew[i]->type == slang_oper_identifier || + substNew[i]->type == slang_oper_literal_float); +#if 1 /* DEBUG only */ + if (substNew[i]->type == slang_oper_identifier) { + assert(substNew[i]->var); + assert(substNew[i]->var->a_name); + printf("Substitute %s with %s in id node %p\n", + (char*)v->a_name, (char*) substNew[i]->var->a_name, + (void*) oper); + } + else + printf("Substitute %s with %f in id node %p\n", + (char*)v->a_name, substNew[i]->literal[0], + (void*) oper); +#endif + slang_operation_copy(oper, substNew[i]); + break; + } + } + } + break; + case slang_oper_return: + /* do return replacement here too */ + slang_assemble_return(A, oper); + slang_substitute(A, oper, substCount, substOld, substNew, GL_FALSE); + break; + case slang_oper_assign: + case slang_oper_subscript: + /* special case: + * child[0] can't have substitutions but child[1] can. + */ + slang_substitute(A, &oper->children[0], substCount, substOld, substNew, GL_TRUE); + slang_substitute(A, &oper->children[1], substCount, substOld, substNew, GL_FALSE); + break; + case slang_oper_field: + /* XXX NEW - test */ + slang_substitute(A, &oper->children[0], substCount, substOld, substNew, GL_TRUE); + break; + default: + { + GLuint i; + for (i = 0; i < oper->num_children; i++) + slang_substitute(A, &oper->children[i], substCount, substOld, substNew, GL_FALSE); + } + } +} + + + +/** + * Inline the given function call operation. + * Return a new slang_operation that corresponds to the inlined code. + */ +static slang_operation * +slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, + slang_operation *oper, slang_operation *returnOper) +{ + typedef enum { + SUBST = 1, + COPY_IN, + COPY_OUT + } ParamMode; + ParamMode *paramMode; + const GLboolean haveRetValue = _slang_function_has_return_value(fun); + const GLuint numArgs = oper->num_children; + const GLuint totalArgs = numArgs + haveRetValue; + slang_operation *args = oper->children; + slang_operation *inlined, *top; + slang_variable **substOld; + slang_operation **substNew; + GLuint substCount, numCopyIn, i; + + /*assert(oper->type == slang_oper_call); (or (matrix) multiply, etc) */ + assert(fun->param_count == totalArgs); + + /* allocate temporary arrays */ + paramMode = (ParamMode *) + _mesa_calloc(totalArgs * sizeof(ParamMode)); + substOld = (slang_variable **) + _mesa_calloc(totalArgs * sizeof(slang_variable *)); + substNew = (slang_operation **) + _mesa_calloc(totalArgs * sizeof(slang_operation *)); + + printf("\nInline call to %s (total vars=%d nparams=%d)\n", + (char *) fun->header.a_name, + fun->parameters->num_variables, numArgs); + + + if (haveRetValue && !returnOper) { + /* Create comma sequence for inlined code, the left child will be the + * function body and the right child will be a variable (__retVal) + * that will get the return value. + */ + slang_operation *commaSeq; + slang_operation *declOper = NULL; + slang_variable *resultVar; + + commaSeq = slang_operation_new(1); + commaSeq->type = slang_oper_sequence; + assert(commaSeq->locals); + commaSeq->locals->outer_scope = oper->locals->outer_scope; + commaSeq->num_children = 3; + commaSeq->children = slang_operation_new(3); + /* allocate the return var */ + resultVar = slang_variable_scope_grow(commaSeq->locals); + /* + printf("ALLOC __retVal from scope %p\n", (void*) commaSeq->locals); + */ + printf("Alloc __resultTemp in scope %p for retval of calling %s\n", + (void*)commaSeq->locals, (char *) fun->header.a_name); + + resultVar->a_name = slang_atom_pool_atom(A->atoms, "__resultTmp"); + resultVar->type = fun->header.type; /* XXX copy? */ + /*resultVar->type.qualifier = slang_qual_out;*/ + + /* child[0] = __resultTmp declaration */ + declOper = &commaSeq->children[0]; + declOper->type = slang_oper_variable_decl; + declOper->a_id = resultVar->a_name; + declOper->locals->outer_scope = commaSeq->locals; /*** ??? **/ + + /* child[1] = function body */ + inlined = &commaSeq->children[1]; + /* XXXX this may be inappropriate!!!!: */ + inlined->locals->outer_scope = commaSeq->locals; + + /* child[2] = __resultTmp reference */ + returnOper = &commaSeq->children[2]; + returnOper->type = slang_oper_identifier; + returnOper->a_id = resultVar->a_name; + returnOper->locals->outer_scope = commaSeq->locals; + declOper->locals->outer_scope = commaSeq->locals; + + top = commaSeq; + } + else { + top = inlined = slang_operation_new(1); + /* XXXX this may be inappropriate!!!! */ + inlined->locals->outer_scope = oper->locals->outer_scope; + } + + + assert(inlined->locals); + + /* Examine the parameters, look for inout/out params, look for possible + * substitutions, etc: + * param type behaviour + * in copy actual to local + * const in substitute param with actual + * out copy out + */ + substCount = 0; + for (i = 0; i < totalArgs; i++) { + slang_variable *p = &fun->parameters->variables[i]; + printf("Param %d: %s %s \n", i, + slang_type_qual_string(p->type.qualifier), + (char *) p->a_name); + if (p->type.qualifier == slang_qual_inout || + p->type.qualifier == slang_qual_out) { + /* an output param */ + slang_operation *arg; + if (i < numArgs) + arg = &args[i]; + else + arg = returnOper; + paramMode[i] = SUBST; + assert(arg->type == slang_oper_identifier + /*||arg->type == slang_oper_variable_decl*/); + slang_resolve_variable(arg); + /* replace parameter 'p' with argument 'arg' */ + substOld[substCount] = p; + substNew[substCount] = arg; /* will get copied */ + substCount++; + } + else if (p->type.qualifier == slang_qual_const) { + /* a constant input param */ + if (args[i].type == slang_oper_identifier || + args[i].type == slang_oper_literal_float) { + /* replace all occurances of this parameter variable with the + * actual argument variable or a literal. + */ + paramMode[i] = SUBST; + slang_resolve_variable(&args[i]); + substOld[substCount] = p; + substNew[substCount] = &args[i]; /* will get copied */ + substCount++; + } + else { + paramMode[i] = COPY_IN; + } + } + else { + paramMode[i] = COPY_IN; + } + assert(paramMode[i]); + } + +#if 00 + printf("ABOUT to inline body %p with checksum %d\n", + (char *) fun->body, slang_checksum_tree(fun->body)); +#endif + + /* actual code inlining: */ + slang_operation_copy(inlined, fun->body); + +#if 000 + printf("======================= orig body code ======================\n"); + printf("=== params scope = %p\n", (void*) fun->parameters); + slang_print_tree(fun->body, 8); + printf("======================= copied code =========================\n"); + slang_print_tree(inlined, 8); +#endif + + /* do parameter substitution in inlined code: */ + slang_substitute(A, inlined, substCount, substOld, substNew, GL_FALSE); + +#if 000 + printf("======================= subst code ==========================\n"); + slang_print_tree(inlined, 8); + printf("=============================================================\n"); +#endif + + /* New prolog statements: (inserted before the inlined code) + * Copy the 'in' arguments. + */ + numCopyIn = 0; + for (i = 0; i < numArgs; i++) { + if (paramMode[i] == COPY_IN) { + slang_variable *p = &fun->parameters->variables[i]; + /* declare parameter 'p' */ + slang_operation *decl = slang_operation_insert(&inlined->num_children, + &inlined->children, + numCopyIn); + printf("COPY_IN %s from expr\n", (char*)p->a_name); + decl->type = slang_oper_variable_decl; + assert(decl->locals); + decl->locals = fun->parameters; + decl->a_id = p->a_name; + decl->num_children = 1; + decl->children = slang_operation_new(1); + + /* child[0] is the var's initializer */ + slang_operation_copy(&decl->children[0], args + i); + + numCopyIn++; + } + } + + /* New epilog statements: + * 1. Create end of function label to jump to from return statements. + * 2. Copy the 'out' parameter vars + */ + { + slang_operation *lab = slang_operation_insert(&inlined->num_children, + &inlined->children, + inlined->num_children); + lab->type = slang_oper_label; + lab->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + } + + for (i = 0; i < totalArgs; i++) { + if (paramMode[i] == COPY_OUT) { + const slang_variable *p = &fun->parameters->variables[i]; + /* actualCallVar = outParam */ + /*if (i > 0 || !haveRetValue)*/ + slang_operation *ass = slang_operation_insert(&inlined->num_children, + &inlined->children, + inlined->num_children); + ass->type = slang_oper_assign; + ass->num_children = 2; + ass->locals = _slang_variable_scope_new(inlined->locals); + assert(ass->locals); + ass->children = slang_operation_new(2); + ass->children[0] = args[i]; /*XXX copy */ + ass->children[1].type = slang_oper_identifier; + ass->children[1].a_id = p->a_name; + ass->children[1].locals = _slang_variable_scope_new(ass->locals); + } + } + + _mesa_free(paramMode); + _mesa_free(substOld); + _mesa_free(substNew); + + printf("Done Inline call to %s (total vars=%d nparams=%d)\n", + (char *) fun->header.a_name, + fun->parameters->num_variables, numArgs); + + return top; +} + + +static slang_ir_node * +slang_assemble_function_call(slang_assemble_ctx *A, slang_function *fun, + slang_operation *oper, slang_operation *dest) +{ + slang_ir_node *n; + slang_operation *inlined; + slang_function *prevFunc; + + prevFunc = CurFunction; + CurFunction = fun; + + if (!CurFunction->end_label) { + char name[200]; + sprintf(name, "__endOfFunc_%s_", (char *) CurFunction->header.a_name); + CurFunction->end_label = slang_atom_pool_gen(A->atoms, name); + } + + if (slang_is_asm_function(fun) && !dest) { + /* assemble assembly function - tree style */ + inlined = slang_inline_asm_function(A, fun, oper); + } + else { + /* non-assembly function */ + inlined = slang_inline_function_call(A, fun, oper, dest); + } + + /* Replace the function call with the inlined block */ +#if 0 + slang_operation_construct(oper); + slang_operation_copy(oper, inlined); +#else + *oper = *inlined; +#endif + + +#if 1 + assert(inlined->locals); + printf("*** Inlined code for call to %s:\n", + (char*) fun->header.a_name); + + slang_print_tree(oper, 10); + printf("\n"); +#endif + + /* assemble what we just made XXX here??? */ + n = slang_assemble_operation(A, oper); + + CurFunction = prevFunc; + + return n; +} + + +/** + * Map "_asm foo" to IR_FOO, etc. + */ +typedef struct +{ + const char *Name; + slang_ir_opcode Opcode; + GLuint HaveRetValue, NumParams; +} slang_asm_info; + + +static slang_asm_info AsmInfo[] = { + /* vec4 binary op */ + { "vec4_add", IR_ADD, 1, 2 }, + { "vec4_multiply", IR_MUL, 1, 2 }, + { "vec4_dot", IR_DOT4, 1, 2 }, + { "vec3_dot", IR_DOT3, 1, 2 }, + { "vec3_cross", IR_CROSS, 1, 2 }, + { "vec4_min", IR_MIN, 1, 2 }, + { "vec4_max", IR_MAX, 1, 2 }, + { "vec4_seq", IR_SEQ, 1, 2 }, + { "vec4_sge", IR_SGE, 1, 2 }, + { "vec4_sgt", IR_SGT, 1, 2 }, + /* vec4 unary */ + { "vec4_floor", IR_FLOOR, 1, 1 }, + { "vec4_frac", IR_FRAC, 1, 1 }, + { "vec4_abs", IR_ABS, 1, 1 }, + /* float binary op */ + { "float_add", IR_ADD, 1, 2 }, + { "float_subtract", IR_SUB, 1, 2 }, + { "float_multiply", IR_MUL, 1, 2 }, + { "float_divide", IR_DIV, 1, 2 }, + { "float_power", IR_POW, 1, 2 }, + /* unary op */ + { "int_to_float", IR_I_TO_F, 1, 1 }, + { "float_exp", IR_EXP, 1, 1 }, + { "float_exp2", IR_EXP2, 1, 1 }, + { "float_log2", IR_LOG2, 1, 1 }, + { "float_rsq", IR_RSQ, 1, 1 }, + { "float_rcp", IR_RCP, 1, 1 }, + { "float_sine", IR_SIN, 1, 1 }, + { "float_cosine", IR_COS, 1, 1 }, + { NULL, IR_NOP, 0, 0 } +}; + + +static slang_asm_info * +slang_find_asm_info(const char *name) +{ + GLuint i; + for (i = 0; AsmInfo[i].Name; i++) { + if (_mesa_strcmp(AsmInfo[i].Name, name) == 0) { + return AsmInfo + i; + } + } + return NULL; +} + + +static GLuint +make_writemask(char *field) +{ + GLuint mask = 0x0; + while (*field) { + switch (*field) { + case 'x': + mask |= WRITEMASK_X; + break; + case 'y': + mask |= WRITEMASK_Y; + break; + case 'z': + mask |= WRITEMASK_Z; + break; + case 'w': + mask |= WRITEMASK_W; + break; + default: + abort(); + } + field++; + } + if (mask == 0x0) + return WRITEMASK_XYZW; + else + return mask; +} + + +/** + * Generate IR code for an instruction/operation such as: + * __asm vec4_dot __retVal.x, v1, v2; + */ +static slang_ir_node * +slang_assemble_asm(slang_assemble_ctx *A, slang_operation *oper, + slang_operation *dest) +{ + const slang_asm_info *info; + slang_ir_node *kids[2], *n; + GLuint j, firstOperand; + + assert(oper->type == slang_oper_asm); + + info = slang_find_asm_info((char *) oper->a_id); + assert(info); + assert(info->NumParams <= 2); + + if (info->NumParams == oper->num_children) { + /* storage for result not specified */ + firstOperand = 0; + } + else { + /* storage for result (child[0]) is specified */ + firstOperand = 1; + } + + /* assemble child(ren) */ + kids[0] = kids[1] = NULL; + for (j = 0; j < info->NumParams; j++) { + kids[j] = slang_assemble_operation(A, &oper->children[firstOperand + j]); + } + + n = new_node(info->Opcode, kids[0], kids[1]); + + if (firstOperand) { + /* Setup n->Store to be a particular location. Otherwise, storage + * for the result (a temporary) will be allocated later. + */ + GLuint writemask = WRITEMASK_XYZW; + slang_operation *dest_oper; + slang_ir_node *n0; + + dest_oper = &oper->children[0]; + if (dest_oper->type == slang_oper_field) { + /* writemask */ + writemask = make_writemask((char*) dest_oper->a_id); + dest_oper = &dest_oper->children[0]; + } + + assert(dest_oper->type == slang_oper_identifier); + n0 = slang_assemble_operation(A, dest_oper); + assert(n0->Var); + assert(n0->Store); + free(n0); + + n->Store = n0->Store; + n->Writemask = writemask; + } + + return n; +} + + + + + +/** + * Assemble a function call, given a particular function name. + * \param name the function's name (operators like '*' are possible). + */ +static slang_ir_node * +slang_assemble_function_call_name(slang_assemble_ctx *A, const char *name, + slang_operation *oper, slang_operation *dest) +{ + slang_operation *params = oper->children; + const GLuint param_count = oper->num_children; + slang_atom atom; + slang_function *fun; + + atom = slang_atom_pool_atom(A->atoms, name); + if (atom == SLANG_ATOM_NULL) + return NULL; + + fun = _slang_locate_function(A->space.funcs, atom, params, param_count, + &A->space, A->atoms); + if (!fun) { + RETURN_ERROR2("Undefined function", name, 0); + } + + return slang_assemble_function_call(A, fun, oper, dest); +} + + +static slang_ir_node * +slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) +{ + switch (oper->type) { + case slang_oper_block_no_new_scope: + case slang_oper_block_new_scope: + /* list of operations */ + assert(oper->num_children > 0); + { + slang_ir_node *n, *first = NULL; + GLuint i; + for (i = 0; i < oper->num_children; i++) { + n = slang_assemble_operation(A, &oper->children[i]); + first = first ? new_seq(first, n) : n; + } + return first; + } + break; + case slang_oper_expression: + return slang_assemble_operation(A, &oper->children[0]); + break; + case slang_oper_while: + { + slang_ir_node *nStartLabel = new_label("while-start"); + slang_ir_node *nCond = slang_assemble_operation(A, &oper->children[0]); + slang_ir_node *nNotCond = new_node(IR_NOT, nCond, NULL); + slang_ir_node *nBody = slang_assemble_operation(A, &oper->children[1]); + slang_ir_node *nEndLabel = new_label("while-end"); + slang_ir_node *nCJump = new_cjump(nNotCond, "while-end"); + slang_ir_node *nJump = new_jump("while-start"); + + return new_seq(nStartLabel, + new_seq(nCJump, + new_seq(nBody, + new_seq(nJump, + nEndLabel) + ) + ) + ); + } + break; + case slang_oper_less: + return new_node(IR_LESS, + slang_assemble_operation(A, &oper->children[0]), + slang_assemble_operation(A, &oper->children[1])); + case slang_oper_add: + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = slang_assemble_function_call_name(A, "+", oper, NULL); + return n; + } + case slang_oper_subtract: + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = slang_assemble_function_call_name(A, "-", oper, NULL); + return n; + } + case slang_oper_multiply: + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = slang_assemble_function_call_name(A, "*", oper, NULL); + return n; + } + case slang_oper_divide: + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = slang_assemble_function_call_name(A, "/", oper, NULL); + return n; + } + + case slang_oper_variable_decl: + { + slang_ir_node *n; + slang_ir_node *varDecl; + slang_variable *v; + + assert(oper->num_children == 0 || oper->num_children == 1); + + v = _slang_locate_variable(oper->locals, + oper->a_id, GL_TRUE); + assert(v); + varDecl = new_var_decl(A, v); + slang_alloc_var_storage(v, varDecl); + + if (oper->num_children > 0) { + /* child is initializer */ + slang_ir_node *var, *init, *rhs; + assert(oper->num_children == 1); + var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); + /* XXX make copy of this initializer? */ + printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); + rhs = slang_assemble_operation(A, &oper->children[0]); + init = new_node(IR_MOVE, var, rhs); + n = new_seq(varDecl, init); + } + else if (v->initializer) { + slang_ir_node *var, *init, *rhs; + var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); + /* XXX make copy of this initializer? */ + printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); + rhs = slang_assemble_operation(A, v->initializer); + init = new_node(IR_MOVE, var, rhs); + n = new_seq(varDecl, init); + } + else { + n = varDecl; + } + return n; + } + break; + case slang_oper_assign: + /* assignment */ + /* XXX look for special case of: x = f(a, b) + * and replace with f(a, b, x) (where x == hidden __retVal out param) + */ + if (oper->children[0].type == slang_oper_identifier && + oper->children[1].type == slang_oper_call) { + /* special case */ + slang_ir_node *n; + printf(">>>>>>>>>>>>>> Assign function call\n"); + n = slang_assemble_function_call_name(A, + (const char *) oper->children[1].a_id, + &oper->children[1], &oper->children[0]); + return n; + } + else + { + slang_operation *lhs = &oper->children[0]; + slang_ir_node *n, *c0, *c1; + GLuint mask = WRITEMASK_XYZW; + if (lhs->type == slang_oper_field) { + /* writemask */ + if (!slang_is_writemask((char *) lhs->a_id, &mask)) + mask = WRITEMASK_XYZW; + lhs = &lhs->children[0]; + } + c0 = slang_assemble_operation(A, lhs); + c1 = slang_assemble_operation(A, &oper->children[1]); + + n = new_node(IR_MOVE, c0, c1); + n->Writemask = mask; + return n; + } + break; + case slang_oper_asm: + return slang_assemble_asm(A, oper, NULL); + case slang_oper_call: + return slang_assemble_function_call_name(A, (const char *) oper->a_id, + oper, NULL); + break; + case slang_oper_return: + return slang_assemble_return(A, oper); + case slang_oper_goto: + return new_jump((char*) oper->a_id); + case slang_oper_label: + return new_label((char*) oper->a_id); + case slang_oper_identifier: + { + /* If there's a variable associated with this oper (from inlining) + * use it. Otherwise, use the oper's var id. + */ + slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; + slang_ir_node *n = new_var(A, oper, aVar, SWIZZLE_NOOP); + assert(oper->var); + return n; + } + break; + case slang_oper_field: + { + slang_assembly_typeinfo ti; + slang_assembly_typeinfo_construct(&ti); + _slang_typeof_operation(A, &oper->children[0], &ti); + if (_slang_type_is_vector(ti.spec.type)) { + /* the field should be a swizzle */ + const GLuint rows = _slang_type_dim(ti.spec.type); + slang_swizzle swz; + slang_ir_node *n; + if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { + RETURN_ERROR("Bad swizzle", 0); + } + n = slang_assemble_operation(A, &oper->children[0]); + n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], + swz.swizzle[1], + swz.swizzle[2], + swz.swizzle[3]); + return n; + } + else if (ti.spec.type == slang_spec_float) { + const GLuint rows = 1; + slang_swizzle swz; + slang_ir_node *n; + if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { + RETURN_ERROR("Bad swizzle", 0); + } + n = slang_assemble_operation(A, &oper->children[0]); + n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], + swz.swizzle[1], + swz.swizzle[2], + swz.swizzle[3]); + return n; + } + else { + /* the field is a structure member */ + abort(); + } + } + break; + case slang_oper_subscript: + /* array dereference */ + if (oper->children[1].type == slang_oper_literal_int) { + /* compile-time constant index - OK */ + slang_assembly_typeinfo ti; + slang_ir_node *base; + slang_ir_storage *store2; + GLint index; + slang_assembly_typeinfo_construct(&ti); + _slang_typeof_operation(A, &oper->children[0], &ti); + + base = slang_assemble_operation(A, &oper->children[0]); + assert(base->Opcode == IR_VAR); + + index = (GLint) oper->children[1].literal[0]; + /* + printf("element[%d]\n", index); + */ +#if 1 + store2 = (slang_ir_storage *) _mesa_calloc(sizeof(*store2)); + *store2 = *base->Store; + base->Store = store2; + base->Store->Size = -15; +#endif + assert(base->Store); + base->Store->Index += index; + base->Store->Size = 1; + return base; + } + else { + /* run-time index - TBD */ + abort(); + } + return NULL; + case slang_oper_literal_float: + return new_float_literal(oper->literal[0], oper->literal[1], + oper->literal[2], oper->literal[3]); + case slang_oper_literal_int: + return new_float_literal(oper->literal[0], 0, 0, 0); + case slang_oper_literal_bool: + return new_float_literal(oper->literal[0], 0, 0, 0); + case slang_oper_postincrement: + /* XXX not 100% about this */ + { + slang_ir_node *var = slang_assemble_operation(A, &oper->children[0]); + slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); + slang_ir_node *sum = new_node(IR_ADD, var, one); + slang_ir_node *assign = new_node(IR_MOVE, var, sum); + return assign; + } + break; + case slang_oper_sequence: + { + slang_ir_node *top = NULL; + GLuint i; + for (i = 0; i < oper->num_children; i++) { + slang_ir_node *n = slang_assemble_operation(A, &oper->children[i]); + top = top ? new_seq(top, n) : n; + } + return top; + } + break; + case slang_oper_none: + return NULL; + default: + printf("Unhandled node type %d\n", oper->type); + abort(); + return new_node(IR_NOP, NULL, NULL); + } + abort(); + return NULL; +} + + +/** + * Produce an IR tree from a function AST. + * Then call the code emitter to convert the IR tree into a gl_program. + */ +struct slang_ir_node_ * +_slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) +{ + slang_ir_node *n, *endLabel; + + if (_mesa_strcmp((char *) fun->header.a_name, "main") != 0 && + _mesa_strcmp((char *) fun->header.a_name, "foo") != 0 && + _mesa_strcmp((char *) fun->header.a_name, "bar") != 0) + return 0; + + printf("\n*********** Assemble function2(%s)\n", (char*)fun->header.a_name); + + slang_print_function(fun, 1); + + A->program->Parameters = _mesa_new_parameter_list(); + A->program->Varying = _mesa_new_parameter_list(); + + /*printf("** Begin Simplify\n");*/ + slang_simplify(fun->body, &A->space, A->atoms); + /*printf("** End Simplify\n");*/ + + CurFunction = fun; + + n = slang_assemble_operation(A, fun->body); + + if (!CurFunction->end_label) + CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunction_Main"); + + endLabel = new_label(fun->end_label); + n = new_seq(n, endLabel); + + CurFunction = NULL; + + + printf("************* New body for %s *****\n", (char*)fun->header.a_name); + slang_print_function(fun, 1); + + printf("************* IR for %s *******\n", (char*)fun->header.a_name); + slang_print_ir(n, 0); + + if (_mesa_strcmp((char*) fun->header.a_name, "main") == 0) { + _slang_emit_code(n, A->program); + } + + printf("************* End assemble function2 ************\n\n"); + + return n; +} + + diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h new file mode 100644 index 0000000000..042737b2b5 --- /dev/null +++ b/src/mesa/shader/slang/slang_codegen.h @@ -0,0 +1,39 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef SLANG_CODEGEN_H +#define SLANG_CODEGEN_H + + +#include "imports.h" +#include "slang_compile.h" +#include "slang_ir.h" + + +extern struct slang_ir_node_ * +_slang_codegen_function(slang_assemble_ctx *A , struct slang_function_ *fun); + + +#endif /* SLANG_CODEGEN_H */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index c49ab4a68d..a9c84abdce 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -29,10 +29,16 @@ */ #include "imports.h" +#include "context.h" +#include "program.h" #include "grammar_mesa.h" +#include "slang_codegen.h" #include "slang_compile.h" #include "slang_preprocess.h" #include "slang_storage.h" +#include "slang_error.h" + +#include "slang_print.h" /* * This is a straightforward implementation of the slang front-end @@ -214,6 +220,7 @@ slang_info_log_memory(slang_info_log * log) log->dont_free_text = 1; log->text = out_of_memory; } + abort(); } /* slang_parse_ctx */ @@ -237,6 +244,7 @@ typedef struct slang_output_ctx_ slang_assembly_file *assembly; slang_var_pool *global_pool; slang_machine *machine; + struct gl_program *program; } slang_output_ctx; /* _slang_compile() */ @@ -782,16 +790,17 @@ parse_fully_specified_type(slang_parse_ctx * C, slang_output_ctx * O, * \param C the parsing context * \param O the output context * \param oper the operation we're parsing - * \param statment which child of the operation is being parsed + * \param statement indicates whether parsing a statement, or expression * \return 1 if success, 0 if error */ static int parse_child_operation(slang_parse_ctx * C, slang_output_ctx * O, - slang_operation * oper, unsigned int statement) + slang_operation * oper, GLboolean statement) { slang_operation *ch; /* grow child array */ +#if 000 oper->children = (slang_operation *) slang_alloc_realloc(oper->children, oper->num_children * sizeof(slang_operation), @@ -807,7 +816,9 @@ parse_child_operation(slang_parse_ctx * C, slang_output_ctx * O, return 0; } oper->num_children++; - /* XXX I guess the 0th "statement" is not really a statement? */ +#else + ch = slang_operation_grow(&oper->num_children, &oper->children); +#endif if (statement) return parse_statement(C, O, ch); return parse_expression(C, O, ch); @@ -846,6 +857,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, /* local variable declaration, individual declarators are stored as * children identifiers */ +#if 000 oper->type = slang_oper_variable_decl; { const unsigned int first_var = O->vars->num_variables; @@ -881,6 +893,38 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, } } } +#else + + oper->type = slang_oper_block_no_new_scope; + { + const unsigned int first_var = O->vars->num_variables; + + /* parse the declaration, note that there can be zero or more + * than one declarators + */ + if (!parse_declaration(C, O)) + return 0; + if (first_var < O->vars->num_variables) { + const unsigned int num_vars = O->vars->num_variables - first_var; + unsigned int i; + + oper->num_children = num_vars; + oper->children = slang_operation_new(num_vars); + if (oper->children == NULL) { + slang_info_log_memory(C->L); + return 0; + } + for (i = first_var; i < O->vars->num_variables; i++) { + slang_operation *o = &oper->children[i - first_var]; + o->type = slang_oper_variable_decl; + o->locals->outer_scope = O->vars; + o->a_id = O->vars->variables[i].a_name; + } + } + } + + +#endif break; case OP_ASM: /* the __asm statement, parse the mnemonic and all its arguments @@ -888,6 +932,9 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, */ oper->type = slang_oper_asm; oper->a_id = parse_identifier(C); + if (strcmp((char*)oper->a_id, "dot") == 0) { + printf("Assemble dot! **************************\n"); + } if (oper->a_id == SLANG_ATOM_NULL) return 0; while (*C->I != OP_END) { @@ -1042,18 +1089,27 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, op->type = slang_oper_literal_bool; if (!parse_number(C, &number)) return 0; - op->literal = (GLfloat) number; + op->literal[0] = + op->literal[1] = + op->literal[2] = + op->literal[3] = (GLfloat) number; break; case OP_PUSH_INT: op->type = slang_oper_literal_int; if (!parse_number(C, &number)) return 0; - op->literal = (GLfloat) number; + op->literal[0] = + op->literal[1] = + op->literal[2] = + op->literal[3] = (GLfloat) number; break; case OP_PUSH_FLOAT: op->type = slang_oper_literal_float; - if (!parse_float(C, &op->literal)) + if (!parse_float(C, &op->literal[0])) return 0; + op->literal[1] = + op->literal[2] = + op->literal[3] = op->literal[0]; break; case OP_PUSH_IDENTIFIER: op->type = slang_oper_identifier; @@ -1480,6 +1536,20 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, return 0; } +#if 111 + /* if the function returns a value, append a hidden __retVal 'out' + * parameter that corresponds to the return value. + */ + if (_slang_function_has_return_value(func)) { + slang_variable *p = slang_variable_scope_grow(func->parameters); + slang_atom a_retVal = slang_atom_pool_atom(C->atoms, "__retVal"); + assert(a_retVal); + p->a_name = a_retVal; + p->type = func->header.type; + p->type.qualifier = slang_qual_out; + } +#endif + /* function formal parameters and local variables share the same * scope, so save the information about param count in a seperate * place also link the scope to the global variable scope so when a @@ -1488,6 +1558,7 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, */ func->param_count = func->parameters->num_variables; func->parameters->outer_scope = O->vars; + return 1; } @@ -1770,9 +1841,9 @@ parse_init_declarator_list(slang_parse_ctx * C, slang_output_ctx * O) * \param O output context * \param definition if non-zero expect a definition, else a declaration * \param parsed_func_ret returns the parsed function - * \return 1 if success, 0 if failure + * \return GL_TRUE if success, GL_FALSE if failure */ -static int +static GLboolean parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, slang_function ** parsed_func_ret) { @@ -1780,17 +1851,17 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, /* parse function definition/declaration */ if (!slang_function_construct(&parsed_func)) - return 0; + return GL_FALSE; if (definition) { if (!parse_function_definition(C, O, &parsed_func)) { slang_function_destruct(&parsed_func); - return 0; + return GL_FALSE; } } else { if (!parse_function_prototype(C, O, &parsed_func)) { slang_function_destruct(&parsed_func); - return 0; + return GL_FALSE; } } @@ -1800,7 +1871,7 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, */ found_func = slang_function_scope_find(O->funs, &parsed_func, 0); if (found_func == NULL) { - /* add the parsed function to the function list */ + /* New function, add it to the function list */ O->funs->functions = (slang_function *) slang_alloc_realloc(O->funs->functions, O->funs->num_functions * @@ -1810,7 +1881,7 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, if (O->funs->functions == NULL) { slang_info_log_memory(C->L); slang_function_destruct(&parsed_func); - return 0; + return GL_FALSE; } O->funs->functions[O->funs->num_functions] = parsed_func; O->funs->num_functions++; @@ -1819,6 +1890,7 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, *parsed_func_ret = &O->funs->functions[O->funs->num_functions - 1]; } else { + /* previously defined or declared */ /* TODO: check function return type qualifiers and specifiers */ if (definition) { if (found_func->body != NULL) { @@ -1827,7 +1899,7 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, parsed_func.header. a_name)); slang_function_destruct(&parsed_func); - return 0; + return GL_FALSE; } /* destroy the existing function declaration and replace it @@ -1857,10 +1929,33 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, A.space.funcs = O->funs; A.space.structs = O->structs; A.space.vars = O->vars; - if (!_slang_assemble_function(&A, *parsed_func_ret)) - return 0; + A.program = O->program; + + _slang_reset_error(); + +#if 0 + printf("*************** Assemble function %s ****\n", (char *) (*parsed_func_ret)->header.a_name); + slang_print_var_scope((*parsed_func_ret)->parameters, + (*parsed_func_ret)->param_count); +#endif + + + if (!_slang_assemble_function(&A, *parsed_func_ret)) { + /* propogate the error message back through the info log */ + C->L->text = _mesa_strdup(_slang_error_text()); + C->L->dont_free_text = GL_FALSE; + return GL_FALSE; + } + + +#if 0 + printf("**************************************\n"); +#endif +#if 1 + _slang_codegen_function(&A, *parsed_func_ret); +#endif } - return 1; + return GL_TRUE; } /* declaration */ @@ -1895,7 +1990,8 @@ parse_declaration(slang_parse_ctx * C, slang_output_ctx * O) #define EXTERNAL_DECLARATION 2 static GLboolean -parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit) +parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, + struct gl_program *program) { slang_output_ctx o; @@ -1906,6 +2002,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit) o.assembly = &unit->object->assembly; o.global_pool = &unit->object->varpool; o.machine = &unit->object->machine; + o.program = program; /* parse individual functions and declarations */ while (*C->I != EXTERNAL_NULL) { @@ -1915,25 +2012,26 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit) slang_function *func; if (!parse_function(C, &o, 1, &func)) - return 0; + return GL_FALSE; } break; case EXTERNAL_DECLARATION: if (!parse_declaration(C, &o)) - return 0; + return GL_FALSE; break; default: - return 0; + return GL_FALSE; } } C->I++; - return 1; + return GL_TRUE; } static GLboolean compile_binary(const byte * prod, slang_code_unit * unit, slang_unit_type type, slang_info_log * infolog, - slang_code_unit * builtin, slang_code_unit * downlink) + slang_code_unit * builtin, slang_code_unit * downlink, + struct gl_program *program) { slang_parse_ctx C; @@ -1956,13 +2054,14 @@ compile_binary(const byte * prod, slang_code_unit * unit, } /* parse translation unit */ - return parse_code_unit(&C, unit); + return parse_code_unit(&C, unit, program); } static GLboolean compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, slang_unit_type type, slang_info_log * infolog, - slang_code_unit * builtin) + slang_code_unit * builtin, + struct gl_program *program) { byte *prod; GLuint size, start, version; @@ -1987,8 +2086,9 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, } /* Finally check the syntax and generate its binary representation. */ - if (!grammar_fast_check - (id, (const byte *) (slang_string_cstr(&preprocessed)), &prod, &size, + if (!grammar_fast_check(id, + (const byte *) (slang_string_cstr(&preprocessed)), + &prod, &size, 65536)) { char buf[1024]; GLint pos; @@ -1996,14 +2096,14 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, slang_string_free(&preprocessed); grammar_get_last_error((byte *) (buf), sizeof(buf), &pos); slang_info_log_error(infolog, buf); - return GL_FALSE; + RETURN_ERROR("syntax error", 0); } slang_string_free(&preprocessed); /* Syntax is okay - translate it to internal representation. */ - if (!compile_binary - (prod, unit, type, infolog, builtin, - &builtin[SLANG_BUILTIN_TOTAL - 1])) { + if (!compile_binary(prod, unit, type, infolog, builtin, + &builtin[SLANG_BUILTIN_TOTAL - 1], + program)) { grammar_alloc_free(prod); return GL_FALSE; } @@ -2032,6 +2132,7 @@ static const byte slang_vertex_builtin_gc[] = { }; #if defined(USE_X86_ASM) || defined(SLANG_X86) +foo static const byte slang_builtin_vec4_gc[] = { #include "library/slang_builtin_vec4_gc.h" }; @@ -2039,7 +2140,8 @@ static const byte slang_builtin_vec4_gc[] = { static GLboolean compile_object(grammar * id, const char *source, slang_code_object * object, - slang_unit_type type, slang_info_log * infolog) + slang_unit_type type, slang_info_log * infolog, + struct gl_program *program) { slang_code_unit *builtins = NULL; @@ -2067,56 +2169,79 @@ compile_object(grammar * id, const char *source, slang_code_object * object, /* if parsing user-specified shader, load built-in library */ if (type == slang_unit_fragment_shader || type == slang_unit_vertex_shader) { /* compile core functionality first */ - if (!compile_binary(slang_core_gc, &object->builtin[SLANG_BUILTIN_CORE], - slang_unit_fragment_builtin, infolog, NULL, NULL)) + if (!compile_binary(slang_core_gc, + &object->builtin[SLANG_BUILTIN_CORE], + slang_unit_fragment_builtin, infolog, + NULL, NULL, NULL)) return GL_FALSE; /* compile common functions and variables, link to core */ - if (!compile_binary - (slang_common_builtin_gc, &object->builtin[SLANG_BUILTIN_COMMON], - slang_unit_fragment_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_CORE])) + if (!compile_binary(slang_common_builtin_gc, + &object->builtin[SLANG_BUILTIN_COMMON], + slang_unit_fragment_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_CORE], NULL)) return GL_FALSE; /* compile target-specific functions and variables, link to common */ if (type == slang_unit_fragment_shader) { - if (!compile_binary - (slang_fragment_builtin_gc, - &object->builtin[SLANG_BUILTIN_TARGET], - slang_unit_fragment_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_COMMON])) + if (!compile_binary(slang_fragment_builtin_gc, + &object->builtin[SLANG_BUILTIN_TARGET], + slang_unit_fragment_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_COMMON], NULL)) return GL_FALSE; } else if (type == slang_unit_vertex_shader) { - if (!compile_binary - (slang_vertex_builtin_gc, &object->builtin[SLANG_BUILTIN_TARGET], - slang_unit_vertex_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_COMMON])) + if (!compile_binary(slang_vertex_builtin_gc, + &object->builtin[SLANG_BUILTIN_TARGET], + slang_unit_vertex_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_COMMON], NULL)) return GL_FALSE; } #if defined(USE_X86_ASM) || defined(SLANG_X86) /* compile x86 4-component vector overrides, link to target */ - if (!compile_binary - (slang_builtin_vec4_gc, &object->builtin[SLANG_BUILTIN_VEC4], - slang_unit_fragment_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_TARGET])) + if (!compile_binary(slang_builtin_vec4_gc, + &object->builtin[SLANG_BUILTIN_VEC4], + slang_unit_fragment_builtin, infolog, NULL, + &object->builtin[SLANG_BUILTIN_TARGET])) return GL_FALSE; #endif /* disable language extensions */ +#if NEW_SLANG /* allow-built-ins */ + grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); +#else grammar_set_reg8(*id, (const byte *) "parsing_builtin", 0); +#endif builtins = object->builtin; } /* compile the actual shader - pass-in built-in library for external shader */ return compile_with_grammar(*id, source, &object->unit, type, infolog, - builtins); + builtins, program); +} + + +static void +slang_create_uniforms(const slang_export_data_table *exports, + struct gl_program *program) +{ + /* XXX only add uniforms that are actually going to get used */ + GLuint i; + for (i = 0; i < exports->count; i++) { + if (exports->entries[i].access == slang_exp_uniform) { + const char *name = (char *) exports->entries[i].quant.name; + GLint j = _mesa_add_uniform(program->Parameters, name, 4); + assert(j >= 0); + } + } } + GLboolean _slang_compile(const char *source, slang_code_object * object, - slang_unit_type type, slang_info_log * infolog) + slang_unit_type type, slang_info_log * infolog, + struct gl_program *program) { GLboolean success; grammar id = 0; @@ -2124,7 +2249,7 @@ _slang_compile(const char *source, slang_code_object * object, _slang_code_object_dtr(object); _slang_code_object_ctr(object); - success = compile_object(&id, source, object, type, infolog); + success = compile_object(&id, source, object, type, infolog, program); if (id != 0) grammar_destroy(id); if (!success) @@ -2132,10 +2257,20 @@ _slang_compile(const char *source, slang_code_object * object, if (!_slang_build_export_data_table(&object->expdata, &object->unit.vars)) return GL_FALSE; - if (!_slang_build_export_code_table - (&object->expcode, &object->unit.funs, &object->unit)) + if (!_slang_build_export_code_table(&object->expcode, &object->unit.funs, + &object->unit)) return GL_FALSE; +#if NEW_SLANG + { + GET_CURRENT_CONTEXT(ctx); + slang_create_uniforms(&object->expdata, program); + _mesa_print_program(program); + _mesa_print_program_parameters(ctx, program); + } +#endif + + #if defined(USE_X86_ASM) || defined(SLANG_X86) /* XXX: lookup the @main label */ if (!_slang_x86_codegen @@ -2146,3 +2281,4 @@ _slang_compile(const char *source, slang_code_object * object, return GL_TRUE; } + diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 02987f4e1b..a41c00a3f5 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -25,6 +25,8 @@ #if !defined SLANG_COMPILE_H #define SLANG_COMPILE_H +#include "imports.h" +#include "mtypes.h" #include "slang_export.h" #include "slang_execute.h" #include "slang_compile_variable.h" @@ -107,7 +109,7 @@ int slang_info_log_warning (slang_info_log *, const char *, ...); void slang_info_log_memory (slang_info_log *); extern GLboolean -_slang_compile (const char *, slang_code_object *, slang_unit_type, slang_info_log *); +_slang_compile (const char *, slang_code_object *, slang_unit_type, slang_info_log *, struct gl_program *program); #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index e6e0d89ddb..58a453d4c2 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -86,6 +86,7 @@ slang_function_construct(slang_function * func) func->param_count = 0; func->body = NULL; func->address = ~0; + func->end_label = 0; slang_fixup_table_init(&func->fixups); return 1; } @@ -126,6 +127,16 @@ slang_function_scope_destruct(slang_function_scope * scope) } +/** + * Does this function have a non-void return value? + */ +GLboolean +_slang_function_has_return_value(const slang_function *fun) +{ + return fun->header.type.specifier.type != slang_spec_void; +} + + /** * Search a list of functions for a particular function by name. * \param funcs the list of functions to search @@ -166,21 +177,39 @@ slang_function_scope_find(slang_function_scope * funcs, slang_function * fun, for (i = 0; i < funcs->num_functions; i++) { slang_function *f = &funcs->functions[i]; + const GLuint haveRetValue = 0; +#if 0 + = (f->header.type.specifier.type != slang_spec_void); +#endif unsigned int j; + /* + printf("Compare name %s to %s (ret %u, %d, %d)\n", + (char *) fun->header.a_name, (char *) f->header.a_name, + haveRetValue, + fun->param_count, f->param_count); + */ + if (fun->header.a_name != f->header.a_name) continue; if (fun->param_count != f->param_count) continue; - for (j = 0; j < fun->param_count; j++) { + for (j = haveRetValue; j < fun->param_count; j++) { if (!slang_type_specifier_equal (&fun->parameters->variables[j].type.specifier, &f->parameters->variables[j].type.specifier)) break; } - if (j == fun->param_count) + if (j == fun->param_count) { + /* + printf("Found match\n"); + */ return f; + } } + /* + printf("Not found\n"); + */ if (all_scopes && funcs->outer_scope != NULL) return slang_function_scope_find(funcs->outer_scope, fun, 1); return NULL; diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index c05c6f4d85..8f0e3b326d 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -69,6 +69,7 @@ typedef struct slang_function_ slang_operation *body; /**< The instruction tree */ unsigned int address; /**< Address of this func in memory */ slang_fixup_table fixups; /**< Mem locations which need func's address */ + slang_atom end_label; /**< The end-of-function label */ } slang_function; extern int slang_function_construct(slang_function *); @@ -92,6 +93,9 @@ _slang_function_scope_ctr(slang_function_scope *); extern void slang_function_scope_destruct(slang_function_scope *); +extern GLboolean +_slang_function_has_return_value(const slang_function *fun); + extern int slang_function_scope_find_by_name(slang_function_scope *, slang_atom, int); diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 73f57bfb12..192f2b086b 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -41,14 +41,14 @@ slang_operation_construct(slang_operation * oper) oper->type = slang_oper_none; oper->children = NULL; oper->num_children = 0; - oper->literal = (float) 0; + oper->literal[0] = 0.0; oper->a_id = SLANG_ATOM_NULL; - oper->locals = - (slang_variable_scope *) - slang_alloc_malloc(sizeof(slang_variable_scope)); + oper->locals = _slang_variable_scope_new(NULL); if (oper->locals == NULL) return GL_FALSE; _slang_variable_scope_ctr(oper->locals); + oper->fun = NULL; + oper->var = NULL; return GL_TRUE; } @@ -62,6 +62,9 @@ slang_operation_destruct(slang_operation * oper) slang_alloc_free(oper->children); slang_variable_scope_destruct(oper->locals); slang_alloc_free(oper->locals); + oper->children = NULL; + oper->num_children = 0; + oper->locals = NULL; } /** @@ -96,12 +99,21 @@ slang_operation_copy(slang_operation * x, const slang_operation * y) return GL_FALSE; } } - z.literal = y->literal; + z.literal[0] = y->literal[0]; + z.literal[1] = y->literal[1]; + z.literal[2] = y->literal[2]; + z.literal[3] = y->literal[3]; z.a_id = y->a_id; - if (!slang_variable_scope_copy(z.locals, y->locals)) { - slang_operation_destruct(&z); - return GL_FALSE; + if (y->locals) { + if (!slang_variable_scope_copy(z.locals, y->locals)) { + slang_operation_destruct(&z); + return GL_FALSE; + } } +#if 0 + z.var = y->var; + z.fun = y->fun; +#endif slang_operation_destruct(x); *x = z; return GL_TRUE; @@ -111,5 +123,77 @@ slang_operation_copy(slang_operation * x, const slang_operation * y) slang_operation * slang_operation_new(GLuint count) { - return (slang_operation *) _mesa_calloc(count * sizeof(slang_operation)); + slang_operation *ops + = (slang_operation *) _mesa_malloc(count * sizeof(slang_operation)); + assert(count > 0); + if (ops) { + GLuint i; + for (i = 0; i < count; i++) + slang_operation_construct(ops + i); + } + return ops; +} + + +slang_operation * +slang_operation_grow(GLuint *numChildren, slang_operation **children) +{ + slang_operation *ops; + + ops = (slang_operation *) + slang_alloc_realloc(*children, + *numChildren * sizeof(slang_operation), + (*numChildren + 1) * sizeof(slang_operation)); + if (ops) { + slang_operation *newOp = ops + *numChildren; + if (!slang_operation_construct(newOp)) { + _mesa_free(ops); + *children = NULL; + return NULL; + } + *children = ops; + (*numChildren)++; + return newOp; + } + return NULL; +} + +/** + * Insert a new slang_operation into an array. + * \param numChildren pointer to current number of children (in/out) + * \param children address of array (in/out) + * \param pos position to insert + * \return pointer to the new operation + */ +slang_operation * +slang_operation_insert(GLuint *numChildren, slang_operation **children, + GLuint pos) +{ + slang_operation *ops; + + assert(pos <= *numChildren); + + ops = (slang_operation *) + _mesa_malloc((*numChildren + 1) * sizeof(slang_operation)); + if (ops) { + slang_operation *newOp; + newOp = ops + pos; + if (pos > 0) + _mesa_memcpy(ops, *children, pos * sizeof(slang_operation)); + if (pos < *numChildren) + _mesa_memcpy(newOp + 1, (*children) + pos, + (*numChildren - pos) * sizeof(slang_operation)); + + if (!slang_operation_construct(newOp)) { + _mesa_free(ops); + *numChildren = 0; + *children = NULL; + return NULL; + } + *children = ops; + (*numChildren)++; + return newOp; + } + return NULL; } + diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index a9376ec945..f6d0ba85ba 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -46,6 +46,8 @@ typedef enum slang_operation_type_ slang_oper_continue, /* "continue" statement */ slang_oper_discard, /* "discard" (kill fragment) statement */ slang_oper_return, /* "return" [expr] */ + slang_oper_goto, /* jump to label */ + slang_oper_label, /* a jump target */ slang_oper_expression, /* [expr] */ slang_oper_if, /* "if" [0] then [1] else [2] */ slang_oper_while, /* "while" [cond] [body] */ @@ -114,9 +116,13 @@ typedef struct slang_operation_ slang_operation_type type; struct slang_operation_ *children; GLuint num_children; - GLfloat literal; /**< Used for float, int and bool values */ - slang_atom a_id; /**< type: asm, identifier, call, field */ - slang_variable_scope *locals; /**< local vars for scope */ + GLfloat literal[4]; /**< Used for float, int and bool values */ + slang_atom a_id; /**< type: asm, identifier, call, field */ + slang_variable_scope *locals; /**< local vars for scope */ + struct slang_function_ *fun; /**< If type == slang_oper_call */ + struct slang_variable_ *var; /**< If type == slang_oper_identier */ + slang_fully_specified_type *datatype; /**< Type of this operation */ + slang_assembly_typeinfo ti; } slang_operation; @@ -132,6 +138,13 @@ slang_operation_copy(slang_operation *, const slang_operation *); extern slang_operation * slang_operation_new(GLuint count); +extern slang_operation * +slang_operation_grow(GLuint *numChildren, slang_operation **children); + +extern slang_operation * +slang_operation_insert(GLuint *numChildren, slang_operation **children, + GLuint pos); + #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index a8a2d6aa6a..f9f02066a3 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -127,6 +127,16 @@ slang_fully_specified_type_copy(slang_fully_specified_type * x, * slang_variable_scope */ +slang_variable_scope * +_slang_variable_scope_new(slang_variable_scope *parent) +{ + slang_variable_scope *s; + s = (slang_variable_scope *) _mesa_calloc(sizeof(slang_variable_scope)); + s->outer_scope = parent; + return s; +} + + GLvoid _slang_variable_scope_ctr(slang_variable_scope * self) { @@ -218,9 +228,11 @@ slang_variable_construct(slang_variable * var) var->array_len = 0; var->initializer = NULL; var->address = ~0; - var->address2 = 0; var->size = 0; var->global = GL_FALSE; + var->declared = GL_FALSE; + var->used = GL_FALSE; + var->aux = NULL; return 1; } @@ -248,8 +260,8 @@ slang_variable_copy(slang_variable * x, const slang_variable * y) z.a_name = y->a_name; z.array_len = y->array_len; if (y->initializer != NULL) { - z.initializer = - (slang_operation *) slang_alloc_malloc(sizeof(slang_operation)); + z.initializer + = (slang_operation *) slang_alloc_malloc(sizeof(slang_operation)); if (z.initializer == NULL) { slang_variable_destruct(&z); return 0; diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index b0910e855e..d52e2660dc 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -78,9 +78,10 @@ typedef struct slang_variable_ GLuint array_len; /**< only if type == slang_spec_array */ struct slang_operation_ *initializer; /**< Optional initializer code */ GLuint address; /**< Storage location */ - GLuint address2; /**< Storage location */ GLuint size; /**< Variable's size in bytes */ GLboolean global; /**< A global var? */ + GLboolean used; /**< Ever referenced by code? */ + GLboolean declared; /**< Declared by slang_variable_decl? */ void *aux; /**< Used during code gen */ } slang_variable; @@ -95,6 +96,10 @@ typedef struct slang_variable_scope_ struct slang_variable_scope_ *outer_scope; } slang_variable_scope; + +extern slang_variable_scope * +_slang_variable_scope_new(slang_variable_scope *parent); + extern GLvoid _slang_variable_scope_ctr(slang_variable_scope *); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c new file mode 100644 index 0000000000..0b4ef6dba1 --- /dev/null +++ b/src/mesa/shader/slang/slang_emit.c @@ -0,0 +1,1027 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_emit.c + * Emit program instructions (PI code) from IR trees. + * \author Brian Paul + */ + +#include "imports.h" +#include "context.h" +#include "get.h" +#include "macros.h" +#include "program.h" +#include "program_instruction.h" +#include "slang_emit.h" + + +/** + * Assembly and IR info + */ +typedef struct +{ + slang_ir_opcode IrOpcode; + const char *IrName; + gl_inst_opcode InstOpcode; + GLuint ResultSize, NumParams; +} slang_ir_info; + + + +static slang_ir_info IrInfo[] = { + /* binary ops */ + { IR_ADD, "IR_ADD", OPCODE_ADD, 4, 2 }, + { IR_SUB, "IR_SUB", OPCODE_SUB, 4, 2 }, + { IR_MUL, "IR_MUL", OPCODE_MUL, 4, 2 }, + { IR_DIV, "IR_DIV", OPCODE_NOP, 0, 2 }, /* XXX broke */ + { IR_DOT4, "IR_DOT_4", OPCODE_DP4, 1, 2 }, + { IR_DOT3, "IR_DOT_3", OPCODE_DP3, 1, 2 }, + { IR_CROSS, "IR_CROSS", OPCODE_XPD, 3, 2 }, + { IR_MIN, "IR_MIN", OPCODE_MIN, 4, 2 }, + { IR_MAX, "IR_MAX", OPCODE_MAX, 4, 2 }, + { IR_SEQUAL, "IR_SEQUAL", OPCODE_SEQ, 4, 2 }, + { IR_SNEQUAL, "IR_SNEQUAL", OPCODE_SNE, 4, 2 }, + { IR_SGE, "IR_SGE", OPCODE_SGE, 4, 2 }, + { IR_SGT, "IR_SGT", OPCODE_SGT, 4, 2 }, + { IR_POW, "IR_POW", OPCODE_POW, 1, 2 }, + /* unary ops */ + { IR_I_TO_F, "IR_I_TO_F", OPCODE_NOP, 1, 1 }, + { IR_EXP, "IR_EXP", OPCODE_EXP, 1, 1 }, + { IR_EXP2, "IR_EXP2", OPCODE_EX2, 1, 1 }, + { IR_LOG2, "IR_LOG2", OPCODE_LG2, 1, 1 }, + { IR_RSQ, "IR_RSQ", OPCODE_RSQ, 1, 1 }, + { IR_RCP, "IR_RCP", OPCODE_RCP, 1, 1 }, + { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, + { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, + { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, + { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, + { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, + /* other */ + { IR_SEQ, "IR_SEQ", 0, 0, 0 }, + { IR_LABEL, "IR_LABEL", 0, 0, 0 }, + { IR_JUMP, "IR_JUMP", 0, 0, 0 }, + { IR_CJUMP, "IR_CJUMP", 0, 0, 0 }, + { IR_CALL, "IR_CALL", 0, 0, 0 }, + { IR_MOVE, "IR_MOVE", 0, 0, 1 }, + { IR_LESS, "IR_LESS", 0, 1, 2 }, + { IR_NOT, "IR_NOT", 0, 1, 1 }, + { IR_VAR, "IR_VAR", 0, 0, 0 }, + { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, + { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, + { IR_FIELD, "IR_FIELD", 0, 0, 0 }, + { IR_NOP, NULL, OPCODE_NOP, 0, 0 } +}; + + +static slang_ir_info * +slang_find_ir_info(slang_ir_opcode opcode) +{ + GLuint i; + for (i = 0; IrInfo[i].IrName; i++) { + if (IrInfo[i].IrOpcode == opcode) { + return IrInfo + i; + } + } + return NULL; +} + +static const char * +slang_ir_name(slang_ir_opcode opcode) +{ + return slang_find_ir_info(opcode)->IrName; +} + + +slang_ir_storage * +_slang_new_ir_storage(enum register_file file, GLint index, GLint size) +{ + slang_ir_storage *st; + st = (slang_ir_storage *) _mesa_calloc(sizeof(slang_ir_storage)); + if (st) { + st->File = file; + st->Index = index; + st->Size = size; + } + return st; +} + + +static const char * +swizzle_string(GLuint swizzle) +{ + static char s[6]; + GLuint i; + s[0] = '.'; + for (i = 1; i < 5; i++) { + s[i] = "xyzw"[GET_SWZ(swizzle, i-1)]; + } + s[i] = 0; + return s; +} + +static const char * +writemask_string(GLuint writemask) +{ + static char s[6]; + GLuint i, j = 0; + s[j++] = '.'; + for (i = 0; i < 4; i++) { + if (writemask & (1 << i)) + s[j++] = "xyzw"[i]; + } + s[j] = 0; + return s; +} + +static const char * +storage_string(const slang_ir_storage *st) +{ + static const char *files[] = { + "TEMP", + "LOCAL_PARAM", + "ENV_PARAM", + "STATE", + "INPUT", + "OUTPUT", + "NAMED_PARAM", + "CONSTANT", + "UNIFORM", + "WRITE_ONLY", + "ADDRESS", + "UNDEFINED" + }; + static char s[100]; +#if 0 + if (st->Size == 1) + sprintf(s, "%s[%d]", files[st->File], st->Index); + else + sprintf(s, "%s[%d..%d]", files[st->File], st->Index, + st->Index + st->Size - 1); +#endif + sprintf(s, "%s", files[st->File]); + return s; +} + + +static GLuint +sizeof_struct(const slang_struct *s) +{ + return 0; +} + + +static GLuint +sizeof_type(const slang_fully_specified_type *t) +{ + switch (t->specifier.type) { + case slang_spec_void: + abort(); + return 0; + case slang_spec_bool: + return 1; + case slang_spec_bvec2: + return 2; + case slang_spec_bvec3: + return 3; + case slang_spec_bvec4: + return 4; + case slang_spec_int: + return 1; + case slang_spec_ivec2: + return 2; + case slang_spec_ivec3: + return 3; + case slang_spec_ivec4: + return 4; + case slang_spec_float: + return 1; + case slang_spec_vec2: + return 2; + case slang_spec_vec3: + return 3; + case slang_spec_vec4: + return 4; + case slang_spec_mat2: + return 2 * 2; + case slang_spec_mat3: + return 3 * 3; + case slang_spec_mat4: + return 4 * 4; + case slang_spec_sampler1D: + case slang_spec_sampler2D: + case slang_spec_sampler3D: + case slang_spec_samplerCube: + case slang_spec_sampler1DShadow: + case slang_spec_sampler2DShadow: + abort(); + return 0; + case slang_spec_struct: + return sizeof_struct(t->specifier._struct); + case slang_spec_array: + return 1; /* XXX */ + default: + abort(); + return 0; + } + return 0; +} + + +#define IND 0 +void +slang_print_ir(const slang_ir_node *n, int indent) +{ + int i; + if (!n) + return; +#if !IND + if (n->Opcode != IR_SEQ) +#else + printf("%3d:", indent); +#endif + for (i = 0; i < indent; i++) + printf(" "); + + switch (n->Opcode) { + case IR_SEQ: +#if IND + printf("SEQ store %p\n", (void*) n->Store); +#endif + assert(n->Children[0]); + assert(n->Children[1]); + slang_print_ir(n->Children[0], indent + IND); + slang_print_ir(n->Children[1], indent + IND); + break; + case IR_MOVE: + printf("MOVE (writemask = %s)\n", writemask_string(n->Writemask)); + slang_print_ir(n->Children[0], indent+3); + slang_print_ir(n->Children[1], indent+3); + break; + case IR_LABEL: + printf("LABEL: %s\n", n->Target); + break; + case IR_JUMP: + printf("JUMP %s\n", n->Target); + break; + case IR_CJUMP: + printf("CJUMP %s\n", n->Target); + slang_print_ir(n->Children[0], indent+3); + break; + case IR_VAR: + printf("VAR %s%s at %s store %p\n", + (char *) n->Var->a_name, swizzle_string(n->Swizzle), + storage_string(n->Store), (void*) n->Store); + break; + case IR_VAR_DECL: + printf("VAR_DECL %s (%p) at %s store %p\n", + (char *) n->Var->a_name, (void*) n->Var, storage_string(n->Store), + (void*) n->Store); + break; + case IR_FIELD: + printf("FIELD %s of\n", n->Target); + slang_print_ir(n->Children[0], indent+3); + break; + case IR_CALL: + printf("ASMCALL %s(%d args)\n", n->Target, n->Swizzle); + break; + case IR_FLOAT: + printf("FLOAT %f %f %f %f\n", + n->Value[0], n->Value[1], n->Value[2], n->Value[3]); + break; + case IR_I_TO_F: + printf("INT_TO_FLOAT %d\n", (int) n->Value[0]); + break; + default: + printf("%s (%p, %p)\n", slang_ir_name(n->Opcode), + (void*) n->Children[0], (void*) n->Children[1]); + slang_print_ir(n->Children[0], indent+3); + slang_print_ir(n->Children[1], indent+3); + } +} + + +static GLint +alloc_temporary(slang_gen_context *gc) +{ + GLuint i; + for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { + if (!gc->TempUsed[i]) { + gc->TempUsed[i] = GL_TRUE; + return i; + } + } + return -1; +} + + +static GLboolean +is_temporary(const slang_gen_context *gc, const slang_ir_storage *st) +{ + if (st->File == PROGRAM_TEMPORARY && gc->TempUsed[st->Index]) + return gc->TempUsed[st->Index]; + else + return GL_FALSE; +} + + +static void +free_temporary(slang_gen_context *gc, GLuint r) +{ + if (gc->TempUsed[r]) + gc->TempUsed[r] = GL_FALSE; +} + + + +static GLint +slang_find_input(GLenum target, const char *name, GLint index) +{ + struct input_info { + const char *Name; + GLuint Attrib; + }; + static const struct input_info vertInputs[] = { + { "gl_Vertex", VERT_ATTRIB_POS }, + { "gl_Normal", VERT_ATTRIB_NORMAL }, + { "gl_Color", VERT_ATTRIB_COLOR0 }, + { "gl_SecondaryColor", VERT_ATTRIB_COLOR1 }, + { NULL, 0 } + }; + static const struct input_info fragInputs[] = { + { NULL, 0 } + }; + const struct input_info *inputs; + GLuint i; + + if (target == GL_VERTEX_PROGRAM_ARB) { + inputs = vertInputs; + } + else { + assert(target == GL_FRAGMENT_PROGRAM_ARB); + inputs = fragInputs; + } + + for (i = 0; inputs[i].Name; i++) { + if (strcmp(inputs[i].Name, name) == 0) { + /* found */ + return inputs[i].Attrib; + } + } + return -1; +} + + +static GLint +slang_find_output(GLenum target, const char *name, GLint index) +{ + struct output_info { + const char *Name; + GLuint Attrib; + }; + static const struct output_info vertOutputs[] = { + { "gl_Position", VERT_RESULT_HPOS }, + { "gl_FrontColor", VERT_RESULT_COL0 }, + { "gl_BackColor", VERT_RESULT_BFC0 }, + { "gl_FrontSecondaryColor", VERT_RESULT_COL1 }, + { "gl_BackSecondaryColor", VERT_RESULT_BFC1 }, + { "gl_TexCoord", VERT_RESULT_TEX0 }, /* XXX indexed */ + { "gl_FogFragCoord", VERT_RESULT_FOGC }, + { NULL, 0 } + }; + static const struct output_info fragOutputs[] = { + { "gl_FragColor", FRAG_RESULT_COLR }, + { NULL, 0 } + }; + const struct output_info *outputs; + GLuint i; + + if (target == GL_VERTEX_PROGRAM_ARB) { + outputs = vertOutputs; + } + else { + assert(target == GL_FRAGMENT_PROGRAM_ARB); + outputs = fragOutputs; + } + + for (i = 0; outputs[i].Name; i++) { + if (strcmp(outputs[i].Name, name) == 0) { + /* found */ + return outputs[i].Attrib; + } + } + return -1; +} + + +/** + * Lookup a named constant and allocate storage for the parameter in + * the given parameter list. + * \return position of the constant in the paramList. + */ +static GLint +slang_lookup_constant(const char *name, GLint index, + struct gl_program_parameter_list *paramList) +{ + struct constant_info { + const char *Name; + const GLenum Token; + }; + static const struct constant_info info[] = { + { "gl_MaxLights", GL_MAX_LIGHTS }, + { "gl_MaxClipPlanes", GL_MAX_CLIP_PLANES }, + { "gl_MaxTextureUnits", GL_MAX_TEXTURE_UNITS }, + { "gl_MaxTextureCoords", GL_MAX_TEXTURE_COORDS }, + { "gl_MaxVertexAttribs", GL_MAX_VERTEX_ATTRIBS }, + { "gl_MaxVertexUniformComponents", GL_MAX_VERTEX_UNIFORM_COMPONENTS }, + { "gl_MaxVaryingFloats", GL_MAX_VARYING_FLOATS }, + { "gl_MaxVertexTextureImageUnits", GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS }, + { "gl_MaxTextureImageUnits", GL_MAX_TEXTURE_IMAGE_UNITS }, + { "gl_MaxFragmentUniformComponents", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS }, + { "gl_MaxCombinedTextureImageUnits", GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS }, + { NULL, 0 } + }; + GLuint i; + GLuint swizzle; /* XXX use this */ + + for (i = 0; info[i].Name; i++) { + if (strcmp(info[i].Name, name) == 0) { + /* found */ + GLfloat value = -1.0; + GLint pos; + _mesa_GetFloatv(info[i].Token, &value); + ASSERT(value >= 0.0); /* sanity check that glGetFloatv worked */ + pos = _mesa_add_unnamed_constant(paramList, &value, 1, &swizzle); + return pos; + } + } + return -1; +} + + +/** + * Determine if 'name' is a state variable. If so, create a new program + * parameter for it, and return the param's index. Else, return -1. + */ +static GLint +slang_lookup_statevar(const char *name, GLint index, + struct gl_program_parameter_list *paramList) +{ + struct state_info { + const char *Name; + const GLuint NumRows; /** for matrices */ + const GLuint Swizzle; + const GLint Indexes[6]; + }; + static const struct state_info state[] = { + { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { "gl_NormalMatrix", 3, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, STATE_MATRIX_INVTRANS } }, + { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MVP, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { "gl_TextureMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } + }; + GLuint i; + + for (i = 0; state[i].Name; i++) { + if (strcmp(state[i].Name, name) == 0) { + /* found */ + if (paramList) { + if (state[i].NumRows > 1) { + /* a matrix */ + GLuint j; + GLint pos[4], indexesCopy[6]; + /* make copy of state tokens */ + for (j = 0; j < 6; j++) + indexesCopy[j] = state[i].Indexes[j]; + /* load rows */ + for (j = 0; j < state[i].NumRows; j++) { + indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ + pos[j] = _mesa_add_state_reference(paramList, indexesCopy); + assert(pos[j] >= 0); + } + return pos[0]; + } + else { + /* non-matrix state */ + GLint pos + = _mesa_add_state_reference(paramList, state[i].Indexes); + assert(pos >= 0); + return pos; + } + } + } + } + return -1; +} + + +static GLint +slang_alloc_uniform(struct gl_program *prog, const char *name) +{ + GLint i = _mesa_add_uniform(prog->Parameters, name, 4); + return i; +} + + +static GLint +slang_alloc_varying(struct gl_program *prog, const char *name) +{ + GLint i = _mesa_add_varying(prog->Varying, name, 4); /* XXX fix size */ + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + i += VERT_RESULT_VAR0; + prog->OutputsWritten |= (1 << i); + } + else { + i += FRAG_ATTRIB_VAR0; + prog->InputsRead |= (1 << i); + } + return i; +} + + +/** + * Allocate temporary storage for an intermediate result (such as for + * a multiply or add, etc. + */ +static void +slang_alloc_temp_storage(slang_gen_context *gc, slang_ir_node *n, GLint size) +{ + GLint indx; + assert(!n->Var); + assert(!n->Store); + assert(size > 0); + indx = alloc_temporary(gc); + n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, indx, size); +} + + +/** + * Allocate storage info for an IR node (n->Store). + * We may do any of the following: + * 1. Compute Store->File/Index for program inputs/outputs/uniforms/etc. + * 2. Allocate storage for user-declared variables. + * 3. Allocate intermediate/unnamed storage for complex expressions. + * 4. other? + * + * If gc or prog is NULL, we may only be able to determine the Store->File + * but not an Index (register). + */ +void +slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, + struct gl_program *prog) +{ + int k = 0; + if (!n->Store) { + /**assert(n->Var);**/ + if (n->Var && n->Var->aux) { + /* node storage info = var storage info */ + n->Store = (slang_ir_storage *) n->Var->aux; + } + else { + /* alloc new storage info */ + n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -5); + k = 1; + /*XXX n->Store->Size = sizeof(var's type) */ + if (n->Var) + n->Var->aux = n->Store; + } + } + + if (n->Opcode == IR_VAR_DECL) { + /* allocate storage for a user's variable */ + assert(n->Var); + if (n->Store->Index < 0) { + assert(gc); + n->Store->File = PROGRAM_TEMPORARY; + n->Store->Index = alloc_temporary(gc); + n->Store->Size = sizeof_type(&n->Var->type); + printf("alloc var %s storage at %d (size %d)\n", + (char *) n->Var->a_name, + n->Store->Index, + n->Store->Size); + assert(n->Store->Size > 0); + n->Var->declared = GL_TRUE; + } + return; + } + + if (n->Opcode == IR_VAR && n->Store->File == PROGRAM_UNDEFINED) { + /* try to determine the storage for this variable */ + GLint i; + + assert(n->Var); + assert(prog); + +#if 0 + assert(n->Var->declared || + n->Var->type.qualifier == slang_qual_uniform || + n->Var->type.qualifier == slang_qual_varying || + n->Var->type.qualifier == slang_qual_fixedoutput || + n->Var->type.qualifier == slang_qual_attribute || + n->Var->type.qualifier == slang_qual_out || + n->Var->type.qualifier == slang_qual_const); +#endif + + i = slang_find_input(prog->Target, (char *) n->Var->a_name, 0); + if (i >= 0) { + n->Store->File = PROGRAM_INPUT; + n->Store->Index = i; + n->Store->Size = sizeof_type(&n->Var->type); + assert(n->Store->Size > 0); + prog->InputsRead |= (1 << i); + return; + } + + i = slang_find_output(prog->Target, (char *) n->Var->a_name, 0); + if (i >= 0) { + n->Store->File = PROGRAM_OUTPUT; + n->Store->Index = i; + n->Store->Size = sizeof_type(&n->Var->type); + prog->OutputsWritten |= (1 << i); + return; + } + + i = slang_lookup_statevar((char *) n->Var->a_name, 0, prog->Parameters); + if (i >= 0) { + n->Store->File = PROGRAM_STATE_VAR; + n->Store->Index = i; + n->Store->Size = sizeof_type(&n->Var->type); + return; + } + + i = slang_lookup_constant((char *) n->Var->a_name, 0, prog->Parameters); + if (i >= 0) { + n->Store->File = PROGRAM_CONSTANT; + n->Store->Index = i; + n->Store->Size = sizeof_type(&n->Var->type); + return; + } + + /* probably a uniform or varying */ + if (n->Var->type.qualifier == slang_qual_uniform) { + i = slang_alloc_uniform(prog, (char *) n->Var->a_name); + if (i >= 0) { + n->Store->File = PROGRAM_UNIFORM; + n->Store->Index = i; + n->Store->Size = sizeof_type(&n->Var->type); + return; + } + } + else if (n->Var->type.qualifier == slang_qual_varying) { + i = slang_alloc_varying(prog, (char *) n->Var->a_name); + if (i >= 0) { + if (prog->Target == GL_VERTEX_PROGRAM_ARB) + n->Store->File = PROGRAM_OUTPUT; + else + n->Store->File = PROGRAM_INPUT; + n->Store->Size = sizeof_type(&n->Var->type); + n->Store->Index = i; + return; + } + } + + /* what is this?!? */ + /* + abort(); + */ + } + + if (n->Store->File == PROGRAM_TEMPORARY && n->Store->Index < 0) { + /* unnamed intermediate temporary */ + if (gc) + n->Store->Index = alloc_temporary(gc); + return; + } + + if (gc && n->Store->File == PROGRAM_UNDEFINED && n->Store->Size < 0) { + abort(); + } +} + + +static slang_ir_storage * +alloc_constant(const GLfloat v[], GLuint size, struct gl_program *prog) +{ + GLuint swizzle; + GLint ind = _mesa_add_unnamed_constant(prog->Parameters, v, size, &swizzle); + slang_ir_storage *st = _slang_new_ir_storage(PROGRAM_CONSTANT, ind, size); + return st; +} + + +/** + * Swizzle a swizzle. + */ +static GLuint +swizzle_compose(GLuint swz1, GLuint swz2) +{ + GLuint i, swz, s[4]; + for (i = 0; i < 4; i++) { + GLuint c = GET_SWZ(swz1, i); + s[i] = GET_SWZ(swz2, c); + } + swz = MAKE_SWIZZLE4(s[0], s[1], s[2], s[3]); + return swz; +} + + +/** + * Convert IR storage to an instruction dst register. + */ +static void +storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st, + GLuint writemask) +{ + static const GLuint defaultWritemask[4] = { + WRITEMASK_X, + WRITEMASK_X | WRITEMASK_Y, + WRITEMASK_X | WRITEMASK_Y | WRITEMASK_Z, + WRITEMASK_X | WRITEMASK_Y | WRITEMASK_Z | WRITEMASK_W + }; + dst->File = st->File; + dst->Index = st->Index; + assert(st->Size >= 1); + assert(st->Size <= 4); + dst->WriteMask = defaultWritemask[st->Size - 1] & writemask; +} + + +/** + * Convert IR storage to an instruction src register. + */ +static void +storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st, + GLuint swizzle) +{ + static const GLuint defaultSwizzle[4] = { + MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X), + MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W), + MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W), + MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W) + }; + + src->File = st->File; + src->Index = st->Index; + assert(st->Size >= 1); + assert(st->Size <= 4); + /* XXX swizzling logic here may need some work */ + /*src->Swizzle = swizzle_compose(swizzle, defaultSwizzle[st->Size - 1]);*/ + if (swizzle != SWIZZLE_NOOP) + src->Swizzle = swizzle; + else + src->Swizzle = defaultSwizzle[st->Size - 1]; +} + + + +/** + * Add new instruction at end of given program. + * \param prog the program to append instruction onto + * \param opcode opcode for the new instruction + * \return pointer to the new instruction + */ +static struct prog_instruction * +new_instruction(struct gl_program *prog, gl_inst_opcode opcode) +{ + struct prog_instruction *inst; + prog->Instructions = _mesa_realloc_instructions(prog->Instructions, + prog->NumInstructions, + prog->NumInstructions + 1); + inst = prog->Instructions + prog->NumInstructions; + prog->NumInstructions++; + _mesa_init_instructions(inst, 1); + inst->Opcode = opcode; + return inst; +} + + +static struct prog_instruction * +gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog); + + +/** + * Generate code for a simple binary-op instruction. + */ +static struct prog_instruction * +gen_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *inst; + const slang_ir_info *info = slang_find_ir_info(n->Opcode); + assert(info); + + gen(gc, n->Children[0], prog); + gen(gc, n->Children[1], prog); + inst = new_instruction(prog, info->InstOpcode); + /* alloc temp storage for the result: */ + if (!n->Store || n->Store->File == PROGRAM_UNDEFINED) { +#if 1 + slang_alloc_temp_storage(gc, n, info->ResultSize); +#else + slang_resolve_storage(gc, n, prog); +#endif + } + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, + n->Children[0]->Swizzle); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store, + n->Children[1]->Swizzle); + inst->Comment = n->Comment; + return inst; +} + + +static struct prog_instruction * +gen_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *inst; + const slang_ir_info *info = slang_find_ir_info(n->Opcode); + assert(info); + + assert(info->NumParams == 1); + + gen(gc, n->Children[0], prog); + + inst = new_instruction(prog, info->InstOpcode); + /*slang_resolve_storage(gc, n, prog);*/ + + if (!n->Store) + slang_alloc_temp_storage(gc, n, info->ResultSize); + + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, + n->Children[0]->Swizzle); + + inst->Comment = n->Comment; + + return inst; +} + + +static struct prog_instruction * +gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *inst; + if (!n) + return NULL; + + switch (n->Opcode) { + case IR_SEQ: + assert(n->Children[0]); + assert(n->Children[1]); + gen(gc, n->Children[0], prog); + inst = gen(gc, n->Children[1], prog); + n->Store = n->Children[1]->Store; + return inst; + break; + case IR_VAR_DECL: + slang_resolve_storage(gc, n, prog); + assert(n->Store->Index >= 0); + assert(n->Store->Size > 0); + break; + case IR_VAR: + /*printf("Gen: var ref\n");*/ + { + int b = !n->Store || n->Store->Index < 0; + if (b) + slang_resolve_storage(gc, n, prog); + /*assert(n->Store->Index >= 0);*/ + assert(n->Store->Size > 0); + } + break; + case IR_MOVE: + /* rhs */ + assert(n->Children[1]); + inst = gen(gc, n->Children[1], prog); + /* lhs */ + gen(gc, n->Children[0], prog); + +#if 1 + if (inst && is_temporary(gc, n->Children[1]->Store)) { + /* Peephole optimization: + * Just modify the RHS to put its result into the dest of this + * MOVE operation. Then, this MOVE is a no-op. + */ + free_temporary(gc, n->Children[1]->Store->Index); + *n->Children[1]->Store = *n->Children[0]->Store; + /* fixup the prev (RHS) instruction */ + storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); + return inst; + } + else +#endif + { + inst = new_instruction(prog, OPCODE_MOV); + storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, + n->Children[1]->Swizzle); + if (n->Children[1]->Store->File == PROGRAM_TEMPORARY) { + free_temporary(gc, n->Children[1]->Store->Index); + } + inst->Comment = n->Comment; + n->Store = n->Children[0]->Store; /*XXX new */ + return inst; + } + break; + case IR_ADD: + case IR_SUB: + case IR_MUL: + case IR_DOT4: + case IR_DOT3: + case IR_CROSS: + case IR_MIN: + case IR_MAX: + case IR_SEQUAL: + case IR_SNEQUAL: + case IR_SGE: + case IR_SGT: + case IR_POW: + case IR_EXP: + case IR_EXP2: + return gen_binop(gc, n, prog); + break; + case IR_RSQ: + case IR_RCP: + case IR_FLOOR: + case IR_FRAC: + case IR_ABS: + case IR_SIN: + case IR_COS: + return gen_unop(gc, n, prog); + break; + case IR_LABEL: + /*printf("LAB: %s\n", n->Target);*/ + break; + case IR_JUMP: +#if 0 + inst = new_instruction(prog, OPCODE_BRA); + inst->Comment = _mesa_strdup(n->Target); +#endif + break; + case IR_FLOAT: + n->Store = alloc_constant(n->Value, 4, prog); /*XXX fix size */ + break; + default: + printf("gen: ?\n"); + abort(); + } + return NULL; +} + + + +GLboolean +_slang_emit_code(slang_ir_node *n, struct gl_program *prog) +{ + slang_gen_context *gc; + /*GET_CURRENT_CONTEXT(ctx);*/ + + gc = (slang_gen_context *) _mesa_calloc(sizeof(*gc)); + + printf("************ Begin generate code\n"); + + gen(gc, n, prog); + + { + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_END); + } + + printf("************ End generate code (%u inst):\n", prog->NumInstructions); + +#if 0 + _mesa_print_program(prog); + _mesa_print_program_parameters(ctx,prog); +#endif + + _mesa_free(gc); + + return GL_FALSE; +} diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h new file mode 100644 index 0000000000..1683542b90 --- /dev/null +++ b/src/mesa/shader/slang/slang_emit.h @@ -0,0 +1,56 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef SLANG_EMIT_H +#define SLANG_EMIT_H + + +#include "imports.h" +#include "slang_compile.h" +#include "slang_ir.h" +#include "mtypes.h" + + +typedef struct { + GLboolean TempUsed[MAX_PROGRAM_TEMPS]; +} slang_gen_context; + + +extern void +slang_print_ir(const slang_ir_node *n, int indent); + + +extern slang_ir_storage * +_slang_new_ir_storage(enum register_file file, GLint index, GLint size); + + +extern void +slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, + struct gl_program *prog); + +extern GLboolean +_slang_emit_code(slang_ir_node *n, struct gl_program *prog); + + +#endif /* SLANG_EMIT_H */ diff --git a/src/mesa/shader/slang/slang_error.c b/src/mesa/shader/slang/slang_error.c new file mode 100644 index 0000000000..2767163178 --- /dev/null +++ b/src/mesa/shader/slang/slang_error.c @@ -0,0 +1,77 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "imports.h" +#include "slang_error.h" + + +static char ErrorText[10000]; +static char FormattedErrorText[10000]; +static int ErrorPos; + + +void +_slang_reset_error(void) +{ + ErrorText[0] = 0; + ErrorPos = -1; +} + + +/** + * Record an error message, if one hasn't been recorded already. + */ +void +_slang_record_error(const char *msg1, const char *msg2, + GLint pos, const char *file, int line) +{ + /* don't overwrite a previously recorded error */ + if (!ErrorText[0]) { + _mesa_sprintf(ErrorText, "%s %s", msg1, msg2); + ErrorPos = -1; +#ifdef DEBUG + fprintf(stderr, "Mesa shader compile error: %s %s at %d (%s line %d)\n", + msg1, msg2, pos, file, line); +#endif + } +} + + +/** + * Return formatted error text. + */ +const char * +_slang_error_text(void) +{ + /* + * NVIDIA formats errors like this: + * (LINE_NUMBER) : error ERROR_CODE: ERROR_TEXT + * Example: + * (7) : error C1048: invalid character 'P' in swizzle "P" + */ + _mesa_sprintf(FormattedErrorText, + "(%d) : error: %s", ErrorPos, ErrorText); + return FormattedErrorText; +} + diff --git a/src/mesa/shader/slang/slang_error.h b/src/mesa/shader/slang/slang_error.h new file mode 100644 index 0000000000..d35ae83fba --- /dev/null +++ b/src/mesa/shader/slang/slang_error.h @@ -0,0 +1,85 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef SLANG_ERROR_H +#define SLANG_ERROR_H + + +extern void +_slang_reset_error(void); + + +extern void +_slang_record_error(const char *msg1, const char *msg2, + GLint pos, const char *file, int line); + + +extern const char * +_slang_error_text(void); + + +/** + * Record a compilation error, single string message. + */ +#define RETURN_ERROR(MSG, POS) \ +do { \ + _slang_record_error(MSG, "", POS, __FILE__, __LINE__); \ + return GL_FALSE; \ +} while (0) + + +/** + * Record a compilation error, two-string message. + */ +#define RETURN_ERROR2(MSG1, MSG2, POS) \ +do { \ + _slang_record_error(MSG1, MSG2, POS, __FILE__, __LINE__); \ + return GL_FALSE; \ +} while (0) + + +/** + * Record a nil error. Either a real error message or out of memory should + * have already been recorded. + */ +#define RETURN_NIL() \ +do { \ + _slang_record_error("unknown", "", -1, __FILE__, __LINE__); \ + return GL_FALSE; \ +} while (0) + + +/** + * Used to report an out of memory condition. + */ +#define RETURN_OUT_OF_MEMORY() \ +do { \ + _slang_record_error("Out of memory", "", -1, __FILE__, __LINE__); \ + return GL_FALSE; \ +} while (0) + + + + +#endif /* SLANG_ERROR_H */ diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c index e469de0207..09401b8910 100644 --- a/src/mesa/shader/slang/slang_execute.c +++ b/src/mesa/shader/slang/slang_execute.c @@ -392,12 +392,16 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) case slang_asm_int_copy: case slang_asm_bool_copy: /* store top value on stack to memory */ +#if 0 { GLuint address = (stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / 4; GLfloat value = stack[mach->sp]._float; mach->mem[address]._float = value; } +#else + mach->mem[(stack[mach->sp + a->param[0] / 4]._addr +a->param[1]) / 4]._float = stack[mach->sp]._float; +#endif mach->sp++; break; case slang_asm_float_move: @@ -425,6 +429,10 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) stack[mach->sp + 1]._float += stack[mach->sp]._float; mach->sp++; break; + case slang_asm_float_subtract: + stack[mach->sp + 1]._float -= stack[mach->sp]._float; + mach->sp++; + break; case slang_asm_float_multiply: stack[mach->sp + 1]._float *= stack[mach->sp]._float; mach->sp++; @@ -476,12 +484,14 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) case slang_asm_float_log2: stack[mach->sp]._float = LOG2(stack[mach->sp]._float); break; +#if 0 case slang_asm_float_floor: stack[mach->sp]._float = FLOORF(stack[mach->sp]._float); break; case slang_asm_float_ceil: stack[mach->sp]._float = CEILF(stack[mach->sp]._float); break; +#endif case slang_asm_float_noise1: stack[mach->sp]._float = _slang_library_noise1(stack[mach->sp]._float); @@ -718,6 +728,7 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) -mach->mem[(da + 12) / 4]._float; } break; +#if 0 case slang_asm_vec4_dot: /* [vec4] | vec4 > [float] */ { @@ -730,6 +741,7 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) mach->sp += 4; } break; +#endif case slang_asm_vec4_copy: /* [vec4] | vec4 > [vec4] */ { @@ -768,6 +780,19 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) } } break; + case slang_asm_vec4_dot: + case slang_asm_vec3_dot: + { + /* XXX almost certainly wrong */ + GLuint da = stack[mach->sp + 4]._addr; + mach->mem[da / 4]._float = + mach->mem[da / 4]._float * stack[mach->sp]._float + + mach->mem[(da + 4) / 4]._float * stack[mach->sp + 1]._float + + mach->mem[(da + 8) / 4]._float * stack[mach->sp + 2]._float + + mach->mem[(da + 12) / 4]._float * stack[mach->sp + 3]._float; + mach->sp += 4; + } + break; default: _mesa_problem(NULL, "bad slang opcode 0x%x", a->type); return GL_FALSE; diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h new file mode 100644 index 0000000000..3c583365d8 --- /dev/null +++ b/src/mesa/shader/slang/slang_ir.h @@ -0,0 +1,115 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_ir.h + * Mesa GLSL Itermediate Representation tree types and constants. + * \author Brian Paul + */ + + +#ifndef SLANG_IR_H +#define SLANG_IR_H + + +#include "imports.h" +#include "slang_compile.h" +#include "mtypes.h" + + +/** + * Intermediate Representation opcode + */ +typedef enum +{ + IR_NOP = 0, + IR_SEQ, + IR_LABEL, /* target of a jump or cjump */ + IR_JUMP, /* unconditional jump */ + IR_CJUMP, /* conditional jump */ + IR_CALL, + IR_MOVE, + IR_ADD, + IR_SUB, + IR_MUL, + IR_DIV, + IR_DOT4, + IR_DOT3, + IR_CROSS, + IR_MIN, + IR_MAX, + IR_SEQUAL, + IR_SNEQUAL, + IR_SGE, + IR_SGT, + IR_POW, + IR_EXP, + IR_EXP2, + IR_LOG2, + IR_RSQ, + IR_RCP, + IR_FLOOR, + IR_FRAC, + IR_ABS, + IR_SIN, + IR_COS, + IR_LESS, + IR_NOT, + IR_VAR, + IR_VAR_DECL, + IR_FLOAT, + IR_FIELD, + IR_I_TO_F +} slang_ir_opcode; + + +/** + * Describes where data storage is allocated. + */ +typedef struct +{ + enum register_file File; /**< PROGRAM_TEMPORARY, PROGRAM_INPUT, etc */ + GLint Index; /**< -1 means unallocated */ + GLint Size; /**< number of floats */ +} slang_ir_storage; + + +/** + * Intermediate Representation (IR) tree node + */ +typedef struct slang_ir_node_ +{ + slang_ir_opcode Opcode; + struct slang_ir_node_ *Children[2]; + const char *Comment; + const char *Target; + GLuint Swizzle; + GLuint Writemask; /**< If Op == IR_MOVE */ + GLfloat Value[4]; /**< If Op == IR_FLOAT */ + slang_variable *Var; + slang_ir_storage *Store; +} slang_ir_node; + + +#endif /* SLANG_IR_H */ diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index 433964223a..af45c6657e 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -316,6 +316,9 @@ enum SLANG_COMMON_CODE_MAX }; +/** + * XXX promote this to mtypes.h? + */ typedef struct { slang_active_variables active_uniforms; @@ -345,6 +348,11 @@ _slang_program_rst (slang_program *); extern GLboolean _slang_link (slang_program *, slang_code_object **, GLuint); + +extern void +_slang_link2(GLcontext *ctx, GLhandleARB h, + struct gl_linked_program *linked); + #ifdef __cplusplus } #endif diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c new file mode 100644 index 0000000000..e62cc01b3e --- /dev/null +++ b/src/mesa/shader/slang/slang_link2.c @@ -0,0 +1,226 @@ +/* + * Mesa 3-D graphics library + * Version: 6.6 + * + * Copyright (C) 2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_link.c + * slang linker + * \author Michal Krol + */ + +#include "imports.h" +#include "context.h" +#include "hash.h" +#include "macros.h" +#include "program.h" +#include "shaderobjects.h" +#include "slang_link.h" + + + + +#define RELEASE_GENERIC(x)\ + (**x)._unknown.Release ((struct gl2_unknown_intf **) (x)) + +#define RELEASE_CONTAINER(x)\ + (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) + +#define RELEASE_PROGRAM(x)\ + (**x)._container._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) + +#define RELEASE_SHADER(x)\ + (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) + + + +static struct gl2_unknown_intf ** +lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, + const char *function) +{ + struct gl2_unknown_intf **unk; + + /* + * Note: _mesa_HashLookup() requires non-zero input values, so the + * passed-in handle value must be checked beforehand. + */ + if (handle == 0) { + _mesa_error(ctx, GL_INVALID_VALUE, function); + return NULL; + } + _glthread_LOCK_MUTEX(ctx->Shared->Mutex); + unk = (struct gl2_unknown_intf **) _mesa_HashLookup(ctx->Shared->GL2Objects, + handle); + _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); + + if (unk == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, function); + } + else { + unk = (**unk).QueryInterface(unk, uiid); + if (unk == NULL) + _mesa_error(ctx, GL_INVALID_OPERATION, function); + } + return unk; +} + +#define GET_GENERIC(x, handle, function)\ + struct gl2_generic_intf **x = (struct gl2_generic_intf **)\ + lookup_handle (ctx, handle, UIID_GENERIC, function); + +#define GET_CONTAINER(x, handle, function)\ + struct gl2_container_intf **x = (struct gl2_container_intf **)\ + lookup_handle (ctx, handle, UIID_CONTAINER, function); + +#define GET_PROGRAM(x, handle, function)\ + struct gl2_program_intf **x = (struct gl2_program_intf **)\ + lookup_handle (ctx, handle, UIID_PROGRAM, function); + +#define GET_SHADER(x, handle, function)\ + struct gl2_shader_intf **x = (struct gl2_shader_intf **)\ + lookup_handle (ctx, handle, UIID_SHADER, function); + + +static void +prelink(GLhandleARB programObj, struct gl_linked_program *linked) +{ + GET_CURRENT_CONTEXT(ctx); + + linked->VertexProgram = NULL; + linked->FragmentProgram = NULL; + + if (programObj != 0) { + GET_PROGRAM(program, programObj, "glUseProgramObjectARB(program)"); + + if (program == NULL) + return; + + /* XXX terrible hack to find the real vertex/fragment programs */ + { + GLuint handle; + GLsizei cnt, i; + cnt = (**program)._container.GetAttachedCount((struct gl2_container_intf **) (program)); + + for (i = 0; i < cnt; i++) { + struct gl2_generic_intf **x + = (**program)._container.GetAttached((struct gl2_container_intf **) program, i); + handle = (**x).GetName(x); + { + struct gl_program *prog; + GET_SHADER(sha, handle, "foo"); + if (sha && (*sha)->Program) { + prog = (*sha)->Program; + if (prog->Target == GL_VERTEX_PROGRAM_ARB) + linked->VertexProgram = (struct gl_vertex_program *) prog; + else if (prog->Target == GL_FRAGMENT_PROGRAM_ARB) + linked->FragmentProgram = (struct gl_fragment_program *) prog; + } + } +#if 0 + if (linked->VertexProgram) + printf("Found vert prog %p %d\n", + linked->VertexProgram, + linked->VertexProgram->Base.NumInstructions); + if (linked->FragmentProgram) + printf("Found frag prog %p %d\n", + linked->FragmentProgram, + linked->FragmentProgram->Base.NumInstructions); +#endif + RELEASE_GENERIC(x); + } + } + + } +} + + + +void +_slang_link2(GLcontext *ctx, + GLhandleARB programObj, + struct gl_linked_program *linked) +{ + struct gl_vertex_program *vertProg; + struct gl_fragment_program *fragProg; + + prelink(programObj, linked); + + vertProg = linked->VertexProgram; + fragProg = linked->FragmentProgram; + + /* free old linked data, if any */ + if (linked->NumUniforms > 0) { + GLuint i; + for (i = 0; i < linked->NumUniforms; i++) { + _mesa_free((char *) linked->Uniforms[i].Name); + linked->Uniforms[i].Name = NULL; + linked->Uniforms[i].Value = NULL; + } + linked->NumUniforms = 0; + } + + /* + * Find uniforms. + * XXX what about dups? + */ + if (vertProg) { + GLuint i; + for (i = 0; i < vertProg->Base.Parameters->NumParameters; i++) { + struct gl_program_parameter *p + = vertProg->Base.Parameters->Parameters + i; + if (p->Name) { + struct gl_uniform *u = linked->Uniforms + linked->NumUniforms; + u->Name = _mesa_strdup(p->Name); + u->Value = &vertProg->Base.Parameters->ParameterValues[i][0]; + linked->NumUniforms++; + assert(linked->NumUniforms < MAX_UNIFORMS); + } + } + } + if (fragProg) { + GLuint i; + for (i = 0; i < fragProg->Base.Parameters->NumParameters; i++) { + struct gl_program_parameter *p + = fragProg->Base.Parameters->Parameters + i; + if (p->Name) { + struct gl_uniform *u = linked->Uniforms + linked->NumUniforms; + u->Name = _mesa_strdup(p->Name); + u->Value = &fragProg->Base.Parameters->ParameterValues[i][0]; + linked->NumUniforms++; + assert(linked->NumUniforms < MAX_UNIFORMS); + } + } + } + + /* For varying: + * scan both programs for varyings, rewrite programs so they agree + * on locations of varyings. + */ + + /** + * Linking should _copy_ the vertex and fragment shader code, + * rewriting varying references as we go along... + */ + + linked->LinkStatus = (vertProg && fragProg); +} + diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c new file mode 100644 index 0000000000..2ac06291bc --- /dev/null +++ b/src/mesa/shader/slang/slang_print.c @@ -0,0 +1,1136 @@ + +/** + * Dump/print a slang_operation tree + */ + + +#include "imports.h" +#include "slang_compile.h" +#include "slang_print.h" + + +static void +spaces(int n) +{ + while (n--) + printf(" "); +} + + +static void +print_type(const slang_fully_specified_type *t) +{ + switch (t->qualifier) { + case slang_qual_none: + /*printf("");*/ + break; + case slang_qual_const: + printf("const "); + break; + case slang_qual_attribute: + printf("attrib "); + break; + case slang_qual_varying: + printf("varying "); + break; + case slang_qual_uniform: + printf("uniform "); + break; + case slang_qual_out: + printf("output "); + break; + case slang_qual_inout: + printf("inout "); + break; + case slang_qual_fixedoutput: + printf("fixedoutput"); + break; + case slang_qual_fixedinput: + printf("fixedinput"); + break; + default: + printf("unknown qualifer!"); + } + + switch (t->specifier.type) { + case slang_spec_void: + printf("void"); + break; + case slang_spec_bool: + printf("bool"); + break; + case slang_spec_bvec2: + printf("bvec2"); + break; + case slang_spec_bvec3: + printf("bvec3"); + break; + case slang_spec_bvec4: + printf("bvec4"); + break; + case slang_spec_int: + printf("int"); + break; + case slang_spec_ivec2: + printf("ivec2"); + break; + case slang_spec_ivec3: + printf("ivec3"); + break; + case slang_spec_ivec4: + printf("ivec4"); + break; + case slang_spec_float: + printf("float"); + break; + case slang_spec_vec2: + printf("vec2"); + break; + case slang_spec_vec3: + printf("vec3"); + break; + case slang_spec_vec4: + printf("vec4"); + break; + case slang_spec_mat2: + printf("mat2"); + break; + case slang_spec_mat3: + printf("mat3"); + break; + case slang_spec_mat4: + printf("mat4"); + break; + case slang_spec_sampler1D: + printf("sampler1D"); + break; + case slang_spec_sampler2D: + printf("sampler2D"); + break; + case slang_spec_sampler3D: + printf("sampler3D"); + break; + case slang_spec_samplerCube: + printf("samplerCube"); + break; + case slang_spec_sampler1DShadow: + printf("sampler1DShadow"); + break; + case slang_spec_sampler2DShadow: + printf("sampler2DShadow"); + break; + case slang_spec_struct: + printf("struct"); + break; + case slang_spec_array: + printf("array"); + break; + default: + printf("unknown type"); + } + /*printf("\n");*/ +} + + +static void +print_variable(const slang_variable *v, int indent) +{ + spaces(indent); + printf("VAR "); + print_type(&v->type); + printf(" %s", (char *) v->a_name); + if (v->initializer) { + printf(" :=\n"); + slang_print_tree(v->initializer, indent + 3); + } + else { + printf(";\n"); + } +} + + +static void +print_binary(const slang_operation *op, const char *oper, int indent) +{ + assert(op->num_children == 2); + slang_print_tree(&op->children[0], indent + 3); + spaces(indent); + printf("%s\n", oper); + slang_print_tree(&op->children[1], indent + 3); +} + + +static void +print_generic2(const slang_operation *op, const char *oper, + const char *s, int indent) +{ + int i; + if (oper) { + spaces(indent); + printf("[%p locals %p] %s %s\n", (void*) op, (void*) op->locals, oper, s); + } + for (i = 0; i < op->num_children; i++) { + spaces(indent); + printf("//child %d:\n", i); + slang_print_tree(&op->children[i], indent); + } +} + +static void +print_generic(const slang_operation *op, const char *oper, int indent) +{ + print_generic2(op, oper, "", indent); +} + + +static const slang_variable_scope * +find_scope(const slang_variable_scope *s, slang_atom name) +{ + GLuint i; + for (i = 0; i < s->num_variables; i++) { + if (s->variables[i].a_name == name) + return s; + } + if (s->outer_scope) + return find_scope(s->outer_scope, name); + else + return NULL; +} + +static const slang_variable * +find_var(const slang_variable_scope *s, slang_atom name) +{ + GLuint i; + for (i = 0; i < s->num_variables; i++) { + if (s->variables[i].a_name == name) + return &s->variables[i]; + } + if (s->outer_scope) + return find_var(s->outer_scope, name); + else + return NULL; +} + + +void +slang_print_tree(const slang_operation *op, int indent) +{ + int i; + + switch (op->type) { + + case slang_oper_none: + spaces(indent); + printf("slang_oper_none\n"); + break; + + case slang_oper_block_no_new_scope: + spaces(indent); + printf("{ locals %p\n", (void*)op->locals); + print_generic(op, NULL, indent+3); + spaces(indent); + printf("}\n"); + break; + + case slang_oper_block_new_scope: + spaces(indent); + printf("{{ // new scope locals %p\n", (void*)op->locals); + print_generic(op, NULL, indent+3); + spaces(indent); + printf("}}\n"); + break; + + case slang_oper_variable_decl: + assert(op->num_children == 0 || op->num_children == 1); + { + slang_variable *v; + v = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); + if (v) { + spaces(indent); + printf("DECL (locals=%p outer=%p) ", (void*)op->locals, (void*) op->locals->outer_scope); + print_type(&v->type); + printf(" %s (%p)", (char *) op->a_id, + (void *) find_var(op->locals, op->a_id)); + + printf(" (in scope %p) ", + (void *) find_scope(op->locals, op->a_id)); + if (op->num_children == 1) { + printf(" :=\n"); + slang_print_tree(&op->children[0], indent + 3); + } + else if (v->initializer) { + printf(" := INITIALIZER\n"); + slang_print_tree(v->initializer, indent + 3); + } + else { + printf(";\n"); + } + /* + spaces(indent); + printf("TYPE: "); + print_type(&v->type); + spaces(indent); + printf("ADDR: %d size: %d\n", v->address, v->size); + */ + } + else { + abort(); + spaces(indent); + printf("DECL %s (anonymous variable!!!!)\n", (char *) op->a_id); + /*abort();*/ + } + } + break; + + case slang_oper_asm: + spaces(indent); + printf("ASM: %s\n", (char*) op->a_id); + print_generic(op, NULL, indent+3); + break; + + case slang_oper_break: + spaces(indent); + printf("BREAK\n"); + break; + + case slang_oper_continue: + spaces(indent); + printf("CONTINUE\n"); + break; + + case slang_oper_discard: + spaces(indent); + printf("DISCARD\n"); + break; + + case slang_oper_return: + spaces(indent); + printf("RETURN\n"); + if (op->num_children > 0) + slang_print_tree(&op->children[0], indent + 3); + break; + + case slang_oper_goto: + spaces(indent); + printf("GOTO %s\n", (char *) op->a_id); + break; + + case slang_oper_label: + spaces(indent); + printf("LABEL %s\n", (char *) op->a_id); + break; + + case slang_oper_expression: + spaces(indent); + printf("EXPR: locals %p\n", (void*) op->locals); + /*print_generic(op, "slang_oper_expression", indent);*/ + slang_print_tree(&op->children[0], indent + 3); + break; + + case slang_oper_if: + spaces(indent); + printf("IF\n"); + slang_print_tree(&op->children[0], indent + 3); + spaces(indent); + printf("THEN\n"); + slang_print_tree(&op->children[1], indent + 3); + spaces(indent); + printf("ELSE\n"); + slang_print_tree(&op->children[2], indent + 3); + spaces(indent); + printf("ENDIF\n"); + break; + + case slang_oper_while: + assert(op->num_children == 2); + spaces(indent); + printf("WHILE cond:\n"); + slang_print_tree(&op->children[0], indent + 3); + spaces(indent); + printf("WHILE body:\n"); + slang_print_tree(&op->children[1], indent + 3); + break; + + case slang_oper_do: + spaces(indent); + printf("DO body:\n"); + slang_print_tree(&op->children[0], indent + 3); + spaces(indent); + printf("DO cond:\n"); + slang_print_tree(&op->children[1], indent + 3); + break; + + case slang_oper_for: + spaces(indent); + printf("FOR init:\n"); + slang_print_tree(&op->children[0], indent + 3); + spaces(indent); + printf("FOR while:\n"); + slang_print_tree(&op->children[1], indent + 3); + spaces(indent); + printf("FOR step:\n"); + slang_print_tree(&op->children[2], indent + 3); + spaces(indent); + printf("FOR body:\n"); + slang_print_tree(&op->children[3], indent + 3); + spaces(indent); + printf("ENDFOR\n"); + /* + print_generic(op, "FOR", indent + 3); + */ + break; + + case slang_oper_void: + spaces(indent); + printf("(oper-void)\n"); + break; + + case slang_oper_literal_bool: + spaces(indent); + /*printf("slang_oper_literal_bool\n");*/ + printf("%s\n", op->literal[0] ? "TRUE" : "FALSE"); + break; + + case slang_oper_literal_int: + spaces(indent); + /*printf("slang_oper_literal_int\n");*/ + printf("(%d %d %d %d)\n", (int) op->literal[0], (int) op->literal[1], + (int) op->literal[2], (int) op->literal[3]); + break; + + case slang_oper_literal_float: + spaces(indent); + /*printf("slang_oper_literal_float\n");*/ + printf("(%f %f %f %f)\n", op->literal[0], op->literal[1], op->literal[2], + op->literal[3]); + break; + + case slang_oper_identifier: + spaces(indent); + if (op->var && op->var->a_name) + printf("VAR %s (in scope %p)\n", (char *) op->var->a_name, + (void *) find_scope(op->locals, op->a_id)); + else + printf("VAR' %s (in scope %p)\n", (char *) op->a_id, + (void *) find_scope(op->locals, op->a_id)); + break; + + case slang_oper_sequence: + print_generic(op, "COMMA-SEQ", indent+3); + break; + + case slang_oper_assign: + spaces(indent); + printf("ASSIGNMENT locals %p\n", (void*)op->locals); + print_binary(op, ":=", indent); + break; + + case slang_oper_addassign: + spaces(indent); + printf("ASSIGN\n"); + print_binary(op, "+=", indent); + break; + + case slang_oper_subassign: + spaces(indent); + printf("ASSIGN\n"); + print_binary(op, "-=", indent); + break; + + case slang_oper_mulassign: + spaces(indent); + printf("ASSIGN\n"); + print_binary(op, "*=", indent); + break; + + case slang_oper_divassign: + spaces(indent); + printf("ASSIGN\n"); + print_binary(op, "/=", indent); + break; + + /*slang_oper_modassign,*/ + /*slang_oper_lshassign,*/ + /*slang_oper_rshassign,*/ + /*slang_oper_orassign,*/ + /*slang_oper_xorassign,*/ + /*slang_oper_andassign,*/ + case slang_oper_select: + spaces(indent); + printf("slang_oper_select n=%d\n", op->num_children); + assert(op->num_children == 3); + slang_print_tree(&op->children[0], indent+3); + spaces(indent); + printf("?\n"); + slang_print_tree(&op->children[1], indent+3); + spaces(indent); + printf(":\n"); + slang_print_tree(&op->children[2], indent+3); + break; + + case slang_oper_logicalor: + print_binary(op, "||", indent); + break; + + case slang_oper_logicalxor: + print_binary(op, "^^", indent); + break; + + case slang_oper_logicaland: + print_binary(op, "&&", indent); + break; + + /*slang_oper_bitor*/ + /*slang_oper_bitxor*/ + /*slang_oper_bitand*/ + case slang_oper_equal: + print_binary(op, "==", indent); + break; + + case slang_oper_notequal: + print_binary(op, "!=", indent); + break; + + case slang_oper_less: + print_binary(op, "<", indent); + break; + + case slang_oper_greater: + print_binary(op, ">", indent); + break; + + case slang_oper_lessequal: + print_binary(op, "<=", indent); + break; + + case slang_oper_greaterequal: + print_binary(op, ">=", indent); + break; + + /*slang_oper_lshift*/ + /*slang_oper_rshift*/ + case slang_oper_add: + print_binary(op, "+", indent); + break; + + case slang_oper_subtract: + print_binary(op, "-", indent); + break; + + case slang_oper_multiply: + print_binary(op, "*", indent); + break; + + case slang_oper_divide: + print_binary(op, "/", indent); + break; + + /*slang_oper_modulus*/ + case slang_oper_preincrement: + spaces(indent); + printf("PRE++\n"); + slang_print_tree(&op->children[0], indent+3); + break; + + case slang_oper_predecrement: + spaces(indent); + printf("PRE--\n"); + slang_print_tree(&op->children[0], indent+3); + break; + + case slang_oper_plus: + spaces(indent); + printf("slang_oper_plus\n"); + break; + + case slang_oper_minus: + spaces(indent); + printf("slang_oper_minus\n"); + break; + + /*slang_oper_complement*/ + case slang_oper_not: + spaces(indent); + printf("NOT\n"); + slang_print_tree(&op->children[0], indent+3); + break; + + case slang_oper_subscript: + spaces(indent); + printf("slang_oper_subscript\n"); + print_generic(op, NULL, indent+3); + break; + + case slang_oper_call: +#if 0 + slang_function *fun + = _slang_locate_function(A->space.funcs, oper->a_id, + oper->children, + oper->num_children, &A->space, A->atoms); +#endif + spaces(indent); + printf("CALL %s(\n", (char *) op->a_id); + for (i = 0; i < op->num_children; i++) { + slang_print_tree(&op->children[i], indent+3); + if (i + 1 < op->num_children) { + spaces(indent + 3); + printf(",\n"); + } + } + spaces(indent); + printf(")\n"); + break; + + case slang_oper_field: + spaces(indent); + printf("FIELD %s of\n", (char*) op->a_id); + slang_print_tree(&op->children[0], indent+3); + break; + + case slang_oper_postincrement: + spaces(indent); + printf("POST++\n"); + slang_print_tree(&op->children[0], indent+3); + break; + + case slang_oper_postdecrement: + spaces(indent); + printf("POST--\n"); + slang_print_tree(&op->children[0], indent+3); + break; + + default: + printf("unknown op->type %d\n", (int) op->type); + } + +} + + + +void +slang_print_function(const slang_function *f, GLboolean body) +{ + int i; + +#if 0 + if (_mesa_strcmp((char *) f->header.a_name, "main") != 0) + return; +#endif + + printf("FUNCTION %s (\n", + (char *) f->header.a_name); + + for (i = 0; i < f->param_count; i++) { + print_variable(&f->parameters->variables[i], 3); + } + + printf(")\n"); + if (body && f->body) + slang_print_tree(f->body, 0); +} + + + + +/* operation */ +#define OP_END 0 +#define OP_BLOCK_BEGIN_NO_NEW_SCOPE 1 +#define OP_BLOCK_BEGIN_NEW_SCOPE 2 +#define OP_DECLARE 3 +#define OP_ASM 4 +#define OP_BREAK 5 +#define OP_CONTINUE 6 +#define OP_DISCARD 7 +#define OP_RETURN 8 +#define OP_EXPRESSION 9 +#define OP_IF 10 +#define OP_WHILE 11 +#define OP_DO 12 +#define OP_FOR 13 +#define OP_PUSH_VOID 14 +#define OP_PUSH_BOOL 15 +#define OP_PUSH_INT 16 +#define OP_PUSH_FLOAT 17 +#define OP_PUSH_IDENTIFIER 18 +#define OP_SEQUENCE 19 +#define OP_ASSIGN 20 +#define OP_ADDASSIGN 21 +#define OP_SUBASSIGN 22 +#define OP_MULASSIGN 23 +#define OP_DIVASSIGN 24 +/*#define OP_MODASSIGN 25*/ +/*#define OP_LSHASSIGN 26*/ +/*#define OP_RSHASSIGN 27*/ +/*#define OP_ORASSIGN 28*/ +/*#define OP_XORASSIGN 29*/ +/*#define OP_ANDASSIGN 30*/ +#define OP_SELECT 31 +#define OP_LOGICALOR 32 +#define OP_LOGICALXOR 33 +#define OP_LOGICALAND 34 +/*#define OP_BITOR 35*/ +/*#define OP_BITXOR 36*/ +/*#define OP_BITAND 37*/ +#define OP_EQUAL 38 +#define OP_NOTEQUAL 39 +#define OP_LESS 40 +#define OP_GREATER 41 +#define OP_LESSEQUAL 42 +#define OP_GREATEREQUAL 43 +/*#define OP_LSHIFT 44*/ +/*#define OP_RSHIFT 45*/ +#define OP_ADD 46 +#define OP_SUBTRACT 47 +#define OP_MULTIPLY 48 +#define OP_DIVIDE 49 +/*#define OP_MODULUS 50*/ +#define OP_PREINCREMENT 51 +#define OP_PREDECREMENT 52 +#define OP_PLUS 53 +#define OP_MINUS 54 +/*#define OP_COMPLEMENT 55*/ +#define OP_NOT 56 +#define OP_SUBSCRIPT 57 +#define OP_CALL 58 +#define OP_FIELD 59 +#define OP_POSTINCREMENT 60 +#define OP_POSTDECREMENT 61 + + +void +slang_print_opcode(unsigned int opcode) +{ + switch (opcode) { + case OP_PUSH_VOID: + printf("OP_PUSH_VOID\n"); + break; + case OP_PUSH_BOOL: + printf("OP_PUSH_BOOL\n"); + break; + case OP_PUSH_INT: + printf("OP_PUSH_INT\n"); + break; + case OP_PUSH_FLOAT: + printf("OP_PUSH_FLOAT\n"); + break; + case OP_PUSH_IDENTIFIER: + printf("OP_PUSH_IDENTIFIER\n"); + break; + case OP_SEQUENCE: + printf("OP_SEQUENCE\n"); + break; + case OP_ASSIGN: + printf("OP_ASSIGN\n"); + break; + case OP_ADDASSIGN: + printf("OP_ADDASSIGN\n"); + break; + case OP_SUBASSIGN: + printf("OP_SUBASSIGN\n"); + break; + case OP_MULASSIGN: + printf("OP_MULASSIGN\n"); + break; + case OP_DIVASSIGN: + printf("OP_DIVASSIGN\n"); + break; + /*case OP_MODASSIGN:*/ + /*case OP_LSHASSIGN:*/ + /*case OP_RSHASSIGN:*/ + /*case OP_ORASSIGN:*/ + /*case OP_XORASSIGN:*/ + /*case OP_ANDASSIGN:*/ + case OP_SELECT: + printf("OP_SELECT\n"); + break; + case OP_LOGICALOR: + printf("OP_LOGICALOR\n"); + break; + case OP_LOGICALXOR: + printf("OP_LOGICALXOR\n"); + break; + case OP_LOGICALAND: + printf("OP_LOGICALAND\n"); + break; + /*case OP_BITOR:*/ + /*case OP_BITXOR:*/ + /*case OP_BITAND:*/ + case OP_EQUAL: + printf("OP_EQUAL\n"); + break; + case OP_NOTEQUAL: + printf("OP_NOTEQUAL\n"); + break; + case OP_LESS: + printf("OP_LESS\n"); + break; + case OP_GREATER: + printf("OP_GREATER\n"); + break; + case OP_LESSEQUAL: + printf("OP_LESSEQUAL\n"); + break; + case OP_GREATEREQUAL: + printf("OP_GREATEREQUAL\n"); + break; + /*case OP_LSHIFT:*/ + /*case OP_RSHIFT:*/ + case OP_ADD: + printf("OP_ADD\n"); + break; + case OP_SUBTRACT: + printf("OP_SUBTRACT\n"); + break; + case OP_MULTIPLY: + printf("OP_MULTIPLY\n"); + break; + case OP_DIVIDE: + printf("OP_DIVIDE\n"); + break; + /*case OP_MODULUS:*/ + case OP_PREINCREMENT: + printf("OP_PREINCREMENT\n"); + break; + case OP_PREDECREMENT: + printf("OP_PREDECREMENT\n"); + break; + case OP_PLUS: + printf("OP_PLUS\n"); + break; + case OP_MINUS: + printf("OP_MINUS\n"); + break; + case OP_NOT: + printf("OP_NOT\n"); + break; + /*case OP_COMPLEMENT:*/ + case OP_SUBSCRIPT: + printf("OP_SUBSCRIPT\n"); + break; + case OP_CALL: + printf("OP_CALL\n"); + break; + case OP_FIELD: + printf("OP_FIELD\n"); + break; + case OP_POSTINCREMENT: + printf("OP_POSTINCREMENT\n"); + break; + case OP_POSTDECREMENT: + printf("OP_POSTDECREMENT\n"); + break; + default: + printf("UNKNOWN OP %d\n", opcode); + } +} + + + +const char * +slang_asm_string(slang_assembly_type t) +{ + switch (t) { + /* core */ + case slang_asm_none: + return "none"; + case slang_asm_float_copy: + return "float_copy"; + case slang_asm_float_move: + return "float_move"; + case slang_asm_float_push: + return "float_push"; + case slang_asm_float_deref: + return "float_deref"; + case slang_asm_float_add: + return "float_add"; + case slang_asm_float_multiply: + return "float_multiply"; + case slang_asm_float_divide: + return "float_divide"; + case slang_asm_float_negate: + return "float_negate"; + case slang_asm_float_less: + return "float_less"; + case slang_asm_float_equal_exp: + return "float_equal"; + case slang_asm_float_equal_int: + return "float_equal"; + case slang_asm_float_to_int: + return "float_to_int"; + case slang_asm_float_sine: + return "float_sine"; + case slang_asm_float_arcsine: + return "float_arcsine"; + case slang_asm_float_arctan: + return "float_arctan"; + case slang_asm_float_power: + return "float_power"; + case slang_asm_float_log2: + return "float_log2"; + case slang_asm_vec4_floor: + return "vec4_floor"; + case slang_asm_float_ceil: + return "float_ceil"; + case slang_asm_float_noise1: + return "float_noise1"; + case slang_asm_float_noise2: + return "float_noise2"; + case slang_asm_float_noise3: + return "float_noise3"; + case slang_asm_float_noise4: + return "float_noise4"; + case slang_asm_int_copy: + return "int_copy"; + case slang_asm_int_move: + return "int_move"; + case slang_asm_int_push: + return "int_push"; + case slang_asm_int_deref: + return "int_deref"; + case slang_asm_int_to_float: + return "int_to_float"; + case slang_asm_int_to_addr: + return "int_to_addr"; + case slang_asm_bool_copy: + return "bool_copy"; + case slang_asm_bool_move: + return "bool_move"; + case slang_asm_bool_push: + return "bool_push"; + case slang_asm_bool_deref: + return "bool_deref"; + case slang_asm_addr_copy: + return "addr_copy"; + case slang_asm_addr_push: + return "addr_push"; + case slang_asm_addr_deref: + return "addr_deref"; + case slang_asm_addr_add: + return "addr_add"; + case slang_asm_addr_multiply: + return "addr_multiply"; + case slang_asm_vec4_tex1d: + return "vec4_tex1d"; + case slang_asm_vec4_tex2d: + return "vec4_tex2d"; + case slang_asm_vec4_tex3d: + return "vec4_tex3d"; + case slang_asm_vec4_texcube: + return "vec4_texcube"; + case slang_asm_vec4_shad1d: + return "vec4_shad1d"; + case slang_asm_vec4_shad2d: + return "vec4_shad2d"; + case slang_asm_jump: + return "jump"; + case slang_asm_jump_if_zero: + return "jump_if_zero"; + case slang_asm_enter: + return "enter"; + case slang_asm_leave: + return "leave"; + case slang_asm_local_alloc: + return "local_alloc"; + case slang_asm_local_free: + return "local_free"; + case slang_asm_local_addr: + return "local_addr"; + case slang_asm_global_addr: + return "global_addr"; + case slang_asm_call: + return "call"; + case slang_asm_return: + return "return"; + case slang_asm_discard: + return "discard"; + case slang_asm_exit: + return "exit"; + /* GL_MESA_shader_debug */ + case slang_asm_float_print: + return "float_print"; + case slang_asm_int_print: + return "int_print"; + case slang_asm_bool_print: + return "bool_print"; + /* vec4 */ + case slang_asm_float_to_vec4: + return "float_to_vec4"; + case slang_asm_vec4_add: + return "vec4_add"; + case slang_asm_vec4_subtract: + return "vec4_subtract"; + case slang_asm_vec4_multiply: + return "vec4_multiply"; + case slang_asm_vec4_divide: + return "vec4_divide"; + case slang_asm_vec4_negate: + return "vec4_negate"; + case slang_asm_vec4_dot: + return "vec4_dot"; + case slang_asm_vec4_copy: + return "vec4_copy"; + case slang_asm_vec4_deref: + return "vec4_deref"; + case slang_asm_vec4_equal_int: + return "vec4_equal"; + default: + return "??asm??"; + } +} + + +const char * +slang_type_qual_string(slang_type_qualifier q) +{ + switch (q) { + case slang_qual_none: + return "none"; + case slang_qual_const: + return "const"; + case slang_qual_attribute: + return "attribute"; + case slang_qual_varying: + return "varying"; + case slang_qual_uniform: + return "uniform"; + case slang_qual_out: + return "out"; + case slang_qual_inout: + return "inout"; + case slang_qual_fixedoutput: + return "fixedoutput"; + case slang_qual_fixedinput: + return "fixedinputk"; + default: + return "qual?"; + } +} + + +static const char * +slang_type_string(slang_type_specifier_type t) +{ + switch (t) { + case slang_spec_void: + return "void"; + case slang_spec_bool: + return "bool"; + case slang_spec_bvec2: + return "bvec2"; + case slang_spec_bvec3: + return "bvec3"; + case slang_spec_bvec4: + return "bvec4"; + case slang_spec_int: + return "int"; + case slang_spec_ivec2: + return "ivec2"; + case slang_spec_ivec3: + return "ivec3"; + case slang_spec_ivec4: + return "ivec4"; + case slang_spec_float: + return "float"; + case slang_spec_vec2: + return "vec2"; + case slang_spec_vec3: + return "vec3"; + case slang_spec_vec4: + return "vec4"; + case slang_spec_mat2: + return "mat2"; + case slang_spec_mat3: + return "mat3"; + case slang_spec_mat4: + return "mat4"; + case slang_spec_sampler1D: + return "sampler1D"; + case slang_spec_sampler2D: + return "sampler2D"; + case slang_spec_sampler3D: + return "sampler3D"; + case slang_spec_samplerCube: + return "samplerCube"; + case slang_spec_sampler1DShadow: + return "sampler1DShadow"; + case slang_spec_sampler2DShadow: + return "sampler2DShadow"; + case slang_spec_struct: + return "struct"; + case slang_spec_array: + return "array"; + default: + return "type?"; + } +} + + +static const char * +slang_fq_type_string(const slang_fully_specified_type *t) +{ + static char str[1000]; + sprintf(str, "%s %s", slang_type_qual_string(t->qualifier), + slang_type_string(t->specifier.type)); + return str; +} + + +void +slang_print_type(const slang_fully_specified_type *t) +{ + printf("%s %s", slang_type_qual_string(t->qualifier), + slang_type_string(t->specifier.type)); +} + + +static char * +slang_var_string(const slang_variable *v) +{ + static char str[1000]; + sprintf(str, "%s : %s", + (char *) v->a_name, + slang_fq_type_string(&v->type)); + return str; +} + + +void +slang_print_variable(const slang_variable *v) +{ + printf("Name: %s\n", (char *) v->a_name); + printf("Type: %s\n", slang_fq_type_string(&v->type)); +} + + +void +_slang_print_var_scope(const slang_variable_scope *vars, int indent) +{ + GLuint i; + + spaces(indent); + printf("Var scope %p %d vars\n", (void *) vars, vars->num_variables); + for (i = 0; i < vars->num_variables; i++) { + spaces(indent + 3); + printf("%s\n", (char *) vars->variables[i].a_name); + } + + if (vars->outer_scope) { + spaces(indent + 3); + printf("outer_scope = %p\n", (void*) vars->outer_scope); + _slang_print_var_scope(vars->outer_scope, indent + 3); + } +} + + + +int +slang_checksum_tree(const slang_operation *op) +{ + int s = op->num_children; + int i; + + for (i = 0; i < op->num_children; i++) { + s += slang_checksum_tree(&op->children[i]); + } + return s; +} diff --git a/src/mesa/shader/slang/slang_print.h b/src/mesa/shader/slang/slang_print.h new file mode 100644 index 0000000000..a98607a540 --- /dev/null +++ b/src/mesa/shader/slang/slang_print.h @@ -0,0 +1,38 @@ + + +#ifndef SLANG_PRINT +#define SLANG_PRINT + +extern void +slang_print_function(const slang_function *f, GLboolean body); + +extern void +slang_print_tree(const slang_operation *op, int indent); + + +extern void +slang_print_opcode(unsigned int opcode); + + +extern const char * +slang_asm_string(slang_assembly_type t); + + +extern const char * +slang_type_qual_string(slang_type_qualifier q); + +extern void +slang_print_type(const slang_fully_specified_type *t); + +extern void +slang_print_variable(const slang_variable *v); + +extern void +_slang_print_var_scope(const slang_variable_scope *s, int indent); + + +extern int +slang_checksum_tree(const slang_operation *op); + +#endif /* SLANG_PRINT */ + diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c new file mode 100644 index 0000000000..94e6e1ecc2 --- /dev/null +++ b/src/mesa/shader/slang/slang_simplify.c @@ -0,0 +1,170 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_assemble_typeinfo.c + * slang type info + * \author Michal Krol + */ + +#include "imports.h" +#include "macros.h" +#include "slang_compile.h" +#include "slang_simplify.h" + + +/** + * Recursively traverse an AST tree, applying simplifications wherever + * possible. + * At the least, we do constant folding. We need to do that much so that + * compile-time expressions can be evaluated for things like array + * declarations. I.e.: float foo[3 + 5]; + */ +void +slang_simplify(slang_operation *oper, + const slang_assembly_name_space * space, + slang_atom_pool * atoms) +{ + GLboolean isFloat[4]; + GLboolean isBool[4]; + GLuint i, n; + + /* first, simplify children */ + for (i = 0; i < oper->num_children; i++) { + slang_simplify(&oper->children[i], space, atoms); + } + + /* examine children */ + n = MIN2(oper->num_children, 4); + for (i = 0; i < n; i++) { + isFloat[i] = (oper->children[i].type == slang_oper_literal_float || + oper->children[i].type == slang_oper_literal_int); + isBool[i] = (oper->children[i].type == slang_oper_literal_bool); + } + + if (n == 2 && isFloat[0] && isFloat[1]) { + /* probably simple arithmetic */ + switch (oper->type) { + case slang_oper_add: + for (i = 0; i < 4; i++) { + oper->literal[i] + = oper->children[0].literal[i] + oper->children[1].literal[i]; + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + break; + case slang_oper_subtract: + for (i = 0; i < 4; i++) { + oper->literal[i] + = oper->children[0].literal[i] - oper->children[1].literal[i]; + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + break; + case slang_oper_multiply: + for (i = 0; i < 4; i++) { + oper->literal[i] + = oper->children[0].literal[i] * oper->children[1].literal[i]; + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + break; + case slang_oper_divide: + for (i = 0; i < 4; i++) { + oper->literal[i] + = oper->children[0].literal[i] / oper->children[1].literal[i]; + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + break; + default: + ; /* nothing */ + } + } + else if (n == 1 && isFloat[0]) { + switch (oper->type) { + case slang_oper_minus: + for (i = 0; i < 4; i++) { + oper->literal[i] = -oper->children[0].literal[i]; + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + break; + case slang_oper_plus: + COPY_4V(oper->literal, oper->children[0].literal); + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + break; + default: + ; /* nothing */ + } + } + else if (n == 2 && isBool[0] && isBool[1]) { + /* simple boolean expression */ + switch (oper->type) { + case slang_oper_logicaland: + for (i = 0; i < 4; i++) { + const GLint a = oper->children[0].literal[i] ? 1 : 0; + const GLint b = oper->children[1].literal[i] ? 1 : 0; + oper->literal[i] = (GLfloat) (a && b); + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_bool; + break; + case slang_oper_logicalor: + for (i = 0; i < 4; i++) { + const GLint a = oper->children[0].literal[i] ? 1 : 0; + const GLint b = oper->children[1].literal[i] ? 1 : 0; + oper->literal[i] = (GLfloat) (a || b); + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_bool; + break; + case slang_oper_logicalxor: + for (i = 0; i < 4; i++) { + const GLint a = oper->children[0].literal[i] ? 1 : 0; + const GLint b = oper->children[1].literal[i] ? 1 : 0; + oper->literal[i] = (GLfloat) (a ^ b); + } + slang_operation_destruct(oper); + oper->type = slang_oper_literal_bool; + break; + default: + ; /* nothing */ + } + } + else if (n == 4 && isFloat[0] && isFloat[1] && isFloat[2] && isFloat[3]) { + if (oper->type == slang_oper_call) { + if (strcmp((char *) oper->a_id, "vec4") == 0) { + oper->literal[0] = oper->children[0].literal[0]; + oper->literal[1] = oper->children[1].literal[0]; + oper->literal[2] = oper->children[2].literal[0]; + oper->literal[3] = oper->children[3].literal[0]; + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + } + } + } +} + diff --git a/src/mesa/shader/slang/slang_simplify.h b/src/mesa/shader/slang/slang_simplify.h new file mode 100644 index 0000000000..69be3092a5 --- /dev/null +++ b/src/mesa/shader/slang/slang_simplify.h @@ -0,0 +1,12 @@ + +#ifndef SLANG_SIMPLIFY_H +#define SLANG_SIMPLIFY_H + +extern void +slang_simplify(slang_operation *oper, + const slang_assembly_name_space * space, + slang_atom_pool * atoms); + + + +#endif /* SLANG_SIMPLIFY_H */ diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 256d52455d..314ecc8d75 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -220,3 +220,16 @@ slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom) return (const char *) (atom); } + +/** + * Generate a new, unique atom with given prefix. + */ +slang_atom +slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix) +{ + char name[1000]; + static int nextFree = 100; + sprintf(name, "%s%d", prefix, nextFree); + nextFree++; + return slang_atom_pool_atom(pool, name); +} diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 565de4e4b0..c969ffcd2a 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -102,6 +102,10 @@ GLvoid slang_atom_pool_destruct (slang_atom_pool *); slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *); const char *slang_atom_pool_id (slang_atom_pool *, slang_atom); +slang_atom +slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix); + + #ifdef __cplusplus } #endif -- cgit v1.2.3 From 8627bf14524a85cedc3d1794fce9f562fd12bf79 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 14:49:41 -0700 Subject: Rewrite/simplify most built-in functions to use updated set of __asm instructions. --- .../shader/slang/library/slang_builtin_vec4.gc | 20 +- .../shader/slang/library/slang_common_builtin.gc | 1504 ++++++++++++-------- src/mesa/shader/slang/library/slang_core.gc | 251 +++- 3 files changed, 1105 insertions(+), 670 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_builtin_vec4.gc b/src/mesa/shader/slang/library/slang_builtin_vec4.gc index d549c0133a..f075a886bd 100755 --- a/src/mesa/shader/slang/library/slang_builtin_vec4.gc +++ b/src/mesa/shader/slang/library/slang_builtin_vec4.gc @@ -181,10 +181,10 @@ float dot (vec3 v, vec3 u) { return v4.x; } -float dot (vec4 v, vec4 u) { - __asm vec4_dot v, u; - return v.x; -} +//float dot (vec4 v, vec4 u) { +// __asm vec4_dot v, u; +// return v.x; +//} float length (vec3 v) { @@ -199,14 +199,10 @@ float length (vec4 v) { } -vec3 normalize (vec3 v) { - vec4 u = vec4 (v, 0.0); - vec4 w = u; - __asm vec4_dot u, u; - float l = sqrt (u.x); - __asm float_to_vec4 u, l; - __asm vec4_divide w, u; - return w.xyz; +vec3 normalize (vec3 v) +{ + float s = inversesqrt(dot(v,v)); + __retVal = v * s; } vec4 normalize (vec4 v) { diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 768cef5474..0e94979d92 100755 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -26,6 +26,8 @@ // From Shader Spec, ver. 1.10, rev. 59 // +//bp: XXX these will probably go away since the value needs to be +//determined at runtime and may vary from one GLcontext to another... const int gl_MaxLights = 8; const int gl_MaxClipPlanes = 6; const int gl_MaxTextureUnits = 8; @@ -155,128 +157,159 @@ struct gl_FogParameters { uniform gl_FogParameters gl_Fog; + + + + // // 8.1 Angle and Trigonometry Functions // -float radians (float deg) { - return 3.141593 * deg / 180.0; +//// radians + +float radians(const float deg) +{ + const float c = 3.1415926 / 180.0; + __asm vec4_multiply __retVal.x, deg, c; } -vec2 radians (vec2 deg) { - return vec2 (3.141593) * deg / vec2 (180.0); +vec2 radians(const vec2 deg) +{ + const float c = 3.1415926 / 180.0; + __asm vec4_multiply __retVal.xy, deg.xy, c.xx; } -vec3 radians (vec3 deg) { - return vec3 (3.141593) * deg / vec3 (180.0); +vec3 radians(const vec3 deg) +{ + const float c = 3.1415926 / 180.0; + __asm vec4_multiply __retVal.xyz, deg.xyz, c.xxx; } -vec4 radians (vec4 deg) { - return vec4 (3.141593) * deg / vec4 (180.0); +vec4 radians(const vec4 deg) +{ + const float c = 3.1415926 / 180.0; + __asm vec4_multiply __retVal, deg, c.xxxx; } -float degrees (float rad) { - return 180.0 * rad / 3.141593; + +//// degrees + +float degrees(const float rad) +{ + const float c = 180.0 / 3.1415926; + __asm vec4_multiply __retVal.x, rad, c; } -vec2 degrees (vec2 rad) { - return vec2 (180.0) * rad / vec2 (3.141593); +vec2 degrees(const vec2 rad) +{ + const float c = 3.1415926 / 180.0; + __asm vec4_multiply __retVal.xy, rad.xy, c.xx; } -vec3 degrees (vec3 rad) { - return vec3 (180.0) * rad / vec3 (3.141593); +vec3 degrees(const vec3 rad) +{ + const float c = 3.1415926 / 180.0; + __asm vec4_multiply __retVal.xyz, rad.xyz, c.xxx; } -vec4 degrees (vec4 rad) { - return vec4 (180.0) * rad / vec4 (3.141593); +vec4 degrees(const vec4 rad) +{ + const float c = 3.1415926 / 180.0; + __asm vec4_multiply __retVal, rad, c.xxxx; } -float sin (float angle) { - float x; - __asm float_sine x, angle; - return x; + +//// sin + +float sin(const float radians) +{ + __asm float_sine __retVal.x, radians; } -vec2 sin (vec2 angle) { - return vec2 ( - sin (angle.x), - sin (angle.y) - ); +vec2 sin(const vec2 radians) +{ + __asm float_sine __retVal.x, radians.x; + __asm float_sine __retVal.y, radians.y; } -vec3 sin (vec3 angle) { - return vec3 ( - sin (angle.x), - sin (angle.y), - sin (angle.z) - ); +vec3 sin(const vec3 radians) +{ + __asm float_sine __retVal.x, radians.x; + __asm float_sine __retVal.y, radians.y; + __asm float_sine __retVal.z, radians.z; } -vec4 sin (vec4 angle) { - return vec4 ( - sin (angle.x), - sin (angle.y), - sin (angle.z), - sin (angle.w) - ); +vec4 sin(const vec4 radians) +{ + __asm float_sine __retVal.x, radians.x; + __asm float_sine __retVal.y, radians.y; + __asm float_sine __retVal.z, radians.z; + __asm float_sine __retVal.w, radians.w; } -float cos (float angle) { - return sin (angle + 1.5708); + +//// cos + +float cos(const float radians) +{ + __asm float_cosine __retVal.x, radians; } -vec2 cos (vec2 angle) { - return vec2 ( - cos (angle.x), - cos (angle.y) - ); +vec2 cos(const vec2 radians) +{ + __asm float_cosine __retVal.x, radians.x; + __asm float_cosine __retVal.y, radians.y; } -vec3 cos (vec3 angle) { - return vec3 ( - cos (angle.x), - cos (angle.y), - cos (angle.z) - ); +vec3 cos(const vec3 radians) +{ + __asm float_cosine __retVal.x, radians.x; + __asm float_cosine __retVal.y, radians.y; + __asm float_cosine __retVal.z, radians.z; } -vec4 cos (vec4 angle) { - return vec4 ( - cos (angle.x), - cos (angle.y), - cos (angle.z), - cos (angle.w) - ); +vec4 cos(const vec4 radians) +{ + __asm float_cosine __retVal.x, radians.x; + __asm float_cosine __retVal.y, radians.y; + __asm float_cosine __retVal.z, radians.z; + __asm float_cosine __retVal.w, radians.w; } -float tan (float angle) { - return sin (angle) / cos (angle); + + +//// tan + +float tan(const float angle) +{ + const float s = sin(angle); + const float c = cos(angle); + return s / c; } -vec2 tan (vec2 angle) { - return vec2 ( - tan (angle.x), - tan (angle.y) - ); +vec2 tan(const vec2 angle) +{ + const vec2 s = sin(angle); + const vec2 c = cos(angle); + return s / c; } -vec3 tan (vec3 angle) { - return vec3 ( - tan (angle.x), - tan (angle.y), - tan (angle.z) - ); +vec3 tan(const vec3 angle) +{ + const vec3 s = sin(angle); + const vec3 c = cos(angle); + return s / c; } -vec4 tan (vec4 angle) { - return vec4 ( - tan (angle.x), - tan (angle.y), - tan (angle.z), - tan (angle.w) - ); +vec4 tan(const vec4 angle) +{ + const vec4 s = sin(angle); + const vec4 c = cos(angle); + return s / c; } + + float asin (float x) { float y; __asm float_arcsine y, x; @@ -404,675 +437,884 @@ vec4 atan (vec4 u, vec4 v) { // 8.2 Exponential Functions // -float pow (float x, float y) { - float p; - __asm float_power p, x, y; - return p; +//// pow + +float pow(const float a, const float b) +{ + __asm float_power __retVal.x, a, b; } -vec2 pow (vec2 v, vec2 u) { - return vec2 ( - pow (v.x, u.x), - pow (v.y, u.y) - ); +vec2 pow(const vec2 a, const vec2 b) +{ + __asm float_power __retVal.x, a.x, b.x; + __asm float_power __retVal.y, a.y, b.y; } -vec3 pow (vec3 v, vec3 u) { - return vec3 ( - pow (v.x, u.x), - pow (v.y, u.y), - pow (v.z, u.z) - ); +vec3 pow(const vec3 a, const vec3 b) +{ + __asm float_power __retVal.x, a.x, b.x; + __asm float_power __retVal.y, a.y, b.y; + __asm float_power __retVal.z, a.z, b.z; } -vec4 pow (vec4 v, vec4 u) { - return vec4 ( - pow (v.x, u.x), - pow (v.y, u.y), - pow (v.z, u.z), - pow (v.w, u.w) - ); +vec4 pow(const vec4 a, const vec4 b) +{ + __asm float_power __retVal.x, a.x, b.x; + __asm float_power __retVal.y, a.y, b.y; + __asm float_power __retVal.z, a.z, b.z; + __asm float_power __retVal.w, a.w, b.w; } -float exp (float x) { - return pow (2.71828183, x); + +//// exp + +float exp(const float a) +{ + __asm float_exp __retVal.x, a; } -vec2 exp (vec2 v) { - return pow (vec2 (2.71828183), v); +vec2 exp(const vec2 a) +{ + __asm float_exp __retVal.x, a.x; + __asm float_exp __retVal.y, a.y; } -vec3 exp (vec3 v) { - return pow (vec3 (2.71828183), v); +vec3 exp(const vec3 a) +{ + __asm float_exp __retVal.x, a.x; + __asm float_exp __retVal.y, a.y; + __asm float_exp __retVal.z, a.z; } -vec4 exp (vec4 v) { - return pow (vec4 (2.71828183), v); +vec4 exp(const vec4 a) +{ + __asm float_exp __retVal.x, a.x; + __asm float_exp __retVal.y, a.y; + __asm float_exp __retVal.z, a.z; + __asm float_exp __retVal.w, a.w; } -float log2 (float x) { - float y; - __asm float_log2 y, x; - return y; + + +//// log2 + +float log2(const float x) +{ + __asm float_log2 __retVal.x, x; } -vec2 log2 (vec2 v) { - return vec2 ( - log2 (v.x), - log2 (v.y) - ); +vec2 log2(const vec2 v) +{ + __asm float_log2 __retVal.x, v.x; + __asm float_log2 __retVal.y, v.y; } -vec3 log2 (vec3 v) { - return vec3 ( - log2 (v.x), - log2 (v.y), - log2 (v.z) - ); +vec3 log2(const vec3 v) +{ + __asm float_log2 __retVal.x, v.x; + __asm float_log2 __retVal.y, v.y; + __asm float_log2 __retVal.z, v.z; } -vec4 log2 (vec4 v) { - return vec4 ( - log2 (v.x), - log2 (v.y), - log2 (v.z), - log2 (v.w) - ); +vec4 log2(const vec4 v) +{ + __asm float_log2 __retVal.x, v.x; + __asm float_log2 __retVal.y, v.y; + __asm float_log2 __retVal.z, v.z; + __asm float_log2 __retVal.w, v.w; } -float log (float x) { - return log2 (x) / log2 (2.71828183); + +//// log (natural log) + +float log(const float x) +{ + // note: logBaseB(x) = logBaseN(x) / logBaseN(B) + // compute log(x) = log2(x) / log2(e) + // c = 1.0 / log2(e) = 0.693147181 + const float c = 0.693147181; + return log2(x) * c; } -vec2 log (vec2 v) { - return log2 (v) / log2 (vec2 (2.71828183)); +vec2 log(const vec2 v) +{ + const float c = 0.693147181; + return log2(v) * c; } -vec3 log (vec3 v) { - return log2 (v) / log2 (vec3 (2.71828183)); +vec3 log(const vec3 v) +{ + const float c = 0.693147181; + return log2(v) * c; } -vec4 log (vec4 v) { - return log2 (v) / log2 (vec4 (2.71828183)); +vec4 log(const vec4 v) +{ + const float c = 0.693147181; + return log2(v) * c; } -float exp2 (float x) { - return pow (2.0, x); + +//// exp2 + +float exp2(const float a) +{ + __asm float_exp2 __retVal.x, a; } -vec2 exp2 (vec2 v) { - return pow (vec2 (2.0), v); +vec2 exp2(const vec2 a) +{ + __asm float_exp2 __retVal.x, a.x; + __asm float_exp2 __retVal.y, a.y; } -vec3 exp2 (vec3 v) { - return pow (vec3 (2.0), v); +vec3 exp2(const vec3 a) +{ + __asm float_exp2 __retVal.x, a.x; + __asm float_exp2 __retVal.y, a.y; + __asm float_exp2 __retVal.z, a.z; } -vec4 exp2 (vec4 v) { - return pow (vec4 (2.0), v); +vec4 exp2(const vec4 a) +{ + __asm float_exp2 __retVal.x, a.x; + __asm float_exp2 __retVal.y, a.y; + __asm float_exp2 __retVal.z, a.z; + __asm float_exp2 __retVal.w, a.w; } -float sqrt (float x) { - return pow (x, 0.5); + +//// sqrt + +float sqrt(const float x) +{ + float r; + __asm float_rsq r, x; + __asm float_rcp __retVal.x, r; } -vec2 sqrt (vec2 v) { - return pow (v, vec2 (0.5)); +vec2 sqrt(const vec2 v) +{ + float r; + __asm float_rsq r, v.x; + __asm float_rcp __retVal.x, r; + __asm float_rsq r, v.y; + __asm float_rcp __retVal.y, r; } -vec3 sqrt (vec3 v) { - return pow (v, vec3 (0.5)); +vec3 sqrt(const vec3 v) +{ + float r; + __asm float_rsq r, v.x; + __asm float_rcp __retVal.x, r; + __asm float_rsq r, v.y; + __asm float_rcp __retVal.y, r; + __asm float_rsq r, v.z; + __asm float_rcp __retVal.z, r; } -vec4 sqrt (vec4 v) { - return pow (v, vec4 (0.5)); +vec4 sqrt(const vec4 v) +{ + float r; + __asm float_rsq r, v.x; + __asm float_rcp __retVal.x, r; + __asm float_rsq r, v.y; + __asm float_rcp __retVal.y, r; + __asm float_rsq r, v.z; + __asm float_rcp __retVal.z, r; + __asm float_rsq r, v.w; + __asm float_rcp __retVal.w, r; } -float inversesqrt (float x) { - return 1.0 / sqrt (x); + +//// inversesqrt + +float inversesqrt(const float x) +{ + __asm float_rsq __retVal.x, x; } -vec2 inversesqrt (vec2 v) { - return vec2 (1.0) / sqrt (v); +vec2 inversesqrt(const vec2 v) +{ + __asm float_rsq __retVal.x, v.x; + __asm float_rsq __retVal.y, v.y; } -vec3 inversesqrt (vec3 v) { - return vec3 (1.0) / sqrt (v); +vec3 inversesqrt(const vec3 v) +{ + __asm float_rsq __retVal.x, v.x; + __asm float_rsq __retVal.y, v.y; + __asm float_rsq __retVal.z, v.z; } -vec4 inversesqrt (vec4 v) { - return vec4 (1.0) / sqrt (v); +vec4 inversesqrt(const vec4 v) +{ + __asm float_rsq __retVal.x, v.x; + __asm float_rsq __retVal.y, v.y; + __asm float_rsq __retVal.z, v.z; + __asm float_rsq __retVal.w, v.w; } + +//// normalize + +float normalize(const float x) +{ + __retVal.x = 1.0; +} + +vec2 normalize(const vec2 v) +{ + const float s = inversesqrt(dot(v, v)); + __asm vec4_multiply __retVal.xy, v, s.xx; +} + +vec3 normalize(const vec3 v) +{ + const float s = inversesqrt(dot(v, v)); + __asm vec4_multiply __retVal.xyz, v, s.xxx; +} + +vec4 normalize(const vec4 v) +{ + const float s = inversesqrt(dot(v, v)); + __asm vec4_multiply __retVal, v, s.xxxx; +} + + + // // 8.3 Common Functions // -float abs (float x) { - return x >= 0.0 ? x : -x; + +//// abs + +float abs(const float a) +{ + __asm vec4_abs __retVal.x, a; } -vec2 abs (vec2 v) { - return vec2 ( - abs (v.x), - abs (v.y) - ); +vec2 abs(const vec2 a) +{ + __asm vec4_abs __retVal.xy, a; } -vec3 abs (vec3 v) { - return vec3 ( - abs (v.x), - abs (v.y), - abs (v.z) - ); +vec3 abs(const vec3 a) +{ + __asm vec4_abs __retVal.xyz, a; } -vec4 abs (vec4 v) { - return vec4 ( - abs (v.x), - abs (v.y), - abs (v.z), - abs (v.w) - ); +vec4 abs(const vec4 a) +{ + __asm vec4_abs __retVal, a; } -float sign (float x) { - return x > 0.0 ? 1.0 : x < 0.0 ? -1.0 : 0.0; + +//// sign + +float sign(const float x) +{ + float p, n; + __asm vec4_sgt p.x, x, 0.0; // p = (x > 0) + __asm vec4_sgt n.x, 0.0, x; // n = (x < 0) + __asm vec4_subtract __retVal.x, p, n; // sign = p - n } -vec2 sign (vec2 v) { - return vec2 ( - sign (v.x), - sign (v.y) - ); +vec2 sign(const vec2 v) +{ + vec2 p, n; + __asm vec4_sgt p.xy, v, 0.0; + __asm vec4_sgt n.xy, 0.0, v; + __asm vec4_subtract __retVal.xy, p, n; } -vec3 sign (vec3 v) { - return vec3 ( - sign (v.x), - sign (v.y), - sign (v.z) - ); +vec3 sign(const vec3 v) +{ + vec3 p, n; + __asm vec4_sgt p.xyz, v, 0.0; + __asm vec4_sgt n.xyz, 0.0, v; + __asm vec4_subtract __retVal.xyz, p, n; } -vec4 sign (vec4 v) { - return vec4 ( - sign (v.x), - sign (v.y), - sign (v.z), - sign (v.w) - ); +vec4 sign(const vec4 v) +{ + vec4 p, n; + __asm vec4_sgt p, v, 0.0; + __asm vec4_sgt n, 0.0, v; + __asm vec4_subtract __retVal, p, n; } -float floor (float x) { - float y; - __asm float_floor y, x; - return y; + +//// floor + +float floor(const float a) +{ + __asm vec4_floor __retVal.x, a; } -vec2 floor (vec2 v) { - return vec2 ( - floor (v.x), - floor (v.y) - ); +vec2 floor(const vec2 a) +{ + __asm vec4_floor __retVal.xy, a; } -vec3 floor (vec3 v) { - return vec3 ( - floor (v.x), - floor (v.y), - floor (v.z) - ); +vec3 floor(const vec3 a) +{ + __asm vec4_floor __retVal.xyz, a; } -vec4 floor (vec4 v) { - return vec4 ( - floor (v.x), - floor (v.y), - floor (v.z), - floor (v.w) - ); +vec4 floor(const vec4 a) +{ + __asm vec4_floor __retVal, a; } -float ceil (float x) { - float y; - __asm float_ceil y, x; - return y; + +//// ceil + +float ceil(const float a) +{ + // XXX this could be improved + float b = -a; + __asm vec4_floor b, b; + __retVal.x = -b; } -vec2 ceil (vec2 v) { - return vec2 ( - ceil (v.x), - ceil (v.y) - ); +vec2 ceil(const vec2 a) +{ + vec2 b = -a; + __asm vec4_floor b, b; + __retVal.xy = -b; } -vec3 ceil (vec3 v) { - return vec3 ( - ceil (v.x), - ceil (v.y), - ceil (v.z) - ); +vec3 ceil(const vec3 a) +{ + vec3 b = -a; + __asm vec4_floor b, b; + __retVal.xyz = -b; } -vec4 ceil (vec4 v) { - return vec4 ( - ceil (v.x), - ceil (v.y), - ceil (v.z), - ceil (v.w) - ); +vec4 ceil(const vec4 a) +{ + vec4 b = -a; + __asm vec4_floor b, b; + __retVal = -b; } -float fract (float x) { - return x - floor (x); + +//// fract + +float fract(const float a) +{ + __asm vec4_frac __retVal.x, a; } -vec2 fract (vec2 v) { - return v - floor (v); +vec2 fract(const vec2 a) +{ + __asm vec4_frac __retVal.xy, a; } -vec3 fract (vec3 v) { - return v - floor (v); +vec3 fract(const vec3 a) +{ + __asm vec4_frac __retVal.xyz, a; } -vec4 fract (vec4 v) { - return v - floor (v); +vec4 fract(const vec4 a) +{ + __asm vec4_frac __retVal, a; } -float mod (float x, float y) { - return x - y * floor (x / y); + +//// mod (very untested!) + +float mod(const float a, const float b) +{ + float oneOverB; + __asm float_rcp oneOverB, b; + __retVal.x = a - b * floor(a * oneOverB); } -vec2 mod (vec2 v, float u) { - return v - u * floor (v / u); +vec2 mod(const vec2 a, const float b) +{ + float oneOverB; + __asm float_rcp oneOverB, b; + __retVal.xy = a - b * floor(a * oneOverB); } -vec3 mod (vec3 v, float u) { - return v - u * floor (v / u); +vec3 mod(const vec3 a, const float b) +{ + float oneOverB; + __asm float_rcp oneOverB, b; + __retVal.xyz = a - b * floor(a * oneOverB); } -vec4 mod (vec4 v, float u) { - return v - u * floor (v / u); +vec4 mod(const vec4 a, const float b) +{ + float oneOverB; + __asm float_rcp oneOverB, b; + __retVal = a - b * floor(a * oneOverB); } -vec2 mod (vec2 v, vec2 u) { - return v - u * floor (v / u); +vec2 mod(const vec2 a, const vec2 b) +{ + float oneOverBx, oneOverBy; + __asm float_rcp oneOverBx, b.x; + __asm float_rcp oneOverBy, b.y; + __retVal.x = a.x - b.x * floor(a.x * oneOverBx); + __retVal.y = a.y - b.y * floor(a.y * oneOverBy); } -vec3 mod (vec3 v, vec3 u) { - return v - u * floor (v / u); +vec3 mod(const vec3 a, const vec3 b) +{ + float oneOverBx, oneOverBy, oneOverBz; + __asm float_rcp oneOverBx, b.x; + __asm float_rcp oneOverBy, b.y; + __asm float_rcp oneOverBz, b.z; + __retVal.x = a.x - b.x * floor(a.x * oneOverBx); + __retVal.y = a.y - b.y * floor(a.y * oneOverBy); + __retVal.z = a.z - b.z * floor(a.z * oneOverBz); } -vec4 mod (vec4 v, vec4 u) { - return v - u * floor (v / u); +vec4 mod(const vec4 a, const vec4 b) +{ + float oneOverBx, oneOverBy, oneOverBz, oneOverBw; + __asm float_rcp oneOverBx, b.x; + __asm float_rcp oneOverBy, b.y; + __asm float_rcp oneOverBz, b.z; + __asm float_rcp oneOverBw, b.w; + __retVal.x = a.x - b.x * floor(a.x * oneOverBx); + __retVal.y = a.y - b.y * floor(a.y * oneOverBy); + __retVal.z = a.z - b.z * floor(a.z * oneOverBz); + __retVal.w = a.w - b.w * floor(a.w * oneOverBz); } -float min (float x, float y) { - return x < y ? x : y; + +//// min + +float min(const float a, const float b) +{ + __asm vec4_min __retVal.x, a.x, b.x; } -vec2 min (vec2 v, vec2 u) { - return vec2 ( - min (v.x, u.x), - min (v.y, u.y) - ); +vec2 min(const vec2 a, const vec2 b) +{ + __asm vec4_min __retVal.xy, a.xy, b.xy; } -vec3 min (vec3 v, vec3 u) { - return vec3 ( - min (v.x, u.x), - min (v.y, u.y), - min (v.z, u.z) - ); +vec3 min(const vec3 a, const vec3 b) +{ + __asm vec4_min __retVal.xyz, a.xyz, b.xyz; } -vec4 min (vec4 v, vec4 u) { - return vec4 ( - min (v.x, u.x), - min (v.y, u.y), - min (v.z, u.z), - min (v.w, u.w) - ); +vec4 min(const vec4 a, const vec4 b) +{ + __asm vec4_min __retVal, a, b; } -vec2 min (vec2 v, float y) { - return min (v, vec2 (y)); +vec2 min(const vec2 a, const float b) +{ + __asm vec4_min __retVal, a.xy, b.xx; } -vec3 min (vec3 v, float y) { - return min (v, vec3 (y)); +vec3 min(const vec3 a, const float b) +{ + __asm vec4_min __retVal, a.xyz, b.xxx; } -vec4 min (vec4 v, float y) { - return min (v, vec4 (y)); +vec4 min(const vec4 a, const float b) +{ + __asm vec4_min __retVal, a, b.xxxx; } -float max (float x, float y) { - return x < y ? y : x; + +//// max + +float max(const float a, const float b) +{ + __asm vec4_max __retVal.x, a.x, b.x; } -vec2 max (vec2 v, vec2 u) { - return vec2 ( - max (v.x, u.x), - max (v.y, u.y) - ); +vec2 max(const vec2 a, const vec2 b) +{ + __asm vec4_max __retVal.xy, a.xy, b.xy; } -vec3 max (vec3 v, vec3 u) { - return vec3 ( - max (v.x, u.x), - max (v.y, u.y), - max (v.z, u.z) - ); +vec3 max(const vec3 a, const vec3 b) +{ + __asm vec4_max __retVal.xyz, a.xyz, b.xyz; } -vec4 max (vec4 v, vec4 u) { - return vec4 ( - max (v.x, u.x), - max (v.y, u.y), - max (v.z, u.z), - max (v.w, u.w) - ); +vec4 max(const vec4 a, const vec4 b) +{ + __asm vec4_max __retVal, a, b; } -vec2 max (vec2 v, float y) { - return max (v, vec2 (y)); +vec2 max(const vec2 a, const float b) +{ + __asm vec4_max __retVal, a.xy, b.xx; } -vec3 max (vec3 v, float y) { - return max (v, vec3 (y)); +vec3 max(const vec3 a, const float b) +{ + __asm vec4_max __retVal, a.xyz, b.xxx; } -vec4 max (vec4 v, float y) { - return max (v, vec4 (y)); +vec4 max(const vec4 a, const float b) +{ + __asm vec4_max __retVal, a, b.xxxx; } -float clamp (float x, float minVal, float maxVal) { - return min (max (x, minVal), maxVal); + +//// clamp + +float clamp(const float val, const float minVal, const float maxVal) +{ + float t; + __asm vec4_max t, val, minVal; + __asm vec4_min __retVal.x, t, maxVal; } -vec2 clamp (vec2 x, float minVal, float maxVal) { - return min (max (x, minVal), maxVal); +vec2 clamp(const vec2 val, const float minVal, const float maxVal) +{ + vec2 t; + __asm vec4_max t.xy, val.xy, minVal.xx; + __asm vec4_min __retVal.xy, t.xy, maxVal.xx; } -vec3 clamp (vec3 x, float minVal, float maxVal) { - return min (max (x, minVal), maxVal); +vec3 clamp(const vec3 val, const float minVal, const float maxVal) +{ + vec3 t; + __asm vec4_max t.xyz, val.xyz, minVal.xxx; + __asm vec4_min __retVal.xyz, t.xyz, maxVal.xxx; } -vec4 clamp (vec4 x, float minVal, float maxVal) { - return min (max (x, minVal), maxVal); +vec4 clamp(const vec4 val, const float minVal, const float maxVal) +{ + vec4 t; + __asm vec4_max t, val, minVal.xxxx; + __asm vec4_min __retVal, t, maxVal.xxxx; } -vec2 clamp (vec2 x, vec2 minVal, vec2 maxVal) { - return min (max (x, minVal), maxVal); +vec2 clamp(const vec2 val, const vec2 minVal, const vec2 maxVal) +{ + vec2 t; + __asm vec4_max t.xy, val.xy, minVal.xy; + __asm vec4_min __retVal.xy, t.xy, maxVal.xxxx; } -vec3 clamp (vec3 x, vec3 minVal, vec3 maxVal) { - return min (max (x, minVal), maxVal); +vec3 clamp(const vec3 val, const vec3 minVal, const vec3 maxVal) +{ + vec3 t; + __asm vec4_max t.xyz, val.xyz, minVal.xyz; + __asm vec4_min __retVal.xyz, t.xyz, maxVal.xxxx; } -vec4 clamp (vec4 x, vec4 minVal, vec4 maxVal) { - return min (max (x, minVal), maxVal); +vec4 clamp(const vec4 val, const vec4 minVal, const vec4 maxVal) +{ + vec4 t; + __asm vec4_max t, val, minVal; + __asm vec4_min __retVal, t, maxVal; } -float mix (float x, float y, float a) { - return x * (1.0 - a) + y * a; + +//// mix + +float mix(const float x, const float y, const float a) +{ + const float d = y - x; + return x + d * a; // MAD } -vec2 mix (vec2 x, vec2 y, float a) { - return x * (1.0 - a) + y * a; +vec2 mix(const vec2 x, const vec2 y, const float a) +{ + const vec2 d = y - x; + return x + d * a; // MAD } -vec3 mix (vec3 x, vec3 y, float a) { - return x * (1.0 - a) + y * a; +vec3 mix(const vec3 x, const vec3 y, const float a) +{ + const vec3 d = y - x; + return x + d * a; // MAD } -vec4 mix (vec4 x, vec4 y, float a) { - return x * (1.0 - a) + y * a; +vec4 mix(const vec4 x, const vec4 y, const float a) +{ + const vec4 d = y - x; + return x + d * a; // MAD } -vec2 mix (vec2 x, vec2 y, vec2 a) { - return x * (1.0 - a) + y * a; +vec2 mix(const vec2 x, const vec2 y, const vec2 a) +{ + const vec2 d = y - x; + return x + d * a; // MAD } -vec3 mix (vec3 x, vec3 y, vec3 a) { - return x * (1.0 - a) + y * a; +vec3 mix(const vec3 x, const vec3 y, const vec3 a) +{ + const vec3 d = y - x; + return x + d * a; // MAD } -vec4 mix (vec4 x, vec4 y, vec4 a) { - return x * (1.0 - a) + y * a; +vec4 mix(const vec4 x, const vec4 y, const vec4 a) +{ + const vec4 d = y - x; + return x + d * a; // MAD } -float step (float edge, float x) { - return x < edge ? 0.0 : 1.0; + +//// step (untested) + +float step(const float edge, const float x) +{ + __asm vec4_sgt __retVal.x, x, edge; } -vec2 step (vec2 edge, vec2 v) { - return vec2 ( - step (edge.x, v.x), - step (edge.y, v.y) - ); +vec2 step(const vec2 edge, const vec2 x) +{ + __asm vec4_sgt __retVal.xy, x, edge; } -vec3 step (vec3 edge, vec3 v) { - return vec3 ( - step (edge.x, v.x), - step (edge.y, v.y), - step (edge.z, v.z) - ); +vec3 step(const vec3 edge, const vec3 x) +{ + __asm vec4_sgt __retVal.xyz, x, edge; } -vec4 step (vec4 edge, vec4 v) { - return vec4 ( - step (edge.x, v.x), - step (edge.y, v.y), - step (edge.z, v.z), - step (edge.w, v.w) - ); +vec4 step(const vec4 edge, const vec4 x) +{ + __asm vec4_sgt __retVal, x, edge; } -vec2 step (float edge, vec2 v) { - return step (vec2 (edge), v); +vec2 step(const float edge, const vec2 v) +{ + __asm vec4_sgt __retVal.xy, v, edge.xx; } -vec3 step (float edge, vec3 v) { - return step (vec3 (edge), v); +vec3 step(const float edge, const vec3 v) +{ + __asm vec4_sgt __retVal.xyz, v, edge.xxx; } -vec4 step (float edge, vec4 v) { - return step (vec4 (edge), v); +vec4 step(const float edge, const vec4 v) +{ + __asm vec4_sgt __retVal, v, edge.xxxx; } -float smoothstep (float edge0, float edge1, float x) { - float t = clamp ((x - edge0) / (edge1 - edge0), 0.0, 1.0); + +//// smoothstep (untested) + +float smoothstep(const float edge0, const float edge1, const float x) +{ + float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); return t * t * (3.0 - 2.0 * t); } -vec2 smoothstep (vec2 edge0, vec2 edge1, vec2 v) { - return vec2 ( - smoothstep (edge0.x, edge1.x, v.x), - smoothstep (edge0.y, edge1.y, v.y) - ); +vec2 smoothstep(const vec2 edge0, const vec2 edge1, const vec2 v) +{ + vec2 t = clamp((v - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); } -vec3 smoothstep (vec3 edge0, vec3 edge1, vec3 v) { - return vec3 ( - smoothstep (edge0.x, edge1.x, v.x), - smoothstep (edge0.y, edge1.y, v.y), - smoothstep (edge0.z, edge1.z, v.z) - ); +vec3 smoothstep(const vec3 edge0, const vec3 edge1, const vec3 v) +{ + vec3 t = clamp((v - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); } -vec4 smoothstep (vec4 edge0, vec4 edge1, vec4 v) { - return vec4 ( - smoothstep (edge0.x, edge1.x, v.x), - smoothstep (edge0.y, edge1.y, v.y), - smoothstep (edge0.z, edge1.z, v.z), - smoothstep (edge0.w, edge1.w, v.w) - ); +vec4 smoothstep(const vec4 edge0, const vec4 edge1, const vec4 v) +{ + vec4 t = clamp((v - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); } -vec2 smoothstep (float edge0, float edge1, vec2 v) { - return vec2 ( - smoothstep (edge0, edge1, v.x), - smoothstep (edge0, edge1, v.y) - ); +vec2 smoothstep(const float edge0, const float edge1, const vec2 v) +{ + vec2 t = clamp((v - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); } -vec3 smoothstep (float edge0, float edge1, vec3 v) { - return vec3 ( - smoothstep (edge0, edge1, v.x), - smoothstep (edge0, edge1, v.y), - smoothstep (edge0, edge1, v.z) - ); +vec3 smoothstep(const float edge0, const float edge1, const vec3 v) +{ + vec3 t = clamp((v - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); } -vec4 smoothstep (float edge0, float edge1, vec4 v) { - return vec4 ( - smoothstep (edge0, edge1, v.x), - smoothstep (edge0, edge1, v.y), - smoothstep (edge0, edge1, v.z), - smoothstep (edge0, edge1, v.w) - ); +vec4 smoothstep(const float edge0, const float edge1, const vec4 v) +{ + vec4 t = clamp((v - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); } + + // // 8.4 Geometric Functions // -float dot (float x, float y) { - return x * y; -} -float dot (vec2 v, vec2 u) { - return v.x * u.x + v.y * u.y; -} +//// length -float dot (vec3 v, vec3 u) { - return v.x * u.x + v.y * u.y + v.z * u.z; +float length(const float x) +{ + return abs(x); } -float dot (vec4 v, vec4 u) { - return v.x * u.x + v.y * u.y + v.z * u.z + v.w * u.w; +float length(const vec2 v) +{ + float r; + const float p = dot(v, v); // p = v.x * v.x + v.y * v.y + __asm float_rsq r, p; // r = 1 / sqrt(p) + __asm float_rcp __retVal.x, r; // retVal = 1 / r } -float length (float x) { - return sqrt (dot (x, x)); +float length(const vec3 v) +{ + float r; + const float p = dot(v, v); // p = v.x * v.x + v.y * v.y + v.z * v.z + __asm float_rsq r, p; // r = 1 / sqrt(p) + __asm float_rcp __retVal.x, r; // retVal = 1 / r } -float length (vec2 v) { - return sqrt (dot (v, v)); +float length(const vec4 v) +{ + float r; + const float p = dot(v, v); // p = v.x * v.x + v.y * v.y + ... + __asm float_rsq r, p; // r = 1 / sqrt(p) + __asm float_rcp __retVal.x, r; // retVal = 1 / r } -float length (vec3 v) { - return sqrt (dot (v, v)); -} -float length (vec4 v) { - return sqrt (dot (v, v)); -} +//// distance -float distance (float x, float y) { - return length (x - y); +float distance(const float x, const float y) +{ + const float d = x - y; + return length(d); } -float distance (vec2 v, vec2 u) { - return length (v - u); +float distance(const vec2 v, const vec2 u) +{ + const vec2 d = v - u; + return length(d); } -float distance (vec3 v, vec3 u) { - return length (v - u); +float distance(const vec3 v, const vec3 u) +{ + const vec3 d = v - u; + return length(d); } -float distance (vec4 v, vec4 u) { - return length (v - u); +float distance(const vec4 v, const vec4 u) +{ + const vec4 d = v - u; + return length(d); } -vec3 cross (vec3 v, vec3 u) { - return vec3 ( - v.y * u.z - u.y * v.z, - v.z * u.x - u.z * v.x, - v.x * u.y - u.x * v.y - ); -} -float normalize (float x) { - return 1.0; -} +//// cross -vec2 normalize (vec2 v) { - return v / length (v); +vec3 cross(const vec3 v, const vec3 u) +{ + __asm vec3_cross __retVal.xyz, v, u; } -vec3 normalize (vec3 v) { - return v / length (v); -} -vec4 normalize (vec4 v) { - return v / length (v); -} +//// faceforward -float faceforward (float N, float I, float Nref) { - return dot (Nref, I) < 0.0 ? N : -N; +float faceforward(const float N, const float I, const float Nref) +{ + // this could probably be done better + const float d = dot(Nref, I); + float s; + __asm vec4_sgt s.x, 0.0, d; // s = (0.0 > d) ? 1 : 0 + return mix(-N, N, s); } -vec2 faceforward (vec2 N, vec2 I, vec2 Nref) { - return dot (Nref, I) < 0.0 ? N : -N; +vec2 faceforward(const vec2 N, const vec2 I, const vec2 Nref) +{ + // this could probably be done better + const float d = dot(Nref, I); + float s; + __asm vec4_sgt s.x, 0.0, d; // s = (0.0 > d) ? 1 : 0 + return mix(-N, N, s); } -vec3 faceforward (vec3 N, vec3 I, vec3 Nref) { - return dot (Nref, I) < 0.0 ? N : -N; +vec3 faceforward(const vec3 N, const vec3 I, const vec3 Nref) +{ + // this could probably be done better + const float d = dot(Nref, I); + float s; + __asm vec4_sgt s.x, 0.0, d; // s = (0.0 > d) ? 1 : 0 + return mix(-N, N, s); } -vec4 faceforward (vec4 N, vec4 I, vec4 Nref) { - return dot (Nref, I) < 0.0 ? N : -N; +vec4 faceforward(const vec4 N, const vec4 I, const vec4 Nref) +{ + // this could probably be done better + const float d = dot(Nref, I); + float s; + __asm vec4_sgt s.x, 0.0, d; // s = (0.0 > d) ? 1 : 0 + return mix(-N, N, s); } -float reflect (float I, float N) { - return I - 2.0 * dot (N, I) * N; + +//// reflect + +float reflect(const float I, const float N) +{ + return I - 2.0 * dot(N, I) * N; } -vec2 reflect (vec2 I, vec2 N) { - return I - 2.0 * dot (N, I) * N; +vec2 reflect(const vec2 I, const vec2 N) +{ + return I - 2.0 * dot(N, I) * N; } -vec3 reflect (vec3 I, vec3 N) { - return I - 2.0 * dot (N, I) * N; +vec3 reflect(const vec3 I, const vec3 N) +{ + return I - 2.0 * dot(N, I) * N; } -vec4 reflect (vec4 I, vec4 N) { - return I - 2.0 * dot (N, I) * N; +vec4 reflect(const vec4 I, const vec4 N) +{ + return I - 2.0 * dot(N, I) * N; } -float refract (float I, float N, float eta) { - float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); - if (k < 0.0) - return 0.0; - return eta * I - (eta * dot (N, I) + sqrt (k)) * N; +//// refract + +float refract(const float I, const float N, const float eta) +{ + float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)); + if (k < 0.0) + return 0.0; + return eta * I - (eta * dot(N, I) + sqrt(k)) * N; } -vec2 refract (vec2 I, vec2 N, float eta) { - float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); - if (k < 0.0) - return 0.0; - return eta * I - (eta * dot (N, I) + sqrt (k)) * N; +vec2 refract(const vec2 I, const vec2 N, const float eta) +{ + float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)); + if (k < 0.0) + return 0.0; + return eta * I - (eta * dot(N, I) + sqrt(k)) * N; } -vec3 refract (vec3 I, vec3 N, float eta) { - float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); - if (k < 0.0) - return 0.0; - return eta * I - (eta * dot (N, I) + sqrt (k)) * N; +vec3 refract(const vec3 I, const vec3 N, const float eta) +{ + float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)); + if (k < 0.0) + return 0.0; + return eta * I - (eta * dot(N, I) + sqrt(k)) * N; } -vec4 refract (vec4 I, vec4 N, float eta) { - float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I)); - if (k < 0.0) - return 0.0; - return eta * I - (eta * dot (N, I) + sqrt (k)) * N; +vec4 refract(const vec4 I, const vec4 N, const float eta) +{ + float k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)); + if (k < 0.0) + return 0.0; + return eta * I - (eta * dot(N, I) + sqrt(k)) * N; } + + + // // 8.5 Matrix Functions // @@ -1089,190 +1331,286 @@ mat4 matrixCompMult (mat4 m, mat4 n) { return mat4 (m[0] * n[0], m[1] * n[1], m[2] * n[2], m[3] * n[3]); } + + + // // 8.6 Vector Relational Functions // -bvec2 lessThan (vec2 v, vec2 u) { - return bvec2 (v.x < u.x, v.y < u.y); +//// lessThan + +bvec2 lessThan(const vec2 v, const vec2 u) +{ + __asm vec4_sgt __retVal.xy, u, v; } -bvec3 lessThan (vec3 v, vec3 u) { - return bvec3 (v.x < u.x, v.y < u.y, v.z < u.z); +bvec3 lessThan(const vec3 v, const vec3 u) +{ + __asm vec4_sgt __retVal.xyz, u, v; } -bvec4 lessThan (vec4 v, vec4 u) { - return bvec4 (v.x < u.x, v.y < u.y, v.z < u.z, v.w < u.w); +bvec4 lessThan(const vec4 v, const vec4 u) +{ + __asm vec4_sgt __retVal, u, v; } -bvec2 lessThan (ivec2 v, ivec2 u) { - return bvec2 (v.x < u.x, v.y < u.y); +bvec2 lessThan(const ivec2 v, const ivec2 u) +{ + __asm vec4_sgt __retVal.xy, u, v; } -bvec3 lessThan (ivec3 v, ivec3 u) { - return bvec3 (v.x < u.x, v.y < u.y, v.z < u.z); +bvec3 lessThan(const ivec3 v, const ivec3 u) +{ + __asm vec4_sgt __retVal.xyz, u, v; } -bvec4 lessThan (ivec4 v, ivec4 u) { - return bvec4 (v.x < u.x, v.y < u.y, v.z < u.z, v.w < u.w); +bvec4 lessThan(const ivec4 v, const ivec4 u) +{ + __asm vec4_sgt __retVal, u, v; } -bvec2 lessThanEqual (vec2 v, vec2 u) { - return bvec2 (v.x <= u.x, v.y <= u.y); + +//// lessThanEqual + +bvec2 lessThanEqual(const vec2 v, const vec2 u) +{ + __asm vec4_sge __retVal.xy, u, v; } -bvec3 lessThanEqual (vec3 v, vec3 u) { - return bvec3 (v.x <= u.x, v.y <= u.y, v.z <= u.z); +bvec3 lessThanEqual(const vec3 v, const vec3 u) +{ + __asm vec4_sge __retVal.xyz, u, v; } -bvec4 lessThanEqual (vec4 v, vec4 u) { - return bvec4 (v.x <= u.x, v.y <= u.y, v.z <= u.z, v.w <= u.w); +bvec4 lessThanEqual(const vec4 v, const vec4 u) +{ + __asm vec4_sge __retVal, u, v; } -bvec2 lessThanEqual (ivec2 v, ivec2 u) { - return bvec2 (v.x <= u.x, v.y <= u.y); +bvec2 lessThanEqual(const ivec2 v, const ivec2 u) +{ + __asm vec4_sge __retVal.xy, u, v; } -bvec3 lessThanEqual (ivec3 v, ivec3 u) { - return bvec3 (v.x <= u.x, v.y <= u.y, v.z <= u.z); +bvec3 lessThanEqual(const ivec3 v, const ivec3 u) +{ + __asm vec4_sge __retVal.xyz, u, v; } -bvec4 lessThanEqual (ivec4 v, ivec4 u) { - return bvec4 (v.x <= u.x, v.y <= u.y, v.z <= u.z, v.w <= u.w); +bvec4 lessThanEqual(const ivec4 v, const ivec4 u) +{ + __asm vec4_sge __retVal, u, v; } -bvec2 greaterThan (vec2 v, vec2 u) { - return bvec2 (v.x > u.x, v.y > u.y); + +//// greaterThan + +bvec2 greaterThan(const vec2 v, const vec2 u) +{ + __asm vec4_sgt __retVal.xy, v, u; } -bvec3 greaterThan (vec3 v, vec3 u) { - return bvec3 (v.x > u.x, v.y > u.y, v.z > u.z); +bvec3 greaterThan(const vec3 v, const vec3 u) +{ + __asm vec4_sgt __retVal.xyz, v, u; } -bvec4 greaterThan (vec4 v, vec4 u) { - return bvec4 (v.x > u.x, v.y > u.y, v.z > u.z, v.w > u.w); +bvec4 greaterThan(const vec4 v, const vec4 u) +{ + __asm vec4_sgt __retVal, v, u; } -bvec2 greaterThan (ivec2 v, ivec2 u) { - return bvec2 (v.x > u.x, v.y > u.y); +bvec2 greaterThan(const ivec2 v, const ivec2 u) +{ + __asm vec4_sgt __retVal.xy, v, u; } -bvec3 greaterThan (ivec3 v, ivec3 u) { - return bvec3 (v.x > u.x, v.y > u.y, v.z > u.z); +bvec3 greaterThan(const ivec3 v, const ivec3 u) +{ + __asm vec4_sgt __retVal.xyz, v, u; } -bvec4 greaterThan (ivec4 v, ivec4 u) { - return bvec4 (v.x > u.x, v.y > u.y, v.z > u.z, v.w > u.w); +bvec4 greaterThan(const ivec4 v, const ivec4 u) +{ + __asm vec4_sgt __retVal, v, u; } -bvec2 greaterThanEqual (vec2 v, vec2 u) { - return bvec2 (v.x >= u.x, v.y >= u.y); + +//// greaterThanEqual + +bvec2 greaterThanEqual(const vec2 v, const vec2 u) +{ + __asm vec4_sge __retVal.xy, v, u; } -bvec3 greaterThanEqual (vec3 v, vec3 u) { - return bvec3 (v.x >= u.x, v.y >= u.y, v.z >= u.z); +bvec3 greaterThanEqual(const vec3 v, const vec3 u) +{ + __asm vec4_sge __retVal.xyz, v, u; } -bvec4 greaterThanEqual (vec4 v, vec4 u) { - return bvec4 (v.x >= u.x, v.y >= u.y, v.z >= u.z, v.w >= u.w); +bvec4 greaterThanEqual(const vec4 v, const vec4 u) +{ + __asm vec4_sge __retVal, v, u; } -bvec2 greaterThanEqual (ivec2 v, ivec2 u) { - return bvec2 (v.x >= u.x, v.y >= u.y); +bvec2 greaterThanEqual(const ivec2 v, const ivec2 u) +{ + __asm vec4_sge __retVal.xy, v, u; } -bvec3 greaterThanEqual (ivec3 v, ivec3 u) { - return bvec3 (v.x >= u.x, v.y >= u.y, v.z >= u.z); +bvec3 greaterThanEqual(const ivec3 v, const ivec3 u) +{ + __asm vec4_sge __retVal.xyz, v, u; } -bvec4 greaterThanEqual (ivec4 v, ivec4 u) { - return bvec4 (v.x >= u.x, v.y >= u.y, v.z >= u.z, v.w >= u.w); +bvec4 greaterThanEqual(const ivec4 v, const ivec4 u) +{ + __asm vec4_sge __retVal, v, u; } -bvec2 equal (vec2 v, vec2 u) { - return bvec2 (v.x == u.x, v.y == u.y); + +//// equal + +bvec2 equal(const vec2 v, const vec2 u) +{ + __asm vec4_seq __retVal.xy, v, u; } -bvec3 equal (vec3 v, vec3 u) { - return bvec3 (v.x == u.x, v.y == u.y, v.z == u.z); +bvec3 equal(const vec3 v, const vec3 u) +{ + __asm vec4_seq __retVal.xyz, v, u; } -bvec4 equal (vec4 v, vec4 u) { - return bvec4 (v.x == u.x, v.y == u.y, v.z == u.z, v.w == u.w); +bvec4 equal(const vec4 v, const vec4 u) +{ + __asm vec4_seq __retVal, v, u; } -bvec2 equal (ivec2 v, ivec2 u) { - return bvec2 (v.x == u.x, v.y == u.y); +bvec2 equal(const ivec2 v, const ivec2 u) +{ + __asm vec4_seq __retVal.xy, v, u; } -bvec3 equal (ivec3 v, ivec3 u) { - return bvec3 (v.x == u.x, v.y == u.y, v.z == u.z); +bvec3 equal(const ivec3 v, const ivec3 u) +{ + __asm vec4_seq __retVal.xyz, v, u; } -bvec4 equal (ivec4 v, ivec4 u) { - return bvec4 (v.x == u.x, v.y == u.y, v.z == u.z, v.w == u.w); +bvec4 equal(const ivec4 v, const ivec4 u) +{ + __asm vec4_seq __retVal, v, u; } -bvec2 notEqual (vec2 v, vec2 u) { - return bvec2 (v.x != u.x, v.y != u.y); + +//// notEqual + +bvec2 notEqual(const vec2 v, const vec2 u) +{ + __asm vec4_sne __retVal.xy, v, u; } -bvec3 notEqual (vec3 v, vec3 u) { - return bvec3 (v.x != u.x, v.y != u.y, v.z != u.z); +bvec3 notEqual(const vec3 v, const vec3 u) +{ + __asm vec4_sne __retVal.xyz, v, u; } -bvec4 notEqual (vec4 v, vec4 u) { - return bvec4 (v.x != u.x, v.y != u.y, v.z != u.z, v.w != u.w); +bvec4 notEqual(const vec4 v, const vec4 u) +{ + __asm vec4_sne __retVal, v, u; } -bvec2 notEqual (ivec2 v, ivec2 u) { - return bvec2 (v.x != u.x, v.y != u.y); +bvec2 notEqual(const ivec2 v, const ivec2 u) +{ + __asm vec4_sne __retVal.xy, v, u; } -bvec3 notEqual (ivec3 v, ivec3 u) { - return bvec3 (v.x != u.x, v.y != u.y, v.z != u.z); +bvec3 notEqual(const ivec3 v, const ivec3 u) +{ + __asm vec4_sne __retVal.xyz, v, u; } -bvec4 notEqual (ivec4 v, ivec4 u) { - return bvec4 (v.x != u.x, v.y != u.y, v.z != u.z, v.w != u.w); +bvec4 notEqual(const ivec4 v, const ivec4 u) +{ + __asm vec4_sne __retVal, v, u; } -bool any (bvec2 v) { - return v.x || v.y; + +//// any + +bool any(const bvec2 v) +{ + float sum; + __asm vec4_add sum.x, v.x, v.y; + __asm vec4_sne __retVal.x, sum.x, 0.0; } -bool any (bvec3 v) { - return v.x || v.y || v.z; +bool any(const bvec3 v) +{ + float sum; + __asm vec4_add sum.x, v.x, v.y; + __asm vec4_add sum.x, sum.x, v.z; + __asm vec4_sne __retVal.x, sum.x, 0.0; } -bool any (bvec4 v) { - return v.x || v.y || v.z || v.w; +bool any(const bvec4 v) +{ + float sum; + __asm vec4_add sum.x, v.x, v.y; + __asm vec4_add sum.x, sum.x, v.z; + __asm vec4_add sum.x, sum.x, v.w; + __asm vec4_sne __retVal.x, sum.x, 0.0; } -bool all (bvec2 v) { + +//// all + +bool all (const vec2 v) +{ + float prod; + __asm vec4_multiply prod.x, v.x, v.y; + __asm vec4_sne __retVal.x, prod.x, 0.0; return v.x && v.y; } -bool all (bvec3 v) { - return v.x && v.y && v.z; +bool all (const bvec3 v) +{ + float prod; + __asm vec4_multiply prod.x, v.x, v.y; + __asm vec4_multiply prod.x, prod.x, v.z; + __asm vec4_sne __retVal.x, prod.x, 0.0; } -bool all (bvec4 v) { - return v.x && v.y && v.z && v.w; +bool all (const bvec4 v) +{ + float prod; + __asm vec4_multiply prod.x, v.x, v.y; + __asm vec4_multiply prod.x, prod.x, v.z; + __asm vec4_multiply prod.x, prod.x, v.w; + __asm vec4_sne __retVal.x, prod.x, 0.0; } -bvec2 not (bvec2 v) { - return bvec2 (!v.x, !v.y); + + +//// not + +bvec2 not (const bvec2 v) +{ + __asm vec4_seq __retVal.xy, v, 0.0; } -bvec3 not (bvec3 v) { - return bvec3 (!v.x, !v.y, !v.z); +bvec3 not (const bvec3 v) +{ + __asm vec4_seq __retVal.xyz, v, 0.0; } -bvec4 not (bvec4 v) { - return bvec4 (!v.x, !v.y, !v.z, !v.w); +bvec4 not (const bvec4 v) +{ + __asm vec4_seq __retVal, v, 0.0; } + + // // 8.7 Texture Lookup Functions // diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 7a721a5a1d..8f1b0c2d3c 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -23,69 +23,93 @@ */ // -// This file defines nearly all constructors and operators for built-in data types, using -// extended language syntax. In general, compiler treats constructors and operators as -// ordinary functions with some exceptions. For example, the language does not allow -// functions to be called in constant expressions - here the exception is made to allow it. +// This file defines nearly all constructors and operators for built-in data +// types, using extended language syntax. In general, compiler treats +// constructors and operators as ordinary functions with some exceptions. +// For example, the language does not allow functions to be called in +// constant expressions - here the exception is made to allow it. // -// Each implementation provides its own version of this file. Each implementation can define -// the required set of operators and constructors in its own fashion. +// Each implementation provides its own version of this file. Each +// implementation can define the required set of operators and constructors +// in its own fashion. // -// The extended language syntax is only present when compiling this file. It is implicitly -// included at the very beginning of the compiled shader, so no built-in functions can be -// used. +// The extended language syntax is only present when compiling this file. +// It is implicitly included at the very beginning of the compiled shader, +// so no built-in functions can be used. // -// To communicate with the implementation, a special extended "__asm" keyword is used, followed -// by an instruction name (any valid identifier), a destination variable identifier and a -// a list of zero or more source variable identifiers. A variable identifier is a variable name -// declared earlier in the code (as a function parameter, local or global variable). -// An instruction name designates an instruction that must be exported by the implementation. -// Each instruction receives data from source variable identifiers and returns data in the -// destination variable identifier. +// To communicate with the implementation, a special extended "__asm" keyword +// is used, followed by an instruction name (any valid identifier), a +// destination variable identifier and a list of zero or more source +// variable identifiers. // -// It is up to the implementation how to define a particular operator or constructor. If it is -// expected to being used rarely, it can be defined in terms of other operators and constructors, +// A variable identifier is a variable name declared earlier in the code +// (as a function parameter, local or global variable). +// +// An instruction name designates an instruction that must be exported +// by the implementation. Each instruction receives data from source +// variable identifiers and returns data in the destination variable +// identifier. +// +// It is up to the implementation how to define a particular operator +// or constructor. If it is expected to being used rarely, it can be +// defined in terms of other operators and constructors, // for example: // // ivec2 __operator + (const ivec2 x, const ivec2 y) { // return ivec2 (x[0] + y[0], x[1] + y[1]); // } // -// If a particular operator or constructor is expected to be used very often or is an atomic -// operation (that is, an operation that cannot be expressed in terms of other operations or -// would create a dependency cycle) it must be defined using one or more __asm constructs. +// If a particular operator or constructor is expected to be used very +// often or is an atomic operation (that is, an operation that cannot be +// expressed in terms of other operations or would create a dependency +// cycle) it must be defined using one or more __asm constructs. // -// Each implementation must define constructors for all scalar types (bool, float, int). -// There are 9 scalar-to-scalar constructors (including identity constructors). However, -// since the language introduces special constructors (like matrix constructor with a single +// Each implementation must define constructors for all scalar types +// (bool, float, int). There are 9 scalar-to-scalar constructors +// (including identity constructors). However, since the language +// introduces special constructors (like matrix constructor with a single // scalar value), implementations must also implement these cases. // The compiler provides the following algorithm when resolving a constructor: // - try to find a constructor with a prototype matching ours, -// - if no constructor is found and this is a scalar-to-scalar constructor, raise an error, +// - if no constructor is found and this is a scalar-to-scalar constructor, +// raise an error, // - if a constructor is found, execute it and return, -// - count the size of the constructor parameter list - if it is less than the size of -// our constructor's type, raise an error, -// - for each parameter in the list do a recursive constructor matching for appropriate -// scalar fields in the constructed variable, +// - count the size of the constructor parameter list - if it is less than +// the size of our constructor's type, raise an error, +// - for each parameter in the list do a recursive constructor matching for +// appropriate scalar fields in the constructed variable, // -// Each implementation must also define a set of operators that deal with built-in data types. +// Each implementation must also define a set of operators that deal with +// built-in data types. // There are four kinds of operators: -// 1) Operators that are implemented only by the compiler: "()" (function call), "," (sequence) -// and "?:" (selection). -// 2) Operators that are implemented by the compiler by expressing it in terms of other operators: +// 1) Operators that are implemented only by the compiler: "()" (function +// call), "," (sequence) and "?:" (selection). +// 2) Operators that are implemented by the compiler by expressing it in +// terms of other operators: // - "." (field selection) - translated to subscript access, -// - "&&" (logical and) - translated to " ? : false", +// - "&&" (logical and) - translated to " ? : +// false", // - "||" (logical or) - translated to " ? true : ", -// 3) Operators that can be defined by the implementation and if the required prototype is not -// found, standard behaviour is used: -// - "==", "!=", "=" (equality, assignment) - compare or assign matching fields one-by-one; -// note that at least operators for scalar data types must be defined by the implementation -// to get it work, -// 4) All other operators not mentioned above. If no required prototype is found, an error is -// raised. An implementation must follow the language specification to provide all valid -// operator prototypes. +// 3) Operators that can be defined by the implementation and if the required +// prototype is not found, standard behaviour is used: +// - "==", "!=", "=" (equality, assignment) - compare or assign +// matching fields one-by-one; +// note that at least operators for scalar data types must be defined +// by the implementation to get it work, +// 4) All other operators not mentioned above. If no required prototype is +// found, an error is raised. An implementation must follow the language +// specification to provide all valid operator prototypes. // +//bp: +vec4 vec4(const float a1, const float b1, const float c1, const float d1) +{ + __retVal.x = a1; + __retVal.y = b1; + __retVal.z = c1; + __retVal.w = d1; +} + int __constructor (const float f) { int i; __asm float_to_int i, f; @@ -154,6 +178,7 @@ vec3 __constructor (const bool b) { return vec3 (b ? 1.0 : 0.0); } +//bp: TODO replace with asm == f.xxxx vec4 __constructor (const float f) { return vec4 (f, f, f, f); } @@ -307,9 +332,11 @@ void __operator /= (inout float a, const float b) { } float __operator + (const float a, const float b) { - float c; - __asm float_add c, a, b; - return c; +// float c; +// __asm float_add c, a, b; +// return c; +//bp: + __asm float_add __retVal, a, b; } void __operator += (inout int a, const int b) { @@ -330,9 +357,11 @@ void __operator -= (inout int a, const int b) { } float __operator * (const float a, const float b) { - float c; - __asm float_multiply c, a, b; - return c; +// float c; +// __asm float_multiply c, a, b; +// return c; +//bp: + __asm float_multiply __retVal, a, b; } void __operator *= (inout int a, const int b) { @@ -340,9 +369,11 @@ void __operator *= (inout int a, const int b) { } float __operator / (const float a, const float b) { - float c; - __asm float_divide c, a, b; - return c; +// float c; +// __asm float_divide c, a, b; +// return c; +//bp: + __asm float_divide __retVal, a, b; } void __operator /= (inout int a, const int b) { @@ -535,12 +566,22 @@ void __operator -= (inout mat3 m, const mat3 n) { m[2] -= n[2]; } -vec3 __operator * (const mat3 m, const vec3 v) { - return vec3 ( - v.x * m[0].x + v.y * m[1].x + v.z * m[2].x, - v.x * m[0].y + v.y * m[1].y + v.z * m[2].y, - v.x * m[0].z + v.y * m[1].z + v.z * m[2].z - ); +//bp: +vec3 __operator * (const mat3 m, const vec3 v) +{ + vec3 r1, r2, r3; + r1.x = m[0].x; + r1.y = m[1].x; + r1.z = m[2].x; + r2.x = m[0].y; + r2.y = m[1].y; + r2.z = m[2].y; + r3.x = m[0].z; + r3.y = m[1].z; + r3.z = m[2].z; + __asm vec3_dot __retVal.x, r1, v; + __asm vec3_dot __retVal.y, r2, v; + __asm vec3_dot __retVal.z, r3, v; } mat3 __operator * (const mat3 m, const mat3 n) { @@ -571,13 +612,57 @@ void __operator -= (inout mat4 m, const mat4 n) { m[3] -= n[3]; } -vec4 __operator * (const mat4 m, const vec4 v) { - return vec4 ( - v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x, - v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y, - v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z, - v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w - ); + + + +//// dot (formerly in slang_common_builtin.gc) + +float dot(const float a, const float b) +{ + return a * b; +} + +float dot(const vec2 a, const vec2 b) +{ + return a.x * b.x + a.y * b.y; +} + +float dot(const vec3 a, const vec3 b) +{ + __asm vec3_dot __retVal, a, b; +} + +float dot(const vec4 a, const vec4 b) +{ + __asm vec4_dot __retVal, a, b; +} + + + + +vec4 __operator * (const mat4 m, const vec4 v) +{ + vec4 r1, r2, r3, r4; + r1.x = m[0].x; + r1.y = m[1].x; + r1.z = m[2].x; + r1.w = m[3].x; + r2.x = m[0].y; + r2.y = m[1].y; + r2.z = m[2].y; + r2.w = m[3].y; + r3.x = m[0].z; + r3.y = m[1].z; + r3.z = m[2].z; + r3.w = m[3].z; + r4.x = m[0].w; + r4.y = m[1].w; + r4.z = m[2].w; + r4.w = m[3].w; + __asm vec4_dot __retVal.x, r1, v; + __asm vec4_dot __retVal.y, r2, v; + __asm vec4_dot __retVal.z, r3, v; + __asm vec4_dot __retVal.w, r4, v; } mat4 __operator * (const mat4 m, const mat4 n) { @@ -768,6 +853,11 @@ vec4 __operator * (const vec4 v, const mat4 m) { v.x * m[1].x + v.y * m[1].y + v.z * m[1].z + v.w * m[1].w, v.x * m[2].x + v.y * m[2].y + v.z * m[2].z + v.w * m[2].w, v.x * m[3].x + v.y * m[3].y + v.z * m[3].z + v.w * m[3].w +//bp: +// dot(v, m[0]), +// dot(v, m[1]), +// dot(v, m[2]), +// dot(v, m[3]) ); } @@ -776,10 +866,12 @@ void __operator *= (inout vec4 v, const mat4 m) { } float __operator - (const float a, const float b) { - float c; - __asm float_negate c, b; - __asm float_add c, a, c; - return c; +// float c; +// __asm float_negate c, b; +// __asm float_add c, a, c; +// return c; +//bp: + __asm float_subtract __retVal, a, b; } int __operator + (const int a, const int b) { @@ -855,8 +947,10 @@ vec3 __operator / (const vec3 v, const vec3 u) { return vec3 (v.x / u.x, v.y / u.y, v.z / u.z); } -vec4 __operator + (const vec4 v, const vec4 u) { - return vec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w); +vec4 __operator + (const vec4 vadd, const vec4 uadd) { +// return vec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w); +//bp: + __asm vec4_add __retVal, vadd, uadd; } vec4 __operator - (const vec4 v, const vec4 u) { @@ -864,7 +958,10 @@ vec4 __operator - (const vec4 v, const vec4 u) { } vec4 __operator * (const vec4 v, const vec4 u) { - return vec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w); +// return vec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w); +// return v; +//bp: + __asm vec4_multiply __retVal, v, u; } vec4 __operator / (const vec4 v, const vec4 u) { @@ -1007,8 +1104,10 @@ vec3 __operator * (const float a, const vec3 u) { return vec3 (a * u.x, a * u.y, a * u.z); } -vec3 __operator * (const vec3 v, const float b) { - return vec3 (v.x * b, v.y * b, v.z * b); +//bp: +vec3 __operator * (const vec3 v, const float b) +{ + __retVal.xyz = v.xyz * b.xxx; } vec3 __operator / (const float a, const vec3 u) { @@ -1039,8 +1138,10 @@ vec4 __operator * (const float a, const vec4 u) { return vec4 (a * u.x, a * u.y, a * u.z, a * u.w); } -vec4 __operator * (const vec4 v, const float b) { - return vec4 (v.x * b, v.y * b, v.z * b, v.w * b); +//bp: +vec4 __operator * (const vec4 v, const float b) +{ + __asm vec4_multiply __retVal.xyzw, v.xyzw, b.xxxx; } vec4 __operator / (const float a, const vec4 u) { -- cgit v1.2.3 From fe1d01cb398cbcb5b28a0b222845d3865c4d612b Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 14:54:47 -0700 Subject: Checkpoint of work for new GLSL compiler back-end. Lots of assorted changes. --- src/mesa/shader/nvfragparse.c | 24 +- src/mesa/shader/nvvertexec.c | 28 +- src/mesa/shader/nvvertexec.h | 10 +- src/mesa/shader/program.c | 272 +++-- src/mesa/shader/program.h | 24 +- src/mesa/shader/program_instruction.h | 14 +- src/mesa/shader/programopt.c | 5 +- src/mesa/shader/shaderobjects.c | 151 ++- src/mesa/shader/shaderobjects.h | 11 + src/mesa/shader/shaderobjects_3dlabs.c | 14 +- .../shader/slang/library/slang_builtin_vec4_gc.h | 26 +- .../shader/slang/library/slang_common_builtin_gc.h | 1193 +++++++++++--------- src/mesa/shader/slang/library/slang_core_gc.h | 820 +++++++------- src/mesa/shader/slang/library/slang_shader.syn | 7 +- src/mesa/shader/slang/library/slang_shader_syn.h | 6 +- src/mesa/shader/slang/traverse_wrap.h | 112 -- 16 files changed, 1527 insertions(+), 1190 deletions(-) mode change 100755 => 100644 src/mesa/shader/shaderobjects_3dlabs.c delete mode 100644 src/mesa/shader/slang/traverse_wrap.h (limited to 'src') diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 79e6dbd87b..8405623333 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -1038,21 +1038,25 @@ Parse_VectorSrc(struct parse_state *parseState, else if (IsDigit(token[0]) || token[0] == '-' || token[0] == '+' || token[0] == '.'){ /* literal scalar constant */ GLfloat values[4]; - GLuint paramIndex; + GLuint paramIndex, swizzle; if (!Parse_ScalarConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, + values, 4, &swizzle); + ASSERT(swizzle == SWIZZLE_NOOP); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; } else if (token[0] == '{'){ /* literal vector constant */ GLfloat values[4]; - GLuint paramIndex; + GLuint paramIndex, swizzle; (void) Parse_String(parseState, "{"); if (!Parse_VectorConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, + values, 4, &swizzle); + ASSERT(swizzle == SWIZZLE_NOOP); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; } @@ -1138,11 +1142,13 @@ Parse_ScalarSrcReg(struct parse_state *parseState, else if (token[0] == '{') { /* vector literal */ GLfloat values[4]; - GLuint paramIndex; + GLuint paramIndex, swizzle; (void) Parse_String(parseState, "{"); if (!Parse_VectorConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, + values, 4, &swizzle); + ASSERT(swizzle == SWIZZLE_NOOP); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; } @@ -1163,10 +1169,12 @@ Parse_ScalarSrcReg(struct parse_state *parseState, else if (IsDigit(token[0])) { /* scalar literal */ GLfloat values[4]; - GLuint paramIndex; + GLuint paramIndex, swizzle; if (!Parse_ScalarConstant(parseState, values)) RETURN_ERROR; - paramIndex = _mesa_add_unnamed_constant(parseState->parameters, values, 4); + paramIndex = _mesa_add_unnamed_constant(parseState->parameters, + values, 4, &swizzle); + ASSERT(swizzle == SWIZZLE_NOOP); srcReg->Index = paramIndex; srcReg->File = PROGRAM_NAMED_PARAM; needSuffix = GL_FALSE; diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 10962d7e14..96bb16e873 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -63,7 +63,9 @@ _mesa_init_vp_per_vertex_registers(GLcontext *ctx, struct vp_machine *machine) for (i = 0; i < MAX_NV_VERTEX_PROGRAM_TEMPS; i++) { ASSIGN_4V(machine->Temporaries[i], 0.0F, 0.0F, 0.0F, 0.0F); } - ASSIGN_4V(machine->AddressReg, 0, 0, 0, 0); + for (i = 0; i < MAX_VERTEX_PROGRAM_ADDRESS_REGS; i++) { + ASSIGN_4V(machine->AddressReg[i], 0, 0, 0, 0); + } } } @@ -201,7 +203,7 @@ _mesa_dump_vp_state( const struct gl_vertex_program_state *state, _mesa_printf("\n"); _mesa_printf("Registers:\n"); - for (i = 0; i < MAX_NV_VERTEX_PROGRAM_TEMPS; i++) { + for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { _mesa_printf("%d: %f %f %f %f ", i, machine->Temporaries[i][0], machine->Temporaries[i][1], @@ -234,25 +236,27 @@ get_register_pointer( GLcontext *ctx, const struct gl_vertex_program *program ) { if (source->RelAddr) { - const GLint reg = source->Index + machine->AddressReg[0]; - ASSERT( (source->File == PROGRAM_ENV_PARAM) || - (source->File == PROGRAM_STATE_VAR) ); + const GLint reg = source->Index + machine->AddressReg[0][0]; + ASSERT(source->File == PROGRAM_ENV_PARAM || + source->File == PROGRAM_STATE_VAR || + source->File == PROGRAM_LOCAL_PARAM); if (reg < 0 || reg > MAX_NV_VERTEX_PROGRAM_PARAMS) return ZeroVec; else if (source->File == PROGRAM_ENV_PARAM) return ctx->VertexProgram.Parameters[reg]; else { - ASSERT(source->File == PROGRAM_LOCAL_PARAM); + ASSERT(source->File == PROGRAM_LOCAL_PARAM || + source->File == PROGRAM_STATE_VAR); return program->Base.Parameters->ParameterValues[reg]; } } else { switch (source->File) { case PROGRAM_TEMPORARY: - ASSERT(source->Index < MAX_NV_VERTEX_PROGRAM_TEMPS); + ASSERT(source->Index < MAX_PROGRAM_TEMPS); return machine->Temporaries[source->Index]; case PROGRAM_INPUT: - ASSERT(source->Index < MAX_NV_VERTEX_PROGRAM_INPUTS); + ASSERT(source->Index < VERT_ATTRIB_MAX); return machine->Inputs[source->Index]; case PROGRAM_OUTPUT: /* This is only needed for the PRINT instruction */ @@ -265,6 +269,12 @@ get_register_pointer( GLcontext *ctx, ASSERT(source->Index < MAX_NV_VERTEX_PROGRAM_PARAMS); return ctx->VertexProgram.Parameters[source->Index]; case PROGRAM_STATE_VAR: + /* Fallthrough */ + case PROGRAM_CONSTANT: + /* Fallthrough */ + case PROGRAM_UNIFORM: + /* Fallthrough */ + case PROGRAM_NAMED_PARAM: ASSERT(source->Index < program->Base.Parameters->NumParameters); return program->Base.Parameters->ParameterValues[source->Index]; default: @@ -644,7 +654,7 @@ _mesa_exec_vertex_program(GLcontext *ctx, { GLfloat t[4]; fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - machine->AddressReg[0] = (GLint) FLOORF(t[0]); + machine->AddressReg[0][0] = (GLint) FLOORF(t[0]); } break; case OPCODE_DPH: diff --git a/src/mesa/shader/nvvertexec.h b/src/mesa/shader/nvvertexec.h index b1cf31bd3c..5516c6b0ea 100644 --- a/src/mesa/shader/nvvertexec.h +++ b/src/mesa/shader/nvvertexec.h @@ -35,11 +35,11 @@ */ struct vp_machine { - GLfloat Temporaries[MAX_NV_VERTEX_PROGRAM_TEMPS][4]; - GLfloat Inputs[MAX_NV_VERTEX_PROGRAM_INPUTS][4]; - GLuint InputsSize[MAX_NV_VERTEX_PROGRAM_INPUTS]; - GLfloat Outputs[MAX_NV_VERTEX_PROGRAM_OUTPUTS][4]; - GLint AddressReg[4]; + GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; + GLfloat Inputs[VERT_ATTRIB_MAX][4]; + GLuint InputsSize[VERT_ATTRIB_MAX]; + GLfloat Outputs[VERT_RESULT_MAX][4]; + GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; }; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index ddfad47b89..1cf3547969 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -203,6 +203,7 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog, { (void) ctx; if (prog) { + _mesa_bzero(prog, sizeof(*prog)); prog->Id = id; prog->Target = target; prog->Resident = GL_TRUE; @@ -304,6 +305,10 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog) _mesa_free_parameter_list(prog->Parameters); } + if (prog->Varying) { + _mesa_free_parameter_list(prog->Varying); + } + /* XXX this is a little ugly */ if (prog->Target == GL_VERTEX_PROGRAM_ARB) { struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog; @@ -364,13 +369,14 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) * Add a new parameter to a parameter list. * \param paramList the list to add the parameter to * \param name the parameter name, will be duplicated/copied! - * \param values initial parameter value, 4 GLfloats + * \param values initial parameter value, up to 4 GLfloats + * \param size number of elements in 'values' vector (1..4) * \param type type of parameter, such as * \return index of new parameter in the list, or -1 if error (out of mem) */ static GLint add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], + const char *name, const GLfloat values[4], GLuint size, enum register_file type) { const GLuint n = paramList->NumParameters; @@ -425,7 +431,7 @@ GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, const char *name, const GLfloat values[4]) { - return add_parameter(paramList, name, values, PROGRAM_NAMED_PARAM); + return add_parameter(paramList, name, values, 4, PROGRAM_NAMED_PARAM); } @@ -445,14 +451,16 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, GLuint size) { #if 0 /* disable this for now -- we need to save the name! */ - GLuint pos, swizzle; + GLint pos; + GLuint swizzle; ASSERT(size == 4); /* XXX future feature */ /* check if we already have this constant */ if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { return pos; } #endif - return add_parameter(paramList, name, values, PROGRAM_CONSTANT); + size = 4; /** XXX fix */ + return add_parameter(paramList, name, values, size, PROGRAM_CONSTANT); } @@ -463,22 +471,87 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, * * \param paramList the parameter list * \param values four float values + * \param swizzleOut returns swizzle mask for accessing the constant * \return index/position of the new parameter in the parameter list. */ GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4], GLuint size) + const GLfloat values[4], GLuint size, + GLuint *swizzleOut) { - GLuint pos, swizzle; - ASSERT(size == 4); /* XXX future feature */ + GLint pos; + GLuint swizzle; + ASSERT(size >= 1); + ASSERT(size <= 4); + size = 4; /* XXX temporary */ /* check if we already have this constant */ - if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { + if (_mesa_lookup_parameter_constant(paramList, values, + size, &pos, &swizzle)) { return pos; } - return add_parameter(paramList, NULL, values, PROGRAM_CONSTANT); + return add_parameter(paramList, NULL, values, size, PROGRAM_CONSTANT); } +GLint +_mesa_add_uniform(struct gl_program_parameter_list *paramList, + const char *name, GLuint size) +{ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_UNIFORM) { + /* already in list */ + return i; + } + else { + assert(size == 4); + i = add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); + return i; + } +} + + +GLint +_mesa_add_varying(struct gl_program_parameter_list *paramList, + const char *name, GLuint size) +{ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_VARYING) { + /* already in list */ + return i; + } + else { + assert(size == 4); + i = add_parameter(paramList, name, NULL, size, PROGRAM_VARYING); + return i; + } +} + + + + +#if 0 /* not used yet */ +/** + * Returns the number of 4-component registers needed to store a piece + * of GL state. For matrices this may be as many as 4 registers, + * everything else needs + * just 1 register. + */ +static GLuint +sizeof_state_reference(const GLint *stateTokens) +{ + if (stateTokens[0] == STATE_MATRIX) { + GLuint rows = stateTokens[4] - stateTokens[3] + 1; + assert(rows >= 1); + assert(rows <= 4); + return rows; + } + else { + return 1; + } +} +#endif + + /** * Add a new state reference to the parameter list. * This will be used when the program contains something like this: @@ -492,18 +565,34 @@ GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, const GLint *stateTokens) { - /* XXX we should probably search the current parameter list to see if - * the new state reference is already present. - */ + const GLuint size = 4; /* XXX fix */ + const char *name; GLint index; - const char *name = make_state_string(stateTokens); - index = add_parameter(paramList, name, NULL, PROGRAM_STATE_VAR); + /* Check if the state reference is already in the list */ + for (index = 0; index < paramList->NumParameters; index++) { + GLuint i, match = 0; + for (i = 0; i < 6; i++) { + if (paramList->Parameters[index].StateIndexes[i] == stateTokens[i]) { + match++; + } + else { + break; + } + } + if (match == 6) { + /* this state reference is already in the parameter list */ + return index; + } + } + + name = make_state_string(stateTokens); + index = add_parameter(paramList, name, NULL, size, PROGRAM_STATE_VAR); if (index >= 0) { GLuint i; for (i = 0; i < 6; i++) { paramList->Parameters[index].StateIndexes[i] - = (enum state_index) stateTokens[i]; + = (gl_state_index) stateTokens[i]; } paramList->StateFlags |= make_state_flags(stateTokens); } @@ -523,29 +612,11 @@ GLfloat * _mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name) { - GLuint i; - - if (!paramList) + GLuint i = _mesa_lookup_parameter_index(paramList, nameLen, name); + if (i < 0) return NULL; - - if (nameLen == -1) { - /* name is null-terminated */ - for (i = 0; i < paramList->NumParameters; i++) { - if (paramList->Parameters[i].Name && - _mesa_strcmp(paramList->Parameters[i].Name, name) == 0) - return paramList->ParameterValues[i]; - } - } - else { - /* name is not null-terminated, use nameLen */ - for (i = 0; i < paramList->NumParameters; i++) { - if (paramList->Parameters[i].Name && - _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 - && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen) - return paramList->ParameterValues[i]; - } - } - return NULL; + else + return paramList->ParameterValues[i]; } @@ -601,7 +672,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, GLboolean _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, const GLfloat v[], GLsizei vSize, - GLuint *posOut, GLuint *swizzleOut) + GLint *posOut, GLuint *swizzleOut) { GLuint i; @@ -625,6 +696,8 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramLis if (paramList->ParameterValues[i][shift + j] == v[j]) { matched++; swizzle[j] = shift + j; + ASSERT(swizzle[j] >= SWIZZLE_X); + ASSERT(swizzle[j] <= SWIZZLE_W); } } if (matched == vSize) { @@ -638,6 +711,7 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramLis } } + *posOut = -1; return GL_FALSE; } @@ -650,7 +724,7 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramLis * The program parser will produce the state[] values. */ static void -_mesa_fetch_state(GLcontext *ctx, const enum state_index state[], +_mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], GLfloat *value) { switch (state[0]) { @@ -876,16 +950,16 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], { /* state[1] = modelview, projection, texture, etc. */ /* state[2] = which texture matrix or program matrix */ - /* state[3] = first column to fetch */ - /* state[4] = last column to fetch */ + /* state[3] = first row to fetch */ + /* state[4] = last row to fetch */ /* state[5] = transpose, inverse or invtrans */ const GLmatrix *matrix; - const enum state_index mat = state[1]; + const gl_state_index mat = state[1]; const GLuint index = (GLuint) state[2]; - const GLuint first = (GLuint) state[3]; - const GLuint last = (GLuint) state[4]; - const enum state_index modifier = state[5]; + const GLuint firstRow = (GLuint) state[3]; + const GLuint lastRow = (GLuint) state[4]; + const gl_state_index modifier = state[5]; const GLfloat *m; GLuint row, i; if (mat == STATE_MODELVIEW) { @@ -920,7 +994,7 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], } if (modifier == STATE_MATRIX_TRANSPOSE || modifier == STATE_MATRIX_INVTRANS) { - for (i = 0, row = first; row <= last; row++) { + for (i = 0, row = firstRow; row <= lastRow; row++) { value[i++] = m[row * 4 + 0]; value[i++] = m[row * 4 + 1]; value[i++] = m[row * 4 + 2]; @@ -928,7 +1002,7 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], } } else { - for (i = 0, row = first; row <= last; row++) { + for (i = 0, row = firstRow; row <= lastRow; row++) { value[i++] = m[row + 0]; value[i++] = m[row + 4]; value[i++] = m[row + 8]; @@ -1101,7 +1175,7 @@ append(char *dst, const char *src) static void -append_token(char *dst, enum state_index k) +append_token(char *dst, gl_state_index k) { switch (k) { case STATE_MATERIAL: @@ -1268,17 +1342,17 @@ make_state_string(const GLint state[6]) char tmp[30]; append(str, "state."); - append_token(str, (enum state_index) state[0]); + append_token(str, (gl_state_index) state[0]); switch (state[0]) { case STATE_MATERIAL: append_face(str, state[1]); - append_token(str, (enum state_index) state[2]); + append_token(str, (gl_state_index) state[2]); break; case STATE_LIGHT: append(str, "light"); append_index(str, state[1]); /* light number [i]. */ - append_token(str, (enum state_index) state[2]); /* coefficients */ + append_token(str, (gl_state_index) state[2]); /* coefficients */ break; case STATE_LIGHTMODEL_AMBIENT: append(str, "lightmodel.ambient"); @@ -1294,11 +1368,11 @@ make_state_string(const GLint state[6]) case STATE_LIGHTPROD: append_index(str, state[1]); /* light number [i]. */ append_face(str, state[2]); - append_token(str, (enum state_index) state[3]); + append_token(str, (gl_state_index) state[3]); break; case STATE_TEXGEN: append_index(str, state[1]); /* tex unit [i] */ - append_token(str, (enum state_index) state[2]); /* plane coef */ + append_token(str, (gl_state_index) state[2]); /* plane coef */ break; case STATE_TEXENV_COLOR: append_index(str, state[1]); /* tex unit [i] */ @@ -1318,23 +1392,23 @@ make_state_string(const GLint state[6]) { /* state[1] = modelview, projection, texture, etc. */ /* state[2] = which texture matrix or program matrix */ - /* state[3] = first column to fetch */ - /* state[4] = last column to fetch */ + /* state[3] = first row to fetch */ + /* state[4] = last row to fetch */ /* state[5] = transpose, inverse or invtrans */ - const enum state_index mat = (enum state_index) state[1]; + const gl_state_index mat = (gl_state_index) state[1]; const GLuint index = (GLuint) state[2]; - const GLuint first = (GLuint) state[3]; - const GLuint last = (GLuint) state[4]; - const enum state_index modifier = (enum state_index) state[5]; + const GLuint firstRow = (GLuint) state[3]; + const GLuint lastRow = (GLuint) state[4]; + const gl_state_index modifier = (gl_state_index) state[5]; append_token(str, mat); if (index) append_index(str, index); if (modifier) append_token(str, modifier); - if (first == last) - _mesa_sprintf(tmp, ".row[%d]", first); + if (firstRow == lastRow) + _mesa_sprintf(tmp, ".row[%d]", firstRow); else - _mesa_sprintf(tmp, ".row[%d..%d]", first, last); + _mesa_sprintf(tmp, ".row[%d..%d]", firstRow, lastRow); append(str, tmp); } break; @@ -1344,7 +1418,7 @@ make_state_string(const GLint state[6]) case STATE_VERTEX_PROGRAM: /* state[1] = {STATE_ENV, STATE_LOCAL} */ /* state[2] = parameter index */ - append_token(str, (enum state_index) state[1]); + append_token(str, (gl_state_index) state[1]); append_index(str, state[2]); break; case STATE_INTERNAL: @@ -1456,7 +1530,7 @@ _mesa_realloc_instructions(struct prog_instruction *oldInst, */ struct instruction_info { - enum prog_opcode Opcode; + gl_inst_opcode Opcode; const char *Name; GLuint NumSrcRegs; }; @@ -1466,14 +1540,15 @@ struct instruction_info * \note Opcode should equal array index! */ static const struct instruction_info InstInfo[MAX_OPCODE] = { + { OPCODE_NOP, "NOP", 0 }, { OPCODE_ABS, "ABS", 1 }, { OPCODE_ADD, "ADD", 2 }, { OPCODE_ARA, "ARA", 1 }, { OPCODE_ARL, "ARL", 1 }, { OPCODE_ARL_NV, "ARL", 1 }, { OPCODE_ARR, "ARL", 1 }, - { OPCODE_BRA, "BRA", 1 }, - { OPCODE_CAL, "CAL", 1 }, + { OPCODE_BRA, "BRA", 0 }, + { OPCODE_CAL, "CAL", 0 }, { OPCODE_CMP, "CMP", 3 }, { OPCODE_COS, "COS", 1 }, { OPCODE_DDX, "DDX", 1 }, @@ -1508,7 +1583,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_PUSHA, "PUSHA", 0 }, { OPCODE_RCC, "RCC", 1 }, { OPCODE_RCP, "RCP", 1 }, - { OPCODE_RET, "RET", 1 }, + { OPCODE_RET, "RET", 0 }, { OPCODE_RFL, "RFL", 1 }, { OPCODE_RSQ, "RSQ", 1 }, { OPCODE_SCS, "SCS", 1 }, @@ -1543,9 +1618,10 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { * Return the number of src registers for the given instruction/opcode. */ GLuint -_mesa_num_inst_src_regs(enum prog_opcode opcode) +_mesa_num_inst_src_regs(gl_inst_opcode opcode) { ASSERT(opcode == InstInfo[opcode].Opcode); + ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); return InstInfo[opcode].NumSrcRegs; } @@ -1554,7 +1630,7 @@ _mesa_num_inst_src_regs(enum prog_opcode opcode) * Return string name for given program opcode. */ const char * -_mesa_opcode_string(enum prog_opcode opcode) +_mesa_opcode_string(gl_inst_opcode opcode) { ASSERT(opcode < MAX_OPCODE); return InstInfo[opcode].Name; @@ -1583,12 +1659,16 @@ program_file_string(enum register_file f) return "NAMED"; case PROGRAM_CONSTANT: return "CONST"; + case PROGRAM_UNIFORM: + return "UNIFORM"; + case PROGRAM_VARYING: + return "VARYING"; case PROGRAM_WRITE_ONLY: return "WRITE_ONLY"; case PROGRAM_ADDRESS: return "ADDR"; default: - return "!unkown!"; + return "Unknown program file!"; } } @@ -1685,6 +1765,16 @@ print_src_reg(const struct prog_src_register *srcReg) srcReg->NegateBase, GL_FALSE)); } +static void +print_comment(const struct prog_instruction *inst) +{ + if (inst->Comment) + _mesa_printf("; # %s\n", inst->Comment); + else + _mesa_printf(";\n"); +} + + void _mesa_print_alu_instruction(const struct prog_instruction *inst, const char *opcode_string, @@ -1704,6 +1794,9 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, inst->DstReg.Index, writemask_string(inst->DstReg.WriteMask)); } + else { + _mesa_printf(" ???"); + } if (numRegs > 0) _mesa_printf(", "); @@ -1714,7 +1807,10 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, _mesa_printf(", "); } - _mesa_printf(";\n"); + if (inst->Comment) + _mesa_printf(" # %s", inst->Comment); + + print_comment(inst); } @@ -1735,18 +1831,21 @@ _mesa_print_instruction(const struct prog_instruction *inst) swizzle_string(inst->SrcReg[0].Swizzle, inst->SrcReg[0].NegateBase, GL_FALSE)); } - _mesa_printf(";\n"); + if (inst->Comment) + _mesa_printf(" # %s", inst->Comment); + print_comment(inst); break; case OPCODE_SWZ: _mesa_printf("SWZ"); if (inst->SaturateMode == SATURATE_ZERO_ONE) _mesa_printf("_SAT"); print_dst_reg(&inst->DstReg); - _mesa_printf("%s[%d], %s;\n", + _mesa_printf("%s[%d], %s", program_file_string((enum register_file) inst->SrcReg[0].File), inst->SrcReg[0].Index, swizzle_string(inst->SrcReg[0].Swizzle, inst->SrcReg[0].NegateBase, GL_TRUE)); + print_comment(inst); break; case OPCODE_TEX: case OPCODE_TXP: @@ -1768,17 +1867,26 @@ _mesa_print_instruction(const struct prog_instruction *inst) default: ; } - _mesa_printf("\n"); + print_comment(inst); break; case OPCODE_ARL: _mesa_printf("ARL addr.x, "); print_src_reg(&inst->SrcReg[0]); - _mesa_printf(";\n"); + print_comment(inst); + break; + case OPCODE_BRA: + _mesa_printf("BRA %u", inst->BranchTarget); + print_comment(inst); + break; + case OPCODE_CAL: + _mesa_printf("CAL %u", inst->BranchTarget); + print_comment(inst); break; case OPCODE_END: - _mesa_printf("END;\n"); + _mesa_printf("END"); + print_comment(inst); break; - /* XXX may need for other special-case instructions */ + /* XXX may need other special-case instructions */ default: /* typical alu instruction */ _mesa_print_alu_instruction(inst, @@ -1820,7 +1928,7 @@ _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog) _mesa_load_state_parameters(ctx, prog->Parameters); -#if 0 +#if 0 _mesa_printf("Local Params:\n"); for (i = 0; i < MAX_PROGRAM_LOCAL_PARAMS; i++){ const GLfloat *p = prog->LocalParams[i]; @@ -1831,8 +1939,10 @@ _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog) for (i = 0; i < prog->Parameters->NumParameters; i++){ struct gl_program_parameter *param = prog->Parameters->Parameters + i; const GLfloat *v = prog->Parameters->ParameterValues[i]; - _mesa_printf("param[%d] %s = {%.3f, %.3f, %.3f, %.3f};\n", - i, param->Name, v[0], v[1], v[2], v[3]); + _mesa_printf("param[%d] %s %s = {%.3f, %.3f, %.3f, %.3f};\n", + i, + program_file_string(prog->Parameters->Parameters[i].Type), + param->Name, v[0], v[1], v[2], v[3]); } } diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index af06c03598..a3f50b9310 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -128,8 +128,8 @@ _mesa_realloc_instructions(struct prog_instruction *oldInst, * A string such as "state.light[0].ambient" gets translated into a * sequence of tokens such as [ STATE_LIGHT, 0, STATE_AMBIENT ]. */ -enum state_index { - STATE_MATERIAL, +typedef enum gl_state_index_ { + STATE_MATERIAL = 100, /* start at 100 so small ints are seen as ints */ STATE_LIGHT, STATE_LIGHTMODEL_AMBIENT, @@ -191,7 +191,7 @@ enum state_index { STATE_TEXRECT_SCALE, STATE_POSITION_NORMALIZED, /* normalized light position */ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ -}; +} gl_state_index; @@ -205,7 +205,10 @@ struct gl_program_parameter { const char *Name; /**< Null-terminated string */ enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ - enum state_index StateIndexes[6]; /**< Global state reference */ + /** + * A sequence of STATE_* tokens and integers to identify GL state. + */ + gl_state_index StateIndexes[6]; }; @@ -244,7 +247,16 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, extern GLint _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4], GLuint size); + const GLfloat values[4], GLuint size, + GLuint *swizzleOut); + +extern GLint +_mesa_add_uniform(struct gl_program_parameter_list *paramList, + const char *name, GLuint size); + +extern GLint +_mesa_add_varying(struct gl_program_parameter_list *paramList, + const char *name, GLuint size); extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, @@ -261,7 +273,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, extern GLboolean _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, const GLfloat v[], GLsizei vSize, - GLuint *posOut, GLuint *swizzleOut); + GLint *posOut, GLuint *swizzleOut); extern void _mesa_load_state_parameters(GLcontext *ctx, diff --git a/src/mesa/shader/program_instruction.h b/src/mesa/shader/program_instruction.h index ad3a6d4dd4..2fcdfaa2be 100644 --- a/src/mesa/shader/program_instruction.h +++ b/src/mesa/shader/program_instruction.h @@ -91,8 +91,10 @@ * Program instruction opcodes, for both vertex and fragment programs. * \note changes to this opcode list must be reflected in t_vb_arbprogram.c */ +typedef enum prog_opcode { /* ARB_vp ARB_fp NV_vp NV_fp */ -enum prog_opcode { /*---------------------------------*/ + /*---------------------------------*/ + OPCODE_NOP = 0, OPCODE_ABS, /* X X 1.1 */ OPCODE_ADD, /* X X X X */ OPCODE_ARA, /* 2 */ @@ -164,7 +166,7 @@ enum prog_opcode { /*---------------------------------*/ OPCODE_X2D, /* X */ OPCODE_XPD, /* X X */ MAX_OPCODE -}; +} gl_inst_opcode; /** @@ -263,7 +265,7 @@ struct prog_dst_register */ struct prog_instruction { - enum prog_opcode Opcode; + gl_inst_opcode Opcode; #if FEATURE_MESA_program_debug GLshort StringPos; #endif @@ -344,6 +346,8 @@ struct prog_instruction * For BRA and CAL instructions, the location to jump to. */ GLuint BranchTarget; + + const char *Comment; }; @@ -351,10 +355,10 @@ extern void _mesa_init_instructions(struct prog_instruction *inst, GLuint count); extern GLuint -_mesa_num_inst_src_regs(enum prog_opcode opcode); +_mesa_num_inst_src_regs(gl_inst_opcode opcode); extern const char * -_mesa_opcode_string(enum prog_opcode opcode); +_mesa_opcode_string(gl_inst_opcode opcode); #endif /* PROG_INSTRUCTION_H */ diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index 783177739d..51caa02f9f 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -136,6 +136,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) GLuint colorTemp, fogFactorTemp; /* temporary registerss */ GLfloat fogVals[4]; GLuint fogConsts; /* constant values for EXP, EXP2 mode */ + GLuint swizzle; if (fprog->FogOption == GL_NONE) { _mesa_problem(ctx, "_mesa_append_fog_code() called for fragment program" @@ -172,7 +173,9 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) fogVals[1] = 1.0 / SQRTF(log(2.0)); fogVals[2] = 0.0; fogVals[3] = 0.0; - fogConsts = _mesa_add_unnamed_constant(fprog->Base.Parameters, fogVals, 4); + fogConsts = _mesa_add_unnamed_constant(fprog->Base.Parameters, + fogVals, 4, &swizzle); + ASSERT(swizzle == SWIZZLE_NOOP); /* Scan program to find where result.color is written */ inst = newInst; diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index da4d5c8472..f805e2cebd 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -32,8 +32,10 @@ #include "glheader.h" #include "context.h" #include "hash.h" +#include "macros.h" #include "shaderobjects.h" #include "shaderobjects_3dlabs.h" +#include "slang_link.h" #if FEATURE_ARB_shader_objects @@ -198,8 +200,8 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, } /* - * This array holds offsets of where the appropriate string ends, thus the last - * element will be set to the total length of the source code. + * This array holds offsets of where the appropriate string ends, thus the + * last element will be set to the total length of the source code. */ offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); if (offsets == NULL) { @@ -224,9 +226,8 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, offsets[i] += offsets[i - 1]; } - source = - (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * - sizeof(GLcharARB)); + source = (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * + sizeof(GLcharARB)); if (source == NULL) { _mesa_free((GLvoid *) offsets); RELEASE_SHADER(sha); @@ -296,6 +297,13 @@ _mesa_LinkProgramARB(GLhandleARB programObj) } RELEASE_PROGRAM(pro); } +#if NEW_SLANG + { + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, programObj); + _slang_link2(ctx, programObj, linked); + } +#endif } GLvoid GLAPIENTRY @@ -333,6 +341,15 @@ _mesa_UseProgramObjectARB(GLhandleARB programObj) if (ctx->ShaderObjects.CurrentProgram != NULL) RELEASE_PROGRAM(ctx->ShaderObjects.CurrentProgram); ctx->ShaderObjects.CurrentProgram = program; + +#if NEW_SLANG + if (programObj) { + ctx->ShaderObjects.Linked = _mesa_lookup_linked_program(ctx, programObj); + } + else { + ctx->ShaderObjects.Linked = NULL; + } +#endif } GLvoid GLAPIENTRY @@ -360,6 +377,27 @@ uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, FLUSH_VERTICES(ctx, _NEW_PROGRAM); +#if NEW_SLANG + if (ctx->ShaderObjects.Linked) { + struct gl_linked_program *linked = ctx->ShaderObjects.Linked; + if (location >= 0 && location < linked->NumUniforms) { + GLfloat *v = linked->Uniforms[location].Value; + const GLfloat *fValues = (const GLfloat *) values; /* XXX */ + GLint i; + if (type == GL_FLOAT_VEC4) + count *= 4; + else if (type == GL_FLOAT_VEC3) + count *= 3; + else + abort(); + + for (i = 0; i < count; i++) + v[i] = fValues[i]; + return; + } + } +#endif + if (!(**pro).WriteUniform(pro, location, count, values, type)) _mesa_error(ctx, GL_INVALID_OPERATION, caller); } @@ -808,6 +846,20 @@ _mesa_GetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, GLint GLAPIENTRY _mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) { +#if NEW_SLANG + GET_CURRENT_CONTEXT(ctx); + + if (ctx->ShaderObjects.Linked) { + struct gl_linked_program *linked = ctx->ShaderObjects.Linked; + GLuint loc; + for (loc = 0; loc < linked->NumUniforms; loc++) { + if (!strcmp(linked->Uniforms[loc].Name, name)) { + return loc; + } + } + } + return -1; +#else GET_CURRENT_CONTEXT(ctx); GLint loc = -1; GET_LINKED_PROGRAM(pro, programObj, "glGetUniformLocationARB"); @@ -823,6 +875,7 @@ _mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) } RELEASE_PROGRAM(pro); return loc; +#endif } GLvoid GLAPIENTRY @@ -961,6 +1014,35 @@ void GLAPIENTRY _mesa_AttachShader(GLuint program, GLuint shader) { _mesa_AttachObjectARB(program, shader); +#if NEW_SLANG + { + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + struct gl_program *prog + = _mesa_lookup_shader(ctx, shader); + const GLuint n = linked->NumShaders; + GLuint i; + if (!linked || !prog) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glAttachShader(bad program or shader name)"); + return; + } + for (i = 0; i < n; i++) { + if (linked->Shaders[i] == prog) { + /* already attached */ + return; + } + } + /* append to list */ + linked->Shaders = _mesa_realloc(linked->Shaders, + n * sizeof(struct gl_program *), + (n + 1) * sizeof(struct gl_program *)); + linked->Shaders[n] = prog; + prog->RefCount++; + linked->NumShaders++; + } +#endif } @@ -1000,6 +1082,24 @@ _mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj) { _mesa_GetAttachedObjectsARB(program, maxCount, count, obj); +#if NEW_SLANG + { + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (linked) { + GLuint i; + for (i = 0; i < maxCount && i < linked->NumShaders; i++) { + obj[i] = linked->Shaders[i]->Id; + } + if (count) + *count = i; + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); + } + } +#endif } void GLAPIENTRY @@ -1176,9 +1276,48 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, +#ifdef NEW_SLANG + +struct gl_linked_program * +_mesa_new_linked_program(GLcontext *ctx, GLuint name) +{ + struct gl_linked_program *linked; + linked = CALLOC_STRUCT(gl_linked_program); + linked->Name = name; + return linked; +} + + +struct gl_linked_program * +_mesa_lookup_linked_program(GLcontext *ctx, GLuint name) +{ + GET_PROGRAM(pro, name, "_mesa_lookup_linked_program"); + if (pro) { + if (!(*pro)->Linked) { + (*pro)->Linked = _mesa_new_linked_program(ctx, name); + } + return (*pro)->Linked; + } + return NULL; +} + + +struct gl_program * +_mesa_lookup_shader(GLcontext *ctx, GLuint name) +{ + GET_SHADER(sh, name, "_mesa_lookup_shader"); + if (sh) + return (*sh)->Program; + return NULL; +} + + +#endif /* NEW_SLANG */ + + +#endif /* FEATURE_ARB_shader_objects */ -#endif GLvoid _mesa_init_shaderobjects(GLcontext * ctx) diff --git a/src/mesa/shader/shaderobjects.h b/src/mesa/shader/shaderobjects.h index 09ba807255..0e834d29d1 100644 --- a/src/mesa/shader/shaderobjects.h +++ b/src/mesa/shader/shaderobjects.h @@ -81,6 +81,7 @@ struct gl2_shader_intf GLvoid (* SetSource) (struct gl2_shader_intf **, GLcharARB *, GLint *, GLsizei); const GLcharARB *(* GetSource) (struct gl2_shader_intf **); GLvoid (* Compile) (struct gl2_shader_intf **); + struct gl_program *Program; }; struct gl2_program_intf @@ -114,6 +115,7 @@ struct gl2_program_intf GLvoid (* OverrideAttribBinding) (struct gl2_program_intf **, GLuint, const GLchar *); GLvoid (* WriteAttrib) (struct gl2_program_intf **, GLuint, const GLfloat *); GLvoid (* UpdateVarying) (struct gl2_program_intf **, GLuint, GLfloat *, GLboolean); + struct gl_linked_program *Linked; }; struct gl2_fragment_shader_intf @@ -344,6 +346,15 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +extern struct gl_linked_program * +_mesa_new_linked_program(GLcontext *ctx, GLuint name); + +extern struct gl_linked_program * +_mesa_lookup_linked_program(GLcontext *ctx, GLuint name); + +extern struct gl_program * +_mesa_lookup_shader(GLcontext *ctx, GLuint name); + #endif /* FEATURE_ARB_shader_objects */ diff --git a/src/mesa/shader/shaderobjects_3dlabs.c b/src/mesa/shader/shaderobjects_3dlabs.c old mode 100755 new mode 100644 index 3ead1a1784..2185a7cffb --- a/src/mesa/shader/shaderobjects_3dlabs.c +++ b/src/mesa/shader/shaderobjects_3dlabs.c @@ -34,6 +34,7 @@ #include "imports.h" #include "hash.h" #include "macros.h" +#include "program.h" #include "shaderobjects.h" #include "shaderobjects_3dlabs.h" @@ -600,6 +601,7 @@ _shader_GetSource(struct gl2_shader_intf **intf) static GLvoid _shader_Compile(struct gl2_shader_intf **intf) { + GET_CURRENT_CONTEXT(ctx); struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; #if USE_3DLABS_FRONTEND char **strings; @@ -677,12 +679,18 @@ _shader_Compile(struct gl2_shader_intf **intf) impl->_obj._generic.info_log = _mesa_strdup(ShGetInfoLog(impl->_obj._3dlabs_shhandle._obj.handle)); #else - if (impl->_vftbl->GetSubType(intf) == GL_FRAGMENT_SHADER) + /* NEW_SLANG */ + if (impl->_vftbl->GetSubType(intf) == GL_FRAGMENT_SHADER) { type = slang_unit_fragment_shader; - else + (*intf)->Program = _mesa_new_program(ctx, GL_FRAGMENT_PROGRAM_ARB, 1); + } + else { type = slang_unit_vertex_shader; + (*intf)->Program = _mesa_new_program(ctx, GL_VERTEX_PROGRAM_ARB, 1); + } slang_info_log_construct(&info_log); - if (_slang_compile(impl->_obj.source, &impl->_obj.code, type, &info_log)) + if (_slang_compile(impl->_obj.source, &impl->_obj.code, type, &info_log, + (*intf)->Program)) impl->_obj.compile_status = GL_TRUE; if (info_log.text != NULL) impl->_obj._generic.info_log = _mesa_strdup(info_log.text); diff --git a/src/mesa/shader/slang/library/slang_builtin_vec4_gc.h b/src/mesa/shader/slang/library/slang_builtin_vec4_gc.h index 9c3bae2644..081bb6fa56 100644 --- a/src/mesa/shader/slang/library/slang_builtin_vec4_gc.h +++ b/src/mesa/shader/slang/library/slang_builtin_vec4_gc.h @@ -45,18 +45,14 @@ 0,100,111,116,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,3,2,0,12,1,118,52,0,2,58,118,101,99,52,0,18, 118,0,0,17,48,0,48,0,0,0,0,0,0,3,2,0,12,1,117,52,0,2,58,118,101,99,52,0,18,117,0,0,17,48,0,48,0,0, 0,0,0,0,4,118,101,99,52,95,100,111,116,0,18,118,52,0,0,18,117,52,0,0,0,8,18,118,52,0,59,120,0,0,0, -1,0,9,0,100,111,116,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18, -118,0,0,18,117,0,0,0,8,18,118,0,59,120,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,11,118,0,0,0, -1,3,2,0,12,1,117,0,2,58,118,101,99,52,0,18,118,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,100, -111,116,0,18,117,0,0,18,117,0,0,0,8,58,115,113,114,116,0,18,117,0,59,120,0,0,0,0,0,1,0,9,0,108,101, -110,103,116,104,0,1,0,0,12,118,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,118,0,0,18,118,0,0,0,8, -58,115,113,114,116,0,18,118,0,59,120,0,0,0,0,0,1,0,11,0,110,111,114,109,97,108,105,122,101,0,1,0,0, -11,118,0,0,0,1,3,2,0,12,1,117,0,2,58,118,101,99,52,0,18,118,0,0,17,48,0,48,0,0,0,0,0,0,3,2,0,12,1, -119,0,2,18,117,0,0,0,4,118,101,99,52,95,100,111,116,0,18,117,0,0,18,117,0,0,0,3,2,0,9,1,108,0,2,58, -115,113,114,116,0,18,117,0,59,120,0,0,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18, -117,0,0,18,108,0,0,0,4,118,101,99,52,95,100,105,118,105,100,101,0,18,119,0,0,18,117,0,0,0,8,18,119, -0,59,120,121,122,0,0,0,1,0,12,0,110,111,114,109,97,108,105,122,101,0,1,0,0,12,118,0,0,0,1,3,2,0,12, -1,119,0,2,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,118,0,0,18,118,0,0,0,3,2,0,9,1,108,0,2, -58,115,113,114,116,0,18,118,0,59,120,0,0,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0, -18,118,0,0,18,108,0,0,0,4,118,101,99,52,95,100,105,118,105,100,101,0,18,119,0,0,18,118,0,0,0,8,18, -119,0,0,0,0 +1,0,9,0,108,101,110,103,116,104,0,1,0,0,11,118,0,0,0,1,3,2,0,12,1,117,0,2,58,118,101,99,52,0,18, +118,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,100,111,116,0,18,117,0,0,18,117,0,0,0,8,58,115, +113,114,116,0,18,117,0,59,120,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,12,118,0,0,0,1,4, +118,101,99,52,95,100,111,116,0,18,118,0,0,18,118,0,0,0,8,58,115,113,114,116,0,18,118,0,59,120,0,0, +0,0,0,1,0,11,0,110,111,114,109,97,108,105,122,101,0,1,0,0,11,118,0,0,0,1,3,2,0,9,1,115,0,2,58,105, +110,118,101,114,115,101,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,18,115,0,48,20,0,0,1,0,12,0,110,111,114,109,97,108,105,122,101, +0,1,0,0,12,118,0,0,0,1,3,2,0,12,1,119,0,2,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,118,0,0, +18,118,0,0,0,3,2,0,9,1,108,0,2,58,115,113,114,116,0,18,118,0,59,120,0,0,0,0,0,4,102,108,111,97,116, +95,116,111,95,118,101,99,52,0,18,118,0,0,18,108,0,0,0,4,118,101,99,52,95,100,105,118,105,100,101,0, +18,119,0,0,18,118,0,0,0,8,18,119,0,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index e5876528e1..3442b06283 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -100,548 +100,671 @@ 116,101,114,115,0,12,99,111,108,111,114,0,0,0,1,9,100,101,110,115,105,116,121,0,0,0,1,9,115,116,97, 114,116,0,0,0,1,9,101,110,100,0,0,0,1,9,115,99,97,108,101,0,0,0,0,0,0,2,2,4,23,103,108,95,70,111, 103,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,70,111,103,0,0,0,1,0,9,0,114,97,100,105,97, -110,115,0,1,0,0,9,100,101,103,0,0,0,1,8,17,51,0,49,52,49,53,57,51,0,0,18,100,101,103,0,48,17,49,56, -48,0,48,0,0,49,0,0,1,0,10,0,114,97,100,105,97,110,115,0,1,0,0,10,100,101,103,0,0,0,1,8,58,118,101, -99,50,0,17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,50,0,17,49,56,48,0,48, -0,0,0,0,49,0,0,1,0,11,0,114,97,100,105,97,110,115,0,1,0,0,11,100,101,103,0,0,0,1,8,58,118,101,99, -51,0,17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,51,0,17,49,56,48,0,48,0,0, -0,0,49,0,0,1,0,12,0,114,97,100,105,97,110,115,0,1,0,0,12,100,101,103,0,0,0,1,8,58,118,101,99,52,0, -17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,52,0,17,49,56,48,0,48,0,0,0,0, -49,0,0,1,0,9,0,100,101,103,114,101,101,115,0,1,0,0,9,114,97,100,0,0,0,1,8,17,49,56,48,0,48,0,0,18, -114,97,100,0,48,17,51,0,49,52,49,53,57,51,0,0,49,0,0,1,0,10,0,100,101,103,114,101,101,115,0,1,0,0, -10,114,97,100,0,0,0,1,8,58,118,101,99,50,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101, -99,50,0,17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,11,0,100,101,103,114,101,101,115,0,1,0,0,11, -114,97,100,0,0,0,1,8,58,118,101,99,51,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,99, -51,0,17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,12,0,100,101,103,114,101,101,115,0,1,0,0,12,114, -97,100,0,0,0,1,8,58,118,101,99,52,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,99,52,0, -17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,9,0,115,105,110,0,1,0,0,9,97,110,103,108,101,0,0,0,1, -3,2,0,9,1,120,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,120,0,0,18,97,110,103,108,101,0,0, -0,8,18,120,0,0,0,1,0,10,0,115,105,110,0,1,0,0,10,97,110,103,108,101,0,0,0,1,8,58,118,101,99,50,0, -58,115,105,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0, -59,121,0,0,0,0,0,0,0,1,0,11,0,115,105,110,0,1,0,0,11,97,110,103,108,101,0,0,0,1,8,58,118,101,99,51, -0,58,115,105,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0, -59,121,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,105,110, -0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,115,105,110,0,18,97,110,103,108,101, -0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,115,105,110,0,18,97, -110,103,108,101,0,59,122,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,119,0,0,0,0,0,0,0,1,0, -9,0,99,111,115,0,1,0,0,9,97,110,103,108,101,0,0,0,1,8,58,115,105,110,0,18,97,110,103,108,101,0,17, -49,0,53,55,48,56,0,0,46,0,0,0,0,1,0,10,0,99,111,115,0,1,0,0,10,97,110,103,108,101,0,0,0,1,8,58,118, -101,99,50,0,58,99,111,115,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103, -108,101,0,59,121,0,0,0,0,0,0,0,1,0,11,0,99,111,115,0,1,0,0,11,97,110,103,108,101,0,0,0,1,8,58,118, -101,99,51,0,58,99,111,115,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103, -108,101,0,59,121,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,122,0,0,0,0,0,0,0,1,0,12,0,99, -111,115,0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,99,111,115,0,18,97,110,103, -108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,99,111,115,0,18, -97,110,103,108,101,0,59,122,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,119,0,0,0,0,0,0,0,1, -0,9,0,116,97,110,0,1,0,0,9,97,110,103,108,101,0,0,0,1,8,58,115,105,110,0,18,97,110,103,108,101,0,0, -0,58,99,111,115,0,18,97,110,103,108,101,0,0,0,49,0,0,1,0,10,0,116,97,110,0,1,0,0,10,97,110,103,108, -101,0,0,0,1,8,58,118,101,99,50,0,58,116,97,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97, -110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,0,0,0,1,0,11,0,116,97,110,0,1,0,0,11,97,110,103,108, -101,0,0,0,1,8,58,118,101,99,51,0,58,116,97,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97, -110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,59,122,0,0,0, -0,0,0,0,1,0,12,0,116,97,110,0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,116,97, -110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,59,121,0,0,0, -0,58,116,97,110,0,18,97,110,103,108,101,0,59,122,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0, -59,119,0,0,0,0,0,0,0,1,0,9,0,97,115,105,110,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108, -111,97,116,95,97,114,99,115,105,110,101,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,97,115, -105,110,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58, -97,115,105,110,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,115,105,110,0,1,0,0,11,118,0,0,0,1,8,58, -118,101,99,51,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97,115,105,110,0,18,118,0,59,121,0, -0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,115,105,110,0,1,0,0,12,118,0,0, -0,1,8,58,118,101,99,52,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97,115,105,110,0,18,118,0, -59,121,0,0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,58,97,115,105,110,0,18,118,0,59,119,0,0, -0,0,0,0,0,1,0,9,0,97,99,111,115,0,1,0,0,9,120,0,0,0,1,8,17,49,0,53,55,48,56,0,0,58,97,115,105,110, -0,18,120,0,0,0,47,0,0,1,0,10,0,97,99,111,115,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,97,99, -111,115,0,18,118,0,59,120,0,0,0,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,99, -111,115,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,0,58, -97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0, -97,99,111,115,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0, -0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0,59,122,0,0,0,0,58,97,99, -111,115,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97,116,97,110,0,1,0,0,9,121,95,111,118,101,114,95, -120,0,0,0,1,3,2,0,9,1,122,0,0,0,4,102,108,111,97,116,95,97,114,99,116,97,110,0,18,122,0,0,18,121, -95,111,118,101,114,95,120,0,0,0,8,18,122,0,0,0,1,0,10,0,97,116,97,110,0,1,0,0,10,121,95,111,118, -101,114,95,120,0,0,0,1,8,58,118,101,99,50,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0, -59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,0,0,0,0,1,0,11,0, -97,116,97,110,0,1,0,0,11,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101,99,51,0,58,97,116,97, -110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101, -114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,122,0,0,0,0,0, -0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101,99,52,0, -58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18,121,95, -111,118,101,114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59, -122,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97, -116,97,110,0,1,0,0,9,121,0,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,122,0,2,58,97,116,97,110,0,18,121,0,18, -120,0,49,0,0,0,0,10,18,120,0,17,48,0,48,0,0,40,0,2,10,18,121,0,17,48,0,48,0,0,40,0,8,18,122,0,17, -51,0,49,52,49,53,57,51,0,0,47,0,9,14,0,8,18,122,0,17,51,0,49,52,49,53,57,51,0,0,46,0,0,9,14,0,8,18, -122,0,0,0,1,0,10,0,97,116,97,110,0,1,0,0,10,117,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58, -97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,18,117,0,59,121,0,0, -18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,116,97,110,0,1,0,0,11,117,0,0,1,0,0,11,118,0,0,0,1,8,58, -118,101,99,51,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0, +110,115,0,1,1,0,9,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56, +48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,0,0,18,100,101,103,0,0,18,99,0,0,0,0,1,0,10,0,114,97,100,105,97,110,115,0,1,1,0,10, +100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,100,101,103,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,0,11,0,114,97,100,105,97,110,115,0, +1,1,0,11,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0, +0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,100,101,103,0,59,120,121,122,0,0,18,99,0,59,120,120,120,0,0,0,0,1,0,12,0,114,97, +100,105,97,110,115,0,1,1,0,12,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0, +0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,100,101,103,0,0,18,99,0,59,120,120,120,120,0,0,0,0,1,0,9,0,100,101,103, +114,101,101,115,0,1,1,0,9,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52, +49,53,57,50,54,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,114,97,100,0,0,18,99,0,0,0,0,1,0,10,0,100,101,103,114,101,101,115,0, +1,1,0,10,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0, +49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,114,97,100,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,0,11,0,100,101,103,114,101, +101,115,0,1,1,0,11,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56, +48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,114,97,100,0,59,120,121,122,0,0,18,99,0,59,120,120,120,0,0,0,0,1,0,12, +0,100,101,103,114,101,101,115,0,1,1,0,12,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53, +57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +95,95,114,101,116,86,97,108,0,0,18,114,97,100,0,0,18,99,0,59,120,120,120,120,0,0,0,0,1,0,9,0,115, +105,110,0,1,1,0,9,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,0,0,0,1,0,10,0,115,105,110, +0,1,1,0,10,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97, +116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115, +0,59,121,0,0,0,0,1,0,11,0,115,105,110,0,1,1,0,11,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111, +97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110, +115,0,59,120,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59, +121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18, +95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,0,1,0,12,0, +115,105,110,0,1,1,0,12,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108, +111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97, +110,115,0,59,121,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0, +59,122,0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0, +18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,0,9,0, +99,111,115,0,1,1,0,9,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,0,0,0,1,0,10,0,99, +111,115,0,1,1,0,10,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4, +102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114, +97,100,105,97,110,115,0,59,121,0,0,0,0,1,0,11,0,99,111,115,0,1,1,0,11,114,97,100,105,97,110,115,0, +0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0, +18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95, +95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,0,0,4,102,108,111,97, +116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,97,100,105,97, +110,115,0,59,122,0,0,0,0,1,0,12,0,99,111,115,0,1,1,0,12,114,97,100,105,97,110,115,0,0,0,1,4,102, +108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97, +100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114, +101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,0,0,4,102,108,111,97,116,95, +99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,97,100,105,97,110,115, +0,59,122,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0, +59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,0,9,0,116,97,110,0,1,1,0,9,97,110,103, +108,101,0,0,0,1,3,2,1,9,1,115,0,2,58,115,105,110,0,18,97,110,103,108,101,0,0,0,0,0,3,2,1,9,1,99,0, +2,58,99,111,115,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,0,10,0,116,97,110,0, +1,1,0,10,97,110,103,108,101,0,0,0,1,3,2,1,10,1,115,0,2,58,115,105,110,0,18,97,110,103,108,101,0,0, +0,0,0,3,2,1,10,1,99,0,2,58,99,111,115,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0, +1,0,11,0,116,97,110,0,1,1,0,11,97,110,103,108,101,0,0,0,1,3,2,1,11,1,115,0,2,58,115,105,110,0,18, +97,110,103,108,101,0,0,0,0,0,3,2,1,11,1,99,0,2,58,99,111,115,0,18,97,110,103,108,101,0,0,0,0,0,8, +18,115,0,18,99,0,49,0,0,1,0,12,0,116,97,110,0,1,1,0,12,97,110,103,108,101,0,0,0,1,3,2,1,12,1,115,0, +2,58,115,105,110,0,18,97,110,103,108,101,0,0,0,0,0,3,2,1,12,1,99,0,2,58,99,111,115,0,18,97,110,103, +108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,0,9,0,97,115,105,110,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1, +121,0,0,0,4,102,108,111,97,116,95,97,114,99,115,105,110,101,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0, +0,1,0,10,0,97,115,105,110,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,97,115,105,110,0,18,118,0, +59,120,0,0,0,0,58,97,115,105,110,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,115,105,110,0,1,0,0, +11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97,115,105,110, +0,18,118,0,59,121,0,0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,115,105, +110,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97, +115,105,110,0,18,118,0,59,121,0,0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,58,97,115,105, +110,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97,99,111,115,0,1,0,0,9,120,0,0,0,1,8,17,49,0,53,55,48, +56,0,0,58,97,115,105,110,0,18,120,0,0,0,47,0,0,1,0,10,0,97,99,111,115,0,1,0,0,10,118,0,0,0,1,8,58, +118,101,99,50,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,0,58,97,99,111,115,0,18,118,0,59,121,0,0, +0,0,0,0,0,1,0,11,0,97,99,111,115,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,99,111,115,0,18, +118,0,59,120,0,0,0,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0,59,122, +0,0,0,0,0,0,0,1,0,12,0,97,99,111,115,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,99,111,115, +0,18,118,0,59,120,0,0,0,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0, +59,122,0,0,0,0,58,97,99,111,115,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97,116,97,110,0,1,0,0,9, +121,95,111,118,101,114,95,120,0,0,0,1,3,2,0,9,1,122,0,0,0,4,102,108,111,97,116,95,97,114,99,116,97, +110,0,18,122,0,0,18,121,95,111,118,101,114,95,120,0,0,0,8,18,122,0,0,0,1,0,10,0,97,116,97,110,0,1, +0,0,10,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101,99,50,0,58,97,116,97,110,0,18,121,95,111, +118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0, +0,0,0,0,0,0,1,0,11,0,97,116,97,110,0,1,0,0,11,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101, +99,51,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18, +121,95,111,118,101,114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120, +0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,121,95,111,118,101,114,95,120,0,0,0,1,8, +58,118,101,99,52,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116, +97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118, +101,114,95,120,0,59,122,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,119,0,0,0, +0,0,0,0,1,0,9,0,97,116,97,110,0,1,0,0,9,121,0,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,122,0,2,58,97,116,97, +110,0,18,121,0,18,120,0,49,0,0,0,0,10,18,120,0,17,48,0,48,0,0,40,0,2,10,18,121,0,17,48,0,48,0,0,40, +0,8,18,122,0,17,51,0,49,52,49,53,57,51,0,0,47,0,9,14,0,8,18,122,0,17,51,0,49,52,49,53,57,51,0,0,46, +0,0,9,14,0,8,18,122,0,0,0,1,0,10,0,97,116,97,110,0,1,0,0,10,117,0,0,1,0,0,10,118,0,0,0,1,8,58,118, +101,99,50,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,18, +117,0,59,121,0,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,116,97,110,0,1,0,0,11,117,0,0,1,0,0,11, +118,0,0,0,1,8,58,118,101,99,51,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58, +97,116,97,110,0,18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,97,116,97,110,0,18,117,0,59,122,0,0, +18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,117,0,0,1,0,0,12,118,0,0,0,1,8,58, +118,101,99,52,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0, 18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,97,116,97,110,0,18,117,0,59,122,0,0,18,118,0,59,122, -0,0,0,0,0,0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,117,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0, -58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,18,117,0,59,121, -0,0,18,118,0,59,121,0,0,0,0,58,97,116,97,110,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,0,58,97, -116,97,110,0,18,117,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,112,111,119,0,1,0,0,9,120,0, -0,1,0,0,9,121,0,0,0,1,3,2,0,9,1,112,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,112,0,0, -18,120,0,0,18,121,0,0,0,8,18,112,0,0,0,1,0,10,0,112,111,119,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0, -1,8,58,118,101,99,50,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,112,111,119, -0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,0,0,0,1,0,11,0,112,111,119,0,1,0,0,11,118,0,0,1,0,0, -11,117,0,0,0,1,8,58,118,101,99,51,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0, -58,112,111,119,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,112,111,119,0,18,118,0,59,122,0,0, -18,117,0,59,122,0,0,0,0,0,0,0,1,0,12,0,112,111,119,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58, -118,101,99,52,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,112,111,119,0,18, -118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,112,111,119,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0, -0,0,58,112,111,119,0,18,118,0,59,119,0,0,18,117,0,59,119,0,0,0,0,0,0,0,1,0,9,0,101,120,112,0,1,0,0, -9,120,0,0,0,1,8,58,112,111,119,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,18,120,0,0,0,0,0,1,0,10,0, -101,120,112,0,1,0,0,10,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,50,0,17,50,0,55,49,56,50,56,49, -56,51,0,0,0,0,0,18,118,0,0,0,0,0,1,0,11,0,101,120,112,0,1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,58, -118,101,99,51,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,18,118,0,0,0,0,0,1,0,12,0,101,120,112,0, -1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,52,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0, -0,18,118,0,0,0,0,0,1,0,9,0,108,111,103,50,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111, -97,116,95,108,111,103,50,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,108,111,103,50,0,1,0,0, -10,118,0,0,0,1,8,58,118,101,99,50,0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50, -0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,108,111,103,50,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51, -0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,0,18,118,0,59,121,0,0,0,0,58,108, -111,103,50,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,108,111,103,50,0,1,0,0,12,118,0,0,0,1,8,58,118, -101,99,52,0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,0,18,118,0,59,121,0,0,0, -0,58,108,111,103,50,0,18,118,0,59,122,0,0,0,0,58,108,111,103,50,0,18,118,0,59,119,0,0,0,0,0,0,0,1, -0,9,0,108,111,103,0,1,0,0,9,120,0,0,0,1,8,58,108,111,103,50,0,18,120,0,0,0,58,108,111,103,50,0,17, -50,0,55,49,56,50,56,49,56,51,0,0,0,0,49,0,0,1,0,10,0,108,111,103,0,1,0,0,10,118,0,0,0,1,8,58,108, -111,103,50,0,18,118,0,0,0,58,108,111,103,50,0,58,118,101,99,50,0,17,50,0,55,49,56,50,56,49,56,51,0, -0,0,0,0,0,49,0,0,1,0,11,0,108,111,103,0,1,0,0,11,118,0,0,0,1,8,58,108,111,103,50,0,18,118,0,0,0,58, -108,111,103,50,0,58,118,101,99,51,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,0,49,0,0,1,0,12,0, -108,111,103,0,1,0,0,12,118,0,0,0,1,8,58,108,111,103,50,0,18,118,0,0,0,58,108,111,103,50,0,58,118, -101,99,52,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,0,49,0,0,1,0,9,0,101,120,112,50,0,1,0,0,9, -120,0,0,0,1,8,58,112,111,119,0,17,50,0,48,0,0,0,18,120,0,0,0,0,0,1,0,10,0,101,120,112,50,0,1,0,0, -10,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,50,0,17,50,0,48,0,0,0,0,0,18,118,0,0,0,0,0,1,0,11, -0,101,120,112,50,0,1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,51,0,17,50,0,48,0,0,0,0,0, -18,118,0,0,0,0,0,1,0,12,0,101,120,112,50,0,1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99, -52,0,17,50,0,48,0,0,0,0,0,18,118,0,0,0,0,0,1,0,9,0,115,113,114,116,0,1,0,0,9,120,0,0,0,1,8,58,112, -111,119,0,18,120,0,0,17,48,0,53,0,0,0,0,0,0,1,0,10,0,115,113,114,116,0,1,0,0,10,118,0,0,0,1,8,58, -112,111,119,0,18,118,0,0,58,118,101,99,50,0,17,48,0,53,0,0,0,0,0,0,0,0,1,0,11,0,115,113,114,116,0, -1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,18,118,0,0,58,118,101,99,51,0,17,48,0,53,0,0,0,0,0,0,0,0,1, -0,12,0,115,113,114,116,0,1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,18,118,0,0,58,118,101,99,52,0,17, -48,0,53,0,0,0,0,0,0,0,0,1,0,9,0,105,110,118,101,114,115,101,115,113,114,116,0,1,0,0,9,120,0,0,0,1, -8,17,49,0,48,0,0,58,115,113,114,116,0,18,120,0,0,0,49,0,0,1,0,10,0,105,110,118,101,114,115,101,115, -113,114,116,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,17,49,0,48,0,0,0,0,58,115,113,114,116,0,18, -118,0,0,0,49,0,0,1,0,11,0,105,110,118,101,114,115,101,115,113,114,116,0,1,0,0,11,118,0,0,0,1,8,58, -118,101,99,51,0,17,49,0,48,0,0,0,0,58,115,113,114,116,0,18,118,0,0,0,49,0,0,1,0,12,0,105,110,118, -101,114,115,101,115,113,114,116,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,17,49,0,48,0,0,0,0,58, -115,113,114,116,0,18,118,0,0,0,49,0,0,1,0,9,0,97,98,115,0,1,0,0,9,120,0,0,0,1,8,18,120,0,17,48,0, -48,0,0,43,18,120,0,18,120,0,54,31,0,0,1,0,10,0,97,98,115,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50, -0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,115,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97, -98,115,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98, -115,0,18,118,0,59,121,0,0,0,0,58,97,98,115,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,98,115,0,1, -0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,115,0,18, -118,0,59,121,0,0,0,0,58,97,98,115,0,18,118,0,59,122,0,0,0,0,58,97,98,115,0,18,118,0,59,119,0,0,0,0, -0,0,0,1,0,9,0,115,105,103,110,0,1,0,0,9,120,0,0,0,1,8,18,120,0,17,48,0,48,0,0,41,17,49,0,48,0,0,18, -120,0,17,48,0,48,0,0,40,17,49,0,48,0,0,54,17,48,0,48,0,0,31,31,0,0,1,0,10,0,115,105,103,110,0,1,0, -0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103, -110,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,105,103,110,0,1,0,0,11,118,0,0,0,1,8,58,118,101, -99,51,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,110,0,18,118,0,59,121,0,0,0,0, -58,115,105,103,110,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,105,103,110,0,1,0,0,12,118,0,0,0,1, -8,58,118,101,99,52,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,110,0,18,118,0,59, -121,0,0,0,0,58,115,105,103,110,0,18,118,0,59,122,0,0,0,0,58,115,105,103,110,0,18,118,0,59,119,0,0, -0,0,0,0,0,1,0,9,0,102,108,111,111,114,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,97, -116,95,102,108,111,111,114,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,102,108,111,111,114,0, -1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,102,108,111,111,114,0,18,118,0,59,120,0,0,0,0,58,102, -108,111,111,114,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,102,108,111,111,114,0,1,0,0,11,118,0,0,0, -1,8,58,118,101,99,51,0,58,102,108,111,111,114,0,18,118,0,59,120,0,0,0,0,58,102,108,111,111,114,0, -18,118,0,59,121,0,0,0,0,58,102,108,111,111,114,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,102,108, -111,111,114,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,102,108,111,111,114,0,18,118,0,59,120,0, -0,0,0,58,102,108,111,111,114,0,18,118,0,59,121,0,0,0,0,58,102,108,111,111,114,0,18,118,0,59,122,0, -0,0,0,58,102,108,111,111,114,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,99,101,105,108,0,1,0,0,9,120, -0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,97,116,95,99,101,105,108,0,18,121,0,0,18,120,0,0,0,8,18, -121,0,0,0,1,0,10,0,99,101,105,108,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,99,101,105,108,0, -18,118,0,59,120,0,0,0,0,58,99,101,105,108,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,99,101,105,108, -0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,99,101,105,108,0,18,118,0,59,120,0,0,0,0,58,99,101, -105,108,0,18,118,0,59,121,0,0,0,0,58,99,101,105,108,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,99, -101,105,108,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,99,101,105,108,0,18,118,0,59,120,0,0,0, -0,58,99,101,105,108,0,18,118,0,59,121,0,0,0,0,58,99,101,105,108,0,18,118,0,59,122,0,0,0,0,58,99, -101,105,108,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,102,114,97,99,116,0,1,0,0,9,120,0,0,0,1,8,18, -120,0,58,102,108,111,111,114,0,18,120,0,0,0,47,0,0,1,0,10,0,102,114,97,99,116,0,1,0,0,10,118,0,0,0, -1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,11,0,102,114,97,99,116,0,1,0,0,11, -118,0,0,0,1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,12,0,102,114,97,99,116,0,1, -0,0,12,118,0,0,0,1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,9,0,109,111,100,0,1, -0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,58,102,108,111,111,114,0,18,120,0,18,121,0, -49,0,0,48,47,0,0,1,0,10,0,109,111,100,0,1,0,0,10,118,0,0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0, -58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,11,0,109,111,100,0,1,0,0,11,118,0, -0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47, -0,0,1,0,12,0,109,111,100,0,1,0,0,12,118,0,0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111, -111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,10,0,109,111,100,0,1,0,0,10,118,0,0,1,0,0,10,117, -0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,11,0, -109,111,100,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0, -18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,12,0,109,111,100,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8, -18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,9,0,109,105,110, -0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,40,18,120,0,18,121,0,31,0,0,1,0,10,0,109, -105,110,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,118,101,99,50,0,58,109,105,110,0,18,118,0,59, -120,0,0,18,117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,0,0,0, -1,0,11,0,109,105,110,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,101,99,51,0,58,109,105,110,0, -18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0, -0,0,0,58,109,105,110,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,0,0,0,1,0,12,0,109,105,110,0,1, -0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,118,101,99,52,0,58,109,105,110,0,18,118,0,59,120,0,0,18, -117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,109,105,110,0, -18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,58,109,105,110,0,18,118,0,59,119,0,0,18,117,0,59,119,0, -0,0,0,0,0,0,1,0,10,0,109,105,110,0,1,0,0,10,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,105,110,0,18,118, -0,0,58,118,101,99,50,0,18,121,0,0,0,0,0,0,0,1,0,11,0,109,105,110,0,1,0,0,11,118,0,0,1,0,0,9,121,0, -0,0,1,8,58,109,105,110,0,18,118,0,0,58,118,101,99,51,0,18,121,0,0,0,0,0,0,0,1,0,12,0,109,105,110,0, -1,0,0,12,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,105,110,0,18,118,0,0,58,118,101,99,52,0,18,121,0,0,0, -0,0,0,0,1,0,9,0,109,97,120,0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,40,18,121,0, -18,120,0,31,0,0,1,0,10,0,109,97,120,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,118,101,99,50,0, -58,109,97,120,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,59,121,0,0,18, -117,0,59,121,0,0,0,0,0,0,0,1,0,11,0,109,97,120,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118, -101,99,51,0,58,109,97,120,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0, -59,121,0,0,18,117,0,59,121,0,0,0,0,58,109,97,120,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,0,0, -0,1,0,12,0,109,97,120,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,118,101,99,52,0,58,109,97,120,0, -18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,59,121,0,0,18,117,0,59,121,0, -0,0,0,58,109,97,120,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,58,109,97,120,0,18,118,0,59,119, -0,0,18,117,0,59,119,0,0,0,0,0,0,0,1,0,10,0,109,97,120,0,1,0,0,10,118,0,0,1,0,0,9,121,0,0,0,1,8,58, -109,97,120,0,18,118,0,0,58,118,101,99,50,0,18,121,0,0,0,0,0,0,0,1,0,11,0,109,97,120,0,1,0,0,11,118, -0,0,1,0,0,9,121,0,0,0,1,8,58,109,97,120,0,18,118,0,0,58,118,101,99,51,0,18,121,0,0,0,0,0,0,0,1,0, -12,0,109,97,120,0,1,0,0,12,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,97,120,0,18,118,0,0,58,118,101,99, -52,0,18,121,0,0,0,0,0,0,0,1,0,9,0,99,108,97,109,112,0,1,0,0,9,120,0,0,1,0,0,9,109,105,110,86,97, -108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109, -105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,0,0,10, -120,0,0,1,0,0,9,109,105,110,86,97,108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0, -58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0, -11,0,99,108,97,109,112,0,1,0,0,11,120,0,0,1,0,0,9,109,105,110,86,97,108,0,0,1,0,0,9,109,97,120,86, -97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18, -109,97,120,86,97,108,0,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,0,0,12,120,0,0,1,0,0,9,109,105,110, -86,97,108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0, -18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1, -0,0,10,120,0,0,1,0,0,10,109,105,110,86,97,108,0,0,1,0,0,10,109,97,120,86,97,108,0,0,0,1,8,58,109, -105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0, -0,0,0,1,0,11,0,99,108,97,109,112,0,1,0,0,11,120,0,0,1,0,0,11,109,105,110,86,97,108,0,0,1,0,0,11, -109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97, -108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,0,0,12,120,0,0,1,0,0, -12,109,105,110,86,97,108,0,0,1,0,0,12,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97, -120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,9,0,109, -105,120,0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,1,0,0,9,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47, -48,18,121,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,0,0,10,120,0,0,1,0,0,10,121,0,0,1,0,0,9,97, -0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0, -1,0,0,11,120,0,0,1,0,0,11,121,0,0,1,0,0,9,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18, -121,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,0,0,12,120,0,0,1,0,0,12,121,0,0,1,0,0,9,97,0,0,0, -1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,0,0, -10,120,0,0,1,0,0,10,121,0,0,1,0,0,10,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0, -18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,0,0,11,120,0,0,1,0,0,11,121,0,0,1,0,0,11,97,0,0,0,1,8, -18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,0,0,12, -120,0,0,1,0,0,12,121,0,0,1,0,0,12,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18, -97,0,48,46,0,0,1,0,9,0,115,116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,9,120,0,0,0,1,8,18,120, -0,18,101,100,103,101,0,40,17,48,0,48,0,0,17,49,0,48,0,0,31,0,0,1,0,10,0,115,116,101,112,0,1,0,0,10, -101,100,103,101,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,115,116,101,112,0,18,101,100,103, -101,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,18, -118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,116,101,112,0,1,0,0,11,101,100,103,101,0,0,1,0,0,11,118,0, -0,0,1,8,58,118,101,99,51,0,58,115,116,101,112,0,18,101,100,103,101,0,59,120,0,0,18,118,0,59,120,0, -0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,116,101, -112,0,18,101,100,103,101,0,59,122,0,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,116,101,112,0,1,0, -0,12,101,100,103,101,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,116,101,112,0,18,101,100, -103,101,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0, -18,118,0,59,121,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,122,0,0,18,118,0,59,122,0,0,0, -0,58,115,116,101,112,0,18,101,100,103,101,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,10,0,115, -116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,10,118,0,0,0,1,8,58,115,116,101,112,0,58,118,101, -99,50,0,18,101,100,103,101,0,0,0,0,18,118,0,0,0,0,0,1,0,11,0,115,116,101,112,0,1,0,0,9,101,100,103, -101,0,0,1,0,0,11,118,0,0,0,1,8,58,115,116,101,112,0,58,118,101,99,51,0,18,101,100,103,101,0,0,0,0, -18,118,0,0,0,0,0,1,0,12,0,115,116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,12,118,0,0,0,1,8,58, -115,116,101,112,0,58,118,101,99,52,0,18,101,100,103,101,0,0,0,0,18,118,0,0,0,0,0,1,0,9,0,115,109, -111,111,116,104,115,116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1, -0,0,9,120,0,0,0,1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48,0,47,18, +0,0,0,0,58,97,116,97,110,0,18,117,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,112,111,119,0, +1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,0,112,111,119,0,1,1,0,10,97,0,0,1,1,0,10, +98,0,0,0,1,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0, +0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95, +114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,0,1,0,11,0,112,111,119, +0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112, +111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0, +0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, +97,0,59,122,0,0,18,98,0,59,122,0,0,0,0,1,0,12,0,112,111,119,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1, +4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0, +59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116, +86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,112,111,119, +101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,18,98,0,59,122,0,0,0,4, +102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,97,0,59, +119,0,0,18,98,0,59,119,0,0,0,0,1,0,9,0,101,120,112,0,1,1,0,9,97,0,0,0,1,4,102,108,111,97,116,95, +101,120,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,101,120,112,0,1,1, +0,10,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0, +18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,0,18,95,95,114,101,116,86,97,108,0,59,121, +0,0,18,97,0,59,121,0,0,0,0,1,0,11,0,101,120,112,0,1,1,0,11,97,0,0,0,1,4,102,108,111,97,116,95,101, +120,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95, +101,120,112,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,0,4,102,108,111,97, +116,95,101,120,112,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,0,0,1,0,12,0, +101,120,112,0,1,1,0,12,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,0,18,95,95,114,101,116,86,97, +108,0,59,120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,0,18,95,95,114,101,116, +86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,0,18,95,95,114,101, +116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112,0,18,95,95,114, +101,116,86,97,108,0,59,119,0,0,18,97,0,59,119,0,0,0,0,1,0,9,0,108,111,103,50,0,1,1,0,9,120,0,0,0,1, +4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,0, +0,1,0,10,0,108,111,103,50,0,1,1,0,10,118,0,0,0,1,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,108,111,103,50,0, +18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,0,1,0,11,0,108,111,103,50,0,1,1, +0,11,118,0,0,0,1,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120, +0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108, +0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116, +86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,0,1,0,12,0,108,111,103,50,0,1,1,0,12,118,0,0,0,1,4, +102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120, +0,0,0,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118, +0,59,121,0,0,0,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0, +0,18,118,0,59,122,0,0,0,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0, +59,119,0,0,18,118,0,59,119,0,0,0,0,1,0,9,0,108,111,103,0,1,1,0,9,120,0,0,0,1,3,2,1,9,1,99,0,2,17, +48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103,50,0,18,120,0,0,0,18,99,0,48,0,0,1,0,10,0, +108,111,103,0,1,1,0,10,118,0,0,0,1,3,2,1,9,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8, +58,108,111,103,50,0,18,118,0,0,0,18,99,0,48,0,0,1,0,11,0,108,111,103,0,1,1,0,11,118,0,0,0,1,3,2,1, +9,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103,50,0,18,118,0,0,0,18,99,0, +48,0,0,1,0,12,0,108,111,103,0,1,1,0,12,118,0,0,0,1,3,2,1,9,1,99,0,2,17,48,0,54,57,51,49,52,55,49, +56,49,0,0,0,0,8,58,108,111,103,50,0,18,118,0,0,0,18,99,0,48,0,0,1,0,9,0,101,120,112,50,0,1,1,0,9, +97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +97,0,0,0,0,1,0,10,0,101,120,112,50,0,1,1,0,10,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120, +112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,0,0,1,0,11,0,101,120,112, +50,0,1,1,0,11,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86, +97,108,0,59,121,0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101, +116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,0,0,1,0,12,0,101,120,112,50,0,1,1,0,12,97,0,0,0,1,4, +102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120, +0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,97,0, +59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0, +18,97,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59, +119,0,0,18,97,0,59,119,0,0,0,0,1,0,9,0,115,113,114,116,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,114,0,0,0,4, +102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0,0,0,1,0,10,0,115,113,114,116,0,1,1,0,10,118, +0,0,0,1,3,2,0,9,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,120,0,0,0, +4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0,0,4, +102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,0,0,0,0,1,0,11,0,115,113,114,116,0,1,1, +0,11,118,0,0,0,1,3,2,0,9,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59, +120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, +0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,0,0,0,4,102,108,111,97,116,95, +114,115,113,0,18,114,0,0,18,118,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114, +101,116,86,97,108,0,59,122,0,0,18,114,0,0,0,0,1,0,12,0,115,113,114,116,0,1,1,0,12,118,0,0,0,1,3,2, +0,9,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,120,0,0,0,4,102,108, +111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0,0,4,102,108,111, +97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114, +0,0,18,118,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, +122,0,0,18,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,119,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,0,0,0,0,1,0,9,0, +105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,9,120,0,0,0,1,4,102,108,111,97,116,95,114,115, +113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,0,0,1,0,10,0,105,110,118,101,114,115, +101,115,113,114,116,0,1,1,0,10,118,0,0,0,1,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95, +114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,0,1,0,11,0,105,110,118,101,114,115,101, +115,113,114,116,0,1,1,0,11,118,0,0,0,1,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116, +86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114, +101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95, +95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,0,1,0,12,0,105,110,118,101,114,115,101, +115,113,114,116,0,1,1,0,12,118,0,0,0,1,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116, +86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114, +101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95, +95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,4,102,108,111,97,116,95,114,115,113,0, +18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,59,119,0,0,0,0,1,0,9,0,110,111,114,109,97,108, +105,122,101,0,1,1,0,9,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,17,49,0,48,0,0,20,0, +0,1,0,10,0,110,111,114,109,97,108,105,122,101,0,1,1,0,10,118,0,0,0,1,3,2,1,9,1,115,0,2,58,105,110, +118,101,114,115,101,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, +0,0,18,115,0,59,120,120,0,0,0,0,1,0,11,0,110,111,114,109,97,108,105,122,101,0,1,1,0,11,118,0,0,0,1, +3,2,1,9,1,115,0,2,58,105,110,118,101,114,115,101,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18, +118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,118,0,0,18,115,0,59,120,120,120,0,0,0,0,1,0,12,0,110,111,114,109,97, +108,105,122,101,0,1,1,0,12,118,0,0,0,1,3,2,1,9,1,115,0,2,58,105,110,118,101,114,115,101,115,113, +114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,115,0,59,120,120,120,120,0,0,0,0,1, +0,9,0,97,98,115,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108, +0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,97,98,115,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,0,11,0,97,98,115,0,1,1,0,11,97,0,0, +0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0, +0,1,0,12,0,97,98,115,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86, +97,108,0,0,18,97,0,0,0,0,1,0,9,0,115,105,103,110,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,112,0,0,1,1,110,0, +0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,59,120,0,0,18,120,0,0,17,48,0,48,0,0,0,0,4,118,101, +99,52,95,115,103,116,0,18,110,0,59,120,0,0,17,48,0,48,0,0,0,18,120,0,0,0,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,0,0,18,110,0,0,0,0,1, +0,10,0,115,105,103,110,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95, +115,103,116,0,18,112,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116, +0,18,110,0,59,120,121,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97, +99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,0,18,110,0,0,0,0,1,0,11,0,115, +105,103,110,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116, +0,18,112,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116,0,18, +110,0,59,120,121,122,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,0,18,110,0,0,0,0,1,0,12,0,115, +105,103,110,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116, +0,18,112,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48, +0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,112,0,0,18,110,0,0,0,0,1,0,9,0,102,108,111,111,114,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,102, +108,111,111,114,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,0,11,0,102,108,111,111,114,0,1,1,0,11,97,0,0,0,1,4, +118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0, +0,0,0,1,0,12,0,102,108,111,111,114,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,0,9,0,99,101,105,108,0,1,1,0,9,97,0,0,0,1,3,2,0, +9,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,18,98,0,54,20,0,0,1,0,10,0,99,101,105,108,0,1,1,0,10,97,0,0,0, +1,3,2,0,10,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0, +9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,0,54,20,0,0,1,0,11,0,99,101,105,108,0,1,1,0, +11,97,0,0,0,1,3,2,0,11,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0, +18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,54,20,0,0,1,0,12,0,99,101, +105,108,0,1,1,0,12,97,0,0,0,1,3,2,0,12,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111, +114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,0,9,0,102,114, +97,99,116,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,97,0,0,0,0,1,0,10,0,102,114,97,99,116,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,102, +114,97,99,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,0,11,0,102,114,97,99, +116,0,1,1,0,11,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,97,0,0,0,0,1,0,12,0,102,114,97,99,116,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95, +102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,0,9,0,109,111,100,0,1,1,0,9,97, +0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59, +120,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0, +48,47,20,0,0,1,0,10,0,109,111,100,0,1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79, +118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18, +98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,97,0,18,98,0,58,102,108,111,111,114,0, +18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,0,11,0,109,111,100,0,1,1,0,11,97, +0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97,0,18,111,110,101,79,118,101,114,66,0, +48,0,0,48,47,20,0,0,1,0,12,0,109,111,100,0,1,1,0,12,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110, +101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66, +0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97, +0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,0,10,0,109,111,100,0,1,1,0,10,97,0,0,1, +1,0,10,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,120,0,0,1,1,111,110,101,79,118,101,114, +66,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,120,0,0,18,98,0, +59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,121,0,0,18,98,0, +59,121,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,97,0,59,120,0,18,98,0,59,120,0,58,102, +108,111,111,114,0,18,97,0,59,120,0,18,111,110,101,79,118,101,114,66,120,0,48,0,0,48,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,121,0,18,97,0,59,121,0,18,98,0,59,121,0,58,102,108,111,111,114,0, +18,97,0,59,121,0,18,111,110,101,79,118,101,114,66,121,0,48,0,0,48,47,20,0,0,1,0,11,0,109,111,100,0, +1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,120,0,0,1,1,111,110, +101,79,118,101,114,66,121,0,0,1,1,111,110,101,79,118,101,114,66,122,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,111,110,101,79,118,101,114,66,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,111,110,101,79,118,101,114,66,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,111,110,101,79,118,101,114,66,122,0,0,18,98,0,59,122,0,0,0,9,18,95,95,114,101,116, +86,97,108,0,59,120,0,18,97,0,59,120,0,18,98,0,59,120,0,58,102,108,111,111,114,0,18,97,0,59,120,0, +18,111,110,101,79,118,101,114,66,120,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121, +0,18,97,0,59,121,0,18,98,0,59,121,0,58,102,108,111,111,114,0,18,97,0,59,121,0,18,111,110,101,79, +118,101,114,66,121,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,97,0,59,122, +0,18,98,0,59,122,0,58,102,108,111,111,114,0,18,97,0,59,122,0,18,111,110,101,79,118,101,114,66,122, +0,48,0,0,48,47,20,0,0,1,0,12,0,109,111,100,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,3,2,0,9,1,111,110, +101,79,118,101,114,66,120,0,0,1,1,111,110,101,79,118,101,114,66,121,0,0,1,1,111,110,101,79,118,101, +114,66,122,0,0,1,1,111,110,101,79,118,101,114,66,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +111,110,101,79,118,101,114,66,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +111,110,101,79,118,101,114,66,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +111,110,101,79,118,101,114,66,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +111,110,101,79,118,101,114,66,119,0,0,18,98,0,59,119,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59, +120,0,18,97,0,59,120,0,18,98,0,59,120,0,58,102,108,111,111,114,0,18,97,0,59,120,0,18,111,110,101, +79,118,101,114,66,120,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,97,0,59, +121,0,18,98,0,59,121,0,58,102,108,111,111,114,0,18,97,0,59,121,0,18,111,110,101,79,118,101,114,66, +121,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,97,0,59,122,0,18,98,0,59, +122,0,58,102,108,111,111,114,0,18,97,0,59,122,0,18,111,110,101,79,118,101,114,66,122,0,48,0,0,48, +47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,97,0,59,119,0,18,98,0,59,119,0,58,102,108, +111,111,114,0,18,97,0,59,119,0,18,111,110,101,79,118,101,114,66,122,0,48,0,0,48,47,20,0,0,1,0,9,0, +109,105,110,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,0,1,0,10,0,109,105,110,0,1,1,0, +10,97,0,0,1,1,0,10,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0,1,0,11,0,109,105,110,0,1,1,0,11,97,0, +0,1,1,0,11,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,121,122,0,0,0,0,1,0,12,0,109,105,110,0,1,1,0,12, +97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,10,0,109,105,110,0,1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, +109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0, +1,0,11,0,109,105,110,0,1,1,0,11,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95, +95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,12,0, +109,105,110,0,1,1,0,12,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101, +116,86,97,108,0,0,18,97,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,9,0,109,97,120,0,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +97,0,59,120,0,0,18,98,0,59,120,0,0,0,0,1,0,10,0,109,97,120,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,4, +118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0, +0,18,98,0,59,120,121,0,0,0,0,1,0,11,0,109,97,120,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101, +99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0, +0,18,98,0,59,120,121,122,0,0,0,0,1,0,12,0,109,97,120,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118, +101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,0,109, +97,120,0,1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116, +86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,11,0,109,97,120,0,1,1,0,11,97, +0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0, +59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,12,0,109,97,120,0,1,1,0,12,97,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,59, +120,120,120,120,0,0,0,0,1,0,9,0,99,108,97,109,112,0,1,1,0,9,118,97,108,0,0,1,1,0,9,109,105,110,86, +97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,9,1,116,0,0,0,4,118,101,99,52,95,109,97,120, +0,18,116,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,0,4,118,101,99,52,95,109,105,110,0,18, +95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,10,0,99, +108,97,109,112,0,1,1,0,10,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86, +97,108,0,0,0,1,3,2,0,10,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,0,0,18,118, +97,108,0,59,120,121,0,0,18,109,105,110,86,97,108,0,59,120,120,0,0,0,4,118,101,99,52,95,109,105,110, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,116,0,59,120,121,0,0,18,109,97,120,86,97,108, +0,59,120,120,0,0,0,0,1,0,11,0,99,108,97,109,112,0,1,1,0,11,118,97,108,0,0,1,1,0,9,109,105,110,86, +97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97,120, +0,18,116,0,59,120,121,122,0,0,18,118,97,108,0,59,120,121,122,0,0,18,109,105,110,86,97,108,0,59,120, +120,120,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,116,0,59,120,121,122,0,0,18,109,97,120,86,97,108,0,59,120,120,120,0,0,0,0,1,0,12,0,99,108,97, +109,112,0,1,1,0,12,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0, +0,0,1,3,2,0,12,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105, +110,86,97,108,0,59,120,120,120,120,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86, +97,108,0,0,18,116,0,0,18,109,97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,10,0,99,108,97,109, +112,0,1,1,0,10,118,97,108,0,0,1,1,0,10,109,105,110,86,97,108,0,0,1,1,0,10,109,97,120,86,97,108,0,0, +0,1,3,2,0,10,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,0,0,18,118,97,108,0, +59,120,121,0,0,18,109,105,110,86,97,108,0,59,120,121,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,0,0,18,116,0,59,120,121,0,0,18,109,97,120,86,97,108,0,59,120, +120,120,120,0,0,0,0,1,0,11,0,99,108,97,109,112,0,1,1,0,11,118,97,108,0,0,1,1,0,11,109,105,110,86, +97,108,0,0,1,1,0,11,109,97,120,86,97,108,0,0,0,1,3,2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97, +120,0,18,116,0,59,120,121,122,0,0,18,118,97,108,0,59,120,121,122,0,0,18,109,105,110,86,97,108,0,59, +120,121,122,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, +0,0,18,116,0,59,120,121,122,0,0,18,109,97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,12,0,99, +108,97,109,112,0,1,1,0,12,118,97,108,0,0,1,1,0,12,109,105,110,86,97,108,0,0,1,1,0,12,109,97,120,86, +97,108,0,0,0,1,3,2,0,12,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0, +18,109,105,110,86,97,108,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0, +18,116,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,9,0,109,105,120,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1, +1,0,9,97,0,0,0,1,3,2,1,9,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0, +1,0,10,0,109,105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,10,1,100,0,2,18, +121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0, +0,1,1,0,11,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,11,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18, +100,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,9,97,0,0,0, +1,3,2,1,12,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,10,0,109, +105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0,10,97,0,0,0,1,3,2,1,10,1,100,0,2,18,121,0,18,120, +0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11, +121,0,0,1,1,0,11,97,0,0,0,1,3,2,1,11,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97, +0,48,46,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,12,97,0,0,0,1,3,2,1,12, +1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,9,0,115,116,101,112,0, +1,1,0,9,101,100,103,101,0,0,1,1,0,9,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0, +10,101,100,103,101,0,0,1,1,0,10,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0, +11,101,100,103,101,0,0,1,1,0,11,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,12,0,115,116,101,112,0,1, +1,0,12,101,100,103,101,0,0,1,1,0,12,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101, +116,86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,9,101,100, +103,101,0,0,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0, +9,101,100,103,101,0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,0,0,0,0,1,0,12,0,115, +116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, +95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,120,0,0,0,0,1,0,9,0, +115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101, +49,0,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48, +0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0, +0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111, +111,116,104,115,116,101,112,0,1,1,0,10,101,100,103,101,48,0,0,1,1,0,10,101,100,103,101,49,0,0,1,1, +0,10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18, 101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18, -116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116, -104,115,116,101,112,0,1,0,0,10,101,100,103,101,48,0,0,1,0,0,10,101,100,103,101,49,0,0,1,0,0,10,118, -0,0,0,1,8,58,118,101,99,50,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0, -59,120,0,0,18,101,100,103,101,49,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104, -115,116,101,112,0,18,101,100,103,101,48,0,59,121,0,0,18,101,100,103,101,49,0,59,121,0,0,18,118,0, -59,121,0,0,0,0,0,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,11,101,100,103,101, -48,0,0,1,0,0,11,101,100,103,101,49,0,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,115,109,111, -111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,120,0,0,18,101,100,103,101,49,0,59,120,0, -0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59, -121,0,0,18,101,100,103,101,49,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115, -116,101,112,0,18,101,100,103,101,48,0,59,122,0,0,18,101,100,103,101,49,0,59,122,0,0,18,118,0,59, -122,0,0,0,0,0,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,12,101,100,103,101,48,0, -0,1,0,0,12,101,100,103,101,49,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,109,111,111,116, -104,115,116,101,112,0,18,101,100,103,101,48,0,59,120,0,0,18,101,100,103,101,49,0,59,120,0,0,18,118, -0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,121,0,0, -18,101,100,103,101,49,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115,116,101, -112,0,18,101,100,103,101,48,0,59,122,0,0,18,101,100,103,101,49,0,59,122,0,0,18,118,0,59,122,0,0,0, -0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,119,0,0,18,101,100,103, -101,49,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,10,0,115,109,111,111,116,104,115,116,101,112, -0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101, -99,50,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101, -49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48, -0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,109,111,111,116,104,115, -116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,0,0,11,118,0,0,0,1,8, -58,118,101,99,51,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101, -100,103,101,49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100, -103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115, -116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,122,0,0,0,0,0,0,0,1, -0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100, -103,101,49,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,109,111,111,116,104,115,116,101, -112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111, -111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,121, -0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101, -49,0,0,18,118,0,59,122,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48, -0,0,18,101,100,103,101,49,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,100,111,116,0,1,0,0,9,120,0,0, -1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,48,0,0,1,0,9,0,100,111,116,0,1,0,0,10,118,0,0,1,0,0,10,117, -0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,18,118,0,59,121,0,18,117,0,59,121,0,48,46,0,0,1,0, -9,0,100,111,116,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48, -18,118,0,59,121,0,18,117,0,59,121,0,48,46,18,118,0,59,122,0,18,117,0,59,122,0,48,46,0,0,1,0,9,0, -100,111,116,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,18, -118,0,59,121,0,18,117,0,59,121,0,48,46,18,118,0,59,122,0,18,117,0,59,122,0,48,46,18,118,0,59,119,0, -18,117,0,59,119,0,48,46,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,9,120,0,0,0,1,8,58,115,113,114, -116,0,58,100,111,116,0,18,120,0,0,18,120,0,0,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,10, -118,0,0,0,1,8,58,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,1,0,9,0,108, -101,110,103,116,104,0,1,0,0,11,118,0,0,0,1,8,58,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18, -118,0,0,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,12,118,0,0,0,1,8,58,115,113,114,116,0,58, -100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,0,0,9,120, -0,0,1,0,0,9,121,0,0,0,1,8,58,108,101,110,103,116,104,0,18,120,0,18,121,0,47,0,0,0,0,1,0,9,0,100, -105,115,116,97,110,99,101,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,108,101,110,103,116,104,0, -18,118,0,18,117,0,47,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,0,0,11,118,0,0,1,0,0,11,117, -0,0,0,1,8,58,108,101,110,103,116,104,0,18,118,0,18,117,0,47,0,0,0,0,1,0,9,0,100,105,115,116,97,110, -99,101,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,108,101,110,103,116,104,0,18,118,0,18,117,0,47, -0,0,0,0,1,0,11,0,99,114,111,115,115,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,101,99,51,0, -18,118,0,59,121,0,18,117,0,59,122,0,48,18,117,0,59,121,0,18,118,0,59,122,0,48,47,0,18,118,0,59,122, -0,18,117,0,59,120,0,48,18,117,0,59,122,0,18,118,0,59,120,0,48,47,0,18,118,0,59,120,0,18,117,0,59, -121,0,48,18,117,0,59,120,0,18,118,0,59,121,0,48,47,0,0,0,0,1,0,9,0,110,111,114,109,97,108,105,122, -101,0,1,0,0,9,120,0,0,0,1,8,17,49,0,48,0,0,0,0,1,0,10,0,110,111,114,109,97,108,105,122,101,0,1,0,0, -10,118,0,0,0,1,8,18,118,0,58,108,101,110,103,116,104,0,18,118,0,0,0,49,0,0,1,0,11,0,110,111,114, -109,97,108,105,122,101,0,1,0,0,11,118,0,0,0,1,8,18,118,0,58,108,101,110,103,116,104,0,18,118,0,0,0, -49,0,0,1,0,12,0,110,111,114,109,97,108,105,122,101,0,1,0,0,12,118,0,0,0,1,8,18,118,0,58,108,101, -110,103,116,104,0,18,118,0,0,0,49,0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114,100,0,1,0,0,9, -78,0,0,1,0,0,9,73,0,0,1,0,0,9,78,114,101,102,0,0,0,1,8,58,100,111,116,0,18,78,114,101,102,0,0,18, -73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114, -100,0,1,0,0,10,78,0,0,1,0,0,10,73,0,0,1,0,0,10,78,114,101,102,0,0,0,1,8,58,100,111,116,0,18,78,114, -101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,11,0,102,97,99,101,102,111, -114,119,97,114,100,0,1,0,0,11,78,0,0,1,0,0,11,73,0,0,1,0,0,11,78,114,101,102,0,0,0,1,8,58,100,111, -116,0,18,78,114,101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,12,0,102, -97,99,101,102,111,114,119,97,114,100,0,1,0,0,12,78,0,0,1,0,0,12,73,0,0,1,0,0,12,78,114,101,102,0,0, -0,1,8,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0, -0,1,0,9,0,114,101,102,108,101,99,116,0,1,0,0,9,73,0,0,1,0,0,9,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0, -58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101,102,108,101,99,116,0, -1,0,0,10,73,0,0,1,0,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0, -0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,0,0,11,73,0,0,1,0,0,11,78,0,0,0,1,8, -18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,12,0,114, -101,102,108,101,99,116,0,1,0,0,12,73,0,0,1,0,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111, -116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116,0,1,0,0,9,73,0, -0,1,0,0,9,78,0,0,1,0,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18, -101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0, -18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116, -97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18, -107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,0,0,10,73,0,0,1,0,0,10,78,0, -0,1,0,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48, +116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116, +104,115,116,101,112,0,1,1,0,11,101,100,103,101,48,0,0,1,1,0,11,101,100,103,101,49,0,0,1,1,0,11,118, +0,0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100, +103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18, +116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115, +116,101,112,0,1,1,0,12,101,100,103,101,48,0,0,1,1,0,12,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1, +3,2,0,12,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101, +49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0, +48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,104,115,116, +101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2,0, +10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18, +101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51, +0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1, +1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,116,0, +2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100, +103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0, +17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9, +101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2,58, +99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101, +48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0, +48,0,0,18,116,0,48,47,48,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,9,120,0,0,0,1,8,58,97,98,115, +0,18,120,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2, +1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0, +18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,11,118,0,0,0,1,3,2,0,9,1,114,0,0,0, +3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113, +0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,12,118,0,0,0,1,3,2,0,9,1,114,0,0,0, +3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113, +0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,114,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1, +3,2,1,9,1,100,0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0, +100,105,115,116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0,2,18,118,0, +18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99, +101,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108, +101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12,118,0,0,1, +1,0,12,117,0,0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18, +100,0,0,0,0,0,1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,51, +95,99,114,111,115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0, +0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1,1,0,9,78, +114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0, +9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8, +58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97, +114,100,0,1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100, +111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116, +0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18, +115,0,0,0,0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1,0,11,73,0,0, +1,1,0,11,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0, +0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18, +100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97,99,101,102, +111,114,119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0,1,3,2,1,9,1, +100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52, +95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0, +18,78,0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,0,1, +8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114, +101,102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111, +116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,1,0,11,73, +0,0,1,1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0, +48,47,0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1,8,18,73,0,17, +50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97, +99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0, +18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100, +111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0, +9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58, +115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,1,0,10, +73,0,0,1,1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0, +18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0, +0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101, +116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0, +18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78, +0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48, 17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47, 48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48, 18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18, -78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,0,0,11,73,0,0,1,0,0,11,78,0,0,1,0,0,9,101, +78,0,48,47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,1,1,0,9,101, 116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0, 58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10, 18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97, 0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0, -1,0,12,0,114,101,102,114,97,99,116,0,1,0,0,12,73,0,0,1,0,0,12,78,0,0,1,0,0,9,101,116,97,0,0,0,1,3, -2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0, -18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0, -48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116, -0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109,97, -116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109,97, -116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0,0,1, -0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0, -1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15,110,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0, -57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,0,0,10,118,0,0,1,0, -0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121, -0,18,117,0,59,121,0,40,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,0,0,11,118,0,0,1,0,0,11, -117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,0,18, -117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,0,0,0,1,0,4,0,108,101,115,115,84,104, -97,110,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0, -59,120,0,40,0,18,118,0,59,121,0,18,117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,18, -118,0,59,119,0,18,117,0,59,119,0,40,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,0,0,6,118,0, -0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59, -121,0,18,117,0,59,121,0,40,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,0,0,7,118,0,0,1,0,0,7, -117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,0,18, -117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,0,0,0,1,0,4,0,108,101,115,115,84,104, -97,110,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,40,0,18,118,0,59,121,0,18,117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,18, -118,0,59,119,0,18,117,0,59,119,0,40,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97, -108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59, -120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69, -113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0, -18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122, -0,42,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12, -117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18, -117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,0,42,0,18,118,0,59,119,0,18,117,0,59,119,0, -42,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0, -0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0, -59,121,0,42,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0, -0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0, -18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,0,42,0,0,0,0,1,0,4,0,108,101,115,115,84, -104,97,110,69,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118, -0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,18,118,0,59,122,0,18, -117,0,59,122,0,42,0,18,118,0,59,119,0,18,117,0,59,119,0,42,0,0,0,0,1,0,2,0,103,114,101,97,116,101, -114,84,104,97,110,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120, -0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,0,0,0,1,0,3,0,103,114,101,97,116, -101,114,84,104,97,110,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59, -120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0, -59,122,0,41,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,12,118,0,0,1,0,0,12, -117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18, -117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,18,118,0,59,119,0,18,117,0,59,119,0, -41,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1, -8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121, -0,41,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0, -1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59, -121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84, -104,97,110,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117, -0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0, -18,118,0,59,119,0,18,117,0,59,119,0,41,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69, -113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0, -18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,0,0,0,1,0,3,0,103,114,101,97,116, -101,114,84,104,97,110,69,113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99, -51,0,18,118,0,59,120,0,18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59, -122,0,18,117,0,59,122,0,43,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97, -108,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,0,18,117,0,59,122,0,43,0,18, -118,0,59,119,0,18,117,0,59,119,0,43,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69, -113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18, -117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,0,0,0,1,0,3,0,103,114,101,97,116,101, -114,84,104,97,110,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0, -18,118,0,59,120,0,18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122, -0,18,117,0,59,122,0,43,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108, -0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0, -43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,0,18,117,0,59,122,0,43,0,18,118,0,59, -119,0,18,117,0,59,119,0,43,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0, -0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59, -121,0,38,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118, -101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18, -118,0,59,122,0,18,117,0,59,122,0,38,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12, -117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18, -117,0,59,121,0,38,0,18,118,0,59,122,0,18,117,0,59,122,0,38,0,18,118,0,59,119,0,18,117,0,59,119,0, -38,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50, -0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,0,0,0,1,0,3,0, -101,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0, -18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,118,0,59,122,0,18,117,0,59,122, -0,38,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99, -52,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,118,0,59, -122,0,18,117,0,59,122,0,38,0,18,118,0,59,119,0,18,117,0,59,119,0,38,0,0,0,0,1,0,2,0,110,111,116,69, -113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0, -18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,0,0,0,1,0,3,0,110,111,116,69,113, -117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18, -117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,18,118,0,59,122,0,18,117,0,59,122,0, -39,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98, -118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0, -18,118,0,59,122,0,18,117,0,59,122,0,39,0,18,118,0,59,119,0,18,117,0,59,119,0,39,0,0,0,0,1,0,2,0, -110,111,116,69,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118, -0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,0,0,0,1,0,3,0,110,111, -116,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59, -120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,18,118,0,59,122,0,18,117,0, -59,122,0,39,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8, -58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0, -39,0,18,118,0,59,122,0,18,117,0,59,122,0,39,0,18,118,0,59,119,0,18,117,0,59,119,0,39,0,0,0,0,1,0,1, -0,97,110,121,0,1,0,0,2,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,0,0,1,0,1,0,97,110,121, -0,1,0,0,3,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,18,118,0,59,122,0,32,0,0,1,0,1,0,97, -110,121,0,1,0,0,4,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,18,118,0,59,122,0,32,18,118, -0,59,119,0,32,0,0,1,0,1,0,97,108,108,0,1,0,0,2,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0, -34,0,0,1,0,1,0,97,108,108,0,1,0,0,3,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,34,18,118,0, -59,122,0,34,0,0,1,0,1,0,97,108,108,0,1,0,0,4,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,34, -18,118,0,59,122,0,34,18,118,0,59,119,0,34,0,0,1,0,2,0,110,111,116,0,1,0,0,2,118,0,0,0,1,8,58,98, -118,101,99,50,0,18,118,0,59,120,0,56,0,18,118,0,59,121,0,56,0,0,0,0,1,0,3,0,110,111,116,0,1,0,0,3, -118,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,56,0,18,118,0,59,121,0,56,0,18,118,0,59,122, -0,56,0,0,0,0,1,0,4,0,110,111,116,0,1,0,0,4,118,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0, -56,0,18,118,0,59,121,0,56,0,18,118,0,59,122,0,56,0,18,118,0,59,119,0,56,0,0,0,0,1,0,12,0,116,101, -120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99,111,111,114,100,0,0, -0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,116,101,120, -101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18, -116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115, -97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49, -68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59, -116,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,97,109, -112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,68,0, -18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113, -0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112,108,101,114,0,0, -1,0,0,10,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116, -101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114, -100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50, -68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,8, +1,0,13,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0, +0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, +1,0,0,14,109,0,0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,48,0,0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0, +0,1,0,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0, +18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1, +1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0, +1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0, +0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118, +101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0, +0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95, +115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4, +0,108,101,115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, +97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115, +84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108, +101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, +52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101, +115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, +115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0, +108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99, +52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0, +1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4, +118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2, +0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52, +95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0, +103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, +95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0, +4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, +52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114, +101,97,116,101,114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114, +101,97,116,101,114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103, +114,101,97,116,101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115, +103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116, +101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95, +115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0, +103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1, +4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0, +1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, +0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118, +0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97, +108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97, +110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,10,118,0, +0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0, +1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, +18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52, +95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117, +97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0, +1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1, +4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0, +2,0,110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115, +110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110, +111,116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116, +69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1, +0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,7,118,0,0,1, +1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, +0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117, +0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0, +0,0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, +100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115, +110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0, +0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, +100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97, +100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101, +99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17, +48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101, +99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118, +101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122, +0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18, +118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1, +112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59, +120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,8,18,118,0,59, +120,0,18,118,0,59,121,0,34,0,0,1,0,1,0,97,108,108,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,112,114,111,100, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118, +0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114, +111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115, +110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0, +0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0, +59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0, +18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,119,0,0,0,4, +118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59, +120,0,0,17,48,0,48,0,0,0,0,0,1,0,2,0,110,111,116,0,1,1,0,2,118,0,0,0,1,4,118,101,99,52,95,115,101, +113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,3,0,110, +111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0,110,111,116,0,1,1,0,4,118,0,0,0,1,4,118, +101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, +12,0,116,101,120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99,111, +111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0, +18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48, +0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0, +1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116, +117,114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111, +111,114,100,0,59,116,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0, +0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117, +114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111, +114,100,0,59,113,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112, +108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101, +99,52,95,116,101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99, +111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117, +114,101,50,68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100, +0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99, +50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,111,111,114,100, +0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50, +68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8, 58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99, -111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0, -18,99,111,111,114,100,0,59,112,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114, -111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101, -120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114, -100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111, -111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97, -109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4, -118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120, -116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111, -114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118, -101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111, -114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99, -111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0, -0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101, -108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1, -0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111, -114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18, -116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0, -0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20, -115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49, -68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99, -111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111, -114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112, -108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101, -99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18, -99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100, -111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100, -0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0, -18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59, -116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100, -0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0, -4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110, -111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105, -115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0, -0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8, -18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111, -97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115, -101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58, -110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101, -50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0, -0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111, -105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0, -51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101, -50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51, -0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0, -0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0, -0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111, -105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0, -51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0, -17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0, -0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, -0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49, -55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0, -12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115, -101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0, -0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0, -52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0, -1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101, -49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111, -105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51, -0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99, -52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, -50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58, -118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12, -0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0, -18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17, -55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, -51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0, -57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101, -99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, -99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0, -0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0, -0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0, -58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0, -52,56,0,0,0,0,46,0,0,0,0,0,0,0 +111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0, +18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0, +18,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101, +108,0,0,0,4,118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108, +101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0, +116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0, +12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101, +114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0, +18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59, +112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117, +98,101,0,1,0,0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1, +116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0, +0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120, +101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0, +0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97, +100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, +0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114, +111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104, +97,100,111,119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100, +0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0, +18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21, +115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108, +0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108, +101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0, +115,104,97,100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99, +111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58, +118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111, +111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18, +99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1, +3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97, +0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97, +116,95,110,111,105,115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101, +49,0,1,0,0,11,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18, +97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1, +97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0, +10,0,110,111,105,115,101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0, +18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0, +110,111,105,115,101,50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18, +120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0, +54,54,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101, +99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, +99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0, +110,111,105,115,101,50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18, +120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0, +54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101, +51,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0, +17,53,0,52,55,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118, +101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110, +111,105,115,101,51,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120, +0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54, +54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17, +53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111, +105,115,101,51,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0, +0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0, +0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0, +0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58, +110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0, +46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49, +0,18,120,0,17,50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0, +0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115, +101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0, +46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110, +111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49, +57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0, +0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49, +49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0, +0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0, +55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0, +17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115, +101,49,0,18,120,0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57, +49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index a7aaa317fa..34f84dd987 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -2,167 +2,185 @@ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ /* slang_core.gc */ -3,1,0,5,1,1,1,0,9,102,0,0,0,1,3,2,0,5,1,105,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, -18,105,0,0,18,102,0,0,0,8,18,105,0,0,0,1,0,1,1,1,1,0,5,105,0,0,0,1,8,18,105,0,16,8,48,0,39,0,0,1,0, -1,1,1,1,0,9,102,0,0,0,1,8,18,102,0,17,48,0,48,0,0,39,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,8,18,98,0,16, -10,49,0,16,8,48,0,31,0,0,1,0,9,1,1,1,0,1,98,0,0,0,1,8,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0, -1,0,9,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,102,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0, -18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5, -105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,8,18,102,0,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1, -8,58,118,101,99,50,0,18,102,0,0,18,102,0,0,0,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0, -4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18, -120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0, -0,31,0,0,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,51,0,18,102,0,0,18,102,0,0,18,102,0,0,0, -0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8, -58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,8, -58,118,101,99,52,0,18,102,0,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1, -3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58, -118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0, -48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,50,0,18,105,0,0, -18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,102,0,0, -0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0, -1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7, -1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0, -1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0, -0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102, -0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1, -8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98, -118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58, -98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,50,0,58,98, -111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18, -98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18, -102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,105,0, -0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98, -0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0, -0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1, -0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18, -102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0, -0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0, -0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3, -2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58, -109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0, -48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17, -48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48, -0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0, -48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105, -110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0, -0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0, -0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0, -18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95, -110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0, -0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4, -102,108,111,97,116,95,97,100,100,0,18,97,0,0,18,97,0,0,18,99,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1, -0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,98, -0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100, -101,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99, -0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1,0,0,2,1, -1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0, -58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0, -0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102, -108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111, -95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1, -9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,0,0,0,4,102, -108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0, -1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18, -97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0, -0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,99,0,0,18,97,0,0,18, -98,0,0,0,8,18,99,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58, -102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2, -10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117, -0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1, -0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0, -1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2, -11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0, -12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21, -0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2, -2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117, -0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9, -18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18, -118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122, -0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1, -1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118, -0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6, -118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0, -1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7, -118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117, -0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18, -118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18, -117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8, -117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, -9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3, -1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59, -119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18, -118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0, -0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, -0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18, -109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0, -59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0, -0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48, -0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0, -0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14, -110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109, -0,0,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48, -18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57, -59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16, -10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,48,46,0,18,118,0,59, -120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18, -118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14, -110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0, -57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1, -9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10, -51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0, -15,109,0,0,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59, -120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10, -50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,48,46,0,18,118,0,59,120,0, -18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0, -59,122,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0, -48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0, -57,59,122,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109, -0,16,10,51,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59, -121,0,18,109,0,16,10,49,0,57,59,119,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,48, -46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,48,46,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1, -1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16, -10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1, -0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0, -2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9, -18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0, -9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2, +3,1,0,12,0,118,101,99,52,0,1,1,0,9,97,49,0,0,1,1,0,9,98,49,0,0,1,1,0,9,99,49,0,0,1,1,0,9,100,49,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,97,49,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,59,121,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,99,49,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,119,0,18,100,49,0,20,0,0,1,0,5,1,1,1,0,9,102,0,0,0,1,3,2,0,5,1,105,0,0, +0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,105,0,0,18,102,0,0,0,8,18,105,0,0,0,1,0,1,1, +1,1,0,5,105,0,0,0,1,8,18,105,0,16,8,48,0,39,0,0,1,0,1,1,1,1,0,9,102,0,0,0,1,8,18,102,0,17,48,0,48, +0,0,39,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,8,18,98,0,16,10,49,0,16,8,48,0,31,0,0,1,0,9,1,1,1,0,1,98,0,0, +0,1,8,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,1,0,9,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,102,0,0,0, +4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1, +1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5,105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0, +0,1,8,18,102,0,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,50,0,18,102,0,0,18,102,0,0,0,0,0,1, +0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118, +101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,8,58,118, +101,99,51,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0, +0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18, +120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0, +0,31,0,0,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,52,0,18,102,0,0,18,102,0,0,18,102,0,0,18, +102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0, +0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,6,1,1,1,0,5,105,0,0, +0,1,8,58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118, +101,99,50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99, +50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18, +105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105, +110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116, +0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0, +18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0, +18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0, +0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1, +1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5, +105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0, +0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58, +98,118,101,99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98, +118,101,99,51,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118, +101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118, +101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101, +99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0, +18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9, +1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97, +116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0, +17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48, +0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0, +0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95, +102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0, +1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0, +9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, +17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18, +102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0, +15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97, +116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0, +0,1,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0, +0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8, +18,98,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95, +110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,18, +97,0,0,18,99,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117, +108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0, +0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2, +26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105, +110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1, +0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102, +108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0, +0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0, +0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0,9,97,0, +0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58, +105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0, +0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0, +0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, +0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0, +0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0, +59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0, +0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18, +118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18, +117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, +59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24, +0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59, +119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18, +118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2, +12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18, +117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119, +0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0, +9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18, +118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2, +6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18, +117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, +59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18, +118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18, +117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, +59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23, +0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2, +8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18, +117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119, +0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0, +9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0, +59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120, +0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0, +59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18, +118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2, +13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1, +0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16, +8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0, +18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0, +1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0, +57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, +9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0, +0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, +21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114, +50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120, +0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114, +51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59, +122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99, +51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0, +14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48,0,57, +48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2,3,1,0, +2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0, +0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2, +15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18, +109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10, +51,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1, +0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18, +97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1, +4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9, +0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,3, +2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49, +0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59, +120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18, +109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18, +114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0, +57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122, +0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0, +9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10, +49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59, +119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, +101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,15,2,21,1,1,0,15,109, +0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110, +0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0, +0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, +1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9, +18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1, +9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1, +0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2, 10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0, 1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0, 18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18, @@ -220,247 +238,245 @@ 121,0,18,109,0,16,10,51,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,51,0,57,59,122,0,48, 46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1, 0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4,102, -108,111,97,116,95,97,100,100,0,18,99,0,0,18,97,0,0,18,99,0,0,0,8,18,99,0,0,0,1,0,5,2,26,1,1,0,5,97, -0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111, -95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102, -108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5, -97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116, -111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116, -0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0, -4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95, -116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98, -0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, -0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0, -4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1, -1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116, -95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18, -120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18, -99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, -18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0, -1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121, -0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99, -50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0, -10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59, -120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117, -0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0, -11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, -117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1, -1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0, -18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0, -1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, -0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0, -0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, -121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0, -59,119,0,46,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118, -0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18, -117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, -1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0, -18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119, -0,48,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59, -120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0, -59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18, -117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21, -1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0, -48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1, -8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59, -121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, -59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117, -0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, -118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0, -18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, -0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, -122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, -99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0, -59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118, -101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18, -118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1, -1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47, -0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59, -119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, -99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0, -59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8, -118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18, -118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0, -18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50, -0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2, -22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0, -1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0, -0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57, -18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, -116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1, -1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0, -0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,18,109,0,16,10,51,0, -57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57,18,110,0,16,10, -51,0,57,49,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18, -117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0, -0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0, -10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18, -97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99, -50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0, -0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121, -0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120, -0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0, -1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10, -2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18, -118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99, -51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0, -0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98, -0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97, -0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59, -121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8, -58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0, -18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18, -117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2, -21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,48,0,18,118, -0,59,121,0,18,98,0,48,0,18,118,0,59,122,0,18,98,0,48,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11, -117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18, -97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99, -51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0, -0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120, -0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46, -0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18, -98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0, -46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0, -59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59, -119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59, -120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0, -18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18, -117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0, -59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,18,118,0,59,122,0,18,98,0,48,0,18,118,0,59, -119,0,18,98,0,48,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18, -97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0, -18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0, -18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18, -118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, -16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, -16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0, -16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116, -51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0, -16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0, -0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8, -48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14, -2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0, -18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110, -0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0, -9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98, -0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, -58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0, -18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, -51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57, -18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, -110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18, -97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, -0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, -47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, -16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0, -0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8, -48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18, -110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52, -0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18, -98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, -1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18, -97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10, -49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0, -1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0, -1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0, -1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0, -1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0, -1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0, -1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0, -1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0, -1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0, -1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0, -1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0, -1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0, -1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0, -1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, -0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, -121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18, -118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, -6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, -0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, -121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18, -118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, -13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0, -57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18, -109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58, -109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0, -18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1, -0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0, -59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0, -9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25, -1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0, -0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2, -8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118, -0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49, -0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, -52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0, -9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0, -2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16, -10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, -1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, -122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, -18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, -0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118, -0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0, -9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0, -0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1, -0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109, -0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, -0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, -2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0, -1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11, -118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, -0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, +1,4,102,108,111,97,116,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97, +0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2, +0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0, +18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18, +120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0, +0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, +110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101, +103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0, +0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0, +0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0, +4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111, +95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108, +121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0, +0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1, +121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0, +0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95, +100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95, +105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0, +1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121, +0,46,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,21,1,1,0,10, +118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118, +0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118, +101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0, +0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117, +0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0, +0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18, +117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0, +47,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120, +0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59, +122,0,48,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0, +59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117, +0,59,122,0,49,0,0,0,0,1,0,12,2,26,1,1,0,12,118,97,100,100,0,0,1,1,0,12,117,97,100,100,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,100,100,0,0,18,117,97, +100,100,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59, +120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0, +59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12, +117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0, +18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122, +0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0, +1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, +121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1, +0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, +59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6, +117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18, +117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0, +18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122, +0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99, +51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, +122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, +99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0, +59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, +101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18, +118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0, +46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8, +2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18, +118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, +48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8, +2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, +118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58, +109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0, +16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0, +0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1, +1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,46,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109, +0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0, +1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,15,2,26,1,1, +0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0, +57,46,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1, +0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,18,109,0, +16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1, +8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57, +18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99, +50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118, +0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98, +0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0, +59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1, +8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2, +21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0, +18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0, +18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1, +0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49, +0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18, +98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8, +58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0, +59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0, +59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2, +27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0, +18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, +118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99, +51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0, +0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, +121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97,0,0, +1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0, +49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, +101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98, +0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0, +59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59, +119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59, +120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0, +18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18, +117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0, +59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0, +59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59, +119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18, +97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0, +18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0, +59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117, +0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0, +18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18, +118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0, +13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0, +57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8, +48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13, +110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, +47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0, +57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110, +0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48, +0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0, +0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0, +0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18, +98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18, +97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, +0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97, +0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47, +0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57, +18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14, +2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0, +18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, +49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, +110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, +16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, +52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, +50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, +109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, +0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, +16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, +0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, +47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, +57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, +18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, +18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, +97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, +50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, +0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, +16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, +0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +49,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59, +121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18, +118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99, +52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0, +0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121, +0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118, +0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52, +0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0, +0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10, +49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54, +0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57, +54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0, +0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18, +118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0, +52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118, +0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0, +2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7, +118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, +25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, +9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, +16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10, +49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0, +0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18, +97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121, +0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18, +118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0, +51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0, +59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9, +18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120, +0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0, +2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51, +0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9, +18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0, +0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0, +0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0, +5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0, +2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, +118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, +0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, 25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, 0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, 61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn index 149bb15c44..ee0254f1b8 100644 --- a/src/mesa/shader/slang/library/slang_shader.syn +++ b/src/mesa/shader/slang/library/slang_shader.syn @@ -1192,7 +1192,12 @@ note: this is an extension to the standard language specification - normally sla __asm statements */ asm_argument - variable_identifier .or floatconstant; + var_with_field .or + variable_identifier .or + floatconstant; + +var_with_field + variable_identifier .and dot .and field_selection .emit OP_FIELD; /* ::= diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h index ad89472ba3..abfb6cd42a 100644 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ b/src/mesa/shader/slang/library/slang_shader_syn.h @@ -571,7 +571,11 @@ "asm_arguments_1\n" " comma .and asm_argument .and .true .emit OP_END;\n" "asm_argument\n" -" variable_identifier .or floatconstant;\n" +" var_with_field .or\n" +" variable_identifier .or\n" +" floatconstant;\n" +"var_with_field\n" +" variable_identifier .and dot .and field_selection .emit OP_FIELD;\n" "translation_unit\n" " optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and\n" " .loop external_declaration .and optional_space .and\n" diff --git a/src/mesa/shader/slang/traverse_wrap.h b/src/mesa/shader/slang/traverse_wrap.h deleted file mode 100644 index b2f244ee01..0000000000 --- a/src/mesa/shader/slang/traverse_wrap.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file traverse_wrap.h - * Handy TIntermTraverser class wrapper - * \author Michal Krol - */ - -#ifndef __TRAVERSE_WRAP_H__ -#define __TRAVERSE_WRAP_H__ - -#include "Include/intermediate.h" - -/* - The original TIntermTraverser class that is used to walk the intermediate tree, - is not very elegant in its design. One must define static functions with - appropriate prototypes, construct TIntermTraverser object, and set its member - function pointers to one's static functions. If traversal-specific data - is needed, a new class must be derived, and one must up-cast the object - passed as a parameter to the static function. - - The class below eliminates this burden by providing virtual methods that are - to be overridden in the derived class. -*/ - -class traverse_wrap: private TIntermTraverser -{ -private: - static void _visitSymbol (TIntermSymbol *S, TIntermTraverser *T) { - static_cast (T)->Symbol (*S); - } - static void _visitConstantUnion (TIntermConstantUnion *U, TIntermTraverser *T) { - static_cast (T)->ConstantUnion (*U); - } - static bool _visitBinary (bool preVisit, TIntermBinary *B, TIntermTraverser *T) { - return static_cast (T)->Binary (preVisit, *B); - } - static bool _visitUnary (bool preVisit, TIntermUnary *U, TIntermTraverser *T) { - return static_cast (T)->Unary (preVisit, *U); - } - static bool _visitSelection (bool preVisit, TIntermSelection *S, TIntermTraverser *T) { - return static_cast (T)->Selection (preVisit, *S); - } - static bool _visitAggregate (bool preVisit, TIntermAggregate *A, TIntermTraverser *T) { - return static_cast (T)->Aggregate (preVisit, *A); - } - static bool _visitLoop (bool preVisit, TIntermLoop *L, TIntermTraverser *T) { - return static_cast (T)->Loop (preVisit, *L); - } - static bool _visitBranch (bool preVisit, TIntermBranch *B, TIntermTraverser *T) { - return static_cast (T)->Branch (preVisit, *B); - } -public: - traverse_wrap () { - visitSymbol = _visitSymbol; - visitConstantUnion = _visitConstantUnion; - visitBinary = _visitBinary; - visitUnary = _visitUnary; - visitSelection = _visitSelection; - visitAggregate = _visitAggregate; - visitLoop = _visitLoop; - visitBranch = _visitBranch; - } -protected: - virtual void Symbol (const TIntermSymbol &) { - } - virtual void ConstantUnion (const TIntermConstantUnion &) { - } - virtual bool Binary (bool, const TIntermBinary &) { - return true; - } - virtual bool Unary (bool, const TIntermUnary &) { - return true; - } - virtual bool Selection (bool, const TIntermSelection &) { - return true; - } - virtual bool Aggregate (bool, const TIntermAggregate &) { - return true; - } - virtual bool Loop (bool, const TIntermLoop &) { - return true; - } - virtual bool Branch (bool, const TIntermBranch &) { - return true; - } -}; - -#endif - -- cgit v1.2.3 From a328e469d328f8b6fd5afdfc21d576fa1a2c43fc Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 14:58:13 -0700 Subject: Checkpoint work for new GLSL compiler back-end. Among changes: Remove ctx->FragmentProgram._Active Remove _UseTexEnvProgram Move _MaintainTnlProgram, _MaintainTexEnvProgram, _TexEnvProgram and _TnlProgram fields. Remove/disable old GLSL interpreter code. --- src/mesa/tnl/t_context.c | 11 +- src/mesa/tnl/t_pipeline.c | 5 +- src/mesa/tnl/t_vb_arbprogram.c | 54 ++--- src/mesa/tnl/t_vb_arbprogram.h | 31 ++- src/mesa/tnl/t_vb_arbshader.c | 455 ++++++++++++++++++++++------------------- src/mesa/tnl/t_vb_cull.c | 5 +- src/mesa/tnl/t_vb_fog.c | 5 +- src/mesa/tnl/t_vb_light.c | 10 +- src/mesa/tnl/t_vb_normals.c | 7 +- src/mesa/tnl/t_vb_points.c | 5 +- src/mesa/tnl/t_vb_program.c | 23 ++- src/mesa/tnl/t_vb_texgen.c | 10 +- src/mesa/tnl/t_vb_texmat.c | 5 +- src/mesa/tnl/t_vb_vertex.c | 5 +- src/mesa/tnl/t_vp_build.c | 28 +-- src/mesa/tnl/t_vtx_eval.c | 3 +- 16 files changed, 346 insertions(+), 316 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 154780cc97..b07f90af02 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -86,7 +86,7 @@ _tnl_CreateContext( GLcontext *ctx ) _tnl_array_init( ctx ); _tnl_vtx_init( ctx ); - if (ctx->_MaintainTnlProgram) { + if (ctx->VertexProgram._MaintainTnlProgram) { _tnl_ProgramCacheInit( ctx ); _tnl_install_pipeline( ctx, _tnl_vp_pipeline ); } else { @@ -136,7 +136,7 @@ _tnl_DestroyContext( GLcontext *ctx ) _tnl_destroy_pipeline( ctx ); _ae_destroy_context( ctx ); - if (ctx->_MaintainTnlProgram) + if (ctx->VertexProgram._MaintainTnlProgram) _tnl_ProgramCacheDestroy( ctx ); FREE(tnl); @@ -183,7 +183,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) } if (ctx->Fog.Enabled || - (ctx->FragmentProgram._Active && + (ctx->FragmentProgram._Current && (ctx->FragmentProgram._Current->FogOption != GL_NONE || ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_FOGC))) RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG ); @@ -199,8 +199,13 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) (ctx->VertexProgram._Enabled && ctx->VertexProgram.PointSizeEnabled)) RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POINTSIZE ); +#if NEW_SLANG + RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, + _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC ); +#else if (ctx->ShaderObjects._VertexShaderPresent || ctx->ShaderObjects._FragmentShaderPresent) RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC ); +#endif } diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index 2efe701a80..a50a3f0f2f 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -132,7 +132,7 @@ void _tnl_run_pipeline( GLcontext *ctx ) * (ie const or non-const). */ if (check_input_changes( ctx ) || tnl->pipeline.new_state) { - if (ctx->_MaintainTnlProgram) + if (ctx->VertexProgram._MaintainTnlProgram) _tnl_UpdateFixedFunctionProgram( ctx ); for (i = 0; i < tnl->pipeline.nr_stages ; i++) { @@ -207,9 +207,6 @@ const struct tnl_pipeline_stage *_tnl_default_pipeline[] = { #if defined(FEATURE_NV_vertex_program) || defined(FEATURE_ARB_vertex_program) &_tnl_arb_vertex_program_stage, &_tnl_vertex_program_stage, -#endif -#if FEATURE_ARB_vertex_shader - &_tnl_arb_vertex_shader_stage, #endif &_tnl_render_stage, NULL diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index bf4c1d5223..b7975f3a4e 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -37,6 +37,7 @@ #include "arbprogparse.h" #include "light.h" #include "program.h" +#include "programopt.h" #include "math/m_matrix.h" #include "t_context.h" #include "t_pipeline.h" @@ -292,7 +293,7 @@ static void do_EX2( struct arb_vp_machine *m, union instruction op ) GLfloat *result = m->File[0][op.alu.dst]; const GLfloat *arg0 = m->File[op.alu.file0][op.alu.idx0]; - result[0] = (GLfloat)ApproxExp2(arg0[0]); + result[0] = ApproxExp2(arg0[0]); PUFF(result); } @@ -566,7 +567,7 @@ static void print_reg( GLuint file, GLuint reg ) _mesa_printf("TMP%d", reg - REG_TMP0); else if (reg >= REG_IN0 && reg <= REG_IN31) _mesa_printf("IN%d", reg - REG_IN0); - else if (reg >= REG_OUT0 && reg <= REG_OUT14) + else if (reg >= REG_OUT0 && reg <= REG_OUT23) _mesa_printf("OUT%d", reg - REG_OUT0); else if (reg == REG_ADDR) _mesa_printf("ADDR"); @@ -714,6 +715,7 @@ _tnl_disassem_vba_insn( union instruction op ) static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union instruction) = { + do_NOP, do_ABS, do_ADD, do_NOP,/*ARA*/ @@ -853,6 +855,7 @@ static struct reg cvp_load_reg( struct compilation *cp, return reg; case PROGRAM_STATE_VAR: + case PROGRAM_CONSTANT: reg = cvp_make_reg(FILE_STATE_PARAM, index); if (rel) return cvp_emit_rel(cp, reg, tmpreg); @@ -1058,6 +1061,16 @@ static void compile_vertex_program( struct gl_vertex_program *program, struct tnl_compiled_program *p = CALLOC_STRUCT(tnl_compiled_program); GLuint i; +#if 1 + if (!program->IsNVProgram && program->IsPositionInvariant) { + printf("Adding MVP code\n"); + if (!program->Base.Parameters) + program->Base.Parameters = _mesa_new_parameter_list(); + _mesa_insert_mvp_code(NULL, program); + program->IsPositionInvariant = 0; + } +#endif + if (program->TnlData) free_tnl_data( program ); @@ -1182,6 +1195,7 @@ do_ndc_cliptest(GLcontext *ctx, struct arb_vp_machine *m) /* Test userclip planes. This contributes to VB->ClipMask. */ + /** XXX NEW_SLANG _Enabled ??? */ if (ctx->Transform.ClipPlanesEnabled && (!ctx->VertexProgram._Enabled || ctx->VertexProgram.Current->IsPositionInvariant)) { userclip( ctx, @@ -1221,21 +1235,14 @@ static INLINE void call_func( struct tnl_compiled_program *p, static GLboolean run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) { - const struct gl_vertex_program *program; + const struct gl_vertex_program *program = ctx->VertexProgram._Current; struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; struct arb_vp_machine *m = ARB_VP_MACHINE(stage); struct tnl_compiled_program *p; GLuint i, j; GLbitfield outputs; - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - program = ctx->VertexProgram._Enabled ? ctx->VertexProgram.Current : NULL; - if (!program && ctx->_MaintainTnlProgram) { - program = ctx->_TnlProgram; - } - if (!program || program->IsNVProgram) + if (!program) return GL_TRUE; if (program->Base.Parameters) { @@ -1299,12 +1306,13 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) /* If the program is position invariant, multiply the input position * by the MVP matrix and store in the vertex position result register. */ +#if 0 if (program->IsPositionInvariant) { TRANSFORM_POINT( m->File[0][REG_OUT0+0], ctx->_ModelProjectMatrix.m, m->File[0][REG_IN0+0]); } - +#endif for (j = 0; j < m->nr_outputs; j++) { GLuint idx = REG_OUT0 + m->output[j].idx; m->output[j].data[0] = m->File[0][idx][0]; @@ -1370,6 +1378,14 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) } } + for (i = 0; i < ctx->Const.MaxVarying; i++) { + if (outputs & (1 << (VERT_RESULT_VAR0 + i))) { + /* Note: varying results get put into the generic attributes */ + VB->AttribPtr[VERT_ATTRIB_GENERIC0+i] + = &m->attribs[VERT_RESULT_VAR0 + i]; + } + } + #if 0 for (i = 0; i < VB->Count; i++) { printf("Out %d: %f %f %f %f %f %f %f %f\n", i, @@ -1394,15 +1410,7 @@ static void validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage ) { struct arb_vp_machine *m = ARB_VP_MACHINE(stage); - struct gl_vertex_program *program; - - if (ctx->ShaderObjects._VertexShaderPresent) - return; - - program = (ctx->VertexProgram._Enabled ? ctx->VertexProgram.Current : 0); - if (!program && ctx->_MaintainTnlProgram) { - program = ctx->_TnlProgram; - } + struct gl_vertex_program *program = ctx->VertexProgram._Current; if (program) { if (!program->TnlData) @@ -1472,7 +1480,7 @@ static GLboolean init_vertex_program( GLcontext *ctx, _mesa_vector4f_alloc( &m->ndcCoords, 0, size, 32 ); m->clipmask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte)*size, 32 ); - if (ctx->_MaintainTnlProgram) + if (ctx->VertexProgram._MaintainTnlProgram) _mesa_allow_light_in_model( ctx, GL_FALSE ); m->fpucntl_rnd_neg = RND_NEG_FPU; /* const value */ @@ -1529,7 +1537,7 @@ const struct tnl_pipeline_stage _tnl_arb_vertex_program_stage = void _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program) { - if (target == GL_VERTEX_PROGRAM_ARB) { + if (program->Target == GL_VERTEX_PROGRAM_ARB) { /* free any existing tnl data hanging off the program */ struct gl_vertex_program *vprog = (struct gl_vertex_program *) program; if (vprog->TnlData) { diff --git a/src/mesa/tnl/t_vb_arbprogram.h b/src/mesa/tnl/t_vb_arbprogram.h index 6de8dca328..1bec2a411e 100644 --- a/src/mesa/tnl/t_vb_arbprogram.h +++ b/src/mesa/tnl/t_vb_arbprogram.h @@ -56,6 +56,22 @@ #define REG_TMP0 5 #define REG_TMP11 16 #define REG_OUT0 17 +#define REG_OUT23 40 +#define REG_IN0 41 +#define REG_IN31 72 +#define REG_ID 73 /* 0,0,0,1 */ +#define REG_ONES 74 /* 1,1,1,1 */ +#define REG_SWZ 75 /* 1,-1,0,0 */ +#define REG_NEG 76 /* -1,-1,-1,-1 */ +#define REG_LIT 77 /* 1,0,0,1 */ +#define REG_LIT2 78 /* 1,0,0,1 */ +#define REG_SCRATCH 79 /* internal temporary. XXX we can't actually use this because 70 doesn't fit in the 5-bit 'dst' instruction field! */ +#define REG_UNDEF 127 /* special case - never used */ +#define REG_MAX 128 +#define REG_INVALID ~0 + + +#if 0 #define REG_OUT14 31 #define REG_IN0 32 #define REG_IN31 63 @@ -69,6 +85,7 @@ #define REG_UNDEF 127 /* special case - never used */ #define REG_MAX 128 #define REG_INVALID ~0 +#endif /* ARB_vp instructions are broken down into one or more of the * following micro-instructions, each representable in a 64 bit packed @@ -76,16 +93,16 @@ */ struct reg { GLuint file:2; - GLuint idx:7; + GLuint idx:8; }; union instruction { struct { GLuint opcode:7; - GLuint dst:5; + GLuint dst:6; GLuint file0:2; - GLuint idx0:7; + GLuint idx0:8; GLuint file1:2; GLuint idx1:7; GLuint pad:2; @@ -94,18 +111,18 @@ union instruction { struct { GLuint opcode:7; - GLuint dst:5; + GLuint dst:6; GLuint file0:2; - GLuint idx0:7; + GLuint idx0:8; GLuint neg:4; GLuint swz:12; /* xyzw01 */ } rsw; struct { GLuint opcode:7; - GLuint dst:5; + GLuint dst:6; GLuint file:2; - GLuint idx:7; + GLuint idx:8; GLuint mask:4; GLuint pad:7; GLuint pad2; diff --git a/src/mesa/tnl/t_vb_arbshader.c b/src/mesa/tnl/t_vb_arbshader.c index 13aa3ea910..6d59114657 100644 --- a/src/mesa/tnl/t_vb_arbshader.c +++ b/src/mesa/tnl/t_vb_arbshader.c @@ -38,264 +38,295 @@ typedef struct { - GLvector4f outputs[VERT_RESULT_MAX]; - GLvector4f varyings[MAX_VARYING_VECTORS]; - GLvector4f ndc_coords; - GLubyte *clipmask; - GLubyte ormask; - GLubyte andmask; + GLvector4f outputs[VERT_RESULT_MAX]; + GLvector4f varyings[MAX_VARYING_VECTORS]; + GLvector4f ndc_coords; + GLubyte *clipmask; + GLubyte ormask; + GLubyte andmask; } arbvs_stage_data; #define ARBVS_STAGE_DATA(stage) ((arbvs_stage_data *) stage->privatePtr) -static GLboolean construct_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stage *stage) +static GLboolean +construct_arb_vertex_shader(GLcontext * ctx, struct tnl_pipeline_stage *stage) { - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *vb = &tnl->vb; - arbvs_stage_data *store; - GLuint size = vb->Size; - GLuint i; - - stage->privatePtr = _mesa_malloc (sizeof (arbvs_stage_data)); - store = ARBVS_STAGE_DATA(stage); - if (store == NULL) - return GL_FALSE; - - for (i = 0; i < VERT_RESULT_MAX; i++) - { - _mesa_vector4f_alloc (&store->outputs[i], 0, size, 32); - store->outputs[i].size = 4; - } - for (i = 0; i < MAX_VARYING_VECTORS; i++) - { - _mesa_vector4f_alloc (&store->varyings[i], 0, size, 32); - store->varyings[i].size = 4; - } - _mesa_vector4f_alloc (&store->ndc_coords, 0, size, 32); - store->clipmask = (GLubyte *) ALIGN_MALLOC (size, 32); - - return GL_TRUE; + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *vb = &tnl->vb; + arbvs_stage_data *store; + GLuint size = vb->Size; + GLuint i; + + stage->privatePtr = _mesa_malloc(sizeof(arbvs_stage_data)); + store = ARBVS_STAGE_DATA(stage); + if (store == NULL) + return GL_FALSE; + + for (i = 0; i < VERT_RESULT_MAX; i++) { + _mesa_vector4f_alloc(&store->outputs[i], 0, size, 32); + store->outputs[i].size = 4; + } + for (i = 0; i < MAX_VARYING_VECTORS; i++) { + _mesa_vector4f_alloc(&store->varyings[i], 0, size, 32); + store->varyings[i].size = 4; + } + _mesa_vector4f_alloc(&store->ndc_coords, 0, size, 32); + store->clipmask = (GLubyte *) ALIGN_MALLOC(size, 32); + + return GL_TRUE; } -static void destruct_arb_vertex_shader (struct tnl_pipeline_stage *stage) +static void +destruct_arb_vertex_shader(struct tnl_pipeline_stage *stage) { - arbvs_stage_data *store = ARBVS_STAGE_DATA(stage); - - if (store != NULL) - { - GLuint i; - - for (i = 0; i < VERT_RESULT_MAX; i++) - _mesa_vector4f_free (&store->outputs[i]); - for (i = 0; i < MAX_VARYING_VECTORS; i++) - _mesa_vector4f_free (&store->varyings[i]); - _mesa_vector4f_free (&store->ndc_coords); - ALIGN_FREE (store->clipmask); - - _mesa_free (store); - stage->privatePtr = NULL; - } + arbvs_stage_data *store = ARBVS_STAGE_DATA(stage); + + if (store != NULL) { + GLuint i; + + for (i = 0; i < VERT_RESULT_MAX; i++) + _mesa_vector4f_free(&store->outputs[i]); + for (i = 0; i < MAX_VARYING_VECTORS; i++) + _mesa_vector4f_free(&store->varyings[i]); + _mesa_vector4f_free(&store->ndc_coords); + ALIGN_FREE(store->clipmask); + + _mesa_free(store); + stage->privatePtr = NULL; + } } -static void validate_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stage *stage) +static void +validate_arb_vertex_shader(GLcontext * ctx, struct tnl_pipeline_stage *stage) { } -static GLvoid fetch_input_float (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i, - struct vertex_buffer *vb) +static GLvoid +fetch_input_float(struct gl2_program_intf **pro, GLuint index, GLuint attr, + GLuint i, struct vertex_buffer *vb) { - const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; - const GLuint stride = vb->AttribPtr[attr]->stride; + const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; + const GLuint stride = vb->AttribPtr[attr]->stride; GLfloat *data = (GLfloat *) (ptr + stride * i); - (**pro).UpdateFixedAttrib (pro, index, data, 0, sizeof (GLfloat), GL_TRUE); + (**pro).UpdateFixedAttrib(pro, index, data, 0, sizeof(GLfloat), GL_TRUE); } -static GLvoid fetch_input_vec3 (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i, - struct vertex_buffer *vb) +static GLvoid +fetch_input_vec3(struct gl2_program_intf **pro, GLuint index, GLuint attr, + GLuint i, struct vertex_buffer *vb) { - const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; - const GLuint stride = vb->AttribPtr[attr]->stride; + const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; + const GLuint stride = vb->AttribPtr[attr]->stride; GLfloat *data = (GLfloat *) (ptr + stride * i); - (**pro).UpdateFixedAttrib (pro, index, data, 0, 3 * sizeof (GLfloat), GL_TRUE); + (**pro).UpdateFixedAttrib(pro, index, data, 0, 3 * sizeof(GLfloat), + GL_TRUE); } -static void fetch_input_vec4 (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i, - struct vertex_buffer *vb) +static void +fetch_input_vec4(struct gl2_program_intf **pro, GLuint index, GLuint attr, + GLuint i, struct vertex_buffer *vb) { - const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; - const GLuint size = vb->AttribPtr[attr]->size; - const GLuint stride = vb->AttribPtr[attr]->stride; - const GLfloat *data = (const GLfloat *) (ptr + stride * i); - GLfloat vec[4]; - - switch (size) - { - case 2: - vec[0] = data[0]; - vec[1] = data[1]; - vec[2] = 0.0f; - vec[3] = 1.0f; - break; - case 3: - vec[0] = data[0]; - vec[1] = data[1]; - vec[2] = data[2]; - vec[3] = 1.0f; - break; - case 4: - vec[0] = data[0]; - vec[1] = data[1]; - vec[2] = data[2]; - vec[3] = data[3]; - break; - } - (**pro).UpdateFixedAttrib (pro, index, vec, 0, 4 * sizeof (GLfloat), GL_TRUE); + const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; + const GLuint size = vb->AttribPtr[attr]->size; + const GLuint stride = vb->AttribPtr[attr]->stride; + const GLfloat *data = (const GLfloat *) (ptr + stride * i); + GLfloat vec[4]; + + switch (size) { + case 2: + vec[0] = data[0]; + vec[1] = data[1]; + vec[2] = 0.0f; + vec[3] = 1.0f; + break; + case 3: + vec[0] = data[0]; + vec[1] = data[1]; + vec[2] = data[2]; + vec[3] = 1.0f; + break; + case 4: + vec[0] = data[0]; + vec[1] = data[1]; + vec[2] = data[2]; + vec[3] = data[3]; + break; + } + (**pro).UpdateFixedAttrib(pro, index, vec, 0, 4 * sizeof(GLfloat), + GL_TRUE); } static GLvoid -fetch_gen_attrib (struct gl2_program_intf **pro, GLuint index, GLuint i, struct vertex_buffer *vb) +fetch_gen_attrib(struct gl2_program_intf **pro, GLuint index, GLuint i, + struct vertex_buffer *vb) { const GLuint attr = _TNL_ATTRIB_GENERIC0 + index; const GLubyte *ptr = (const GLubyte *) (vb->AttribPtr[attr]->data); const GLuint stride = vb->AttribPtr[attr]->stride; const GLfloat *data = (const GLfloat *) (ptr + stride * i); - (**pro).WriteAttrib (pro, index, data); + (**pro).WriteAttrib(pro, index, data); } -static GLvoid fetch_output_float (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i, - arbvs_stage_data *store) +static GLvoid +fetch_output_float(struct gl2_program_intf **pro, GLuint index, GLuint attr, + GLuint i, arbvs_stage_data * store) { - (**pro).UpdateFixedAttrib (pro, index, &store->outputs[attr].data[i], 0, sizeof (GLfloat), - GL_FALSE); + (**pro).UpdateFixedAttrib(pro, index, &store->outputs[attr].data[i], 0, + sizeof(GLfloat), GL_FALSE); } -static void fetch_output_vec4 (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i, - GLuint offset, arbvs_stage_data *store) +static void +fetch_output_vec4(struct gl2_program_intf **pro, GLuint index, GLuint attr, + GLuint i, GLuint offset, arbvs_stage_data * store) { - (**pro).UpdateFixedAttrib (pro, index, &store->outputs[attr].data[i], offset, - 4 * sizeof (GLfloat), GL_FALSE); + (**pro).UpdateFixedAttrib(pro, index, &store->outputs[attr].data[i], + offset, 4 * sizeof(GLfloat), GL_FALSE); } -static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stage *stage) +static GLboolean +run_arb_vertex_shader(GLcontext * ctx, struct tnl_pipeline_stage *stage) { - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *vb = &tnl->vb; - arbvs_stage_data *store = ARBVS_STAGE_DATA(stage); - struct gl2_program_intf **pro; - GLsizei i, j; - - if (!ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - pro = ctx->ShaderObjects.CurrentProgram; - (**pro).UpdateFixedUniforms (pro); - - for (i = 0; i < vb->Count; i++) - { - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_VERTEX, _TNL_ATTRIB_POS, i, vb); - fetch_input_vec3 (pro, SLANG_VERTEX_FIXED_NORMAL, _TNL_ATTRIB_NORMAL, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_COLOR, _TNL_ATTRIB_COLOR0, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_SECONDARYCOLOR, _TNL_ATTRIB_COLOR1, i, vb); - fetch_input_float (pro, SLANG_VERTEX_FIXED_FOGCOORD, _TNL_ATTRIB_FOG, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD0, _TNL_ATTRIB_TEX0, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD1, _TNL_ATTRIB_TEX1, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD2, _TNL_ATTRIB_TEX2, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD3, _TNL_ATTRIB_TEX3, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD4, _TNL_ATTRIB_TEX4, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD5, _TNL_ATTRIB_TEX5, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD6, _TNL_ATTRIB_TEX6, i, vb); - fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD7, _TNL_ATTRIB_TEX7, i, vb); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *vb = &tnl->vb; + arbvs_stage_data *store = ARBVS_STAGE_DATA(stage); + struct gl2_program_intf **pro; + GLsizei i, j; + +#if 00 + if (!ctx->ShaderObjects._VertexShaderPresent) + return GL_TRUE; +#else + return GL_TRUE; +#endif + + pro = ctx->ShaderObjects.CurrentProgram; + (**pro).UpdateFixedUniforms(pro); + + for (i = 0; i < vb->Count; i++) { + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_VERTEX, _TNL_ATTRIB_POS, i, + vb); + fetch_input_vec3(pro, SLANG_VERTEX_FIXED_NORMAL, _TNL_ATTRIB_NORMAL, i, + vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_COLOR, _TNL_ATTRIB_COLOR0, i, + vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_SECONDARYCOLOR, + _TNL_ATTRIB_COLOR1, i, vb); + fetch_input_float(pro, SLANG_VERTEX_FIXED_FOGCOORD, _TNL_ATTRIB_FOG, i, + vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD0, + _TNL_ATTRIB_TEX0, i, vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD1, + _TNL_ATTRIB_TEX1, i, vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD2, + _TNL_ATTRIB_TEX2, i, vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD3, + _TNL_ATTRIB_TEX3, i, vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD4, + _TNL_ATTRIB_TEX4, i, vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD5, + _TNL_ATTRIB_TEX5, i, vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD6, + _TNL_ATTRIB_TEX6, i, vb); + fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD7, + _TNL_ATTRIB_TEX7, i, vb); for (j = 0; j < MAX_VERTEX_ATTRIBS; j++) - fetch_gen_attrib (pro, j, i, vb); - - _slang_exec_vertex_shader (pro); - - fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_POSITION, VERT_RESULT_HPOS, i, 0, store); - fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_FRONTCOLOR, VERT_RESULT_COL0, i, 0, store); - fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR, VERT_RESULT_COL1, i, 0, store); - fetch_output_float (pro, SLANG_VERTEX_FIXED_FOGFRAGCOORD, VERT_RESULT_FOGC, i, store); - for (j = 0; j < 8; j++) - fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_TEXCOORD, VERT_RESULT_TEX0 + j, i, j, store); - fetch_output_float (pro, SLANG_VERTEX_FIXED_POINTSIZE, VERT_RESULT_PSIZ, i, store); - fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_BACKCOLOR, VERT_RESULT_BFC0, i, 0, store); - fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR, VERT_RESULT_BFC1, i, 0, store); - /* XXX: fetch output SLANG_VERTEX_FIXED_CLIPVERTEX */ - - for (j = 0; j < MAX_VARYING_VECTORS; j++) - { - GLuint k; - - for (k = 0; k < VARYINGS_PER_VECTOR; k++) - { - (**pro).UpdateVarying (pro, j * VARYINGS_PER_VECTOR + k, - &store->varyings[j].data[i][k], GL_TRUE); - } - } - } - - vb->ClipPtr = &store->outputs[VERT_RESULT_HPOS]; - vb->ClipPtr->count = vb->Count; - - vb->ColorPtr[0] = &store->outputs[VERT_RESULT_COL0]; - vb->AttribPtr[VERT_ATTRIB_COLOR0] = vb->ColorPtr[0]; - vb->ColorPtr[1] = &store->outputs[VERT_RESULT_BFC0]; - - vb->SecondaryColorPtr[0] = - vb->AttribPtr[VERT_ATTRIB_COLOR1] = &store->outputs[VERT_RESULT_COL1]; - - vb->SecondaryColorPtr[1] = &store->outputs[VERT_RESULT_BFC1]; - - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - vb->TexCoordPtr[i] = - vb->AttribPtr[VERT_ATTRIB_TEX0 + i] = &store->outputs[VERT_RESULT_TEX0 + i]; - } - - vb->FogCoordPtr = - vb->AttribPtr[VERT_ATTRIB_FOG] = &store->outputs[VERT_RESULT_FOGC]; - - vb->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->outputs[VERT_RESULT_PSIZ]; - - for (i = 0; i < MAX_VARYING_VECTORS; i++) { - vb->VaryingPtr[i] = &store->varyings[i]; - vb->AttribPtr[_TNL_ATTRIB_GENERIC0 + i] = vb->VaryingPtr[i]; - } - - store->ormask = 0; - store->andmask = CLIP_FRUSTUM_BITS; - - if (tnl->NeedNdcCoords) - { - vb->NdcPtr = _mesa_clip_tab[vb->ClipPtr->size] (vb->ClipPtr, &store->ndc_coords, - store->clipmask, &store->ormask, &store->andmask); - } - else - { - vb->NdcPtr = NULL; - _mesa_clip_np_tab[vb->ClipPtr->size] (vb->ClipPtr, NULL, store->clipmask, &store->ormask, - &store->andmask); - } - - if (store->andmask) - return GL_FALSE; - - vb->ClipAndMask = store->andmask; - vb->ClipOrMask = store->ormask; - vb->ClipMask = store->clipmask; - - return GL_TRUE; + fetch_gen_attrib(pro, j, i, vb); + + _slang_exec_vertex_shader(pro); + + fetch_output_vec4(pro, SLANG_VERTEX_FIXED_POSITION, VERT_RESULT_HPOS, i, + 0, store); + fetch_output_vec4(pro, SLANG_VERTEX_FIXED_FRONTCOLOR, VERT_RESULT_COL0, + i, 0, store); + fetch_output_vec4(pro, SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR, + VERT_RESULT_COL1, i, 0, store); + fetch_output_float(pro, SLANG_VERTEX_FIXED_FOGFRAGCOORD, + VERT_RESULT_FOGC, i, store); + for (j = 0; j < 8; j++) + fetch_output_vec4(pro, SLANG_VERTEX_FIXED_TEXCOORD, + VERT_RESULT_TEX0 + j, i, j, store); + fetch_output_float(pro, SLANG_VERTEX_FIXED_POINTSIZE, VERT_RESULT_PSIZ, + i, store); + fetch_output_vec4(pro, SLANG_VERTEX_FIXED_BACKCOLOR, VERT_RESULT_BFC0, + i, 0, store); + fetch_output_vec4(pro, SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR, + VERT_RESULT_BFC1, i, 0, store); + /* XXX: fetch output SLANG_VERTEX_FIXED_CLIPVERTEX */ + + for (j = 0; j < MAX_VARYING_VECTORS; j++) { + GLuint k; + + for (k = 0; k < VARYINGS_PER_VECTOR; k++) { + (**pro).UpdateVarying(pro, j * VARYINGS_PER_VECTOR + k, + &store->varyings[j].data[i][k], GL_TRUE); + } + } + } + + vb->ClipPtr = &store->outputs[VERT_RESULT_HPOS]; + vb->ClipPtr->count = vb->Count; + + vb->ColorPtr[0] = &store->outputs[VERT_RESULT_COL0]; + vb->AttribPtr[VERT_ATTRIB_COLOR0] = vb->ColorPtr[0]; + vb->ColorPtr[1] = &store->outputs[VERT_RESULT_BFC0]; + + vb->SecondaryColorPtr[0] = + vb->AttribPtr[VERT_ATTRIB_COLOR1] = &store->outputs[VERT_RESULT_COL1]; + + vb->SecondaryColorPtr[1] = &store->outputs[VERT_RESULT_BFC1]; + + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + vb->TexCoordPtr[i] = + vb->AttribPtr[VERT_ATTRIB_TEX0 + i] = + &store->outputs[VERT_RESULT_TEX0 + i]; + } + + vb->FogCoordPtr = + vb->AttribPtr[VERT_ATTRIB_FOG] = &store->outputs[VERT_RESULT_FOGC]; + + vb->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->outputs[VERT_RESULT_PSIZ]; + + for (i = 0; i < MAX_VARYING_VECTORS; i++) { + vb->VaryingPtr[i] = &store->varyings[i]; + vb->AttribPtr[_TNL_ATTRIB_GENERIC0 + i] = vb->VaryingPtr[i]; + } + + store->ormask = 0; + store->andmask = CLIP_FRUSTUM_BITS; + + if (tnl->NeedNdcCoords) { + vb->NdcPtr = + _mesa_clip_tab[vb->ClipPtr->size] (vb->ClipPtr, &store->ndc_coords, + store->clipmask, &store->ormask, + &store->andmask); + } + else { + vb->NdcPtr = NULL; + _mesa_clip_np_tab[vb->ClipPtr->size] (vb->ClipPtr, NULL, + store->clipmask, &store->ormask, + &store->andmask); + } + + if (store->andmask) + return GL_FALSE; + + vb->ClipAndMask = store->andmask; + vb->ClipOrMask = store->ormask; + vb->ClipMask = store->clipmask; + + return GL_TRUE; } const struct tnl_pipeline_stage _tnl_arb_vertex_shader_stage = { - "ARB_vertex_shader", - NULL, - construct_arb_vertex_shader, - destruct_arb_vertex_shader, - validate_arb_vertex_shader, - run_arb_vertex_shader + "ARB_vertex_shader", + NULL, + construct_arb_vertex_shader, + destruct_arb_vertex_shader, + validate_arb_vertex_shader, + run_arb_vertex_shader }; #endif /* FEATURE_ARB_vertex_shader */ - diff --git a/src/mesa/tnl/t_vb_cull.c b/src/mesa/tnl/t_vb_cull.c index 8848dac10c..21a32e5b1d 100644 --- a/src/mesa/tnl/t_vb_cull.c +++ b/src/mesa/tnl/t_vb_cull.c @@ -57,10 +57,7 @@ static GLboolean run_cull_stage( GLcontext *ctx, GLuint count = VB->Count; GLuint i; - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - if (ctx->VertexProgram._Enabled || + if (ctx->VertexProgram._Current || !ctx->Transform.CullVertexFlag) return GL_TRUE; diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index 51f28c4059..5440ff7894 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -148,10 +148,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) struct fog_stage_data *store = FOG_STAGE_DATA(stage); GLvector4f *input; - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - if (!ctx->Fog.Enabled || ctx->VertexProgram._Enabled) + if (!ctx->Fog.Enabled || ctx->VertexProgram._Current) return GL_TRUE; diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index 47c5b400aa..12f2cc7735 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -203,10 +203,7 @@ static GLboolean run_lighting( GLcontext *ctx, GLvector4f *input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->ObjPtr; GLuint idx; - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - if (!ctx->Light.Enabled || ctx->VertexProgram._Enabled) + if (!ctx->Light.Enabled || ctx->VertexProgram._Current) return GL_TRUE; /* Make sure we can talk about position x,y and z: @@ -264,10 +261,7 @@ static void validate_lighting( GLcontext *ctx, { light_func *tab; - if (ctx->ShaderObjects._VertexShaderPresent) - return; - - if (!ctx->Light.Enabled || ctx->VertexProgram._Enabled) + if (!ctx->Light.Enabled || ctx->VertexProgram._Current) return; if (ctx->Visual.rgbMode) { diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c index 0f91784e80..01fad0cee2 100644 --- a/src/mesa/tnl/t_vb_normals.c +++ b/src/mesa/tnl/t_vb_normals.c @@ -95,12 +95,7 @@ validate_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) { struct normal_stage_data *store = NORMAL_STAGE_DATA(stage); - if (ctx->ShaderObjects._VertexShaderPresent) { - store->NormalTransform = NULL; - return; - } - - if (ctx->VertexProgram._Enabled || + if (ctx->VertexProgram._Current || (!ctx->Light.Enabled && !(ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS))) { store->NormalTransform = NULL; diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c index 2f502d61d1..9327f8c273 100644 --- a/src/mesa/tnl/t_vb_points.c +++ b/src/mesa/tnl/t_vb_points.c @@ -47,10 +47,7 @@ struct point_stage_data { static GLboolean run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) { - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - if (ctx->Point._Attenuated && !ctx->VertexProgram._Enabled) { + if (ctx->Point._Attenuated && !ctx->VertexProgram._Current) { struct point_stage_data *store = POINT_STAGE_DATA(stage); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; const GLfloat (*eye)[4] = (const GLfloat (*)[4]) VB->EyePtr->data; diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index f11ac616f1..c901de0588 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -39,6 +39,7 @@ #include "light.h" #include "macros.h" #include "imports.h" +#include "program.h" #include "simple_list.h" #include "mtypes.h" #include "program_instruction.h" @@ -55,7 +56,7 @@ */ struct vp_stage_data { /** The results of running the vertex program go into these arrays. */ - GLvector4f attribs[15]; + GLvector4f attribs[VERT_RESULT_MAX]; GLvector4f ndcCoords; /**< normalized device coords */ GLubyte *clipmask; /**< clip flags */ @@ -75,16 +76,14 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) TNLcontext *tnl = TNL_CONTEXT(ctx); struct vp_stage_data *store = VP_STAGE_DATA(stage); struct vertex_buffer *VB = &tnl->vb; - struct gl_vertex_program *program = ctx->VertexProgram.Current; + struct gl_vertex_program *program = ctx->VertexProgram._Current; struct vp_machine machine; GLuint i; - if (ctx->ShaderObjects._VertexShaderPresent) + if (!program || !program->IsNVProgram) return GL_TRUE; - if (!ctx->VertexProgram._Enabled || - !program->IsNVProgram) - return GL_TRUE; + _mesa_load_state_parameters(ctx, program->Base.Parameters); /* load program parameter registers (they're read-only) */ _mesa_init_vp_per_primitive_registers(ctx); @@ -140,9 +139,16 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) /* copy the output registers into the VB->attribs arrays */ /* XXX (optimize) could use a conditional and smaller loop limit here */ - for (attr = 0; attr < 15; attr++) { + for (attr = 0; attr < VERT_RESULT_MAX; attr++) { COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]); } +#if 0 + printf("HPOS: %f %f %f %f\n", + machine.Outputs[0][0], + machine.Outputs[0][1], + machine.Outputs[0][2], + machine.Outputs[0][3]); +#endif } /* Setup the VB pointers so that the next pipeline stages get @@ -227,8 +233,7 @@ static GLboolean init_vp( GLcontext *ctx, return GL_FALSE; /* Allocate arrays of vertex output values */ - /* XXX change '15' to a named constant */ - for (i = 0; i < 15; i++) { + for (i = 0; i < VERT_RESULT_MAX; i++) { _mesa_vector4f_alloc( &store->attribs[i], 0, size, 32 ); store->attribs[i].size = 4; } diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index 5f7b2dccd8..e98ab743c5 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -488,10 +488,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx, struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage); GLuint i; - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Enabled) + if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current) return GL_TRUE; for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) { @@ -516,10 +513,7 @@ static void validate_texgen_stage( GLcontext *ctx, struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage); GLuint i; - if (ctx->ShaderObjects._VertexShaderPresent) - return; - - if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Enabled) + if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current) return; for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) { diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index fa9222c0f1..674d36f8cb 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -61,10 +61,7 @@ static GLboolean run_texmat_stage( GLcontext *ctx, struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; GLuint i; - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - if (!ctx->Texture._TexMatEnabled || ctx->VertexProgram._Enabled) + if (!ctx->Texture._TexMatEnabled || ctx->VertexProgram._Current) return GL_TRUE; /* ENABLE_TEXMAT implies that the texture matrix is not the diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 100fca2a22..276305b5e6 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -126,10 +126,7 @@ static GLboolean run_vertex_stage( GLcontext *ctx, TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; - if (ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; - - if (ctx->VertexProgram._Enabled) + if (ctx->VertexProgram._Current) return GL_TRUE; if (ctx->_NeedEyeCoords) { diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 805d05ae72..a68127e653 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -382,11 +382,14 @@ static struct ureg register_const4f( struct tnl_program *p, { GLfloat values[4]; GLint idx; + GLuint swizzle; values[0] = s0; values[1] = s1; values[2] = s2; values[3] = s3; - idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4 ); + idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4, + &swizzle ); + ASSERT(swizzle == SWIZZLE_NOOP); return make_ureg(PROGRAM_STATE_VAR, idx); } @@ -1495,7 +1498,7 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ) GLuint hash; const struct gl_vertex_program *prev = ctx->VertexProgram._Current; - if (ctx->VertexProgram._Enabled == GL_FALSE) { + if (!ctx->VertexProgram._Current) { /* Grab all the relevent state and put it in a single structure: */ key = make_state_key(ctx); @@ -1503,45 +1506,42 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ) /* Look for an already-prepared program for this state: */ - ctx->_TnlProgram = (struct gl_vertex_program *) + ctx->VertexProgram._TnlProgram = (struct gl_vertex_program *) search_cache( tnl->vp_cache, hash, key, sizeof(*key) ); /* OK, we'll have to build a new one: */ - if (!ctx->_TnlProgram) { + if (!ctx->VertexProgram._TnlProgram) { if (0) _mesa_printf("Build new TNL program\n"); - ctx->_TnlProgram = (struct gl_vertex_program *) + ctx->VertexProgram._TnlProgram = (struct gl_vertex_program *) ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0); - create_new_program( key, ctx->_TnlProgram, + create_new_program( key, ctx->VertexProgram._TnlProgram, ctx->Const.VertexProgram.MaxTemps ); if (ctx->Driver.ProgramStringNotify) ctx->Driver.ProgramStringNotify( ctx, GL_VERTEX_PROGRAM_ARB, - &ctx->_TnlProgram->Base ); + &ctx->VertexProgram._TnlProgram->Base ); - cache_item(tnl->vp_cache, hash, key, ctx->_TnlProgram ); + cache_item(tnl->vp_cache, hash, key, ctx->VertexProgram._TnlProgram ); } else { FREE(key); if (0) _mesa_printf("Found existing TNL program for key %x\n", hash); } - ctx->VertexProgram._Current = ctx->_TnlProgram; - } - else { - ctx->VertexProgram._Current = ctx->VertexProgram.Current; + ctx->VertexProgram._Current = ctx->VertexProgram._TnlProgram; } /* Tell the driver about the change. Could define a new target for * this? */ - if (ctx->VertexProgram._Current != prev && - ctx->Driver.BindProgram) + if (ctx->VertexProgram._Current != prev && ctx->Driver.BindProgram) { ctx->Driver.BindProgram(ctx, GL_VERTEX_PROGRAM_ARB, (struct gl_program *) ctx->VertexProgram._Current); + } } void _tnl_ProgramCacheInit( GLcontext *ctx ) diff --git a/src/mesa/tnl/t_vtx_eval.c b/src/mesa/tnl/t_vtx_eval.c index 71564076e3..bb621ecbe3 100644 --- a/src/mesa/tnl/t_vtx_eval.c +++ b/src/mesa/tnl/t_vtx_eval.c @@ -123,8 +123,7 @@ void _tnl_update_eval( GLcontext *ctx ) * We do this after the conventional attributes since the spec says that * these generic maps have higher priority. */ - if (ctx->VertexProgram._Enabled && - ctx->VertexProgram._Current && + if (ctx->VertexProgram._Current && ctx->VertexProgram._Current->IsNVProgram) { for (attr = 0; attr < 16; attr++) { if (ctx->Eval.Map1Attrib[attr]) -- cgit v1.2.3 From 12ef1fbefcee964b715783d3ade6b69b2c699ed8 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:05:23 -0700 Subject: Checkpoint for GLSL compiler changes. In brief: Check for enabled fragment program by looking at ctx->FragmentProgram._Current. New code for varying variables. --- src/mesa/swrast/s_aalinetemp.h | 4 ++-- src/mesa/swrast/s_context.c | 27 +++++++++++------------- src/mesa/swrast/s_nvfragprog.c | 41 +++++++++++++++++++++++++++++------- src/mesa/swrast/s_pointtemp.h | 2 +- src/mesa/swrast/s_span.c | 48 ++++++++++++++++++------------------------ src/mesa/swrast/s_triangle.c | 15 +++++++------ 6 files changed, 76 insertions(+), 61 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index 34c95fc34e..68291afeea 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -80,7 +80,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) #ifdef DO_TEX { GLfloat invQ; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Current) { invQ = 1.0F; } else { @@ -100,7 +100,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { if (ctx->Texture.Unit[unit]._ReallyEnabled) { GLfloat invQ; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Current) { invQ = 1.0F; } else { diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 52d560ffdb..e304789154 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -98,7 +98,7 @@ _swrast_update_rasterflags( GLcontext *ctx ) rasterMask |= MULTI_DRAW_BIT; /* all color index bits disabled */ } - if (ctx->FragmentProgram._Enabled) { + if (ctx->FragmentProgram._Current) { rasterMask |= FRAGPROG_BIT; } @@ -165,7 +165,7 @@ _swrast_update_fog_hint( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); swrast->_PreferPixelFog = (!swrast->AllowVertexFog || - ctx->FragmentProgram._Enabled || /* not _Active! */ + ctx->FragmentProgram._Current || (ctx->Hint.Fog == GL_NICEST && swrast->AllowPixelFog)); } @@ -198,17 +198,14 @@ static void _swrast_update_fog_state( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); + const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; /* determine if fog is needed, and if so, which fog mode */ swrast->_FogEnabled = GL_FALSE; - if (ctx->FragmentProgram._Enabled) { - if (ctx->FragmentProgram._Current->Base.Target==GL_FRAGMENT_PROGRAM_ARB) { - const struct gl_fragment_program *fp - = ctx->FragmentProgram._Current; - if (fp->FogOption != GL_NONE) { - swrast->_FogEnabled = GL_TRUE; - swrast->_FogMode = fp->FogOption; - } + if (fp && fp->Base.Target == GL_FRAGMENT_PROGRAM_ARB) { + if (fp->FogOption != GL_NONE) { + swrast->_FogEnabled = GL_TRUE; + swrast->_FogMode = fp->FogOption; } } else if (ctx->Fog.Enabled) { @@ -225,8 +222,8 @@ _swrast_update_fog_state( GLcontext *ctx ) static void _swrast_update_fragment_program(GLcontext *ctx, GLbitfield newState) { - if (ctx->FragmentProgram._Enabled) { - const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; + const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; + if (fp) { #if 0 /* XXX Need a way to trigger the initial loading of parameters * even when there's no recent state changes. @@ -301,7 +298,7 @@ _swrast_validate_triangle( GLcontext *ctx, if (ctx->Texture._EnabledUnits == 0 && NEED_SECONDARY_COLOR(ctx) - && !ctx->FragmentProgram._Enabled) { + && !ctx->FragmentProgram._Current) { /* separate specular color, but no texture */ swrast->SpecTriangle = swrast->Triangle; swrast->Triangle = _swrast_add_spec_terms_triangle; @@ -325,7 +322,7 @@ _swrast_validate_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) if (ctx->Texture._EnabledUnits == 0 && NEED_SECONDARY_COLOR(ctx) - && !ctx->FragmentProgram._Enabled) { + && !ctx->FragmentProgram._Current) { swrast->SpecLine = swrast->Line; swrast->Line = _swrast_add_spec_terms_line; } @@ -348,7 +345,7 @@ _swrast_validate_point( GLcontext *ctx, const SWvertex *v0 ) if (ctx->Texture._EnabledUnits == 0 && NEED_SECONDARY_COLOR(ctx) - && !ctx->FragmentProgram._Enabled) { + && !ctx->FragmentProgram._Current) { swrast->SpecPoint = swrast->Point; swrast->Point = _swrast_add_spec_terms_point; } diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c index 028ddc0090..df583bb29c 100644 --- a/src/mesa/swrast/s_nvfragprog.c +++ b/src/mesa/swrast/s_nvfragprog.c @@ -53,9 +53,9 @@ */ struct fp_machine { - GLfloat Temporaries[MAX_NV_FRAGMENT_PROGRAM_TEMPS][4]; - GLfloat Inputs[MAX_NV_FRAGMENT_PROGRAM_INPUTS][4]; - GLfloat Outputs[MAX_NV_FRAGMENT_PROGRAM_OUTPUTS][4]; + GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; + GLfloat Inputs[FRAG_ATTRIB_MAX][4]; + GLfloat Outputs[FRAG_RESULT_MAX][4]; GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ @@ -161,14 +161,14 @@ get_register_pointer( GLcontext *ctx, { switch (source->File) { case PROGRAM_TEMPORARY: - ASSERT(source->Index < MAX_NV_FRAGMENT_PROGRAM_TEMPS); + ASSERT(source->Index < MAX_PROGRAM_TEMPS); return machine->Temporaries[source->Index]; case PROGRAM_INPUT: - ASSERT(source->Index < MAX_NV_FRAGMENT_PROGRAM_INPUTS); + ASSERT(source->Index < FRAG_ATTRIB_MAX); return machine->Inputs[source->Index]; case PROGRAM_OUTPUT: /* This is only for PRINT */ - ASSERT(source->Index < MAX_NV_FRAGMENT_PROGRAM_OUTPUTS); + ASSERT(source->Index < FRAG_RESULT_MAX); return machine->Outputs[source->Index]; case PROGRAM_LOCAL_PARAM: ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); @@ -180,6 +180,8 @@ get_register_pointer( GLcontext *ctx, /* Fallthrough */ case PROGRAM_CONSTANT: /* Fallthrough */ + case PROGRAM_UNIFORM: + /* Fallthrough */ case PROGRAM_NAMED_PARAM: ASSERT(source->Index < (GLint) program->Base.Parameters->NumParameters); return program->Base.Parameters->ParameterValues[source->Index]; @@ -539,7 +541,7 @@ init_machine_deriv( GLcontext *ctx, const SWspan *span, char xOrY, struct fp_machine *dMachine ) { - GLuint u; + GLuint u, v; ASSERT(xOrY == 'X' || xOrY == 'Y'); @@ -626,6 +628,17 @@ init_machine_deriv( GLcontext *ctx, } } + for (v = 0; v < ctx->Const.MaxVarying; v++) { + if (program->Base.InputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { + GLfloat *var = (GLfloat*) machine->Inputs[FRAG_ATTRIB_VAR0 + v]; + /* XXXX finish this */ + var[0] += span->varStepX[v][0]; + var[1] += span->varStepX[v][1]; + var[2] += span->varStepX[v][2]; + var[3] += span->varStepX[v][3]; + } + } + /* init condition codes */ dMachine->CondCodes[0] = COND_EQ; dMachine->CondCodes[1] = COND_EQ; @@ -1531,7 +1544,7 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, const SWspan *span, GLuint col ) { GLuint inputsRead = program->Base.InputsRead; - GLuint u; + GLuint u, v; if (ctx->FragmentProgram.CallbackEnabled) inputsRead = ~0; @@ -1583,6 +1596,18 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, /*ASSERT(tex[0] != 0 || tex[1] != 0 || tex[2] != 0);*/ } } + for (v = 0; v < ctx->Const.MaxVarying; v++) { + if (inputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { +#if 0 + printf("Frag Var %d: %f %f %f\n", col, + span->array->varying[col][v][0], + span->array->varying[col][v][1], + span->array->varying[col][v][2]); +#endif + COPY_4V(machine->Inputs[FRAG_ATTRIB_VAR0 + v], + span->array->varying[col][v]); + } + } /* init condition codes */ machine->CondCodes[0] = COND_EQ; diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index 6316833a68..b41776b017 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -120,7 +120,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #endif #if FLAGS & TEXTURE span->arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA); - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Current) { /* Don't divide texture s,t,r by q (use TXP to do that) */ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture._EnabledCoordUnits & (1 << u)) { diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index c74b98facf..69ecfa9558 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -130,7 +130,7 @@ _swrast_span_default_texcoords( GLcontext *ctx, SWspan *span ) GLuint i; for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { const GLfloat *tc = ctx->Current.RasterTexCoords[i]; - if (ctx->FragmentProgram._Enabled || ctx->ATIFragmentShader._Enabled) { + if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { COPY_4V(span->tex[i], tc); } else if (tc[3] > 0.0F) { @@ -555,7 +555,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) if (obj) { const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; needLambda = (obj->MinFilter != obj->MagFilter) - || ctx->FragmentProgram._Enabled; + || ctx->FragmentProgram._Current; texW = img->WidthScale; texH = img->HeightScale; } @@ -580,8 +580,8 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) GLfloat r = span->tex[u][2]; GLfloat q = span->tex[u][3]; GLuint i; - if (ctx->FragmentProgram._Enabled || ctx->ATIFragmentShader._Enabled || - ctx->ShaderObjects._FragmentShaderPresent) { + if (ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; @@ -632,8 +632,8 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) GLfloat r = span->tex[u][2]; GLfloat q = span->tex[u][3]; GLuint i; - if (ctx->FragmentProgram._Enabled || ctx->ATIFragmentShader._Enabled || - ctx->ShaderObjects._FragmentShaderPresent) { + if (ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; @@ -691,7 +691,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) if (obj) { const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; needLambda = (obj->MinFilter != obj->MagFilter) - || ctx->FragmentProgram._Enabled; + || ctx->FragmentProgram._Current; texW = (GLfloat) img->WidthScale; texH = (GLfloat) img->HeightScale; } @@ -716,8 +716,8 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) GLfloat r = span->tex[0][2]; GLfloat q = span->tex[0][3]; GLuint i; - if (ctx->FragmentProgram._Enabled || ctx->ATIFragmentShader._Enabled || - ctx->ShaderObjects._FragmentShaderPresent) { + if (ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; @@ -768,8 +768,8 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) GLfloat r = span->tex[0][2]; GLfloat q = span->tex[0][3]; GLuint i; - if (ctx->FragmentProgram._Enabled || ctx->ATIFragmentShader._Enabled || - ctx->ShaderObjects._FragmentShaderPresent) { + if (ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ const GLfloat dwdx = span->dwdx; GLfloat w = span->w; @@ -1340,8 +1340,7 @@ shade_texture_span(GLcontext *ctx, SWspan *span) if (ctx->Texture._EnabledCoordUnits && (span->interpMask & SPAN_TEXTURE)) interpolate_texcoords(ctx, span); - if (ctx->ShaderObjects._FragmentShaderPresent || - ctx->FragmentProgram._Enabled || + if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { /* use float colors if running a fragment program or shader */ @@ -1367,12 +1366,11 @@ shade_texture_span(GLcontext *ctx, SWspan *span) if (span->interpMask & SPAN_Z) _swrast_span_interpolate_z (ctx, span); - /* Run fragment program/shader now */ - if (ctx->ShaderObjects._FragmentShaderPresent) { + if (ctx->ShaderObjects.Linked && span->interpMask & SPAN_VARYING) interpolate_varying(ctx, span); - _swrast_exec_arbshader(ctx, span); - } - else if (ctx->FragmentProgram._Enabled) { + + /* Run fragment program/shader now */ + if (ctx->FragmentProgram._Current) { _swrast_exec_fragment_program(ctx, span); } else { @@ -1403,10 +1401,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) const GLbitfield origInterpMask = span->interpMask; const GLbitfield origArrayMask = span->arrayMask; const GLenum chanType = span->array->ChanType; - const GLboolean shader - = ctx->FragmentProgram._Enabled - || ctx->ShaderObjects._FragmentShaderPresent - || ctx->ATIFragmentShader._Enabled; + const GLboolean shader = (ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled); const GLboolean shaderOrTexture = shader || ctx->Texture._EnabledUnits; GLboolean deferredTexture; @@ -1429,20 +1425,16 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) deferredTexture = GL_FALSE; } else if (shaderOrTexture) { - if (ctx->FragmentProgram._Enabled) { + if (ctx->FragmentProgram._Current) { if (ctx->FragmentProgram.Current->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { - /* Z comes from fragment program */ + /* Z comes from fragment program/shader */ deferredTexture = GL_FALSE; } else { deferredTexture = GL_TRUE; } } - else if (ctx->ShaderObjects._FragmentShaderPresent) { - /* XXX how do we test if Z is written by shader? */ - deferredTexture = GL_FALSE; /* never defer to be safe */ - } else { /* ATI frag shader or conventional texturing */ deferredTexture = GL_TRUE; diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index b17c435460..9b775928cd 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -883,8 +883,8 @@ fast_persp_span(GLcontext *ctx, SWspan *span, /* * This is the big one! - * Interpolate Z, RGB, Alpha, specular, fog, N sets of texture coordinates, and varying floats. - * Yup, it's slow. + * Interpolate Z, RGB, Alpha, specular, fog, N sets of texture coordinates, + * and varying floats. Yup, it's slow. */ #define NAME multitextured_triangle #define INTERP_Z 1 @@ -1073,8 +1073,9 @@ _swrast_choose_triangle( GLcontext *ctx ) } } - if (ctx->Texture._EnabledCoordUnits || ctx->FragmentProgram._Enabled || - ctx->ATIFragmentShader._Enabled || ctx->ShaderObjects._FragmentShaderPresent) { + if (ctx->Texture._EnabledCoordUnits || + ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled) { /* Ugh, we do a _lot_ of tests to pick the best textured tri func */ const struct gl_texture_object *texObj2D; const struct gl_texture_image *texImg; @@ -1089,9 +1090,8 @@ _swrast_choose_triangle( GLcontext *ctx ) /* First see if we can use an optimized 2-D texture function */ if (ctx->Texture._EnabledCoordUnits == 0x1 - && !ctx->FragmentProgram._Enabled + && !ctx->FragmentProgram._Current && !ctx->ATIFragmentShader._Enabled - && !ctx->ShaderObjects._FragmentShaderPresent && ctx->Texture.Unit[0]._ReallyEnabled == TEXTURE_2D_BIT && texObj2D->WrapS == GL_REPEAT && texObj2D->WrapT == GL_REPEAT @@ -1137,7 +1137,8 @@ _swrast_choose_triangle( GLcontext *ctx ) } else { /* general case textured triangles */ - if (ctx->Texture._EnabledCoordUnits > 1) { + if (ctx->Texture._EnabledCoordUnits > 1 || + ctx->FragmentProgram._Current) { USE(multitextured_triangle); } else { -- cgit v1.2.3 From cefc983bec26b597a98a53932cd5ea05ded2b35a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:06:28 -0700 Subject: Retire old GLSL shader code. --- src/mesa/swrast/s_arbshader.c | 124 ------------------------------------------ src/mesa/swrast/s_arbshader.h | 38 ------------- 2 files changed, 162 deletions(-) delete mode 100644 src/mesa/swrast/s_arbshader.c delete mode 100644 src/mesa/swrast/s_arbshader.h (limited to 'src') diff --git a/src/mesa/swrast/s_arbshader.c b/src/mesa/swrast/s_arbshader.c deleted file mode 100644 index ee971a36ec..0000000000 --- a/src/mesa/swrast/s_arbshader.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Michal Krol - */ - -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "s_arbshader.h" -#include "s_context.h" -#include "shaderobjects.h" -#include "shaderobjects_3dlabs.h" -#include "slang_utility.h" -#include "slang_link.h" - -#if FEATURE_ARB_fragment_shader - -void -_swrast_exec_arbshader(GLcontext *ctx, SWspan *span) -{ - struct gl2_program_intf **pro; - GLuint i; - - ASSERT(span->array->ChanType == GL_FLOAT); - - if (!ctx->ShaderObjects._FragmentShaderPresent) - return; - - pro = ctx->ShaderObjects.CurrentProgram; - if (!ctx->ShaderObjects._VertexShaderPresent) - (**pro).UpdateFixedUniforms(pro); - - for (i = span->start; i < span->end; i++) { - /* only run shader on active fragments */ - if (span->array->mask[i]) { - GLfloat vec[4]; - GLuint j; - GLboolean discard; - - /* - * Load input attributes - */ - vec[0] = (GLfloat) span->x + i; - vec[1] = (GLfloat) span->y; - vec[2] = (GLfloat) span->array->z[i] / ctx->DrawBuffer->_DepthMaxF; - vec[3] = span->w + span->dwdx * i; - (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGCOORD, vec, - 0, 4 * sizeof(GLfloat), GL_TRUE); - - (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_COLOR, - span->array->color.sz4.rgba[i], - 0, 4 * sizeof(GLfloat), GL_TRUE); - - (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_SECONDARYCOLOR, - span->array->color.sz4.spec[i], - 0, 4 * sizeof(GLfloat), GL_TRUE); - - for (j = 0; j < ctx->Const.MaxTextureCoordUnits; j++) { - (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_TEXCOORD, - span->array->texcoords[j][i], - j, 4 * sizeof(GLfloat), GL_TRUE); - } - - for (j = 0; j < MAX_VARYING_VECTORS; j++) { - GLuint k; - for (k = 0; k < VARYINGS_PER_VECTOR; k++) { - (**pro).UpdateVarying(pro, j * VARYINGS_PER_VECTOR + k, - &span->array->varying[i][j][k], - GL_FALSE); - } - } - - _slang_exec_fragment_shader(pro); - - /* - * Store results - */ - _slang_fetch_discard(pro, &discard); - if (discard) { - span->array->mask[i] = GL_FALSE; - span->writeAll = GL_FALSE; - } - else { - (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGCOLOR, - vec, 0, 4 * sizeof(GLfloat), GL_FALSE); - COPY_4V(span->array->color.sz4.rgba[i], vec); - - (**pro).UpdateFixedVarying(pro, SLANG_FRAGMENT_FIXED_FRAGDEPTH, vec, 0, - sizeof (GLfloat), GL_FALSE); - if (vec[0] <= 0.0f) - span->array->z[i] = 0; - else if (vec[0] >= 1.0f) - span->array->z[i] = ctx->DrawBuffer->_DepthMax; - else - span->array->z[i] = IROUND(vec[0] * ctx->DrawBuffer->_DepthMaxF); - } - } - } -} - -#endif /* FEATURE_ARB_fragment_shader */ - diff --git a/src/mesa/swrast/s_arbshader.h b/src/mesa/swrast/s_arbshader.h deleted file mode 100644 index 5df80c870b..0000000000 --- a/src/mesa/swrast/s_arbshader.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 David Airlie All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * DAVID AIRLIE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef S_ARBSHADER_H -#define S_ARBSHADER_H - -#include "s_context.h" - -#if FEATURE_ARB_fragment_shader - -extern void _swrast_exec_arbshader (GLcontext *ctx, SWspan *span); - -#endif /* FEATURE_ARB_fragment_shader */ - -#endif - -- cgit v1.2.3 From a5011d97534cb1c89d1f6a78c75f558b24e6299e Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:33:09 -0700 Subject: Not needed. --- src/mesa/shader/asmopcodes.reg | 78 ------------------------------------------ 1 file changed, 78 deletions(-) delete mode 100644 src/mesa/shader/asmopcodes.reg (limited to 'src') diff --git a/src/mesa/shader/asmopcodes.reg b/src/mesa/shader/asmopcodes.reg deleted file mode 100644 index efd8918f21..0000000000 --- a/src/mesa/shader/asmopcodes.reg +++ /dev/null @@ -1,78 +0,0 @@ -/* */ -/* ARB program opcode registry */ -/* each instruction code has its own unique number */ -/* this registry exists to ensure that this relation retains */ -/* */ - -/* GL_ARB_vertex_program */ -ABS 0x00 -ADD 0x01 -ARL 0x02 -DP3 0x03 -DP4 0x04 -DPH 0x05 -DST 0x06 -EX2 0x07 -EXP 0x08 -FLR 0x09 -FRC 0x0A -LG2 0x0B -LIT 0x0C -LOG 0x0D -MAD 0x0E -MAX 0x0F -MIN 0x10 -MOV 0x11 -MUL 0x12 -POW 0x13 -RCP 0x14 -RSQ 0x15 -SGE 0x16 -SLT 0x17 -SUB 0x18 -SWZ 0x19 -XPD 0x1A - -/* GL_ARB_fragment_program */ -ABS_SAT 0x1B -ADD_SAT 0x1C -CMP 0x1D -CMP_SAT 0x1E -COS 0x1F -COS_SAT 0x20 -DP3_SAT 0x21 -DP4_SAT 0x22 -DPH_SAT 0x23 -DST_SAT 0x24 -EX2_SAT 0x25 -FLR_SAT 0x26 -FRC_SAT 0x27 -KIL 0x28 -LG2_SAT 0x29 -LIT_SAT 0x2A -LRP 0x2B -LRP_SAT 0x2C -MAD_SAT 0x2D -MAX_SAT 0x2E -MIN_SAT 0x2F -MOV_SAT 0x30 -MUL_SAT 0x31 -POW_SAT 0x32 -RCP_SAT 0x33 -RSQ_SAT 0x34 -SCS 0x35 -SCS_SAT 0x36 -SGE_SAT 0x37 -SIN 0x38 -SIN_SAT 0x39 -SLT_SAT 0x3A -SUB_SAT 0x3B -SWZ_SAT 0x3C -TEX 0x3D -TEX_SAT 0x3E -TXB 0x3F -TXB_SAT 0x40 -TXP 0x41 -TXP_SAT 0x42 -XPD_SAT 0x43 - -- cgit v1.2.3 From 1fbb1c8d783e4d2cae08415619bac9ddbf74cdef Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:33:41 -0700 Subject: Obsolete. --- src/mesa/tnl/t_vb_arbshader.c | 332 ------------------------------------------ 1 file changed, 332 deletions(-) delete mode 100644 src/mesa/tnl/t_vb_arbshader.c (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbshader.c b/src/mesa/tnl/t_vb_arbshader.c deleted file mode 100644 index 6d59114657..0000000000 --- a/src/mesa/tnl/t_vb_arbshader.c +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Michal Krol - */ - -#include "glheader.h" -#include "imports.h" -#include "macros.h" -#include "shaderobjects.h" -#include "shaderobjects_3dlabs.h" -#include "t_pipeline.h" -#include "slang_utility.h" -#include "slang_link.h" - -#if FEATURE_ARB_vertex_shader - -typedef struct -{ - GLvector4f outputs[VERT_RESULT_MAX]; - GLvector4f varyings[MAX_VARYING_VECTORS]; - GLvector4f ndc_coords; - GLubyte *clipmask; - GLubyte ormask; - GLubyte andmask; -} arbvs_stage_data; - -#define ARBVS_STAGE_DATA(stage) ((arbvs_stage_data *) stage->privatePtr) - -static GLboolean -construct_arb_vertex_shader(GLcontext * ctx, struct tnl_pipeline_stage *stage) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *vb = &tnl->vb; - arbvs_stage_data *store; - GLuint size = vb->Size; - GLuint i; - - stage->privatePtr = _mesa_malloc(sizeof(arbvs_stage_data)); - store = ARBVS_STAGE_DATA(stage); - if (store == NULL) - return GL_FALSE; - - for (i = 0; i < VERT_RESULT_MAX; i++) { - _mesa_vector4f_alloc(&store->outputs[i], 0, size, 32); - store->outputs[i].size = 4; - } - for (i = 0; i < MAX_VARYING_VECTORS; i++) { - _mesa_vector4f_alloc(&store->varyings[i], 0, size, 32); - store->varyings[i].size = 4; - } - _mesa_vector4f_alloc(&store->ndc_coords, 0, size, 32); - store->clipmask = (GLubyte *) ALIGN_MALLOC(size, 32); - - return GL_TRUE; -} - -static void -destruct_arb_vertex_shader(struct tnl_pipeline_stage *stage) -{ - arbvs_stage_data *store = ARBVS_STAGE_DATA(stage); - - if (store != NULL) { - GLuint i; - - for (i = 0; i < VERT_RESULT_MAX; i++) - _mesa_vector4f_free(&store->outputs[i]); - for (i = 0; i < MAX_VARYING_VECTORS; i++) - _mesa_vector4f_free(&store->varyings[i]); - _mesa_vector4f_free(&store->ndc_coords); - ALIGN_FREE(store->clipmask); - - _mesa_free(store); - stage->privatePtr = NULL; - } -} - -static void -validate_arb_vertex_shader(GLcontext * ctx, struct tnl_pipeline_stage *stage) -{ -} - -static GLvoid -fetch_input_float(struct gl2_program_intf **pro, GLuint index, GLuint attr, - GLuint i, struct vertex_buffer *vb) -{ - const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; - const GLuint stride = vb->AttribPtr[attr]->stride; - GLfloat *data = (GLfloat *) (ptr + stride * i); - - (**pro).UpdateFixedAttrib(pro, index, data, 0, sizeof(GLfloat), GL_TRUE); -} - -static GLvoid -fetch_input_vec3(struct gl2_program_intf **pro, GLuint index, GLuint attr, - GLuint i, struct vertex_buffer *vb) -{ - const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; - const GLuint stride = vb->AttribPtr[attr]->stride; - GLfloat *data = (GLfloat *) (ptr + stride * i); - - (**pro).UpdateFixedAttrib(pro, index, data, 0, 3 * sizeof(GLfloat), - GL_TRUE); -} - -static void -fetch_input_vec4(struct gl2_program_intf **pro, GLuint index, GLuint attr, - GLuint i, struct vertex_buffer *vb) -{ - const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data; - const GLuint size = vb->AttribPtr[attr]->size; - const GLuint stride = vb->AttribPtr[attr]->stride; - const GLfloat *data = (const GLfloat *) (ptr + stride * i); - GLfloat vec[4]; - - switch (size) { - case 2: - vec[0] = data[0]; - vec[1] = data[1]; - vec[2] = 0.0f; - vec[3] = 1.0f; - break; - case 3: - vec[0] = data[0]; - vec[1] = data[1]; - vec[2] = data[2]; - vec[3] = 1.0f; - break; - case 4: - vec[0] = data[0]; - vec[1] = data[1]; - vec[2] = data[2]; - vec[3] = data[3]; - break; - } - (**pro).UpdateFixedAttrib(pro, index, vec, 0, 4 * sizeof(GLfloat), - GL_TRUE); -} - -static GLvoid -fetch_gen_attrib(struct gl2_program_intf **pro, GLuint index, GLuint i, - struct vertex_buffer *vb) -{ - const GLuint attr = _TNL_ATTRIB_GENERIC0 + index; - const GLubyte *ptr = (const GLubyte *) (vb->AttribPtr[attr]->data); - const GLuint stride = vb->AttribPtr[attr]->stride; - const GLfloat *data = (const GLfloat *) (ptr + stride * i); - - (**pro).WriteAttrib(pro, index, data); -} - -static GLvoid -fetch_output_float(struct gl2_program_intf **pro, GLuint index, GLuint attr, - GLuint i, arbvs_stage_data * store) -{ - (**pro).UpdateFixedAttrib(pro, index, &store->outputs[attr].data[i], 0, - sizeof(GLfloat), GL_FALSE); -} - -static void -fetch_output_vec4(struct gl2_program_intf **pro, GLuint index, GLuint attr, - GLuint i, GLuint offset, arbvs_stage_data * store) -{ - (**pro).UpdateFixedAttrib(pro, index, &store->outputs[attr].data[i], - offset, 4 * sizeof(GLfloat), GL_FALSE); -} - -static GLboolean -run_arb_vertex_shader(GLcontext * ctx, struct tnl_pipeline_stage *stage) -{ - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *vb = &tnl->vb; - arbvs_stage_data *store = ARBVS_STAGE_DATA(stage); - struct gl2_program_intf **pro; - GLsizei i, j; - -#if 00 - if (!ctx->ShaderObjects._VertexShaderPresent) - return GL_TRUE; -#else - return GL_TRUE; -#endif - - pro = ctx->ShaderObjects.CurrentProgram; - (**pro).UpdateFixedUniforms(pro); - - for (i = 0; i < vb->Count; i++) { - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_VERTEX, _TNL_ATTRIB_POS, i, - vb); - fetch_input_vec3(pro, SLANG_VERTEX_FIXED_NORMAL, _TNL_ATTRIB_NORMAL, i, - vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_COLOR, _TNL_ATTRIB_COLOR0, i, - vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_SECONDARYCOLOR, - _TNL_ATTRIB_COLOR1, i, vb); - fetch_input_float(pro, SLANG_VERTEX_FIXED_FOGCOORD, _TNL_ATTRIB_FOG, i, - vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD0, - _TNL_ATTRIB_TEX0, i, vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD1, - _TNL_ATTRIB_TEX1, i, vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD2, - _TNL_ATTRIB_TEX2, i, vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD3, - _TNL_ATTRIB_TEX3, i, vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD4, - _TNL_ATTRIB_TEX4, i, vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD5, - _TNL_ATTRIB_TEX5, i, vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD6, - _TNL_ATTRIB_TEX6, i, vb); - fetch_input_vec4(pro, SLANG_VERTEX_FIXED_MULTITEXCOORD7, - _TNL_ATTRIB_TEX7, i, vb); - for (j = 0; j < MAX_VERTEX_ATTRIBS; j++) - fetch_gen_attrib(pro, j, i, vb); - - _slang_exec_vertex_shader(pro); - - fetch_output_vec4(pro, SLANG_VERTEX_FIXED_POSITION, VERT_RESULT_HPOS, i, - 0, store); - fetch_output_vec4(pro, SLANG_VERTEX_FIXED_FRONTCOLOR, VERT_RESULT_COL0, - i, 0, store); - fetch_output_vec4(pro, SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR, - VERT_RESULT_COL1, i, 0, store); - fetch_output_float(pro, SLANG_VERTEX_FIXED_FOGFRAGCOORD, - VERT_RESULT_FOGC, i, store); - for (j = 0; j < 8; j++) - fetch_output_vec4(pro, SLANG_VERTEX_FIXED_TEXCOORD, - VERT_RESULT_TEX0 + j, i, j, store); - fetch_output_float(pro, SLANG_VERTEX_FIXED_POINTSIZE, VERT_RESULT_PSIZ, - i, store); - fetch_output_vec4(pro, SLANG_VERTEX_FIXED_BACKCOLOR, VERT_RESULT_BFC0, - i, 0, store); - fetch_output_vec4(pro, SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR, - VERT_RESULT_BFC1, i, 0, store); - /* XXX: fetch output SLANG_VERTEX_FIXED_CLIPVERTEX */ - - for (j = 0; j < MAX_VARYING_VECTORS; j++) { - GLuint k; - - for (k = 0; k < VARYINGS_PER_VECTOR; k++) { - (**pro).UpdateVarying(pro, j * VARYINGS_PER_VECTOR + k, - &store->varyings[j].data[i][k], GL_TRUE); - } - } - } - - vb->ClipPtr = &store->outputs[VERT_RESULT_HPOS]; - vb->ClipPtr->count = vb->Count; - - vb->ColorPtr[0] = &store->outputs[VERT_RESULT_COL0]; - vb->AttribPtr[VERT_ATTRIB_COLOR0] = vb->ColorPtr[0]; - vb->ColorPtr[1] = &store->outputs[VERT_RESULT_BFC0]; - - vb->SecondaryColorPtr[0] = - vb->AttribPtr[VERT_ATTRIB_COLOR1] = &store->outputs[VERT_RESULT_COL1]; - - vb->SecondaryColorPtr[1] = &store->outputs[VERT_RESULT_BFC1]; - - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - vb->TexCoordPtr[i] = - vb->AttribPtr[VERT_ATTRIB_TEX0 + i] = - &store->outputs[VERT_RESULT_TEX0 + i]; - } - - vb->FogCoordPtr = - vb->AttribPtr[VERT_ATTRIB_FOG] = &store->outputs[VERT_RESULT_FOGC]; - - vb->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->outputs[VERT_RESULT_PSIZ]; - - for (i = 0; i < MAX_VARYING_VECTORS; i++) { - vb->VaryingPtr[i] = &store->varyings[i]; - vb->AttribPtr[_TNL_ATTRIB_GENERIC0 + i] = vb->VaryingPtr[i]; - } - - store->ormask = 0; - store->andmask = CLIP_FRUSTUM_BITS; - - if (tnl->NeedNdcCoords) { - vb->NdcPtr = - _mesa_clip_tab[vb->ClipPtr->size] (vb->ClipPtr, &store->ndc_coords, - store->clipmask, &store->ormask, - &store->andmask); - } - else { - vb->NdcPtr = NULL; - _mesa_clip_np_tab[vb->ClipPtr->size] (vb->ClipPtr, NULL, - store->clipmask, &store->ormask, - &store->andmask); - } - - if (store->andmask) - return GL_FALSE; - - vb->ClipAndMask = store->andmask; - vb->ClipOrMask = store->ormask; - vb->ClipMask = store->clipmask; - - return GL_TRUE; -} - -const struct tnl_pipeline_stage _tnl_arb_vertex_shader_stage = { - "ARB_vertex_shader", - NULL, - construct_arb_vertex_shader, - destruct_arb_vertex_shader, - validate_arb_vertex_shader, - run_arb_vertex_shader -}; - -#endif /* FEATURE_ARB_vertex_shader */ -- cgit v1.2.3 From 05dab5eaa2703cd3f16f52e9ecc4eee04b969b62 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:34:10 -0700 Subject: Checkpoint GLSL compiler work. Add new sources, remove obsolete. --- src/mesa/sources | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index 09692c6f15..6e6f1c0bfd 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -87,7 +87,6 @@ SWRAST_SOURCES = \ swrast/s_aatriangle.c \ swrast/s_accum.c \ swrast/s_alpha.c \ - swrast/s_arbshader.c \ swrast/s_atifragshader.c \ swrast/s_bitmap.c \ swrast/s_blend.c \ @@ -128,7 +127,6 @@ TNL_SOURCES = \ tnl/t_save_playback.c \ tnl/t_vb_arbprogram.c \ tnl/t_vb_arbprogram_sse.c \ - tnl/t_vb_arbshader.c\ tnl/t_vb_program.c \ tnl/t_vb_render.c \ tnl/t_vb_texgen.c \ @@ -149,8 +147,6 @@ TNL_SOURCES = \ tnl/t_vtx_eval.c \ tnl/t_vtx_exec.c - - SHADER_SOURCES = \ shader/arbprogparse.c \ shader/arbprogram.c \ @@ -165,34 +161,6 @@ SHADER_SOURCES = \ shader/shaderobjects.c \ shader/shaderobjects_3dlabs.c -SLANG_C_SOURCES = \ - shader/slang/MachineIndependent/preprocessor/atom.c \ - shader/slang/MachineIndependent/preprocessor/cpp.c \ - shader/slang/MachineIndependent/preprocessor/cppstruct.c \ - shader/slang/MachineIndependent/preprocessor/memory.c \ - shader/slang/MachineIndependent/preprocessor/scanner.c \ - shader/slang/MachineIndependent/preprocessor/symbols.c \ - shader/slang/MachineIndependent/preprocessor/tokens.c - -SLANG_CPP_SOURCES = \ - shader/slang/slang_mesa.cpp \ - shader/slang/MachineIndependent/Gen_glslang.cpp \ - shader/slang/MachineIndependent/Gen_glslang_tab.cpp \ - shader/slang/MachineIndependent/InfoSink.cpp \ - shader/slang/MachineIndependent/Initialize.cpp \ - shader/slang/MachineIndependent/Intermediate.cpp \ - shader/slang/MachineIndependent/intermOut.cpp \ - shader/slang/MachineIndependent/IntermTraverse.cpp \ - shader/slang/MachineIndependent/parseConst.cpp \ - shader/slang/MachineIndependent/ParseHelper.cpp \ - shader/slang/MachineIndependent/PoolAlloc.cpp \ - shader/slang/MachineIndependent/QualifierAlive.cpp \ - shader/slang/MachineIndependent/RemoveTree.cpp \ - shader/slang/MachineIndependent/ShaderLang.cpp \ - shader/slang/MachineIndependent/SymbolTable.cpp \ - shader/slang/OGLCompilersDLL/Initialisation.cpp \ - shader/slang/OSDependent/Linux/ossource.cpp - SLANG_SOURCES = \ shader/slang/slang_analyse.c \ shader/slang/slang_assemble.c \ @@ -200,18 +168,24 @@ SLANG_SOURCES = \ shader/slang/slang_assemble_conditional.c \ shader/slang/slang_assemble_constructor.c \ shader/slang/slang_assemble_typeinfo.c \ + shader/slang/slang_codegen.c \ shader/slang/slang_compile.c \ shader/slang/slang_compile_function.c \ shader/slang/slang_compile_operation.c \ shader/slang/slang_compile_struct.c \ shader/slang/slang_compile_variable.c \ + shader/slang/slang_emit.c \ + shader/slang/slang_error.c \ shader/slang/slang_execute.c \ shader/slang/slang_export.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ shader/slang/slang_link.c \ + shader/slang/slang_link2.c \ shader/slang/slang_preprocess.c \ + shader/slang/slang_simplify.c \ shader/slang/slang_storage.c \ + shader/slang/slang_print.c \ shader/slang/slang_utility.c ASM_C_SOURCES = \ @@ -324,7 +298,6 @@ SOLO_SOURCES = \ $(SWRAST_SETUP_SOURCES) \ $(ASM_C_SOURCES) \ $(SLANG_SOURCES) -# $(SLANG_C_SOURCES) CORE_SOURCES = \ $(GLAPI_SOURCES) \ -- cgit v1.2.3 From aed4f2cc2c4ed071adabcea433b4fea1ab4c3448 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:36:00 -0700 Subject: Remove unused 3Dlabs code. --- .../shader/slang/OSDependent/Linux/osinclude.h | 78 ------------ .../shader/slang/OSDependent/Linux/ossource.cpp | 140 --------------------- .../shader/slang/OSDependent/Windows/osinclude.h | 68 ---------- .../shader/slang/OSDependent/Windows/ossource.cpp | 119 ------------------ 4 files changed, 405 deletions(-) delete mode 100755 src/mesa/shader/slang/OSDependent/Linux/osinclude.h delete mode 100755 src/mesa/shader/slang/OSDependent/Linux/ossource.cpp delete mode 100755 src/mesa/shader/slang/OSDependent/Windows/osinclude.h delete mode 100755 src/mesa/shader/slang/OSDependent/Windows/ossource.cpp (limited to 'src') diff --git a/src/mesa/shader/slang/OSDependent/Linux/osinclude.h b/src/mesa/shader/slang/OSDependent/Linux/osinclude.h deleted file mode 100755 index 8b20b961c0..0000000000 --- a/src/mesa/shader/slang/OSDependent/Linux/osinclude.h +++ /dev/null @@ -1,78 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef __OSINCLUDE_H -#define __OSINCLUDE_H - -// -// This file contains any Linux specific functions. -// - -/* WORKAROUND: linux builds seem not to define "linux" */ -/*#if !(defined(linux)) -#error Trying to include a Linux specific file in a non-Linux build. -#endif*/ - -#include -#include -#include -#include -#include "Include/InitializeGlobals.h" -#include "Include/PoolAlloc.h" - -#define _vsnprintf vsnprintf - -void DetachThreadLinux(void *); - -// -// Thread Local Storage Operations -// -typedef unsigned int OS_TLSIndex; -#define OS_INVALID_TLS_INDEX 0xFFFFFFFF - -OS_TLSIndex OS_AllocTLSIndex(); -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue); -bool OS_FreeTLSIndex(OS_TLSIndex nIndex); - - -inline void * OS_GetTLSValue(OS_TLSIndex nIndex) -{ - // - // This function should return 0 if nIndex is invalid. - // - assert(nIndex != OS_INVALID_TLS_INDEX); - return (pthread_getspecific(nIndex)); -} - -#endif // __OSINCLUDE_H diff --git a/src/mesa/shader/slang/OSDependent/Linux/ossource.cpp b/src/mesa/shader/slang/OSDependent/Linux/ossource.cpp deleted file mode 100755 index 4bcd66a315..0000000000 --- a/src/mesa/shader/slang/OSDependent/Linux/ossource.cpp +++ /dev/null @@ -1,140 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -// -// This file contains the Linux specific functions -// -#include "osinclude.h" -#include "Initialisation.h" - -/*#if !(defined(linux)) -#error Trying to build a Linux specific file in a non-Linux build. -#endif*/ - -// -// Thread cleanup -// - -// -// Wrapper for Linux call to DetachThread. This is required as pthread_cleanup_push() expects -// the cleanup routine to return void. -// -void DetachThreadLinux(void *) -{ - DetachThread(); -} - - -// -// Registers cleanup handler, sets cancel type and state, and excecutes the thread specific -// cleanup handler. This function will be called in the Standalone.cpp for regression -// testing. When OpenGL applications are run with the driver code, Linux OS does the -// thread cleanup. -// -void OS_CleanupThreadData(void) -{ - int old_cancel_state, old_cancel_type; - void *cleanupArg = NULL; - - // - // Set thread cancel state and push cleanup handler. - // - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state); - pthread_cleanup_push(DetachThreadLinux, (void *) cleanupArg); - - // - // Put the thread in deferred cancellation mode. - // - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_cancel_type); - - // - // Pop cleanup handler and execute it prior to unregistering the cleanup handler. - // - pthread_cleanup_pop(1); - - // - // Restore the thread's previous cancellation mode. - // - pthread_setcanceltype(old_cancel_state, NULL); -} - - -// -// Thread Local Storage Operations -// -OS_TLSIndex OS_AllocTLSIndex() -{ - pthread_key_t pPoolIndex; - - // - // Create global pool key. - // - if ((pthread_key_create(&pPoolIndex, NULL)) != 0) { - assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); - return false; - } - else - return pPoolIndex; -} - - -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (pthread_setspecific(nIndex, lpvValue) == 0) - return true; - else - return false; -} - - -bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - // - // Delete the global pool key. - // - if (pthread_key_delete(nIndex) == 0) - return true; - else - return false; -} diff --git a/src/mesa/shader/slang/OSDependent/Windows/osinclude.h b/src/mesa/shader/slang/OSDependent/Windows/osinclude.h deleted file mode 100755 index 97a9e9f3df..0000000000 --- a/src/mesa/shader/slang/OSDependent/Windows/osinclude.h +++ /dev/null @@ -1,68 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef __OSINCLUDE_H -#define __OSINCLUDE_H - -// -// This file contains contains the window's specific datatypes and -// declares any windows specific functions. -// - -#if !(defined(_WIN32) || defined(_WIN64)) -#error Trying to include a windows specific file in a non windows build. -#endif - -#define STRICT -#define VC_EXTRALEAN 1 -#include -#include - -// -// Thread Local Storage Operations -// -typedef DWORD OS_TLSIndex; -#define OS_INVALID_TLS_INDEX (TLS_OUT_OF_INDEXES) - -OS_TLSIndex OS_AllocTLSIndex(); -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue); -bool OS_FreeTLSIndex(OS_TLSIndex nIndex); - -inline void* OS_GetTLSValue(OS_TLSIndex nIndex) -{ - assert(nIndex != OS_INVALID_TLS_INDEX); - return TlsGetValue(nIndex); -} - -#endif // __OSINCLUDE_H diff --git a/src/mesa/shader/slang/OSDependent/Windows/ossource.cpp b/src/mesa/shader/slang/OSDependent/Windows/ossource.cpp deleted file mode 100755 index 35d086614c..0000000000 --- a/src/mesa/shader/slang/OSDependent/Windows/ossource.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "Initialisation.h" - -// -// This file contains contains the window's specific functions -// - -#if !(defined(_WIN32) || defined(_WIN64)) -#error Trying to build a windows specific file in a non windows build. -#endif - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - if (!InitProcess()) - return false; - break; - case DLL_THREAD_ATTACH: - if (!InitThread()) - return false; - break; - - case DLL_THREAD_DETACH: - - if (!DetachThread()) - return false; - break; - - case DLL_PROCESS_DETACH: - - DetachProcess(); - break; - - default: - assert(0 && "DllMain(): Reason for calling DLL Main is unknown"); - return false; - } - - return true; -} - -// -// Thread Local Storage Operations -// -OS_TLSIndex OS_AllocTLSIndex() -{ - DWORD dwIndex = TlsAlloc(); - if (dwIndex == TLS_OUT_OF_INDEXES) { - assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); - return (OS_INVALID_TLS_INDEX); - } - - return dwIndex; -} - - -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -{ - if (nIndex == OS_INVALID_TLS_INDEX) - { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (TlsSetValue(nIndex, lpvValue)) - return true; - else - return false; -} - - -bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (TlsFree(nIndex)) - return true; - else - return false; -} - -- cgit v1.2.3 From 33ae886bbd1443412799b506a49dea5b11040527 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:36:26 -0700 Subject: Remove unused 3Dlabs code. --- src/mesa/shader/slang/Include/BaseTypes.h | 133 - src/mesa/shader/slang/Include/Common.h | 288 -- src/mesa/shader/slang/Include/ConstantUnion.h | 50 - src/mesa/shader/slang/Include/InfoSink.h | 135 - src/mesa/shader/slang/Include/InitializeGlobals.h | 43 - .../shader/slang/Include/InitializeParseContext.h | 44 - src/mesa/shader/slang/Include/PoolAlloc.h | 346 -- src/mesa/shader/slang/Include/ResourceLimits.h | 61 - src/mesa/shader/slang/Include/ShHandle.h | 177 - src/mesa/shader/slang/Include/Types.h | 297 -- src/mesa/shader/slang/Include/intermediate.h | 516 --- .../slang/MachineIndependent/Gen_glslang.cpp | 2942 ------------- .../slang/MachineIndependent/Gen_glslang_tab.cpp | 4354 -------------------- .../shader/slang/MachineIndependent/InfoSink.cpp | 107 - .../shader/slang/MachineIndependent/Initialize.cpp | 948 ----- .../shader/slang/MachineIndependent/Initialize.h | 58 - .../slang/MachineIndependent/IntermTraverse.cpp | 243 -- .../slang/MachineIndependent/Intermediate.cpp | 2110 ---------- src/mesa/shader/slang/MachineIndependent/MMap.h | 84 - .../slang/MachineIndependent/ParseHelper.cpp | 1452 ------- .../shader/slang/MachineIndependent/ParseHelper.h | 143 - .../shader/slang/MachineIndependent/PoolAlloc.cpp | 349 -- .../slang/MachineIndependent/QualifierAlive.cpp | 91 - .../slang/MachineIndependent/QualifierAlive.h | 35 - .../shader/slang/MachineIndependent/RemoveTree.cpp | 98 - .../shader/slang/MachineIndependent/RemoveTree.h | 35 - .../shader/slang/MachineIndependent/ShaderLang.cpp | 607 --- .../slang/MachineIndependent/SymbolTable.cpp | 235 -- .../shader/slang/MachineIndependent/SymbolTable.h | 320 -- src/mesa/shader/slang/MachineIndependent/glslang.l | 614 --- src/mesa/shader/slang/MachineIndependent/glslang.y | 2009 --------- .../shader/slang/MachineIndependent/glslang_tab.h | 260 -- .../shader/slang/MachineIndependent/intermOut.cpp | 496 --- .../slang/MachineIndependent/localintermediate.h | 91 - .../shader/slang/MachineIndependent/parseConst.cpp | 344 -- .../slang/MachineIndependent/preprocessor/atom.c | 768 ---- .../slang/MachineIndependent/preprocessor/atom.h | 96 - .../MachineIndependent/preprocessor/compile.h | 132 - .../slang/MachineIndependent/preprocessor/cpp.c | 1037 ----- .../slang/MachineIndependent/preprocessor/cpp.h | 119 - .../preprocessor/cpp_comment_fix.c | 76 - .../MachineIndependent/preprocessor/cppstruct.c | 185 - .../slang/MachineIndependent/preprocessor/memory.c | 191 - .../slang/MachineIndependent/preprocessor/memory.h | 89 - .../slang/MachineIndependent/preprocessor/parser.h | 126 - .../MachineIndependent/preprocessor/preprocess.h | 84 - .../MachineIndependent/preprocessor/scanner.c | 789 ---- .../MachineIndependent/preprocessor/scanner.h | 118 - .../MachineIndependent/preprocessor/slglobals.h | 115 - .../MachineIndependent/preprocessor/symbols.c | 318 -- .../MachineIndependent/preprocessor/symbols.h | 145 - .../slang/MachineIndependent/preprocessor/tokens.c | 462 --- .../slang/MachineIndependent/preprocessor/tokens.h | 122 - src/mesa/shader/slang/MachineIndependent/unistd.h | 1 - .../slang/OGLCompilersDLL/Initialisation.cpp | 151 - .../shader/slang/OGLCompilersDLL/Initialisation.h | 47 - src/mesa/shader/slang/Public/ShaderLang.h | 212 - src/mesa/shader/slang/Public/ShaderLangExt.h | 57 - 58 files changed, 25555 deletions(-) delete mode 100755 src/mesa/shader/slang/Include/BaseTypes.h delete mode 100755 src/mesa/shader/slang/Include/Common.h delete mode 100755 src/mesa/shader/slang/Include/ConstantUnion.h delete mode 100755 src/mesa/shader/slang/Include/InfoSink.h delete mode 100755 src/mesa/shader/slang/Include/InitializeGlobals.h delete mode 100755 src/mesa/shader/slang/Include/InitializeParseContext.h delete mode 100755 src/mesa/shader/slang/Include/PoolAlloc.h delete mode 100755 src/mesa/shader/slang/Include/ResourceLimits.h delete mode 100755 src/mesa/shader/slang/Include/ShHandle.h delete mode 100755 src/mesa/shader/slang/Include/Types.h delete mode 100755 src/mesa/shader/slang/Include/intermediate.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/Gen_glslang.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/Gen_glslang_tab.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/InfoSink.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/Initialize.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/Initialize.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/IntermTraverse.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/Intermediate.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/MMap.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/ParseHelper.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/ParseHelper.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/PoolAlloc.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/QualifierAlive.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/QualifierAlive.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/RemoveTree.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/RemoveTree.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/ShaderLang.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/SymbolTable.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/SymbolTable.h delete mode 100644 src/mesa/shader/slang/MachineIndependent/glslang.l delete mode 100644 src/mesa/shader/slang/MachineIndependent/glslang.y delete mode 100755 src/mesa/shader/slang/MachineIndependent/glslang_tab.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/intermOut.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/localintermediate.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/parseConst.cpp delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/atom.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/atom.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/compile.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.h delete mode 100644 src/mesa/shader/slang/MachineIndependent/preprocessor/cpp_comment_fix.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/cppstruct.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/memory.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/memory.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/parser.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/preprocess.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/slglobals.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.c delete mode 100755 src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.h delete mode 100755 src/mesa/shader/slang/MachineIndependent/unistd.h delete mode 100755 src/mesa/shader/slang/OGLCompilersDLL/Initialisation.cpp delete mode 100755 src/mesa/shader/slang/OGLCompilersDLL/Initialisation.h delete mode 100755 src/mesa/shader/slang/Public/ShaderLang.h delete mode 100755 src/mesa/shader/slang/Public/ShaderLangExt.h (limited to 'src') diff --git a/src/mesa/shader/slang/Include/BaseTypes.h b/src/mesa/shader/slang/Include/BaseTypes.h deleted file mode 100755 index c5bf8de17f..0000000000 --- a/src/mesa/shader/slang/Include/BaseTypes.h +++ /dev/null @@ -1,133 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _BASICTYPES_INCLUDED_ -#define _BASICTYPES_INCLUDED_ - -// -// Basic type. Arrays, vectors, etc., are orthogonal to this. -// -enum TBasicType { - EbtVoid, - EbtFloat, - EbtInt, - EbtBool, - EbtSampler1D, - EbtSampler2D, - EbtSampler3D, - EbtSamplerCube, - EbtSampler1DShadow, - EbtSampler2DShadow, - EbtStruct, - EbtAddress -}; - -__inline bool IsSampler(TBasicType type) -{ - return type >= EbtSampler1D && type <= EbtSampler2DShadow; -} - -// -// Qualifiers and built-ins. These are mainly used to see what can be read -// or written, and by the machine dependent translator to know which registers -// to allocate variables in. Since built-ins tend to go to different registers -// than varying or uniform, it makes sense they are peers, not sub-classes. -// -enum TQualifier { - EvqTemporary, // For temporaries (within a function), read/write - EvqGlobal, // For globals read/write - EvqConst, // User defined constants and non-output parameters in functions - EvqAttribute, // Readonly - EvqVaryingIn, // readonly, fragment shaders only - EvqVaryingOut, // vertex shaders only read/write - EvqUniform, // Readonly, vertex and fragment - - // pack/unpack input and output - EvqInput, - EvqOutput, - - // parameters - EvqIn, - EvqOut, - EvqInOut, - EvqConstReadOnly, - - // built-ins written by vertex shader - EvqPosition, - EvqPointSize, - EvqClipVertex, - - // built-ins read by fragment shader - EvqFace, - EvqFragCoord, - - // built-ins written by fragment shader - EvqFragColor, - EvqFragDepth, - - // end of list - EvqLast -}; - -// -// This is just for debug print out, carried along with the definitions above. -// -__inline const char* getQualifierString(TQualifier q) -{ - switch (q) { - case EvqTemporary: return "Temporary"; break; - case EvqGlobal: return "Global"; break; - case EvqConst: return "const"; break; - case EvqConstReadOnly: return "const"; break; - case EvqAttribute: return "attribute"; break; - case EvqVaryingIn: return "varying"; break; - case EvqVaryingOut: return "varying"; break; - case EvqUniform: return "uniform"; break; - case EvqIn: return "in"; break; - case EvqOut: return "out"; break; - case EvqInOut: return "inout"; break; - case EvqInput: return "input"; break; - case EvqOutput: return "output"; break; - case EvqPosition: return "Position"; break; - case EvqPointSize: return "PointSize"; break; - case EvqClipVertex: return "ClipVertex"; break; - case EvqFace: return "Face"; break; - case EvqFragCoord: return "FragCoord"; break; - case EvqFragColor: return "FragColor"; break; - case EvqFragDepth: return "FragDepth"; break; - default: return "unknown qualifier"; - } -} - -#endif // _BASICTYPES_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/Common.h b/src/mesa/shader/slang/Include/Common.h deleted file mode 100755 index 4a9c0d34a7..0000000000 --- a/src/mesa/shader/slang/Include/Common.h +++ /dev/null @@ -1,288 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _COMMON_INCLUDED_ -#define _COMMON_INCLUDED_ - -#ifdef _WIN32 - #include -#elif defined (solaris) - #include - #define UINT_PTR uintptr_t -#else - #include - #define UINT_PTR uintptr_t -#endif - -/* windows only pragma */ -#ifdef _MSC_VER - #pragma warning(disable : 4786) // Don't warn about too long identifiers - #pragma warning(disable : 4514) // unused inline method - #pragma warning(disable : 4201) // nameless union -#endif - -// -// Doing the push and pop below for warnings does not leave the warning state -// the way it was. This seems like a defect in the compiler. We would like -// to do this, but since it does not work correctly right now, it is turned -// off. -// -//??#pragma warning(push, 3) - - #include - #include - #include - #include - #include - #include - -//??#pragma warning(pop) - -typedef int TSourceLoc; - -#include -#include "PoolAlloc.h" - -// -// Put POOL_ALLOCATOR_NEW_DELETE in base classes to make them use this scheme. -// -#define POOL_ALLOCATOR_NEW_DELETE(A) \ - void* operator new(size_t s) { return (A).allocate(s); } \ - void* operator new(size_t, void *_Where) { return (_Where); } \ - void operator delete(void*) { } \ - void operator delete(void *, void *) { } \ - void* operator new[](size_t s) { return (A).allocate(s); } \ - void* operator new[](size_t, void *_Where) { return (_Where); } \ - void operator delete[](void*) { } \ - void operator delete[](void *, void *) { } - -#ifdef _M_AMD64 -// -// The current version of STL that comes with the PSDK (as required for the AMD64 compiler) -// has a very old version of the STL which is very out of date. As a result, various additions needed -// making to it to get the compilers compiling! -// - -// -// A new version of the Map template class - the operator[] now returns the correct type reference -// -template , class _A = std::allocator<_Ty> > -class TBaseMap : public std::map <_K, _Ty, _Pr, _A > -{ -public : - _Ty& operator[] (const _K& _Kv) - { - iterator _P = insert(value_type(_Kv, _Ty())).first; - return ((*_P).second); - } - - explicit TBaseMap(const _Pr& _Pred = _Pr(), const _A& _Al = _A()) - : std::map<_K, _Ty, _Pr, _A >(_Pred, _Al) {}; - - -}; - -// -// A new version of the List template class - the begin function now checks for NULL to eliminate access violations -// -template > -class TBaseList : public std::list <_Ty, _A > -{ -public : - iterator begin() - { - return (iterator(_Head == 0 ? 0 : _Acc::_Next(_Head))); - } - - const_iterator begin() const - { - return (const_iterator(_Head == 0 ? 0 : _Acc::_Next(_Head))); - } - - // - // These are required - apparently! - // - explicit TBaseList(const _A& _Al = _A()) - : std::list<_Ty, _A >(_Al) {}; - explicit TBaseList(size_type _N, const _Ty& _V = _Ty(), const _A& _Al = _A()) - : std::list<_Ty, _A >(N, _V, _Al) {}; - -}; - -// -// A new version of the set class - this defines the required insert method -// -template, class _A = std::allocator<_K> > -class TBaseSet : public std::set <_K, _Pr, _A> -{ -public : - - // - // This method wasn't defined - // - template - void insert(_Iter _First, _Iter _Last) - { // insert [_First, _Last) - for (; _First != _Last; ++_First) - this->insert(*_First); - } - - // - // These methods were not resolved if I declared the previous method?? - // - _Pairib insert(const value_type& _X) - { - _Imp::_Pairib _Ans = _Tr.insert(_X); - return (_Pairib(_Ans.first, _Ans.second)); - } - - iterator insert(iterator _P, const value_type& _X) - { - return (_Tr.insert((_Imp::iterator&)_P, _X)); - } - - void insert(_It _F, _It _L) - { - for (; _F != _L; ++_F) - _Tr.insert(*_F); - } - -}; - -#else - -#define TBaseMap std::map -#define TBaseList std::list -#define TBaseSet std::set - -#endif //_M_AMD64 - -// -// Pool version of string. -// -typedef pool_allocator TStringAllocator; -typedef std::basic_string , TStringAllocator > TString; -inline TString* NewPoolTString(const char* s) -{ - void* memory = GlobalPoolAllocator.allocate(sizeof(TString)); - return new(memory) TString(s); -} - -// -// Pool allocator versions of vectors, lists, and maps -// -template class TVector : public std::vector > { -public: - typedef typename std::vector >::size_type size_type; - TVector() : std::vector >() {} - TVector(const pool_allocator& a) : std::vector >(a) {} - TVector(size_type i): std::vector >(i) {} -}; - -template class TList : public TBaseList > { -public: - typedef typename TBaseList >::size_type size_type; - TList() : TBaseList >() {} - TList(const pool_allocator& a) : TBaseList >(a) {} - TList(size_type i): TBaseList >(i) {} -}; - -// This is called TStlSet, because TSet is taken by an existing compiler class. -template class TStlSet : public std::set > { - // No pool allocator versions of constructors in std::set. -}; - - -template > class TMap : - public TBaseMap > > { -public: - typedef pool_allocator > tAllocator; - - TMap() : TBaseMap() {} -/* - TMap(const tAllocator& a) : TBaseMap(key_compare(), a) {} -*/ - TMap(const tAllocator& a) : TBaseMap() {} -}; - -// -// Persistent string memory. Should only be used for strings that survive -// across compiles/links. -// -typedef std::basic_string TPersistString; - -// -// templatized min and max functions. -// -template T Min(const T a, const T b) { return a < b ? a : b; } -template T Max(const T a, const T b) { return a > b ? a : b; } - -// -// Create a TString object from an integer. -// -inline const TString String(const int i, const int base = 10) -{ - char text[16]; // 32 bit ints are at most 10 digits in base 10 - - #ifdef _WIN32 - itoa(i, text, base); - #else - // we assume base 10 for all cases - sprintf(text, "%d", i); - #endif - - return text; -} - -const unsigned int SourceLocLineMask = 0xffff; -const unsigned int SourceLocStringShift = 16; - -__inline TPersistString FormatSourceLoc(const TSourceLoc loc) -{ - char locText[64]; - - int string = loc >> SourceLocStringShift; - int line = loc & SourceLocLineMask; - - if (line) - sprintf(locText, "%d:%d", string, line); - else - sprintf(locText, "%d:? ", string); - - return TPersistString(locText); -} -typedef TMap TPragmaTable; -typedef TMap::tAllocator TPragmaTableAllocator; - -#endif // _COMMON_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/ConstantUnion.h b/src/mesa/shader/slang/Include/ConstantUnion.h deleted file mode 100755 index a60ae114f6..0000000000 --- a/src/mesa/shader/slang/Include/ConstantUnion.h +++ /dev/null @@ -1,50 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _CONSTANT_UNION_INCLUDED_ -#define _CONSTANT_UNION_INCLUDED_ - - -class constUnion { -public: - - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - union { - int iConst; // used for ivec - bool bConst; // used for bvec - float fConst; // used for vec, mat - } ; -}; - -#endif // _CONSTANT_UNION_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/InfoSink.h b/src/mesa/shader/slang/Include/InfoSink.h deleted file mode 100755 index 14d44a34ad..0000000000 --- a/src/mesa/shader/slang/Include/InfoSink.h +++ /dev/null @@ -1,135 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _INFOSINK_INCLUDED_ -#define _INFOSINK_INCLUDED_ - -#include "../Include/Common.h" -#include - -// -// TPrefixType is used to centralize how info log messages start. -// See below. -// -enum TPrefixType { - EPrefixNone, - EPrefixWarning, - EPrefixError, - EPrefixInternalError, - EPrefixUnimplemented -}; - -enum TOutputStream { - ENull = 0, - EDebugger = 0x01, - EStdOut = 0x02, - EString = 0x04 -}; -// -// Encapsulate info logs for all objects that have them. -// -// The methods are a general set of tools for getting a variety of -// messages and types inserted into the log. -// -class TInfoSinkBase { -public: - TInfoSinkBase() : outputStream(4) {} - void erase() { sink.erase(); } - TInfoSinkBase& operator<<(const TPersistString& t) { append(t); return *this; } - TInfoSinkBase& operator<<(char c) { append(1, c); return *this; } - TInfoSinkBase& operator<<(const char* s) { append(s); return *this; } - TInfoSinkBase& operator<<(int n) { append(String(n)); return *this; } - TInfoSinkBase& operator<<(const unsigned int n) { append(String(n)); return *this; } - TInfoSinkBase& operator<<(float n) { char buf[40]; - sprintf(buf, (fabs(n) > 1e-8 && fabs(n) < 1e8) || n == 0.0f ? - "%f" : "%g", n); - append(buf); - return *this; } - TInfoSinkBase& operator+(const TPersistString& t) { append(t); return *this; } - TInfoSinkBase& operator+(const TString& t) { append(t); return *this; } - TInfoSinkBase& operator<<(const TString& t) { append(t); return *this; } - TInfoSinkBase& operator+(const char* s) { append(s); return *this; } - const char* c_str() const { return sink.c_str(); } - void prefix(TPrefixType message) { - switch(message) { - case EPrefixNone: break; - case EPrefixWarning: append("WARNING: "); break; - case EPrefixError: append("ERROR: "); break; - case EPrefixInternalError: append("INTERNAL ERROR: "); break; - case EPrefixUnimplemented: append("UNIMPLEMENTED: "); break; - default: append("UNKOWN ERROR: "); break; - } - } - void location(TSourceLoc loc) { - append(FormatSourceLoc(loc).c_str()); - append(": "); - } - void message(TPrefixType message, const char* s) { - prefix(message); - append(s); - append("\n"); - } - void message(TPrefixType message, const char* s, TSourceLoc loc) { - prefix(message); - location(loc); - append(s); - append("\n"); - } - - void setOutputStream(int output = 4) - { - outputStream = output; - } - -protected: - void append(const char *s); - - void append(int count, char c); - void append(const TPersistString& t); - void append(const TString& t); - - void checkMem(size_t growth) { if (sink.capacity() < sink.size() + growth + 2) - sink.reserve(sink.capacity() + sink.capacity() / 2); } - void appendToStream(const char* s); - TPersistString sink; - int outputStream; -}; - -class TInfoSink { -public: - TInfoSinkBase info; - TInfoSinkBase debug; -}; - -#endif // _INFOSINK_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/InitializeGlobals.h b/src/mesa/shader/slang/Include/InitializeGlobals.h deleted file mode 100755 index 3d9a42a2b5..0000000000 --- a/src/mesa/shader/slang/Include/InitializeGlobals.h +++ /dev/null @@ -1,43 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef __INITIALIZE_GLOBALS_INCLUDED_ -#define __INITIALIZE_GLOBALS_INCLUDED_ - -void InitializeGlobalPools(); -void FreeGlobalPools(); -bool InitializePoolIndex(); -void FreePoolIndex(); - -#endif // __INITIALIZE_GLOBALS_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/InitializeParseContext.h b/src/mesa/shader/slang/Include/InitializeParseContext.h deleted file mode 100755 index 7d565b3132..0000000000 --- a/src/mesa/shader/slang/Include/InitializeParseContext.h +++ /dev/null @@ -1,44 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef __INITIALIZE_PARSE_CONTEXT_INCLUDED_ -#define __INITIALIZE_PARSE_CONTEXT_INCLUDED_ -#include "osinclude.h" - -bool InitializeParseContextIndex(); -bool InitializeGlobalParseContext(); -bool FreeParseContext(); -bool FreeParseContextIndex(); - -#endif // __INITIALIZE_PARSE_CONTEXT_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/PoolAlloc.h b/src/mesa/shader/slang/Include/PoolAlloc.h deleted file mode 100755 index e224d3b867..0000000000 --- a/src/mesa/shader/slang/Include/PoolAlloc.h +++ /dev/null @@ -1,346 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _POOLALLOC_INCLUDED_ -#define _POOLALLOC_INCLUDED_ - -#ifdef _DEBUG -# define GUARD_BLOCKS // define to enable guard block sanity checking -#endif - -// -// This header defines an allocator that can be used to efficiently -// allocate a large number of small requests for heap memory, with the -// intention that they are not individually deallocated, but rather -// collectively deallocated at one time. -// -// This simultaneously -// -// * Makes each individual allocation much more efficient; the -// typical allocation is trivial. -// * Completely avoids the cost of doing individual deallocation. -// * Saves the trouble of tracking down and plugging a large class of leaks. -// -// Individual classes can use this allocator by supplying their own -// new and delete methods. -// -// STL containers can use this allocator by using the pool_allocator -// class as the allocator (second) template argument. -// - -#include -#include - -// If we are using guard blocks, we must track each indivual -// allocation. If we aren't using guard blocks, these -// never get instantiated, so won't have any impact. -// - -class TAllocation { -public: - TAllocation(size_t size, unsigned char* mem, TAllocation* prev = 0) : - size(size), mem(mem), prevAlloc(prev) { - // Allocations are bracketed: - // [allocationHeader][initialGuardBlock][userData][finalGuardBlock] - // This would be cleaner with if (guardBlockSize)..., but that - // makes the compiler print warnings about 0 length memsets, - // even with the if() protecting them. -# ifdef GUARD_BLOCKS - memset(preGuard(), guardBlockBeginVal, guardBlockSize); - memset(data(), userDataFill, size); - memset(postGuard(), guardBlockEndVal, guardBlockSize); -# endif - } - - void check() const { - checkGuardBlock(preGuard(), guardBlockBeginVal, "before"); - checkGuardBlock(postGuard(), guardBlockEndVal, "after"); - } - - void checkAllocList() const; - - // Return total size needed to accomodate user buffer of 'size', - // plus our tracking data. - inline static size_t allocationSize(size_t size) { - return size + 2 * guardBlockSize + headerSize(); - } - - // Offset from surrounding buffer to get to user data buffer. - inline static unsigned char* offsetAllocation(unsigned char* m) { - return m + guardBlockSize + headerSize(); - } - -private: - void checkGuardBlock(unsigned char* blockMem, unsigned char val, char* locText) const; - - // Find offsets to pre and post guard blocks, and user data buffer - unsigned char* preGuard() const { return mem + headerSize(); } - unsigned char* data() const { return preGuard() + guardBlockSize; } - unsigned char* postGuard() const { return data() + size; } - - size_t size; // size of the user data area - unsigned char* mem; // beginning of our allocation (pts to header) - TAllocation* prevAlloc; // prior allocation in the chain - - // Support MSVC++ 6.0 - const static unsigned char guardBlockBeginVal; - const static unsigned char guardBlockEndVal; - const static unsigned char userDataFill; - -# ifdef GUARD_BLOCKS - const static size_t guardBlockSize; - inline static size_t headerSize() { return sizeof(TAllocation); } -# else - const static size_t guardBlockSize; - inline static size_t headerSize() { return 0; } -# endif -}; - -// -// There are several stacks. One is to track the pushing and popping -// of the user, and not yet implemented. The others are simply a -// repositories of free pages or used pages. -// -// Page stacks are linked together with a simple header at the beginning -// of each allocation obtained from the underlying OS. Multi-page allocations -// are returned to the OS. Individual page allocations are kept for future -// re-use. -// -// The "page size" used is not, nor must it match, the underlying OS -// page size. But, having it be about that size or equal to a set of -// pages is likely most optimal. -// -class TPoolAllocator { -public: - TPoolAllocator(bool global = false, int growthIncrement = 8*1024, int allocationAlignment = 16); - - // - // Don't call the destructor just to free up the memory, call pop() - // - ~TPoolAllocator(); - - // - // Call push() to establish a new place to pop memory too. Does not - // have to be called to get things started. - // - void push(); - - // - // Call pop() to free all memory allocated since the last call to push(), - // or if no last call to push, frees all memory since first allocation. - // - void pop(); - - // - // Call popAll() to free all memory allocated. - // - void popAll(); - - // - // Call allocate() to actually acquire memory. Returns 0 if no memory - // available, otherwise a properly aligned pointer to 'numBytes' of memory. - // - void* allocate(size_t numBytes); - - // - // There is no deallocate. The point of this class is that - // deallocation can be skipped by the user of it, as the model - // of use is to simultaneously deallocate everything at once - // by calling pop(), and to not have to solve memory leak problems. - // - -protected: - friend struct tHeader; - - struct tHeader { - tHeader(tHeader* nextPage, size_t pageCount) : -#ifdef GUARD_BLOCKS - lastAllocation(0), -#endif - nextPage(nextPage), pageCount(pageCount) { } - - ~tHeader() { -#ifdef GUARD_BLOCKS - if (lastAllocation) - lastAllocation->checkAllocList(); -#endif - } - - tHeader* nextPage; - size_t pageCount; -#ifdef GUARD_BLOCKS - TAllocation* lastAllocation; -#endif - }; - - struct tAllocState { - size_t offset; - tHeader* page; - }; - typedef std::vector tAllocStack; - - // Track allocations if and only if we're using guard blocks - void* initializeAllocation(tHeader* block, unsigned char* memory, size_t numBytes) { -# ifdef GUARD_BLOCKS - new(memory) TAllocation(numBytes, memory, block->lastAllocation); - block->lastAllocation = reinterpret_cast(memory); -# endif - - // This is optimized entirely away if GUARD_BLOCKS is not defined. - return TAllocation::offsetAllocation(memory); - } - - bool global; // should be true if this object is globally scoped - size_t pageSize; // granularity of allocation from the OS - size_t alignment; // all returned allocations will be aligned at - // this granularity, which will be a power of 2 - size_t alignmentMask; - size_t headerSkip; // amount of memory to skip to make room for the - // header (basically, size of header, rounded - // up to make it aligned - size_t currentPageOffset; // next offset in top of inUseList to allocate from - tHeader* freeList; // list of popped memory - tHeader* inUseList; // list of all memory currently being used - tAllocStack stack; // stack of where to allocate from, to partition pool - - int numCalls; // just an interesting statistic - size_t totalBytes; // just an interesting statistic -private: - TPoolAllocator& operator=(const TPoolAllocator&); // dont allow assignment operator - TPoolAllocator(const TPoolAllocator&); // dont allow default copy constructor -}; - - -// -// There could potentially be many pools with pops happening at -// different times. But a simple use is to have a global pop -// with everyone using the same global allocator. -// -typedef TPoolAllocator* PoolAllocatorPointer; -extern TPoolAllocator& GetGlobalPoolAllocator(); -#define GlobalPoolAllocator GetGlobalPoolAllocator() -struct TThreadGlobalPools -{ - TPoolAllocator* globalPoolAllocator; -}; - -// -// This STL compatible allocator is intended to be used as the allocator -// parameter to templatized STL containers, like vector and map. -// -// It will use the pools for allocation, and not -// do any deallocation, but will still do destruction. -// -template -class pool_allocator { -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef T *pointer; - typedef const T *const_pointer; - typedef T& reference; - typedef const T& const_reference; - typedef T value_type; - template - struct rebind { - typedef pool_allocator other; - }; - pointer address(reference x) const { return &x; } - const_pointer address(const_reference x) const { return &x; } - -#ifdef USING_SGI_STL - pool_allocator() { } -#else - pool_allocator() : allocator(GlobalPoolAllocator) { } - pool_allocator(TPoolAllocator& a) : allocator(a) { } - pool_allocator(const pool_allocator& p) : allocator(p.allocator) { } -#endif - -#if defined(_MSC_VER) && _MSC_VER >= 1300 - template -#ifdef USING_SGI_STL - pool_allocator(const pool_allocator& p) /*: allocator(p.getAllocator())*/ { } -#else - pool_allocator(const pool_allocator& p) : allocator(p.getAllocator()) { } -#endif -#endif - -#ifndef _WIN32 - template - pool_allocator(const pool_allocator& p) : allocator(p.getAllocator()) { } -#endif - -#ifdef USING_SGI_STL - static pointer allocate(size_type n) { - return reinterpret_cast(getAllocator().allocate(n)); } - pointer allocate(size_type n, const void*) { - return reinterpret_cast(getAllocator().allocate(n)); } - - static void deallocate(void*, size_type) { } - static void deallocate(pointer, size_type) { } -#else - pointer allocate(size_type n) { - return reinterpret_cast(getAllocator().allocate(n * sizeof(T))); } - pointer allocate(size_type n, const void*) { - return reinterpret_cast(getAllocator().allocate(n * sizeof(T))); } - - void deallocate(void*, size_type) { } - void deallocate(pointer, size_type) { } -#endif - - pointer _Charalloc(size_t n) { - return reinterpret_cast(getAllocator().allocate(n)); } - - void construct(pointer p, const T& val) { new ((void *)p) T(val); } - void destroy(pointer p) { p->T::~T(); } - - bool operator==(const pool_allocator& rhs) const { return &getAllocator() == &rhs.getAllocator(); } - bool operator!=(const pool_allocator& rhs) const { return &getAllocator() != &rhs.getAllocator(); } - - size_type max_size() const { return static_cast(-1) / sizeof(T); } - size_type max_size(int size) const { return static_cast(-1) / size; } - -#ifdef USING_SGI_STL - //void setAllocator(TPoolAllocator* a) { allocator = a; } - static TPoolAllocator& getAllocator() { return GlobalPoolAllocator; } -#else - void setAllocator(TPoolAllocator* a) { allocator = *a; } - TPoolAllocator& getAllocator() const { return allocator; } - -protected: - TPoolAllocator& allocator; -#endif -}; - -#endif // _POOLALLOC_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/ResourceLimits.h b/src/mesa/shader/slang/Include/ResourceLimits.h deleted file mode 100755 index ef24244c28..0000000000 --- a/src/mesa/shader/slang/Include/ResourceLimits.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef _RESOURCE_LIMITS_INCLUDED_ -#define _RESOURCE_LIMITS_INCLUDED_ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct TBuiltInResource_ { - int maxLights; - int maxClipPlanes; - int maxTextureUnits; - int maxTextureCoords; - int maxVertexAttribs; - int maxVertexUniformComponents; - int maxVaryingFloats; - int maxVertexTextureImageUnits; - int maxCombinedTextureImageUnits; - int maxTextureImageUnits; - int maxFragmentUniformComponents; - int maxDrawBuffers; -} TBuiltInResource; - -#ifdef __cplusplus -} -#endif - -#endif /* _RESOURCE_LIMITS_INCLUDED_ */ diff --git a/src/mesa/shader/slang/Include/ShHandle.h b/src/mesa/shader/slang/Include/ShHandle.h deleted file mode 100755 index 82c0314f34..0000000000 --- a/src/mesa/shader/slang/Include/ShHandle.h +++ /dev/null @@ -1,177 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _SHHANDLE_INCLUDED_ -#define _SHHANDLE_INCLUDED_ - -// -// Machine independent part of the compiler private objects -// sent as ShHandle to the driver. -// -// This should not be included by driver code. -// - -#define SH_EXPORTING -#include "../Public/ShaderLangExt.h" -#include "InfoSink.h" - -class TCompiler; -class TLinker; -class TUniformMap; -namespace Lf { - class TBindingList; - class TLinker; - class TLibrary; -} - -// -// The base class used to back handles returned to the driver. -// -class TShHandleBase { -public: - TShHandleBase() { } - virtual ~TShHandleBase() { } - virtual TCompiler* getAsCompiler() { return 0; } - virtual TLinker* getAsLinker() { return 0; } - virtual Lf::TLinker* getAsNewLinker() { return 0; } - virtual TUniformMap* getAsUniformMap() { return 0; } - virtual Lf::TBindingList* getAsBindingList() { return 0; } - virtual Lf::TLibrary* getAsLibrary() { return 0; } -}; -// -// The base class for the machine dependent linker to derive from -// for managing where uniforms live. -// -class TUniformMap : public TShHandleBase { -public: - TUniformMap() { } - virtual ~TUniformMap() { } - virtual TUniformMap* getAsUniformMap() { return this; } - virtual int getLocation(const char* name) = 0; - virtual TInfoSink& getInfoSink() { return infoSink; } - TInfoSink infoSink; -}; - -class TIntermNode; - -// -// The base class for the machine dependent compiler to derive from -// for managing object code from the compile. -// -class TCompiler : public TShHandleBase { -public: - TCompiler(EShLanguage l, TInfoSink& sink) : infoSink(sink) , language(l), haveValidObjectCode(false) { } - virtual ~TCompiler() { } - EShLanguage getLanguage() { return language; } - virtual TInfoSink& getInfoSink() { return infoSink; } - - virtual bool compile(TIntermNode* root) = 0; - - virtual TCompiler* getAsCompiler() { return this; } - virtual bool linkable() { return haveValidObjectCode; } - - TInfoSink& infoSink; -protected: - EShLanguage language; - bool haveValidObjectCode; -}; - -// -// Link operations are base on a list of compile results... -// -typedef TVector TCompilerList; -typedef TVector THandleList; - -// -// The base class for the machine dependent linker to derive from -// to manage the resulting executable. -// - -class TLinker : public TShHandleBase { -public: - TLinker(EShExecutable e, TInfoSink& iSink) : - infoSink(iSink), - executable(e), - haveReturnableObjectCode(false), - appAttributeBindings(0), - fixedAttributeBindings(0), - excludedAttributes(0), - excludedCount(0), - uniformBindings(0) { } - virtual TLinker* getAsLinker() { return this; } - virtual ~TLinker() { } - virtual bool link(TCompilerList&, TUniformMap*) = 0; - virtual bool link(THandleList&) { return false; } - virtual void setAppAttributeBindings(const ShBindingTable* t) { appAttributeBindings = t; } - virtual void setFixedAttributeBindings(const ShBindingTable* t) { fixedAttributeBindings = t; } - virtual void getAttributeBindings(ShBindingTable const **t) const = 0; - virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; } - virtual ShBindingTable* getUniformBindings() const { return uniformBindings; } - virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here - virtual TInfoSink& getInfoSink() { return infoSink; } - TInfoSink& infoSink; -protected: - EShExecutable executable; - bool haveReturnableObjectCode; // true when objectCode is acceptable to send to driver - - const ShBindingTable* appAttributeBindings; - const ShBindingTable* fixedAttributeBindings; - const int* excludedAttributes; - int excludedCount; - ShBindingTable* uniformBindings; // created by the linker -}; - -// -// This is the interface between the machine independent code -// and the machine dependent code. -// -// The machine dependent code should derive from the classes -// above. Then Construct*() and Delete*() will create and -// destroy the machine dependent objects, which contain the -// above machine independent information. -// -TCompiler* ConstructCompiler(EShLanguage, int); - -TShHandleBase* ConstructLinker(EShExecutable, int); -TShHandleBase* ConstructBindings(); -TShHandleBase* ConstructLibrary(); -void DeleteLinker(TShHandleBase*); - -TUniformMap* ConstructUniformMap(); -void DeleteCompiler(TCompiler*); - -void DeleteUniformMap(TUniformMap*); -void freeTargetDependentData(void*); - -#endif // _SHHANDLE_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/Types.h b/src/mesa/shader/slang/Include/Types.h deleted file mode 100755 index 9415879afe..0000000000 --- a/src/mesa/shader/slang/Include/Types.h +++ /dev/null @@ -1,297 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _TYPES_INCLUDED -#define _TYPES_INCLUDED - -#include "../Include/Common.h" -#include "../Include/BaseTypes.h" - -// -// Need to have association of line numbers to types in a list for building structs. -// -class TType; -struct TTypeLine { - TType* type; - int line; -}; -typedef TVector TTypeList; - -inline TTypeList* NewPoolTTypeList() -{ - void* memory = GlobalPoolAllocator.allocate(sizeof(TTypeList)); - return new(memory) TTypeList; -} - -// -// This is a workaround for a problem with the yacc stack, It can't have -// types that the compiler thinks non-trivial constructors. It should -// just be used while recognizing the grammar, not anything else. Pointers -// could be used, but also trying to avoid lots of memory management overhead. -// -// Not as bad as it looks, there is no actual assumption that the fields -// match up or are name the same or anything like that. -// -class TPublicType { -public: - TBasicType type; - TQualifier qualifier; - int size; // size of vector or matrix, not size of array - bool matrix; - bool array; - TType* userDef; - int line; -}; - -typedef std::map TStructureMap; -typedef std::map::iterator TStructureMapIterator; -// -// Base class for things that have a type. -// -class TType { -public: - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - explicit TType(TBasicType t, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) : - type(t), qualifier(q), size(s), matrix(m), array(a), arraySize(0), structure(0), - structureSize(0), maxArraySize(0), arrayInformationType(0), fieldName(0), typeName(0), mangled(0) - { } - explicit TType(TPublicType p) : - type(p.type), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(0), - structure(0), structureSize(0), maxArraySize(0), arrayInformationType(0), fieldName(0), typeName(0), mangled(0) - { - if (p.userDef) { - structure = p.userDef->getStruct(); - structureSize = setStructSize(p.userDef->getStruct()); - typeName = NewPoolTString(p.userDef->getTypeName().c_str()); - } - } - explicit TType(TTypeList* userDef, TString n) : - type(EbtStruct), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0), - structure(userDef), maxArraySize(0), arrayInformationType(0), fieldName(0), mangled(0) { - structureSize = setStructSize(userDef); - typeName = NewPoolTString(n.c_str()); - } - explicit TType() {} - virtual ~TType() {} - - TType (const TType& type) { *this = type; } - - void copyType(const TType& copyOf, TStructureMap& remapper) - { - type = copyOf.type; - qualifier = copyOf.qualifier; - size = copyOf.size; - matrix = copyOf.matrix; - array = copyOf.array; - arraySize = copyOf.arraySize; - - TStructureMapIterator iter; - if (copyOf.structure) { - if ((iter = remapper.find(structure)) == remapper.end()) { - // create the new structure here - structure = NewPoolTTypeList(); - for (unsigned int i = 0; i < copyOf.structure->size(); ++i) { - TTypeLine typeLine; - typeLine.line = (*copyOf.structure)[i].line; - typeLine.type = (*copyOf.structure)[i].type->clone(remapper); - structure->push_back(typeLine); - } - } else { - structure = iter->second; - } - } else - structure = 0; - - fieldName = 0; - if (copyOf.fieldName) - fieldName = NewPoolTString(copyOf.fieldName->c_str()); - typeName = 0; - if (copyOf.typeName) - typeName = NewPoolTString(copyOf.typeName->c_str()); - - mangled = 0; - if (copyOf.mangled) - mangled = NewPoolTString(copyOf.mangled->c_str()); - - structureSize = copyOf.structureSize; - maxArraySize = copyOf.maxArraySize; - assert (copyOf.arrayInformationType == 0); - arrayInformationType = 0; // arrayInformationType should not be set for builtIn symbol table level - } - - TType* clone(TStructureMap& remapper) - { - TType *newType = new TType(); - newType->copyType(*this, remapper); - - return newType; - } - - int setStructSize(TTypeList* userDef) - { - int stSize = 0; - for (TTypeList::iterator tl = userDef->begin(); tl != userDef->end(); tl++) { - if (((*tl).type)->isArray()) { - if (((*tl).type)->getStruct()) { - int structSize = setStructSize(((*tl).type)->getStruct()); - stSize += structSize * ((*tl).type)->getArraySize(); - } else { - stSize += ((*tl).type)->getInstanceSize() * ((*tl).type)->getArraySize(); - } - } else if (((*tl).type)->isMatrix() || ((*tl).type)->isVector()){ - stSize += ((*tl).type)->getInstanceSize(); - } else if (((*tl).type)->getStruct()) { - //?? We should actually be calling getStructSize() function and not setStructSize. This problem occurs in case - // of nested/embedded structs. - stSize += setStructSize(((*tl).type)->getStruct()); - } else - stSize += 1; - } - structureSize = stSize; - return stSize; - } - - virtual void setType(TBasicType t, int s, bool m, bool a, int aS = 0) - { type = t; size = s; matrix = m; array = a; arraySize = aS; } - virtual void setType(TBasicType t, int s, bool m, TType* userDef = 0) - { type = t; - size = s; - matrix = m; - if (userDef) - structure = userDef->getStruct(); - // leave array information intact. - } - virtual void setTypeName(const TString& n) { typeName = NewPoolTString(n.c_str()); } - virtual void setFieldName(const TString& n) { fieldName = NewPoolTString(n.c_str()); } - virtual const TString& getTypeName() const - { - assert (typeName); - return *typeName; - } - - virtual const TString& getFieldName() const - { - assert (fieldName); - return *fieldName; - } - - virtual TBasicType getBasicType() const { return type; } - virtual TQualifier getQualifier() const { return qualifier; } - virtual void changeQualifier(TQualifier q) { qualifier = q; } - - // One-dimensional size of single instance type - virtual int getNominalSize() const { return size; } - - // Full-dimensional size of single instance of type - virtual int getInstanceSize() const - { - if (matrix) - return size * size; - else - return size; - } - - virtual bool isMatrix() const { return matrix ? true : false; } - virtual bool isArray() const { return array ? true : false; } - int getArraySize() const { return arraySize; } - void setArraySize(int s) { array = true; arraySize = s; } - void setMaxArraySize (int s) { maxArraySize = s; } - int getMaxArraySize () const { return maxArraySize; } - void setArrayInformationType(TType* t) { arrayInformationType = t; } - TType* getArrayInformationType() { return arrayInformationType; } - virtual bool isVector() const { return size > 1 && !matrix; } - static char* getBasicString(TBasicType t) { - switch (t) { - case EbtVoid: return "void"; break; - case EbtFloat: return "float"; break; - case EbtInt: return "int"; break; - case EbtBool: return "bool"; break; - case EbtSampler1D: return "sampler1D"; break; - case EbtSampler2D: return "sampler2D"; break; - case EbtSampler3D: return "sampler3D"; break; - case EbtSamplerCube: return "samplerCube"; break; - case EbtSampler1DShadow: return "sampler1DShadow"; break; - case EbtSampler2DShadow: return "sampler2DShadow"; break; - case EbtStruct: return "structure"; break; - default: return "unknown type"; - } - } - const char* getBasicString() const { return TType::getBasicString(type); } - const char* getQualifierString() const { return ::getQualifierString(qualifier); } - TTypeList* getStruct() { return structure; } - int getStructSize() const { return structureSize; } - TTypeList* getStruct() const { return structure; } - TString& getMangledName() { - if (!mangled) { - mangled = NewPoolTString(""); - buildMangledName(*mangled); - *mangled+=';'; - } - - return *mangled; - } - bool operator==(const TType& right) const { - return type == right.type && - size == right.size && - matrix == right.matrix && - array == right.array && - structure == right.structure; - // don't check the qualifier, it's not ever what's being sought after - } - bool operator!=(const TType& right) const { - return !operator==(right); - } - TString getCompleteString() const; - -protected: - void buildMangledName(TString&); - - TBasicType type : 6; - TQualifier qualifier : 7; - int size : 8; // size of vector or matrix, not size of array - unsigned int matrix : 1; - unsigned int array : 1; - - int arraySize; - TTypeList* structure; // 0 unless this is a struct - int structureSize; - int maxArraySize; - TType* arrayInformationType; - TString *fieldName; // for structure field names - TString *typeName; // for structure field type name - TString *mangled; - -}; - -#endif // _TYPES_INCLUDED_ diff --git a/src/mesa/shader/slang/Include/intermediate.h b/src/mesa/shader/slang/Include/intermediate.h deleted file mode 100755 index 13e22c2749..0000000000 --- a/src/mesa/shader/slang/Include/intermediate.h +++ /dev/null @@ -1,516 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -// -// Definition of the in-memory high-level intermediate representation -// of shaders. This is a tree that parser creates. -// -// Nodes in the tree are defined as a hierarchy of classes derived from -// TIntermNode. Each is a node in a tree. There is no preset branching factor; -// each node can have it's own type of list of children. -// - -#ifndef __INTERMEDIATE_H -#define __INTERMEDIATE_H - -#include "../Include/Common.h" -#include "../Include/Types.h" -#include "../Include/ConstantUnion.h" - -// -// Operators used by the high-level (parse tree) representation. -// -enum TOperator { - EOpNull, // if in a node, should only mean a node is still being built - EOpSequence, // denotes a list of statements, or parameters, etc. - EOpFunctionCall, - EOpFunction, // For function definition - EOpParameters, // an aggregate listing the parameters to a function - - // - // Unary operators - // - - EOpNegative, - EOpLogicalNot, - EOpVectorLogicalNot, - EOpBitwiseNot, - - EOpPostIncrement, - EOpPostDecrement, - EOpPreIncrement, - EOpPreDecrement, - - EOpConvIntToBool, - EOpConvFloatToBool, - EOpConvBoolToFloat, - EOpConvIntToFloat, - EOpConvFloatToInt, - EOpConvBoolToInt, - - // - // binary operations - // - - EOpAdd, - EOpSub, - EOpMul, - EOpDiv, - EOpMod, - EOpRightShift, - EOpLeftShift, - EOpAnd, - EOpInclusiveOr, - EOpExclusiveOr, - EOpEqual, - EOpNotEqual, - EOpVectorEqual, - EOpVectorNotEqual, - EOpLessThan, - EOpGreaterThan, - EOpLessThanEqual, - EOpGreaterThanEqual, - EOpComma, - - EOpVectorTimesScalar, - EOpVectorTimesMatrix, - EOpMatrixTimesVector, - EOpMatrixTimesScalar, - - EOpLogicalOr, - EOpLogicalXor, - EOpLogicalAnd, - - EOpIndexDirect, - EOpIndexIndirect, - EOpIndexDirectStruct, - - EOpVectorSwizzle, - - // - // Built-in functions potentially mapped to operators - // - - EOpRadians, - EOpDegrees, - EOpSin, - EOpCos, - EOpTan, - EOpAsin, - EOpAcos, - EOpAtan, - - EOpPow, - EOpExp, - EOpLog, - EOpExp2, - EOpLog2, - EOpSqrt, - EOpInverseSqrt, - - EOpAbs, - EOpSign, - EOpFloor, - EOpCeil, - EOpFract, - EOpMin, - EOpMax, - EOpClamp, - EOpMix, - EOpStep, - EOpSmoothStep, - - EOpLength, - EOpDistance, - EOpDot, - EOpCross, - EOpNormalize, - EOpFaceForward, - EOpReflect, - EOpRefract, - - EOpDPdx, // Fragment only - EOpDPdy, // Fragment only - EOpFwidth, // Fragment only - - EOpMatrixTimesMatrix, - - EOpAny, - EOpAll, - - EOpItof, // pack/unpack only - EOpFtoi, // pack/unpack only - EOpSkipPixels, // pack/unpack only - EOpReadInput, // unpack only - EOpWritePixel, // unpack only - EOpBitmapLsb, // unpack only - EOpBitmapMsb, // unpack only - EOpWriteOutput, // pack only - EOpReadPixel, // pack only - - // - // Branch - // - - EOpKill, // Fragment only - EOpReturn, - EOpBreak, - EOpContinue, - - // - // Constructors - // - - EOpConstructInt, - EOpConstructBool, - EOpConstructFloat, - EOpConstructVec2, - EOpConstructVec3, - EOpConstructVec4, - EOpConstructBVec2, - EOpConstructBVec3, - EOpConstructBVec4, - EOpConstructIVec2, - EOpConstructIVec3, - EOpConstructIVec4, - EOpConstructMat2, - EOpConstructMat3, - EOpConstructMat4, - EOpConstructStruct, - - // - // moves - // - - EOpAssign, - EOpAddAssign, - EOpSubAssign, - EOpMulAssign, - EOpVectorTimesMatrixAssign, - EOpVectorTimesScalarAssign, - EOpMatrixTimesScalarAssign, - EOpMatrixTimesMatrixAssign, - EOpDivAssign, - EOpModAssign, - EOpAndAssign, - EOpInclusiveOrAssign, - EOpExclusiveOrAssign, - EOpLeftShiftAssign, - EOpRightShiftAssign -}; - -class TIntermTraverser; -class TIntermAggregate; -class TIntermBinary; -class TIntermConstantUnion; -class TIntermSelection; -class TIntermTyped; -class TIntermSymbol; -class TInfoSink; - -// -// Base class for the tree nodes -// -class TIntermNode { -public: - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - - TIntermNode() : line(0) {} - virtual TSourceLoc getLine() const { return line; } - virtual void setLine(TSourceLoc l) { line = l; } - virtual void traverse(TIntermTraverser*) = 0; - virtual TIntermTyped* getAsTyped() { return 0; } - virtual TIntermConstantUnion* getAsConstantUnion() { return 0; } - virtual TIntermAggregate* getAsAggregate() { return 0; } - virtual TIntermBinary* getAsBinaryNode() { return 0; } - virtual TIntermSelection* getAsSelectionNode() { return 0; } - virtual TIntermSymbol* getAsSymbolNode() { return 0; } - virtual ~TIntermNode() { } -protected: - TSourceLoc line; -}; - -// -// This is just to help yacc. -// -struct TIntermNodePair { - TIntermNode* node1; - TIntermNode* node2; -}; - -class TIntermSymbol; -class TIntermBinary; - -// -// Intermediate class for nodes that have a type. -// -class TIntermTyped : public TIntermNode { -public: - TIntermTyped(const TType& t) : type(t) { } - virtual TIntermTyped* getAsTyped() { return this; } - virtual void setType(const TType& t) { type = t; } - virtual TType getType() const { return type; } - virtual TType* getTypePointer() { return &type; } - - virtual TBasicType getBasicType() const { return type.getBasicType(); } - virtual TQualifier getQualifier() const { return type.getQualifier(); } - virtual int getNominalSize() const { return type.getNominalSize(); } - virtual int getSize() const { return type.getInstanceSize(); } - virtual bool isMatrix() const { return type.isMatrix(); } - virtual bool isArray() const { return type.isArray(); } - virtual bool isVector() const { return type.isVector(); } - const char* getBasicString() const { return type.getBasicString(); } - const char* getQualifierString() const { return type.getQualifierString(); } - TString getCompleteString() const { return type.getCompleteString(); } - -protected: - TType type; -}; - -// -// Handle for, do-while, and while loops. -// -class TIntermLoop : public TIntermNode { -public: - TIntermLoop(TIntermNode* aBody, TIntermTyped* aTest, TIntermTyped* aTerminal, bool testFirst) : - body(aBody), - test(aTest), - terminal(aTerminal), - first(testFirst) { } - virtual void traverse(TIntermTraverser*); - TIntermNode* getBody() { return body; } - TIntermTyped* getTest() { return test; } - TIntermTyped* getTerminal() { return terminal; } - bool testFirst() { return first; } -protected: - TIntermNode* body; // code to loop over - TIntermTyped* test; // exit condition associated with loop, could be 0 for 'for' loops - TIntermTyped* terminal; // exists for for-loops - bool first; // true for while and for, not for do-while -}; - -// -// Handle break, continue, return, and kill. -// -class TIntermBranch : public TIntermNode { -public: - TIntermBranch(TOperator op, TIntermTyped* e) : - flowOp(op), - expression(e) { } - virtual void traverse(TIntermTraverser*); - TOperator getFlowOp() { return flowOp; } - TIntermTyped* getExpression() { return expression; } -protected: - TOperator flowOp; - TIntermTyped* expression; // non-zero except for "return exp;" statements -}; - -// -// Nodes that correspond to symbols or constants in the source code. -// -class TIntermSymbol : public TIntermTyped { -public: - // if symbol is initialized as symbol(sym), the memory comes from the poolallocator of sym. If sym comes from - // per process globalpoolallocator, then it causes increased memory usage per compile - // it is essential to use "symbol = sym" to assign to symbol - TIntermSymbol(int i, const TString& sym, const TType& t) : - TIntermTyped(t), id(i) { symbol = sym;} - virtual int getId() const { return id; } - virtual const TString& getSymbol() const { return symbol; } - virtual void traverse(TIntermTraverser*); - virtual TIntermSymbol* getAsSymbolNode() { return this; } -protected: - int id; - TString symbol; -}; - -class TIntermConstantUnion : public TIntermTyped { -public: - TIntermConstantUnion(constUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { } - constUnion* getUnionArrayPointer() const { return unionArrayPointer; } - void setUnionArrayPointer(constUnion *c) { unionArrayPointer = c; } - virtual TIntermConstantUnion* getAsConstantUnion() { return this; } - virtual void traverse(TIntermTraverser* ); - virtual TIntermTyped* fold(TOperator, TIntermTyped*, TInfoSink&, bool); -protected: - constUnion *unionArrayPointer; -}; - -// -// Intermediate class for node types that hold operators. -// -class TIntermOperator : public TIntermTyped { -public: - TOperator getOp() { return op; } - bool modifiesState() const; - bool isConstructor() const; - virtual bool promote(TInfoSink&) { return true; } -protected: - TIntermOperator(TOperator o) : TIntermTyped(TType(EbtFloat)), op(o) {} - TIntermOperator(TOperator o, TType& t) : TIntermTyped(t), op(o) {} - TOperator op; -}; - -// -// Nodes for all the basic binary math operators. -// -class TIntermBinary : public TIntermOperator { -public: - TIntermBinary(TOperator o) : TIntermOperator(o) {} - virtual void traverse(TIntermTraverser*); - virtual void setLeft(TIntermTyped* n) { left = n; } - virtual void setRight(TIntermTyped* n) { right = n; } - virtual TIntermTyped* getLeft() const { return left; } - virtual TIntermTyped* getRight() const { return right; } - virtual TIntermBinary* getAsBinaryNode() { return this; } - virtual bool promote(TInfoSink&); -protected: - TIntermTyped* left; - TIntermTyped* right; -}; - -// -// Nodes for unary math operators. -// -class TIntermUnary : public TIntermOperator { -public: - TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(0) {} - TIntermUnary(TOperator o) : TIntermOperator(o), operand(0) {} - virtual void traverse(TIntermTraverser*); - virtual void setOperand(TIntermTyped* o) { operand = o; } - virtual TIntermTyped* getOperand() { return operand; } - virtual bool promote(TInfoSink&); -protected: - TIntermTyped* operand; -}; - -typedef TVector TIntermSequence; -typedef TVector TQualifierList; -// -// Nodes that operate on an arbitrary sized set of children. -// -class TIntermAggregate : public TIntermOperator { -public: - TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { } - TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { } - ~TIntermAggregate() { delete pragmaTable; } - virtual TIntermAggregate* getAsAggregate() { return this; } - virtual void setOperator(TOperator o) { op = o; } - virtual TIntermSequence& getSequence() { return sequence; } - virtual void setName(const TString& n) { name = n; } - virtual const TString& getName() const { return name; } - virtual void traverse(TIntermTraverser*); - virtual void setUserDefined() { userDefined = true; } - virtual bool isUserDefined() { return userDefined; } - virtual TQualifierList& getQualifier() { return qualifier; } - void setOptimize(bool o) { optimize = o; } - void setDebug(bool d) { debug = d; } - bool getOptimize() { return optimize; } - bool getDebug() { return debug; } - void addToPragmaTable(const TPragmaTable& pTable); - const TPragmaTable& getPragmaTable() const { return *pragmaTable; } -protected: - TIntermAggregate(const TIntermAggregate&); // disallow copy constructor - TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator - TIntermSequence sequence; - TQualifierList qualifier; - TString name; - bool userDefined; // used for user defined function names - bool optimize; - bool debug; - TPragmaTable *pragmaTable; -}; - -// -// For if tests. Simplified since there is no switch statement. -// -class TIntermSelection : public TIntermTyped { -public: - TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB) : - TIntermTyped(TType(EbtVoid)), condition(cond), trueBlock(trueB), falseBlock(falseB) {} - TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB, const TType& type) : - TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB) {} - virtual void traverse(TIntermTraverser*); - virtual TIntermNode* getCondition() const { return condition; } - virtual TIntermNode* getTrueBlock() const { return trueBlock; } - virtual TIntermNode* getFalseBlock() const { return falseBlock; } - virtual TIntermSelection* getAsSelectionNode() { return this; } -protected: - TIntermTyped* condition; - TIntermNode* trueBlock; - TIntermNode* falseBlock; -}; - -// -// For traversing the tree. User should derive from this, -// put their traversal specific data in it, and then pass -// it to a Traverse method. -// -// When using this, just fill in the methods for nodes you want visited. -// Return false from a pre-visit to skip visiting that node's subtree. -// -class TIntermTraverser { -public: - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - - TIntermTraverser() : - visitSymbol(0), - visitConstantUnion(0), - visitBinary(0), - visitUnary(0), - visitSelection(0), - visitAggregate(0), - visitLoop(0), - visitBranch(0), - depth(0), - preVisit(true), - postVisit(false), - rightToLeft(false) {} - - void (*visitSymbol)(TIntermSymbol*, TIntermTraverser*); - void (*visitConstantUnion)(TIntermConstantUnion*, TIntermTraverser*); - bool (*visitBinary)(bool preVisit, TIntermBinary*, TIntermTraverser*); - bool (*visitUnary)(bool preVisit, TIntermUnary*, TIntermTraverser*); - bool (*visitSelection)(bool preVisit, TIntermSelection*, TIntermTraverser*); - bool (*visitAggregate)(bool preVisit, TIntermAggregate*, TIntermTraverser*); - bool (*visitLoop)(bool preVisit, TIntermLoop*, TIntermTraverser*); - bool (*visitBranch)(bool preVisit, TIntermBranch*, TIntermTraverser*); - - int depth; - bool preVisit; - bool postVisit; - bool rightToLeft; -}; - -#endif // __INTERMEDIATE_H diff --git a/src/mesa/shader/slang/MachineIndependent/Gen_glslang.cpp b/src/mesa/shader/slang/MachineIndependent/Gen_glslang.cpp deleted file mode 100755 index e54af8bd9f..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/Gen_glslang.cpp +++ /dev/null @@ -1,2942 +0,0 @@ -#line 2 "Gen_glslang.cpp" -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/mesa/shader/slang/MachineIndependent/Gen_glslang.cpp,v 1.3 2005/03/18 14:30:27 michal Exp $ - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - -#include -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - }; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - - -#define yywrap() 1 -#define YY_SKIP_YYWRAP -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 144 -#define YY_END_OF_BUFFER 145 -static yyconst short int yy_accept[428] = - { 0, - 0, 0, 0, 0, 145, 143, 142, 142, 127, 133, - 138, 122, 123, 131, 130, 119, 128, 126, 132, 143, - 143, 120, 116, 134, 121, 135, 139, 143, 124, 125, - 137, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 117, 136, 118, 129, 141, 144, 143, 143, 113, - 99, 118, 107, 102, 97, 105, 95, 106, 96, 0, - 94, 0, 98, 90, 0, 0, 0, 125, 117, 124, - 114, 110, 112, 111, 115, 86, 103, 109, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 11, 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 104, 108, 140, - 93, 0, 1, 92, 0, 0, 88, 89, 0, 100, - 101, 0, 0, 43, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 0, 0, 0, 0, 0, 0, 0, 17, - 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 87, 86, 0, 19, 0, 0, - 83, 0, 0, 0, 0, 0, 0, 0, 12, 46, - 0, 0, 0, 0, 0, 51, 65, 0, 0, 0, - 0, 0, 0, 62, 24, 25, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 49, 20, 0, 0, 0, 0, 0, 0, 27, 28, - 29, 18, 0, 0, 140, 0, 0, 92, 0, 0, - 0, 0, 6, 33, 34, 35, 44, 3, 0, 0, - 0, 0, 76, 77, 78, 0, 21, 66, 16, 73, - - 74, 75, 70, 71, 72, 0, 15, 68, 0, 30, - 31, 32, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 45, 0, 85, - 0, 0, 10, 0, 0, 91, 0, 0, 0, 0, - 64, 59, 54, 0, 0, 0, 69, 50, 57, 23, - 0, 82, 58, 42, 52, 0, 0, 0, 0, 0, - 0, 93, 92, 0, 0, 53, 22, 0, 0, 0, - 0, 0, 0, 47, 4, 0, 5, 0, 0, 7, - 60, 0, 0, 55, 0, 0, 0, 0, 48, 67, - 56, 2, 61, 84, 36, 37, 38, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, - 0, 0, 0, 79, 0, 80, 0, 0, 0, 40, - 0, 41, 0, 0, 0, 81, 0 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 1, 1, 1, 6, 7, 1, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 21, 21, 22, 22, 23, 24, 25, - 26, 27, 28, 1, 29, 29, 30, 31, 32, 29, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 34, 35, 33, 33, 33, 33, 36, 33, 33, - 37, 1, 38, 39, 33, 1, 40, 41, 42, 43, - - 44, 45, 46, 47, 48, 33, 49, 50, 51, 52, - 53, 54, 33, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[68] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, - 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 3, 3, 3, 3, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 1, 1, 1, 1 - } ; - -static yyconst short int yy_base[432] = - { 0, - 0, 0, 67, 0, 678, 679, 679, 679, 651, 109, - 130, 679, 679, 650, 127, 679, 126, 124, 139, 151, - 671, 647, 679, 151, 647, 121, 679, 668, 679, 679, - 124, 147, 154, 155, 158, 171, 174, 157, 156, 184, - 175, 160, 178, 162, 176, 181, 190, 197, 193, 195, - 179, 679, 193, 679, 679, 679, 679, 656, 666, 679, - 679, 679, 679, 679, 679, 679, 679, 679, 679, 665, - 679, 665, 679, 246, 663, 662, 0, 679, 679, 679, - 639, 679, 679, 679, 638, 253, 679, 679, 612, 605, - 608, 616, 615, 602, 617, 604, 610, 598, 595, 608, - - 595, 592, 592, 598, 586, 593, 590, 600, 586, 592, - 597, 679, 136, 596, 587, 581, 586, 588, 578, 592, - 592, 575, 580, 577, 566, 200, 580, 576, 578, 567, - 570, 136, 575, 567, 579, 203, 572, 679, 679, 263, - 275, 616, 679, 282, 614, 311, 318, 325, 613, 679, - 679, 612, 611, 679, 559, 563, 572, 569, 553, 553, - 200, 568, 565, 565, 563, 560, 552, 558, 545, 556, - 559, 679, 556, 544, 551, 553, 546, 535, 534, 547, - 548, 543, 268, 544, 535, 532, 536, 534, 525, 528, - 526, 536, 522, 520, 520, 522, 519, 530, 529, 201, - - 524, 519, 508, 290, 526, 528, 517, 562, 561, 337, - 560, 349, 356, 559, 0, 363, 514, 679, 512, 293, - 679, 504, 502, 510, 499, 516, 505, 297, 679, 679, - 499, 509, 509, 494, 368, 679, 679, 371, 498, 492, - 491, 492, 374, 679, 679, 679, 679, 490, 495, 486, - 499, 494, 486, 490, 482, 485, 489, 494, 493, 484, - 679, 679, 490, 479, 479, 484, 483, 480, 679, 679, - 679, 679, 470, 482, 379, 386, 521, 393, 400, 520, - 422, 482, 679, 679, 679, 679, 679, 679, 470, 471, - 465, 475, 679, 679, 679, 466, 679, 679, 679, 679, - - 679, 679, 679, 679, 679, 473, 679, 679, 471, 679, - 679, 679, 461, 466, 456, 469, 469, 458, 465, 679, - 463, 465, 449, 458, 464, 459, 447, 679, 449, 679, - 448, 451, 679, 429, 448, 679, 440, 439, 439, 452, - 679, 454, 679, 453, 452, 439, 679, 679, 679, 679, - 435, 679, 679, 679, 679, 432, 443, 436, 442, 439, - 434, 679, 679, 426, 438, 679, 679, 431, 438, 437, - 419, 441, 418, 679, 679, 418, 679, 413, 412, 679, - 679, 411, 410, 679, 422, 405, 404, 376, 679, 679, - 679, 679, 679, 679, 397, 242, 397, 389, 382, 384, - - 380, 380, 379, 324, 321, 321, 310, 679, 308, 292, - 282, 266, 268, 285, 265, 679, 246, 258, 229, 679, - 221, 679, 199, 145, 131, 679, 679, 471, 179, 473, - 475 - } ; - -static yyconst short int yy_def[432] = - { 0, - 427, 1, 427, 3, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 428, 427, 427, 427, 427, 429, 427, 427, 427, - 427, 427, 427, 427, 427, 430, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 431, - 427, 428, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 429, 430, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 431, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 0, 427, 427, 427, - 427 - } ; - -static yyconst short int yy_nxt[747] = - { 0, - 6, 7, 8, 7, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, - 21, 21, 22, 23, 24, 25, 26, 27, 28, 28, - 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 28, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 28, 28, 28, 52, 53, 54, 55, 6, 56, 57, - 56, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 58, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 59, 59, 59, 59, 59, - - 59, 59, 59, 6, 6, 6, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, - 6, 6, 6, 6, 61, 62, 63, 66, 68, 70, - 70, 70, 70, 70, 70, 70, 84, 85, 71, 87, - 86, 69, 67, 72, 74, 64, 79, 86, 86, 86, - 86, 86, 88, 86, 73, 86, 75, 75, 75, 75, - 75, 75, 76, 80, 86, 81, 82, 86, 86, 86, - 149, 86, 86, 200, 86, 177, 77, 86, 178, 179, - 426, 201, 180, 86, 94, 110, 86, 425, 86, 116, - - 86, 97, 89, 90, 95, 98, 91, 96, 92, 109, - 99, 77, 93, 104, 111, 120, 100, 117, 138, 119, - 101, 105, 102, 106, 122, 137, 107, 115, 112, 123, - 118, 103, 108, 121, 134, 113, 124, 125, 135, 193, - 128, 424, 114, 129, 132, 264, 126, 136, 133, 127, - 205, 130, 206, 265, 194, 223, 224, 139, 131, 144, - 423, 145, 145, 145, 145, 145, 145, 145, 152, 152, - 152, 152, 152, 152, 152, 400, 401, 146, 208, 208, - 208, 208, 208, 208, 208, 245, 246, 247, 422, 146, - 70, 70, 70, 70, 70, 70, 70, 211, 211, 211, - - 211, 211, 211, 211, 421, 420, 210, 269, 270, 271, - 284, 285, 286, 212, 293, 294, 295, 419, 210, 418, - 417, 213, 416, 213, 415, 212, 214, 214, 214, 214, - 214, 214, 214, 75, 75, 75, 75, 75, 75, 76, - 76, 76, 76, 76, 76, 76, 76, 276, 414, 276, - 413, 412, 277, 277, 277, 277, 277, 277, 277, 279, - 411, 279, 410, 409, 280, 280, 280, 280, 280, 280, - 280, 214, 214, 214, 214, 214, 214, 214, 152, 152, - 152, 152, 152, 152, 152, 300, 301, 302, 303, 304, - 305, 310, 311, 312, 208, 208, 208, 208, 208, 208, - - 208, 277, 277, 277, 277, 277, 277, 277, 211, 211, - 211, 211, 211, 211, 211, 280, 280, 280, 280, 280, - 280, 280, 408, 407, 212, 336, 406, 405, 404, 403, - 402, 399, 362, 398, 397, 396, 212, 214, 214, 214, - 214, 214, 214, 214, 277, 277, 277, 277, 277, 277, - 277, 363, 395, 394, 393, 392, 391, 385, 386, 387, - 390, 389, 384, 280, 280, 280, 280, 280, 280, 280, - 388, 142, 142, 142, 153, 153, 209, 209, 383, 382, - 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, - 371, 370, 369, 368, 367, 366, 365, 364, 361, 360, - - 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, - 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, - 339, 338, 337, 335, 334, 333, 332, 331, 330, 329, - 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, - 318, 317, 316, 315, 314, 313, 309, 308, 307, 306, - 299, 298, 297, 296, 292, 291, 290, 289, 288, 287, - 283, 282, 281, 278, 275, 275, 274, 273, 272, 268, - 267, 266, 263, 262, 261, 260, 259, 258, 257, 256, - 255, 254, 253, 252, 251, 250, 249, 248, 244, 243, - 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, - - 232, 231, 230, 229, 228, 227, 226, 225, 222, 221, - 220, 219, 218, 217, 216, 216, 215, 74, 143, 207, - 204, 203, 202, 199, 198, 197, 196, 195, 192, 191, - 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, - 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, - 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, - 156, 155, 154, 151, 150, 148, 147, 143, 141, 140, - 72, 86, 83, 78, 74, 65, 60, 427, 5, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427 - } ; - -static yyconst short int yy_chk[747] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 10, 10, 11, 15, 17, 18, - 18, 18, 18, 18, 18, 18, 26, 26, 19, 31, - 32, 17, 15, 19, 20, 11, 24, 33, 34, 39, - 38, 35, 31, 42, 19, 44, 20, 20, 20, 20, - 20, 20, 20, 24, 36, 24, 24, 37, 41, 45, - 429, 43, 51, 132, 46, 113, 20, 40, 113, 113, - 425, 132, 113, 47, 34, 39, 49, 424, 50, 42, - - 48, 35, 32, 32, 34, 35, 33, 34, 33, 38, - 35, 20, 33, 37, 39, 45, 35, 43, 53, 44, - 36, 37, 36, 37, 46, 51, 37, 41, 40, 47, - 43, 36, 37, 45, 50, 40, 47, 47, 50, 126, - 48, 423, 40, 48, 49, 200, 47, 50, 49, 47, - 136, 48, 136, 200, 126, 161, 161, 53, 48, 74, - 421, 74, 74, 74, 74, 74, 74, 74, 86, 86, - 86, 86, 86, 86, 86, 396, 396, 74, 140, 140, - 140, 140, 140, 140, 140, 183, 183, 183, 419, 74, - 141, 141, 141, 141, 141, 141, 141, 144, 144, 144, - - 144, 144, 144, 144, 418, 417, 141, 204, 204, 204, - 220, 220, 220, 144, 228, 228, 228, 415, 141, 414, - 413, 146, 412, 146, 411, 144, 146, 146, 146, 146, - 146, 146, 146, 147, 147, 147, 147, 147, 147, 147, - 148, 148, 148, 148, 148, 148, 148, 210, 410, 210, - 409, 407, 210, 210, 210, 210, 210, 210, 210, 212, - 406, 212, 405, 404, 212, 212, 212, 212, 212, 212, - 212, 213, 213, 213, 213, 213, 213, 213, 216, 216, - 216, 216, 216, 216, 216, 235, 235, 235, 238, 238, - 238, 243, 243, 243, 275, 275, 275, 275, 275, 275, - - 275, 276, 276, 276, 276, 276, 276, 276, 278, 278, - 278, 278, 278, 278, 278, 279, 279, 279, 279, 279, - 279, 279, 403, 402, 278, 281, 401, 400, 399, 398, - 397, 395, 334, 388, 387, 386, 278, 281, 281, 281, - 281, 281, 281, 281, 334, 334, 334, 334, 334, 334, - 334, 335, 385, 383, 382, 379, 378, 372, 372, 372, - 376, 373, 371, 335, 335, 335, 335, 335, 335, 335, - 372, 428, 428, 428, 430, 430, 431, 431, 370, 369, - 368, 365, 364, 361, 360, 359, 358, 357, 356, 351, - 346, 345, 344, 342, 340, 339, 338, 337, 332, 331, - - 329, 327, 326, 325, 324, 323, 322, 321, 319, 318, - 317, 316, 315, 314, 313, 309, 306, 296, 292, 291, - 290, 289, 282, 280, 277, 274, 273, 268, 267, 266, - 265, 264, 263, 260, 259, 258, 257, 256, 255, 254, - 253, 252, 251, 250, 249, 248, 242, 241, 240, 239, - 234, 233, 232, 231, 227, 226, 225, 224, 223, 222, - 219, 217, 214, 211, 209, 208, 207, 206, 205, 203, - 202, 201, 199, 198, 197, 196, 195, 194, 193, 192, - 191, 190, 189, 188, 187, 186, 185, 184, 182, 181, - 180, 179, 178, 177, 176, 175, 174, 173, 171, 170, - - 169, 168, 167, 166, 165, 164, 163, 162, 160, 159, - 158, 157, 156, 155, 153, 152, 149, 145, 142, 137, - 135, 134, 133, 131, 130, 129, 128, 127, 125, 124, - 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, - 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, - 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, - 91, 90, 89, 85, 81, 76, 75, 72, 70, 59, - 58, 28, 25, 22, 21, 14, 9, 5, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "glslang.l" -#define INITIAL 0 -/* -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// -*/ -/* Based on -ANSI C grammar, Lex specification - -In 1985, Jeff Lee published this Lex specification together with a Yacc -grammar for the April 30, 1985 ANSI C draft. Tom Stockfisch reposted -both to net.sources in 1987; that original, as mentioned in the answer -to question 17.25 of the comp.lang.c FAQ, can be ftp'ed from ftp.uu.net, -file usenet/net.sources/ansi.c.grammar.Z. - -I intend to keep this version as close to the current C Standard grammar -as possible; please let me know if you discover discrepancies. - -Jutta Degener, 1995 -*/ -#define YY_NO_UNPUT 1 -#line 59 "glslang.l" -#include -#include -#include "ParseHelper.h" -#include "glslang_tab.h" - -/* windows only pragma */ -#ifdef _MSC_VER -#pragma warning(disable : 4102) -#endif - -int yy_input(char* buf, int max_size); -TSourceLoc yylineno; - -#ifdef _WIN32 - extern int yyparse(TParseContext&); - #define YY_DECL int yylex(YYSTYPE* pyylval, TParseContext& parseContext) -#else - extern int yyparse(void*); - #define YY_DECL int yylex(YYSTYPE* pyylval, void* parseContextLocal) - #define parseContext (*((TParseContext*)(parseContextLocal))) -#endif - -#define YY_INPUT(buf,result,max_size) (result = yy_input(buf, max_size)) - -#define YY_NEVER_INTERACTIVE 1 -#define FIELDS 1 - -#line 753 "Gen_glslang.cpp" - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 91 "glslang.l" - -#line 906 "Gen_glslang.cpp" - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 428 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 679 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 92 "glslang.l" -{ /* ?? carriage and/or line-feed? */ }; - YY_BREAK -case 2: -YY_RULE_SETUP -#line 94 "glslang.l" -{ pyylval->lex.line = yylineno; return(ATTRIBUTE); } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 95 "glslang.l" -{ pyylval->lex.line = yylineno; return(CONST_QUAL); } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 96 "glslang.l" -{ pyylval->lex.line = yylineno; return(UNIFORM); } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 97 "glslang.l" -{ pyylval->lex.line = yylineno; return(VARYING); } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 99 "glslang.l" -{ pyylval->lex.line = yylineno; return(BREAK); } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 100 "glslang.l" -{ pyylval->lex.line = yylineno; return(CONTINUE); } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 101 "glslang.l" -{ pyylval->lex.line = yylineno; return(DO); } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 102 "glslang.l" -{ pyylval->lex.line = yylineno; return(FOR); } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 103 "glslang.l" -{ pyylval->lex.line = yylineno; return(WHILE); } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 105 "glslang.l" -{ pyylval->lex.line = yylineno; return(IF); } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 106 "glslang.l" -{ pyylval->lex.line = yylineno; return(ELSE); } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 108 "glslang.l" -{ pyylval->lex.line = yylineno; return(IN_QUAL); } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 109 "glslang.l" -{ pyylval->lex.line = yylineno; return(OUT_QUAL); } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 110 "glslang.l" -{ pyylval->lex.line = yylineno; return(INOUT_QUAL); } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 112 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(FLOAT_TYPE); } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 113 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(INT_TYPE); } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 114 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(VOID_TYPE); } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 115 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(BOOL_TYPE); } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 116 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.b = true; return(BOOLCONSTANT); } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 117 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.b = false; return(BOOLCONSTANT); } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 119 "glslang.l" -{ pyylval->lex.line = yylineno; return(DISCARD); } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 120 "glslang.l" -{ pyylval->lex.line = yylineno; return(RETURN); } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 122 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX2); } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 123 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX3); } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 124 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX4); } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 126 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC2); } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 127 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC3); } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 128 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC4); } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 129 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC2); } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 130 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC3); } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 131 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC4); } - YY_BREAK -case 33: -YY_RULE_SETUP -#line 132 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC2); } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 133 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC3); } - YY_BREAK -case 35: -YY_RULE_SETUP -#line 134 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC4); } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 136 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER1D; } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 137 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER2D; } - YY_BREAK -case 38: -YY_RULE_SETUP -#line 138 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER3D; } - YY_BREAK -case 39: -YY_RULE_SETUP -#line 139 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLERCUBE; } - YY_BREAK -case 40: -YY_RULE_SETUP -#line 140 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER1DSHADOW; } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 141 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER2DSHADOW; } - YY_BREAK -case 42: -YY_RULE_SETUP -#line 143 "glslang.l" -{ pyylval->lex.line = yylineno; return(STRUCT); } - YY_BREAK -case 43: -YY_RULE_SETUP -#line 145 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 44: -YY_RULE_SETUP -#line 147 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 45: -YY_RULE_SETUP -#line 148 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 149 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 150 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 48: -YY_RULE_SETUP -#line 151 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 49: -YY_RULE_SETUP -#line 152 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 50: -YY_RULE_SETUP -#line 153 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 51: -YY_RULE_SETUP -#line 155 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 52: -YY_RULE_SETUP -#line 156 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 53: -YY_RULE_SETUP -#line 157 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 54: -YY_RULE_SETUP -#line 159 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 55: -YY_RULE_SETUP -#line 160 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 56: -YY_RULE_SETUP -#line 161 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 57: -YY_RULE_SETUP -#line 162 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 58: -YY_RULE_SETUP -#line 163 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 59: -YY_RULE_SETUP -#line 164 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 60: -YY_RULE_SETUP -#line 165 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 61: -YY_RULE_SETUP -#line 166 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 62: -YY_RULE_SETUP -#line 168 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 63: -YY_RULE_SETUP -#line 169 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 64: -YY_RULE_SETUP -#line 170 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 65: -YY_RULE_SETUP -#line 171 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 66: -YY_RULE_SETUP -#line 172 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 67: -YY_RULE_SETUP -#line 173 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 68: -YY_RULE_SETUP -#line 175 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 69: -YY_RULE_SETUP -#line 176 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 70: -YY_RULE_SETUP -#line 178 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 71: -YY_RULE_SETUP -#line 179 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 72: -YY_RULE_SETUP -#line 180 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 73: -YY_RULE_SETUP -#line 181 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 74: -YY_RULE_SETUP -#line 182 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 75: -YY_RULE_SETUP -#line 183 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 76: -YY_RULE_SETUP -#line 184 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 77: -YY_RULE_SETUP -#line 185 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 78: -YY_RULE_SETUP -#line 186 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 79: -YY_RULE_SETUP -#line 188 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 80: -YY_RULE_SETUP -#line 189 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 81: -YY_RULE_SETUP -#line 190 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 82: -YY_RULE_SETUP -#line 192 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 83: -YY_RULE_SETUP -#line 193 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 84: -YY_RULE_SETUP -#line 195 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 85: -YY_RULE_SETUP -#line 196 "glslang.l" -{ PaReservedWord(); return 0; } - YY_BREAK -case 86: -YY_RULE_SETUP -#line 198 "glslang.l" -{ - pyylval->lex.line = yylineno; - pyylval->lex.string = NewPoolTString(yytext); - return PaIdentOrType(*pyylval->lex.string, parseContext, pyylval->lex.symbol); -} - YY_BREAK -case 87: -YY_RULE_SETUP -#line 204 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); } - YY_BREAK -case 88: -YY_RULE_SETUP -#line 205 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); } - YY_BREAK -case 89: -YY_RULE_SETUP -#line 206 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.error(yylineno, "Invalid Octal number.", yytext, "", ""); parseContext.recover(); return 0;} - YY_BREAK -case 90: -YY_RULE_SETUP -#line 207 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); } - YY_BREAK -case 91: -YY_RULE_SETUP -#line 209 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.f = static_cast(atof(yytext)); return(FLOATCONSTANT); } - YY_BREAK -case 92: -YY_RULE_SETUP -#line 210 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.f = static_cast(atof(yytext)); return(FLOATCONSTANT); } - YY_BREAK -case 93: -YY_RULE_SETUP -#line 211 "glslang.l" -{ pyylval->lex.line = yylineno; pyylval->lex.f = static_cast(atof(yytext)); return(FLOATCONSTANT); } - YY_BREAK -case 94: -YY_RULE_SETUP -#line 213 "glslang.l" -{ int ret = PaParseComment(pyylval->lex.line, parseContext); if (!ret) return ret; } - YY_BREAK -case 95: -YY_RULE_SETUP -#line 215 "glslang.l" -{ pyylval->lex.line = yylineno; return(ADD_ASSIGN); } - YY_BREAK -case 96: -YY_RULE_SETUP -#line 216 "glslang.l" -{ pyylval->lex.line = yylineno; return(SUB_ASSIGN); } - YY_BREAK -case 97: -YY_RULE_SETUP -#line 217 "glslang.l" -{ pyylval->lex.line = yylineno; return(MUL_ASSIGN); } - YY_BREAK -case 98: -YY_RULE_SETUP -#line 218 "glslang.l" -{ pyylval->lex.line = yylineno; return(DIV_ASSIGN); } - YY_BREAK -case 99: -YY_RULE_SETUP -#line 219 "glslang.l" -{ pyylval->lex.line = yylineno; return(MOD_ASSIGN); } - YY_BREAK -case 100: -YY_RULE_SETUP -#line 220 "glslang.l" -{ pyylval->lex.line = yylineno; return(LEFT_ASSIGN); } - YY_BREAK -case 101: -YY_RULE_SETUP -#line 221 "glslang.l" -{ pyylval->lex.line = yylineno; return(RIGHT_ASSIGN); } - YY_BREAK -case 102: -YY_RULE_SETUP -#line 222 "glslang.l" -{ pyylval->lex.line = yylineno; return(AND_ASSIGN); } - YY_BREAK -case 103: -YY_RULE_SETUP -#line 223 "glslang.l" -{ pyylval->lex.line = yylineno; return(XOR_ASSIGN); } - YY_BREAK -case 104: -YY_RULE_SETUP -#line 224 "glslang.l" -{ pyylval->lex.line = yylineno; return(OR_ASSIGN); } - YY_BREAK -case 105: -YY_RULE_SETUP -#line 226 "glslang.l" -{ pyylval->lex.line = yylineno; return(INC_OP); } - YY_BREAK -case 106: -YY_RULE_SETUP -#line 227 "glslang.l" -{ pyylval->lex.line = yylineno; return(DEC_OP); } - YY_BREAK -case 107: -YY_RULE_SETUP -#line 228 "glslang.l" -{ pyylval->lex.line = yylineno; return(AND_OP); } - YY_BREAK -case 108: -YY_RULE_SETUP -#line 229 "glslang.l" -{ pyylval->lex.line = yylineno; return(OR_OP); } - YY_BREAK -case 109: -YY_RULE_SETUP -#line 230 "glslang.l" -{ pyylval->lex.line = yylineno; return(XOR_OP); } - YY_BREAK -case 110: -YY_RULE_SETUP -#line 231 "glslang.l" -{ pyylval->lex.line = yylineno; return(LE_OP); } - YY_BREAK -case 111: -YY_RULE_SETUP -#line 232 "glslang.l" -{ pyylval->lex.line = yylineno; return(GE_OP); } - YY_BREAK -case 112: -YY_RULE_SETUP -#line 233 "glslang.l" -{ pyylval->lex.line = yylineno; return(EQ_OP); } - YY_BREAK -case 113: -YY_RULE_SETUP -#line 234 "glslang.l" -{ pyylval->lex.line = yylineno; return(NE_OP); } - YY_BREAK -case 114: -YY_RULE_SETUP -#line 235 "glslang.l" -{ pyylval->lex.line = yylineno; return(LEFT_OP); } - YY_BREAK -case 115: -YY_RULE_SETUP -#line 236 "glslang.l" -{ pyylval->lex.line = yylineno; return(RIGHT_OP); } - YY_BREAK -case 116: -YY_RULE_SETUP -#line 237 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(SEMICOLON); } - YY_BREAK -case 117: -YY_RULE_SETUP -#line 238 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(LEFT_BRACE); } - YY_BREAK -case 118: -YY_RULE_SETUP -#line 239 "glslang.l" -{ pyylval->lex.line = yylineno; return(RIGHT_BRACE); } - YY_BREAK -case 119: -YY_RULE_SETUP -#line 240 "glslang.l" -{ pyylval->lex.line = yylineno; if (parseContext.inTypeParen) parseContext.lexAfterType = false; return(COMMA); } - YY_BREAK -case 120: -YY_RULE_SETUP -#line 241 "glslang.l" -{ pyylval->lex.line = yylineno; return(COLON); } - YY_BREAK -case 121: -YY_RULE_SETUP -#line 242 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(EQUAL); } - YY_BREAK -case 122: -YY_RULE_SETUP -#line 243 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.lexAfterType = false; parseContext.inTypeParen = true; return(LEFT_PAREN); } - YY_BREAK -case 123: -YY_RULE_SETUP -#line 244 "glslang.l" -{ pyylval->lex.line = yylineno; parseContext.inTypeParen = false; return(RIGHT_PAREN); } - YY_BREAK -case 124: -YY_RULE_SETUP -#line 245 "glslang.l" -{ pyylval->lex.line = yylineno; return(LEFT_BRACKET); } - YY_BREAK -case 125: -YY_RULE_SETUP -#line 246 "glslang.l" -{ pyylval->lex.line = yylineno; return(RIGHT_BRACKET); } - YY_BREAK -case 126: -YY_RULE_SETUP -#line 247 "glslang.l" -{ BEGIN(FIELDS); return(DOT); } - YY_BREAK -case 127: -YY_RULE_SETUP -#line 248 "glslang.l" -{ pyylval->lex.line = yylineno; return(BANG); } - YY_BREAK -case 128: -YY_RULE_SETUP -#line 249 "glslang.l" -{ pyylval->lex.line = yylineno; return(DASH); } - YY_BREAK -case 129: -YY_RULE_SETUP -#line 250 "glslang.l" -{ pyylval->lex.line = yylineno; return(TILDE); } - YY_BREAK -case 130: -YY_RULE_SETUP -#line 251 "glslang.l" -{ pyylval->lex.line = yylineno; return(PLUS); } - YY_BREAK -case 131: -YY_RULE_SETUP -#line 252 "glslang.l" -{ pyylval->lex.line = yylineno; return(STAR); } - YY_BREAK -case 132: -YY_RULE_SETUP -#line 253 "glslang.l" -{ pyylval->lex.line = yylineno; return(SLASH); } - YY_BREAK -case 133: -YY_RULE_SETUP -#line 254 "glslang.l" -{ pyylval->lex.line = yylineno; return(PERCENT); } - YY_BREAK -case 134: -YY_RULE_SETUP -#line 255 "glslang.l" -{ pyylval->lex.line = yylineno; return(LEFT_ANGLE); } - YY_BREAK -case 135: -YY_RULE_SETUP -#line 256 "glslang.l" -{ pyylval->lex.line = yylineno; return(RIGHT_ANGLE); } - YY_BREAK -case 136: -YY_RULE_SETUP -#line 257 "glslang.l" -{ pyylval->lex.line = yylineno; return(VERTICAL_BAR); } - YY_BREAK -case 137: -YY_RULE_SETUP -#line 258 "glslang.l" -{ pyylval->lex.line = yylineno; return(CARET); } - YY_BREAK -case 138: -YY_RULE_SETUP -#line 259 "glslang.l" -{ pyylval->lex.line = yylineno; return(AMPERSAND); } - YY_BREAK -case 139: -YY_RULE_SETUP -#line 260 "glslang.l" -{ pyylval->lex.line = yylineno; return(QUESTION); } - YY_BREAK -case 140: -YY_RULE_SETUP -#line 262 "glslang.l" -{ -BEGIN(INITIAL); - pyylval->lex.line = yylineno; - pyylval->lex.string = NewPoolTString(yytext); - return FIELD_SELECTION; } - YY_BREAK -case 141: -YY_RULE_SETUP -#line 267 "glslang.l" -{} - YY_BREAK -case 142: -YY_RULE_SETUP -#line 269 "glslang.l" -{ } - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(FIELDS): -#line 270 "glslang.l" -{ (&parseContext)->AfterEOF = true; yy_delete_buffer(YY_CURRENT_BUFFER); yyterminate();} - YY_BREAK -case 143: -YY_RULE_SETUP -#line 271 "glslang.l" -{ parseContext.infoSink.info << "FLEX: Unknown char " << yytext << "\n"; - return 0; } - YY_BREAK -case 144: -YY_RULE_SETUP -#line 274 "glslang.l" -ECHO; - YY_BREAK -#line 1723 "Gen_glslang.cpp" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type yy_get_previous_state() - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 428 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 428 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 427); - - return yy_is_jam ? 0 : yy_current_state; - } - - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - - return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } - -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 274 "glslang.l" - - - -//Including Pre-processor. -extern "C" { - #include "./preprocessor/preprocess.h" -} - -// -// The YY_INPUT macro just calls this. Maybe this could be just put into -// the macro directly. -// - -int yy_input(char* buf, int max_size) -{ - char *char_token =NULL; - int len; - - if ((len = yylex_CPP(buf, max_size)) == 0) - return 0; - if (len >= max_size) - YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); - - buf[len] = ' '; - return len+1; -} - - -// -// Parse an array of strings using yyparse. We set up globals used by -// yywrap. -// -// Returns 0 for success, as per yyparse(). -// -int PaParseStrings(char* argv[], int strLen[], int argc, TParseContext& parseContextLocal) -{ - int argv0len; - ScanFromString(argv[0]); - - //Storing the Current Compiler Parse context into the cpp structure. - cpp->pC = (void*)&parseContextLocal; - - if (!argv || argc == 0 || !argv[0]) - return 1; - - if (!strLen) { - argv0len = (int) strlen(argv[0]); - strLen = &argv0len; - } - yyrestart(0); - (&parseContextLocal)->AfterEOF = false; - cpp->PaWhichStr = 0; - cpp->PaArgv = argv; - cpp->PaArgc = argc; - cpp->PaStrLen = strLen; - yylineno = 1; - - if (*cpp->PaStrLen >= 0) { - int ret; - #ifdef _WIN32 - ret = yyparse(parseContextLocal); - #else - ret = yyparse((void*)(&parseContextLocal)); - #endif - if (cpp->CompileError == 1 || parseContextLocal.recoveredFromError || parseContextLocal.numErrors > 0) - return 1; - else - return 0; - } - else - return 0; -} - -void yyerror(char *s) -{ - if (((TParseContext *)cpp->pC)->AfterEOF) { - if (cpp->tokensBeforeEOF == 1) { - GlobalParseContext->error(yylineno, "syntax error", "pre-mature EOF", s, ""); - GlobalParseContext->recover(); - } - } else { - GlobalParseContext->error(yylineno, "syntax error", yytext, s, ""); - GlobalParseContext->recover(); - } -} - -void PaReservedWord() -{ - GlobalParseContext->error(yylineno, "Reserved word.", yytext, "", ""); - GlobalParseContext->recover(); -} - -int PaIdentOrType(TString& id, TParseContext& parseContextLocal, TSymbol*& symbol) -{ - symbol = parseContextLocal.symbolTable.find(id); - if (parseContextLocal.lexAfterType == false && symbol && symbol->isVariable()) { - TVariable* variable = static_cast(symbol); - if (variable->isUserType()) { - parseContextLocal.lexAfterType = true; - return TYPE_NAME; - } - } - - return IDENTIFIER; -} - -int PaParseComment(int &lineno, TParseContext& parseContextLocal) -{ - int transitionFlag = 0; - int nextChar; - - while (transitionFlag != 2) { - nextChar = yyinput(); - if (nextChar == '\n') - lineno++; - switch (nextChar) { - case '*' : - transitionFlag = 1; - break; - case '/' : /* if star is the previous character, then it is the end of comment */ - if (transitionFlag == 1) { - return 1 ; - } - break; - case EOF : - /* Raise error message here */ - parseContextLocal.error(yylineno, "End of shader found before end of comment.", "", "", ""); - GlobalParseContext->recover(); - return YY_NULL; - default : /* Any other character will be a part of the comment */ - transitionFlag = 0; - } - } - return 1; -} - -extern "C" { - -void CPPDebugLogMsg(const char *msg) -{ - ((TParseContext *)cpp->pC)->infoSink.debug.message(EPrefixNone, msg); -} - -void CPPWarningToInfoLog(const char *msg) -{ - ((TParseContext *)cpp->pC)->infoSink.info.message(EPrefixWarning, msg, yylineno); -} - -void CPPShInfoLogMsg(const char *msg) -{ - ((TParseContext *)cpp->pC)->error(yylineno,"", "",msg,""); - GlobalParseContext->recover(); -} - -void CPPErrorToInfoLog(char *msg) -{ - ((TParseContext *)cpp->pC)->error(yylineno,"syntax error", "",msg,""); - GlobalParseContext->recover(); -} - -void SetLineNumber(int line) -{ - yylineno &= ~SourceLocLineMask; - yylineno |= line; -} - -void SetStringNumber(int string) -{ - yylineno = (string << SourceLocStringShift) | (yylineno & SourceLocLineMask); -} - -int GetStringNumber(void) -{ - return yylineno >> 16; -} - -int GetLineNumber(void) -{ - return yylineno & SourceLocLineMask; -} - -void IncLineNumber(void) -{ - if ((yylineno & SourceLocLineMask) <= SourceLocLineMask) - ++yylineno; -} - -void DecLineNumber(void) -{ - if ((yylineno & SourceLocLineMask) > 0) - --yylineno; -} - -void HandlePragma(const char **tokens, int numTokens) -{ - if (!strcmp(tokens[0], "optimize")) { - if (numTokens != 4) { - CPPShInfoLogMsg("optimize pragma syntax is incorrect"); - return; - } - - if (strcmp(tokens[1], "(")) { - CPPShInfoLogMsg("\"(\" expected after 'optimize' keyword"); - return; - } - - if (!strcmp(tokens[2], "on")) - ((TParseContext *)cpp->pC)->contextPragma.optimize = true; - else if (!strcmp(tokens[2], "off")) - ((TParseContext *)cpp->pC)->contextPragma.optimize = false; - else { - CPPShInfoLogMsg("\"on\" or \"off\" expected after '(' for 'optimize' pragma"); - return; - } - - if (strcmp(tokens[3], ")")) { - CPPShInfoLogMsg("\")\" expected to end 'optimize' pragma"); - return; - } - } else if (!strcmp(tokens[0], "debug")) { - if (numTokens != 4) { - CPPShInfoLogMsg("debug pragma syntax is incorrect"); - return; - } - - if (strcmp(tokens[1], "(")) { - CPPShInfoLogMsg("\"(\" expected after 'debug' keyword"); - return; - } - - if (!strcmp(tokens[2], "on")) - ((TParseContext *)cpp->pC)->contextPragma.debug = true; - else if (!strcmp(tokens[2], "off")) - ((TParseContext *)cpp->pC)->contextPragma.debug = false; - else { - CPPShInfoLogMsg("\"on\" or \"off\" expected after '(' for 'debug' pragma"); - return; - } - - if (strcmp(tokens[3], ")")) { - CPPShInfoLogMsg("\")\" expected to end 'debug' pragma"); - return; - } - } else { - /* - // implementation specific pragma - // use ((TParseContext *)cpp->pC)->contextPragma.pragmaTable to store the information about pragma - // For now, just ignore the pragma that the implementation cannot recognize - // An Example of one such implementation for a pragma that has a syntax like - // #pragma pragmaname(pragmavalue) - // This implementation stores the current pragmavalue against the pragma name in pragmaTable. - if (numTokens == 4 && !strcmp(tokens[1], "(") && !strcmp(tokens[3], ")")) { - TPragmaTable& pragmaTable = ((TParseContext *)cpp->pC)->contextPragma.pragmaTable; - TPragmaTable::iterator iter; - iter = pragmaTable.find(TString(tokens[0])); - if (iter != pragmaTable.end()) { - iter->second = tokens[2]; - } else { - pragmaTable[tokens[0]] = tokens[2]; - } - } - */ - } -} - -void StoreStr(char *string) -{ - TString strSrc; - strSrc = TString(string); - - ((TParseContext *)cpp->pC)->HashErrMsg = ((TParseContext *)cpp->pC)->HashErrMsg + " " + strSrc; -} - -const char* GetStrfromTStr(void) -{ - cpp->ErrMsg = (((TParseContext *)cpp->pC)->HashErrMsg).c_str(); - return cpp->ErrMsg; -} - -void ResetTString(void) -{ - ((TParseContext *)cpp->pC)->HashErrMsg = ""; -} - -TBehavior GetBehavior(const char* behavior) -{ - if (!strcmp("require", behavior)) - return EBhRequire; - else if (!strcmp("enable", behavior)) - return EBhEnable; - else if (!strcmp("disable", behavior)) - return EBhDisable; - else if (!strcmp("warn", behavior)) - return EBhWarn; - else { - CPPShInfoLogMsg((TString("behavior '") + behavior + "' is not supported").c_str()); - return EBhDisable; - } -} - -void updateExtensionBehavior(const char* extName, const char* behavior) -{ - TBehavior behaviorVal = GetBehavior(behavior); - TMap:: iterator iter; - TString msg; - - // special cased for all extension - if (!strcmp(extName, "all")) { - if (behaviorVal == EBhRequire || behaviorVal == EBhEnable) { - CPPShInfoLogMsg("extension 'all' cannot have 'require' or 'enable' behavior"); - return; - } else { - for (iter = ((TParseContext *)cpp->pC)->extensionBehavior.begin(); iter != ((TParseContext *)cpp->pC)->extensionBehavior.end(); ++iter) - iter->second = behaviorVal; - } - } else { - iter = ((TParseContext *)cpp->pC)->extensionBehavior.find(TString(extName)); - if (iter == ((TParseContext *)cpp->pC)->extensionBehavior.end()) { - switch (behaviorVal) { - case EBhRequire: - CPPShInfoLogMsg((TString("extension '") + extName + "' is not supported").c_str()); - break; - case EBhEnable: - case EBhWarn: - case EBhDisable: - msg = TString("extension '") + extName + "' is not supported"; - ((TParseContext *)cpp->pC)->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno); - break; - } - return; - } else - iter->second = behaviorVal; - } -} - -} - -void setInitialState() -{ - yy_start = 1; -} diff --git a/src/mesa/shader/slang/MachineIndependent/Gen_glslang_tab.cpp b/src/mesa/shader/slang/MachineIndependent/Gen_glslang_tab.cpp deleted file mode 100755 index 69aa608726..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/Gen_glslang_tab.cpp +++ /dev/null @@ -1,4354 +0,0 @@ -/* A Bison parser, made by GNU Bison 1.875. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - CONST_QUAL = 259, - BOOL_TYPE = 260, - FLOAT_TYPE = 261, - INT_TYPE = 262, - BREAK = 263, - CONTINUE = 264, - DO = 265, - ELSE = 266, - FOR = 267, - IF = 268, - DISCARD = 269, - RETURN = 270, - BVEC2 = 271, - BVEC3 = 272, - BVEC4 = 273, - IVEC2 = 274, - IVEC3 = 275, - IVEC4 = 276, - VEC2 = 277, - VEC3 = 278, - VEC4 = 279, - MATRIX2 = 280, - MATRIX3 = 281, - MATRIX4 = 282, - IN_QUAL = 283, - OUT_QUAL = 284, - INOUT_QUAL = 285, - UNIFORM = 286, - VARYING = 287, - STRUCT = 288, - VOID_TYPE = 289, - WHILE = 290, - SAMPLER1D = 291, - SAMPLER2D = 292, - SAMPLER3D = 293, - SAMPLERCUBE = 294, - SAMPLER1DSHADOW = 295, - SAMPLER2DSHADOW = 296, - IDENTIFIER = 297, - TYPE_NAME = 298, - FLOATCONSTANT = 299, - INTCONSTANT = 300, - BOOLCONSTANT = 301, - FIELD_SELECTION = 302, - LEFT_OP = 303, - RIGHT_OP = 304, - INC_OP = 305, - DEC_OP = 306, - LE_OP = 307, - GE_OP = 308, - EQ_OP = 309, - NE_OP = 310, - AND_OP = 311, - OR_OP = 312, - XOR_OP = 313, - MUL_ASSIGN = 314, - DIV_ASSIGN = 315, - ADD_ASSIGN = 316, - MOD_ASSIGN = 317, - LEFT_ASSIGN = 318, - RIGHT_ASSIGN = 319, - AND_ASSIGN = 320, - XOR_ASSIGN = 321, - OR_ASSIGN = 322, - SUB_ASSIGN = 323, - LEFT_PAREN = 324, - RIGHT_PAREN = 325, - LEFT_BRACKET = 326, - RIGHT_BRACKET = 327, - LEFT_BRACE = 328, - RIGHT_BRACE = 329, - DOT = 330, - COMMA = 331, - COLON = 332, - EQUAL = 333, - SEMICOLON = 334, - BANG = 335, - DASH = 336, - TILDE = 337, - PLUS = 338, - STAR = 339, - SLASH = 340, - PERCENT = 341, - LEFT_ANGLE = 342, - RIGHT_ANGLE = 343, - VERTICAL_BAR = 344, - CARET = 345, - AMPERSAND = 346, - QUESTION = 347 - }; -#endif -#define ATTRIBUTE 258 -#define CONST_QUAL 259 -#define BOOL_TYPE 260 -#define FLOAT_TYPE 261 -#define INT_TYPE 262 -#define BREAK 263 -#define CONTINUE 264 -#define DO 265 -#define ELSE 266 -#define FOR 267 -#define IF 268 -#define DISCARD 269 -#define RETURN 270 -#define BVEC2 271 -#define BVEC3 272 -#define BVEC4 273 -#define IVEC2 274 -#define IVEC3 275 -#define IVEC4 276 -#define VEC2 277 -#define VEC3 278 -#define VEC4 279 -#define MATRIX2 280 -#define MATRIX3 281 -#define MATRIX4 282 -#define IN_QUAL 283 -#define OUT_QUAL 284 -#define INOUT_QUAL 285 -#define UNIFORM 286 -#define VARYING 287 -#define STRUCT 288 -#define VOID_TYPE 289 -#define WHILE 290 -#define SAMPLER1D 291 -#define SAMPLER2D 292 -#define SAMPLER3D 293 -#define SAMPLERCUBE 294 -#define SAMPLER1DSHADOW 295 -#define SAMPLER2DSHADOW 296 -#define IDENTIFIER 297 -#define TYPE_NAME 298 -#define FLOATCONSTANT 299 -#define INTCONSTANT 300 -#define BOOLCONSTANT 301 -#define FIELD_SELECTION 302 -#define LEFT_OP 303 -#define RIGHT_OP 304 -#define INC_OP 305 -#define DEC_OP 306 -#define LE_OP 307 -#define GE_OP 308 -#define EQ_OP 309 -#define NE_OP 310 -#define AND_OP 311 -#define OR_OP 312 -#define XOR_OP 313 -#define MUL_ASSIGN 314 -#define DIV_ASSIGN 315 -#define ADD_ASSIGN 316 -#define MOD_ASSIGN 317 -#define LEFT_ASSIGN 318 -#define RIGHT_ASSIGN 319 -#define AND_ASSIGN 320 -#define XOR_ASSIGN 321 -#define OR_ASSIGN 322 -#define SUB_ASSIGN 323 -#define LEFT_PAREN 324 -#define RIGHT_PAREN 325 -#define LEFT_BRACKET 326 -#define RIGHT_BRACKET 327 -#define LEFT_BRACE 328 -#define RIGHT_BRACE 329 -#define DOT 330 -#define COMMA 331 -#define COLON 332 -#define EQUAL 333 -#define SEMICOLON 334 -#define BANG 335 -#define DASH 336 -#define TILDE 337 -#define PLUS 338 -#define STAR 339 -#define SLASH 340 -#define PERCENT 341 -#define LEFT_ANGLE 342 -#define RIGHT_ANGLE 343 -#define VERTICAL_BAR 344 -#define CARET 345 -#define AMPERSAND 346 -#define QUESTION 347 - - - - -/* Copy the first part of user declarations. */ -#line 39 "glslang.y" - - -/* Based on: -ANSI C Yacc grammar - -In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a -matching Lex specification) for the April 30, 1985 draft version of the -ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that -original, as mentioned in the answer to question 17.25 of the comp.lang.c -FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z. - -I intend to keep this version as close to the current C Standard grammar as -possible; please let me know if you discover discrepancies. - -Jutta Degener, 1995 -*/ - -#include "SymbolTable.h" -#include "ParseHelper.h" -#include "../Public/ShaderLang.h" - -#ifdef _WIN32 - #define YYPARSE_PARAM parseContext - #define YYPARSE_PARAM_DECL TParseContext& - #define YY_DECL int yylex(YYSTYPE* pyylval, TParseContext& parseContext) - #define YYLEX_PARAM parseContext -#else - #define YYPARSE_PARAM parseContextLocal - #define parseContext (*((TParseContext*)(parseContextLocal))) - #define YY_DECL int yylex(YYSTYPE* pyylval, void* parseContextLocal) - #define YYLEX_PARAM (void*)(parseContextLocal) - extern void yyerror(char*); -#endif - -#define FRAG_VERT_ONLY(S, L) { \ - if (parseContext.language != EShLangFragment && \ - parseContext.language != EShLangVertex) { \ - parseContext.error(L, " supported in vertex/fragment shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define VERTEX_ONLY(S, L) { \ - if (parseContext.language != EShLangVertex) { \ - parseContext.error(L, " supported in vertex shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define FRAG_ONLY(S, L) { \ - if (parseContext.language != EShLangFragment) { \ - parseContext.error(L, " supported in fragment shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define PACK_ONLY(S, L) { \ - if (parseContext.language != EShLangPack) { \ - parseContext.error(L, " supported in pack shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define UNPACK_ONLY(S, L) { \ - if (parseContext.language != EShLangUnpack) { \ - parseContext.error(L, " supported in unpack shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define PACK_UNPACK_ONLY(S, L) { \ - if (parseContext.language != EShLangUnpack && \ - parseContext.language != EShLangPack) { \ - parseContext.error(L, " supported in pack/unpack shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 1 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 117 "glslang.y" -typedef union YYSTYPE { - struct { - TSourceLoc line; - union { - TString *string; - float f; - int i; - bool b; - }; - TSymbol* symbol; - } lex; - struct { - TSourceLoc line; - TOperator op; - union { - TIntermNode* intermNode; - TIntermNodePair nodePair; - TIntermTyped* intermTypedNode; - TIntermAggregate* intermAggregate; - }; - union { - TPublicType type; - TQualifier qualifier; - TFunction* function; - TParameter param; - TTypeLine typeLine; - TTypeList* typeList; - }; - } interm; -} YYSTYPE; -/* Line 191 of yacc.c. */ -#line 369 "glslang.tab.c" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ -#line 148 "glslang.y" - -#ifndef _WIN32 - extern int yylex(YYSTYPE*, void*); -#endif - - -/* Line 214 of yacc.c. */ -#line 386 "glslang.tab.c" - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free -# endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ - - -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 59 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1231 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 93 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 75 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 214 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 331 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 347 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned short yyprhs[] = -{ - 0, 0, 3, 5, 7, 9, 11, 13, 17, 19, - 24, 26, 30, 33, 36, 38, 40, 43, 46, 49, - 51, 54, 58, 61, 63, 65, 67, 69, 71, 73, - 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, - 95, 97, 99, 102, 105, 108, 110, 112, 114, 116, - 118, 122, 126, 130, 132, 136, 140, 142, 146, 150, - 152, 156, 160, 164, 168, 170, 174, 178, 180, 184, - 186, 190, 192, 196, 198, 202, 204, 208, 210, 214, - 216, 222, 224, 228, 230, 232, 234, 236, 238, 240, - 242, 244, 246, 248, 250, 252, 256, 258, 261, 264, - 267, 269, 271, 274, 278, 282, 285, 291, 295, 298, - 302, 305, 306, 308, 310, 312, 314, 319, 321, 325, - 331, 338, 344, 346, 349, 354, 360, 365, 367, 370, - 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, - 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, - 412, 414, 416, 418, 420, 422, 424, 426, 432, 437, - 439, 442, 446, 448, 452, 454, 459, 461, 463, 465, - 467, 469, 471, 473, 475, 477, 480, 481, 482, 488, - 490, 492, 495, 499, 501, 504, 506, 509, 515, 519, - 521, 523, 528, 529, 536, 537, 546, 547, 555, 557, - 559, 561, 562, 565, 569, 572, 575, 578, 582, 585, - 587, 590, 592, 594, 595 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short yyrhs[] = -{ - 164, 0, -1, 42, -1, 94, -1, 45, -1, 44, - -1, 46, -1, 69, 121, 70, -1, 95, -1, 96, - 71, 97, 72, -1, 98, -1, 96, 75, 47, -1, - 96, 50, -1, 96, 51, -1, 121, -1, 99, -1, - 101, 70, -1, 100, 70, -1, 102, 34, -1, 102, - -1, 102, 119, -1, 101, 76, 119, -1, 103, 69, - -1, 104, -1, 42, -1, 6, -1, 7, -1, 5, - -1, 22, -1, 23, -1, 24, -1, 16, -1, 17, - -1, 18, -1, 19, -1, 20, -1, 21, -1, 25, - -1, 26, -1, 27, -1, 43, -1, 96, -1, 50, - 105, -1, 51, 105, -1, 106, 105, -1, 83, -1, - 81, -1, 80, -1, 82, -1, 105, -1, 107, 84, - 105, -1, 107, 85, 105, -1, 107, 86, 105, -1, - 107, -1, 108, 83, 107, -1, 108, 81, 107, -1, - 108, -1, 109, 48, 108, -1, 109, 49, 108, -1, - 109, -1, 110, 87, 109, -1, 110, 88, 109, -1, - 110, 52, 109, -1, 110, 53, 109, -1, 110, -1, - 111, 54, 110, -1, 111, 55, 110, -1, 111, -1, - 112, 91, 111, -1, 112, -1, 113, 90, 112, -1, - 113, -1, 114, 89, 113, -1, 114, -1, 115, 56, - 114, -1, 115, -1, 116, 58, 115, -1, 116, -1, - 117, 57, 116, -1, 117, -1, 117, 92, 121, 77, - 119, -1, 118, -1, 105, 120, 119, -1, 78, -1, - 59, -1, 60, -1, 62, -1, 61, -1, 68, -1, - 63, -1, 64, -1, 65, -1, 66, -1, 67, -1, - 119, -1, 121, 76, 119, -1, 118, -1, 124, 79, - -1, 132, 79, -1, 125, 70, -1, 127, -1, 126, - -1, 127, 129, -1, 126, 76, 129, -1, 134, 42, - 69, -1, 136, 42, -1, 136, 42, 71, 122, 72, - -1, 135, 130, 128, -1, 130, 128, -1, 135, 130, - 131, -1, 130, 131, -1, -1, 28, -1, 29, -1, - 30, -1, 136, -1, 136, 71, 122, 72, -1, 133, - -1, 132, 76, 42, -1, 132, 76, 42, 71, 72, - -1, 132, 76, 42, 71, 122, 72, -1, 132, 76, - 42, 78, 142, -1, 134, -1, 134, 42, -1, 134, - 42, 71, 72, -1, 134, 42, 71, 122, 72, -1, - 134, 42, 78, 142, -1, 136, -1, 135, 136, -1, - 4, -1, 3, -1, 32, -1, 31, -1, 34, -1, - 6, -1, 7, -1, 5, -1, 22, -1, 23, -1, - 24, -1, 16, -1, 17, -1, 18, -1, 19, -1, - 20, -1, 21, -1, 25, -1, 26, -1, 27, -1, - 36, -1, 37, -1, 38, -1, 39, -1, 40, -1, - 41, -1, 137, -1, 43, -1, 33, 42, 73, 138, - 74, -1, 33, 73, 138, 74, -1, 139, -1, 138, - 139, -1, 136, 140, 79, -1, 141, -1, 140, 76, - 141, -1, 42, -1, 42, 71, 122, 72, -1, 119, - -1, 123, -1, 146, -1, 145, -1, 143, -1, 152, - -1, 153, -1, 156, -1, 163, -1, 73, 74, -1, - -1, -1, 73, 147, 151, 148, 74, -1, 150, -1, - 145, -1, 73, 74, -1, 73, 151, 74, -1, 144, - -1, 151, 144, -1, 79, -1, 121, 79, -1, 13, - 69, 121, 70, 154, -1, 144, 11, 144, -1, 144, - -1, 121, -1, 134, 42, 78, 142, -1, -1, 35, - 69, 157, 155, 70, 149, -1, -1, 10, 158, 144, - 35, 69, 121, 70, 79, -1, -1, 12, 69, 159, - 160, 162, 70, 149, -1, 152, -1, 143, -1, 155, - -1, -1, 161, 79, -1, 161, 79, 121, -1, 9, - 79, -1, 8, 79, -1, 15, 79, -1, 15, 121, - 79, -1, 14, 79, -1, 165, -1, 164, 165, -1, - 166, -1, 123, -1, -1, 124, 167, 150, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short yyrline[] = -{ - 0, 210, 210, 245, 248, 261, 266, 271, 277, 280, - 348, 351, 460, 470, 483, 491, 586, 590, 597, 601, - 608, 614, 623, 629, 640, 656, 657, 658, 659, 660, - 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, - 671, 682, 685, 695, 705, 727, 728, 729, 730, 736, - 737, 746, 755, 767, 768, 776, 787, 788, 797, 809, - 810, 820, 830, 840, 853, 854, 864, 877, 878, 890, - 891, 903, 904, 916, 917, 930, 931, 944, 945, 958, - 959, 976, 977, 990, 991, 992, 993, 994, 995, 996, - 997, 998, 999, 1000, 1004, 1007, 1018, 1026, 1027, 1035, - 1071, 1074, 1081, 1089, 1110, 1129, 1140, 1167, 1172, 1182, - 1187, 1197, 1200, 1203, 1206, 1212, 1217, 1235, 1238, 1246, - 1254, 1262, 1284, 1288, 1297, 1306, 1315, 1405, 1408, 1425, - 1429, 1436, 1444, 1453, 1458, 1463, 1468, 1479, 1484, 1489, - 1494, 1499, 1504, 1509, 1514, 1519, 1524, 1530, 1536, 1542, - 1548, 1554, 1560, 1566, 1572, 1578, 1583, 1596, 1606, 1614, - 1617, 1632, 1650, 1654, 1660, 1665, 1681, 1685, 1689, 1690, - 1696, 1697, 1698, 1699, 1700, 1704, 1705, 1705, 1705, 1713, - 1714, 1719, 1722, 1730, 1733, 1739, 1740, 1744, 1752, 1756, - 1766, 1771, 1788, 1788, 1793, 1793, 1800, 1800, 1813, 1816, - 1822, 1825, 1831, 1835, 1842, 1849, 1856, 1863, 1874, 1883, - 1887, 1894, 1897, 1903, 1903 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "ATTRIBUTE", "CONST_QUAL", "BOOL_TYPE", - "FLOAT_TYPE", "INT_TYPE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", - "IF", "DISCARD", "RETURN", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", - "IVEC4", "VEC2", "VEC3", "VEC4", "MATRIX2", "MATRIX3", "MATRIX4", - "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM", "VARYING", "STRUCT", - "VOID_TYPE", "WHILE", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", - "SAMPLERCUBE", "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "IDENTIFIER", - "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT", "BOOLCONSTANT", - "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", - "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", - "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", - "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", - "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", - "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", - "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", - "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION", - "$accept", "variable_identifier", "primary_expression", - "postfix_expression", "integer_expression", "function_call", - "function_call_generic", "function_call_header_no_parameters", - "function_call_header_with_parameters", "function_call_header", - "function_identifier", "constructor_identifier", "unary_expression", - "unary_operator", "multiplicative_expression", "additive_expression", - "shift_expression", "relational_expression", "equality_expression", - "and_expression", "exclusive_or_expression", "inclusive_or_expression", - "logical_and_expression", "logical_xor_expression", - "logical_or_expression", "conditional_expression", - "assignment_expression", "assignment_operator", "expression", - "constant_expression", "declaration", "function_prototype", - "function_declarator", "function_header_with_parameters", - "function_header", "parameter_declarator", "parameter_declaration", - "parameter_qualifier", "parameter_type_specifier", - "init_declarator_list", "single_declaration", "fully_specified_type", - "type_qualifier", "type_specifier", "struct_specifier", - "struct_declaration_list", "struct_declaration", - "struct_declarator_list", "struct_declarator", "initializer", - "declaration_statement", "statement", "simple_statement", - "compound_statement", "@1", "@2", "statement_no_new_scope", - "compound_statement_no_new_scope", "statement_list", - "expression_statement", "selection_statement", - "selection_rest_statement", "condition", "iteration_statement", "@3", - "@4", "@5", "for_init_statement", "conditionopt", "for_rest_statement", - "jump_statement", "translation_unit", "external_declaration", - "function_definition", "@6", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 93, 94, 95, 95, 95, 95, 95, 96, 96, - 96, 96, 96, 96, 97, 98, 99, 99, 100, 100, - 101, 101, 102, 103, 103, 104, 104, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 105, 105, 105, 105, 106, 106, 106, 106, 107, - 107, 107, 107, 108, 108, 108, 109, 109, 109, 110, - 110, 110, 110, 110, 111, 111, 111, 112, 112, 113, - 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, - 118, 119, 119, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 121, 121, 122, 123, 123, 124, - 125, 125, 126, 126, 127, 128, 128, 129, 129, 129, - 129, 130, 130, 130, 130, 131, 131, 132, 132, 132, - 132, 132, 133, 133, 133, 133, 133, 134, 134, 135, - 135, 135, 135, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 137, 137, 138, - 138, 139, 140, 140, 141, 141, 142, 143, 144, 144, - 145, 145, 145, 145, 145, 146, 147, 148, 146, 149, - 149, 150, 150, 151, 151, 152, 152, 153, 154, 154, - 155, 155, 157, 156, 158, 156, 159, 156, 160, 160, - 161, 161, 162, 162, 163, 163, 163, 163, 163, 164, - 164, 165, 165, 167, 166 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 3, 1, 4, - 1, 3, 2, 2, 1, 1, 2, 2, 2, 1, - 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, - 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, - 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, - 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, - 5, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 2, 2, 2, - 1, 1, 2, 3, 3, 2, 5, 3, 2, 3, - 2, 0, 1, 1, 1, 1, 4, 1, 3, 5, - 6, 5, 1, 2, 4, 5, 4, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 5, 4, 1, - 2, 3, 1, 3, 1, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 0, 0, 5, 1, - 1, 2, 3, 1, 2, 1, 2, 5, 3, 1, - 1, 4, 0, 6, 0, 8, 0, 7, 1, 1, - 1, 0, 2, 3, 2, 2, 2, 3, 2, 1, - 2, 1, 1, 0, 3 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 0, 130, 129, 136, 134, 135, 140, 141, 142, 143, - 144, 145, 137, 138, 139, 146, 147, 148, 132, 131, - 0, 133, 149, 150, 151, 152, 153, 154, 156, 212, - 213, 0, 101, 111, 0, 117, 122, 0, 127, 155, - 0, 209, 211, 0, 0, 97, 0, 99, 111, 112, - 113, 114, 102, 0, 111, 0, 98, 123, 128, 1, - 210, 0, 0, 0, 159, 0, 214, 103, 108, 110, - 115, 0, 118, 104, 0, 0, 0, 164, 0, 162, - 158, 160, 136, 134, 135, 0, 0, 194, 0, 0, - 0, 0, 140, 141, 142, 143, 144, 145, 137, 138, - 139, 146, 147, 148, 0, 2, 156, 5, 4, 6, - 0, 0, 0, 176, 181, 185, 47, 46, 48, 45, - 3, 8, 41, 10, 15, 0, 0, 19, 0, 23, - 49, 0, 53, 56, 59, 64, 67, 69, 71, 73, - 75, 77, 79, 81, 94, 0, 167, 0, 170, 183, - 169, 168, 0, 171, 172, 173, 174, 105, 0, 107, - 109, 0, 0, 27, 25, 26, 31, 32, 33, 34, - 35, 36, 28, 29, 30, 37, 38, 39, 40, 124, - 49, 96, 0, 166, 126, 157, 0, 0, 161, 205, - 204, 0, 196, 0, 208, 206, 0, 192, 42, 43, - 0, 175, 0, 12, 13, 0, 0, 17, 16, 0, - 18, 20, 22, 84, 85, 87, 86, 89, 90, 91, - 92, 93, 88, 83, 0, 44, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 186, 182, 184, - 0, 0, 119, 0, 121, 125, 0, 163, 0, 0, - 0, 207, 0, 7, 177, 0, 14, 11, 21, 82, - 50, 51, 52, 55, 54, 57, 58, 62, 63, 60, - 61, 65, 66, 68, 70, 72, 74, 76, 78, 0, - 95, 0, 116, 120, 165, 0, 199, 198, 201, 0, - 190, 0, 0, 0, 9, 0, 106, 0, 200, 0, - 0, 189, 187, 0, 0, 178, 80, 0, 202, 0, - 0, 0, 180, 193, 179, 0, 203, 197, 188, 191, - 195 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const short yydefgoto[] = -{ - -1, 120, 121, 122, 265, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 224, 145, 182, - 146, 147, 31, 32, 33, 68, 52, 53, 69, 34, - 35, 36, 37, 38, 39, 63, 64, 78, 79, 184, - 148, 149, 150, 151, 202, 303, 323, 324, 152, 153, - 154, 312, 302, 155, 262, 191, 259, 298, 309, 310, - 156, 40, 41, 42, 46 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -297 -static const short yypact[] = -{ - 1149, -297, -297, -297, -297, -297, -297, -297, -297, -297, - -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, - -27, -297, -297, -297, -297, -297, -297, -297, -297, -297, - -42, -28, -32, 4, 18, -297, 19, 1188, -297, -297, - 1108, -297, -297, -10, 1188, -297, -3, -297, 36, -297, - -297, -297, -297, 1188, 83, 33, -297, -9, -297, -297, - -297, 1188, 39, 1025, -297, 235, -297, -297, -297, -297, - -18, 1188, -52, -297, 685, 957, 1064, -17, 20, -297, - -297, -297, 29, 45, 63, 21, 23, -297, 75, 77, - 66, 753, 78, 79, 81, 82, 84, 85, 87, 89, - 90, 91, 93, 94, 95, 96, 97, -297, -297, -297, - 957, 957, 957, 120, -297, -297, -297, -297, -297, -297, - -297, -297, 5, -297, -297, 98, 1, 821, 100, -297, - 57, 957, 42, -56, 37, -40, 76, 61, 80, 106, - 111, 138, -41, -297, -297, 30, -297, -42, -297, -297, - -297, -297, 316, -297, -297, -297, -297, 127, 957, -297, - -297, 889, 957, -297, -297, -297, -297, -297, -297, -297, - -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, - -297, -297, 128, -297, -297, -297, 957, 39, -297, -297, - -297, 397, -297, 957, -297, -297, 31, -297, -297, -297, - 3, -297, 397, -297, -297, 957, 152, -297, -297, 957, - -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, - -297, -297, -297, -297, 957, -297, 957, 957, 957, 957, - 957, 957, 957, 957, 957, 957, 957, 957, 957, 957, - 957, 957, 957, 957, 957, 957, 957, -297, -297, -297, - 957, 129, -297, 130, -297, -297, 131, -297, 169, 549, - 12, -297, 617, -297, 397, 133, 134, -297, -297, -297, - -297, -297, -297, 42, 42, -56, -56, 37, 37, 37, - 37, -40, -40, 76, 61, 80, 106, 111, 138, 60, - -297, 135, -297, -297, -297, 137, -297, -297, 617, 397, - 134, 167, 141, 140, -297, 957, -297, 957, -297, 136, - 142, 205, -297, 143, 478, -297, -297, 13, 957, 478, - 397, 957, -297, -297, -297, 139, 134, -297, -297, -297, - -297 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const short yypgoto[] = -{ - -297, -297, -297, -297, -297, -297, -297, -297, -297, -297, - -297, -297, -53, -297, -91, -89, -143, -97, -20, -16, - -21, -15, -14, -22, -297, -57, -75, -297, -90, -155, - 9, 10, -297, -297, -297, 154, 175, 172, 160, -297, - -297, -257, -19, -33, -297, 171, -4, -297, 46, -160, - -25, -107, -296, -297, -297, -297, -84, 190, 35, 6, - -297, -297, -35, -297, -297, -297, -297, -297, -297, -297, - -297, -297, 224, -297, -297 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -101 -static const short yytable[] = -{ - 183, 196, 254, 251, 58, 301, 253, 1, 2, 29, - 30, 62, 233, 234, 54, 43, 244, 181, 322, 161, - 70, 180, 200, 322, 157, 229, 162, 230, 62, 54, - 62, 256, 49, 50, 51, 18, 19, 45, 70, 1, - 2, 301, 47, 62, 48, 249, 44, 235, 236, 29, - 30, 245, 211, 158, 186, 203, 204, 198, 199, 81, - 73, 57, 74, 61, 49, 50, 51, 18, 19, 75, - 65, 208, 81, 263, -100, 72, 205, 209, 225, 246, - 206, 77, 299, 325, 258, 231, 232, 183, 246, 246, - 277, 278, 279, 280, 55, 291, 187, 56, -27, 188, - 189, 181, 190, 260, 181, 180, 246, 246, 180, 247, - 261, 49, 50, 51, -25, 266, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 226, 227, 228, 181, - 237, 238, -26, 180, 268, 223, 246, 305, 273, 274, - 281, 282, 275, 276, 192, 194, 193, -31, -32, 269, - -33, -34, 239, -35, -36, 289, -28, 249, -29, -30, - -37, 329, -38, -39, 197, -24, -40, 242, 207, 212, - 240, 290, 300, 270, 271, 272, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 311, 181, 201, 241, 243, 180, 250, 267, - 255, 292, 293, 294, 295, 304, 307, 306, 300, 313, - 246, 314, 319, 328, 315, 318, 320, 317, 330, 283, - 285, 321, 288, 67, 284, 159, 71, 286, 326, 287, - 316, 160, 76, 257, 296, 327, 66, 264, 1, 2, - 82, 83, 84, 85, 86, 87, 183, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 308, 60, 297, 18, 19, 20, 21, - 104, 22, 23, 24, 25, 26, 27, 105, 106, 107, - 108, 109, 0, 0, 0, 110, 111, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 112, 0, 0, 0, 113, 114, - 0, 0, 0, 0, 115, 116, 117, 118, 119, 1, - 2, 82, 83, 84, 85, 86, 87, 0, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 0, 0, 0, 18, 19, 20, - 21, 104, 22, 23, 24, 25, 26, 27, 105, 106, - 107, 108, 109, 0, 0, 0, 110, 111, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 112, 0, 0, 0, 113, - 248, 0, 0, 0, 0, 115, 116, 117, 118, 119, - 1, 2, 82, 83, 84, 85, 86, 87, 0, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 0, 0, 0, 18, 19, - 20, 21, 104, 22, 23, 24, 25, 26, 27, 105, - 106, 107, 108, 109, 0, 0, 0, 110, 111, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, - 113, 0, 0, 0, 0, 0, 115, 116, 117, 118, - 119, 1, 2, 82, 83, 84, 85, 86, 87, 0, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 0, 0, 0, 18, - 19, 20, 21, 104, 22, 23, 24, 25, 26, 27, - 105, 106, 107, 108, 109, 0, 0, 0, 110, 111, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, - 0, 65, 1, 2, 82, 83, 84, 115, 116, 117, - 118, 119, 0, 0, 0, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 0, 0, 0, - 18, 19, 20, 21, 0, 22, 23, 24, 25, 26, - 27, 105, 106, 107, 108, 109, 0, 0, 0, 110, - 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, - 1, 2, 82, 83, 84, 0, 0, 0, 115, 116, - 117, 118, 119, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 0, 0, 0, 18, 19, - 20, 21, 0, 22, 23, 24, 25, 26, 27, 105, - 106, 107, 108, 109, 0, 0, 0, 110, 111, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, - 163, 164, 165, 0, 0, 0, 0, 116, 117, 118, - 119, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 105, 178, 107, - 108, 109, 0, 0, 0, 110, 111, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 112, 0, 0, 179, 163, 164, - 165, 0, 0, 0, 0, 116, 117, 118, 119, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 105, 178, 107, 108, 109, - 0, 0, 0, 110, 111, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 112, 0, 0, 0, 163, 164, 165, 0, - 0, 0, 195, 116, 117, 118, 119, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 0, - 0, 0, 0, 0, 0, 210, 0, 0, 0, 0, - 0, 0, 0, 105, 178, 107, 108, 109, 0, 0, - 0, 110, 111, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 0, 0, 0, 163, 164, 165, 0, 0, 0, - 0, 116, 117, 118, 119, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 105, 178, 107, 108, 109, 0, 0, 0, 110, - 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, - 0, 252, 163, 164, 165, 0, 0, 0, 0, 116, - 117, 118, 119, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, - 178, 107, 108, 109, 0, 0, 0, 110, 111, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, - 3, 4, 5, 0, 0, 0, 0, 116, 117, 118, - 119, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 0, 0, 0, 0, 0, 20, 21, - 0, 22, 23, 24, 25, 26, 27, 0, 28, 3, - 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 0, 0, 0, 0, 0, 20, 21, 80, - 22, 23, 24, 25, 26, 27, 0, 28, 59, 0, - 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 0, 0, 185, 18, - 19, 20, 21, 0, 22, 23, 24, 25, 26, 27, - 0, 28, 1, 2, 3, 4, 5, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, - 18, 19, 20, 21, 0, 22, 23, 24, 25, 26, - 27, 0, 28, 3, 4, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, - 0, 20, 21, 0, 22, 23, 24, 25, 26, 27, - 0, 28 -}; - -static const short yycheck[] = -{ - 75, 91, 162, 158, 37, 262, 161, 3, 4, 0, - 0, 44, 52, 53, 33, 42, 57, 74, 314, 71, - 53, 74, 112, 319, 42, 81, 78, 83, 61, 48, - 63, 186, 28, 29, 30, 31, 32, 79, 71, 3, - 4, 298, 70, 76, 76, 152, 73, 87, 88, 40, - 40, 92, 127, 71, 71, 50, 51, 110, 111, 63, - 69, 42, 71, 73, 28, 29, 30, 31, 32, 78, - 73, 70, 76, 70, 70, 42, 71, 76, 131, 76, - 75, 42, 70, 70, 191, 48, 49, 162, 76, 76, - 233, 234, 235, 236, 76, 250, 76, 79, 69, 79, - 79, 158, 79, 193, 161, 158, 76, 76, 161, 79, - 79, 28, 29, 30, 69, 205, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 84, 85, 86, 186, - 54, 55, 69, 186, 209, 78, 76, 77, 229, 230, - 237, 238, 231, 232, 69, 79, 69, 69, 69, 224, - 69, 69, 91, 69, 69, 245, 69, 264, 69, 69, - 69, 321, 69, 69, 69, 69, 69, 56, 70, 69, - 90, 246, 262, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 299, 250, 74, 89, 58, 250, 71, 47, - 72, 72, 72, 72, 35, 72, 69, 72, 298, 42, - 76, 70, 70, 320, 74, 79, 11, 307, 79, 239, - 241, 78, 244, 48, 240, 71, 54, 242, 318, 243, - 305, 71, 61, 187, 259, 319, 46, 202, 3, 4, - 5, 6, 7, 8, 9, 10, 321, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 298, 40, 259, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, -1, -1, -1, 50, 51, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 69, -1, -1, -1, 73, 74, - -1, -1, -1, -1, 79, 80, 81, 82, 83, 3, - 4, 5, 6, 7, 8, 9, 10, -1, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, -1, -1, -1, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, -1, -1, -1, 50, 51, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 69, -1, -1, -1, 73, - 74, -1, -1, -1, -1, 79, 80, 81, 82, 83, - 3, 4, 5, 6, 7, 8, 9, 10, -1, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, -1, -1, -1, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, -1, -1, -1, 50, 51, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 69, -1, -1, -1, - 73, -1, -1, -1, -1, -1, 79, 80, 81, 82, - 83, 3, 4, 5, 6, 7, 8, 9, 10, -1, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, -1, -1, -1, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, -1, -1, -1, 50, 51, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 69, -1, -1, - -1, 73, 3, 4, 5, 6, 7, 79, 80, 81, - 82, 83, -1, -1, -1, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, - 31, 32, 33, 34, -1, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, -1, -1, -1, 50, - 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 69, -1, - 3, 4, 5, 6, 7, -1, -1, -1, 79, 80, - 81, 82, 83, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, -1, -1, -1, 31, 32, - 33, 34, -1, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, -1, -1, -1, 50, 51, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 69, -1, -1, -1, - 5, 6, 7, -1, -1, -1, -1, 80, 81, 82, - 83, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 42, 43, 44, - 45, 46, -1, -1, -1, 50, 51, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 69, -1, -1, 72, 5, 6, - 7, -1, -1, -1, -1, 80, 81, 82, 83, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 42, 43, 44, 45, 46, - -1, -1, -1, 50, 51, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 69, -1, -1, -1, 5, 6, 7, -1, - -1, -1, 79, 80, 81, 82, 83, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, - -1, -1, -1, -1, -1, 34, -1, -1, -1, -1, - -1, -1, -1, 42, 43, 44, 45, 46, -1, -1, - -1, 50, 51, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 69, -1, -1, -1, 5, 6, 7, -1, -1, -1, - -1, 80, 81, 82, 83, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 42, 43, 44, 45, 46, -1, -1, -1, 50, - 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 69, -1, - -1, 72, 5, 6, 7, -1, -1, -1, -1, 80, - 81, 82, 83, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, - 43, 44, 45, 46, -1, -1, -1, 50, 51, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 69, -1, -1, -1, - 5, 6, 7, -1, -1, -1, -1, 80, 81, 82, - 83, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, -1, -1, -1, -1, -1, 33, 34, - -1, 36, 37, 38, 39, 40, 41, -1, 43, 5, - 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, -1, -1, -1, -1, -1, 33, 34, 74, - 36, 37, 38, 39, 40, 41, -1, 43, 0, -1, - -1, 3, 4, 5, 6, 7, -1, -1, -1, -1, - -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, -1, -1, 74, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, 41, - -1, 43, 3, 4, 5, 6, 7, -1, -1, -1, - -1, -1, -1, -1, -1, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, - 31, 32, 33, 34, -1, 36, 37, 38, 39, 40, - 41, -1, 43, 5, 6, 7, -1, -1, -1, -1, - -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, - -1, 33, 34, -1, 36, 37, 38, 39, 40, 41, - -1, 43 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 3, 4, 5, 6, 7, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 31, 32, - 33, 34, 36, 37, 38, 39, 40, 41, 43, 123, - 124, 125, 126, 127, 132, 133, 134, 135, 136, 137, - 164, 165, 166, 42, 73, 79, 167, 70, 76, 28, - 29, 30, 129, 130, 135, 76, 79, 42, 136, 0, - 165, 73, 136, 138, 139, 73, 150, 129, 128, 131, - 136, 130, 42, 69, 71, 78, 138, 42, 140, 141, - 74, 139, 5, 6, 7, 8, 9, 10, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 35, 42, 43, 44, 45, 46, - 50, 51, 69, 73, 74, 79, 80, 81, 82, 83, - 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 121, 123, 124, 143, 144, - 145, 146, 151, 152, 153, 156, 163, 42, 71, 128, - 131, 71, 78, 5, 6, 7, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 43, 72, - 105, 118, 122, 119, 142, 74, 71, 76, 79, 79, - 79, 158, 69, 69, 79, 79, 121, 69, 105, 105, - 121, 74, 147, 50, 51, 71, 75, 70, 70, 76, - 34, 119, 69, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 78, 120, 105, 84, 85, 86, 81, - 83, 48, 49, 52, 53, 87, 88, 54, 55, 91, - 90, 89, 56, 58, 57, 92, 76, 79, 74, 144, - 71, 122, 72, 122, 142, 72, 122, 141, 144, 159, - 121, 79, 157, 70, 151, 97, 121, 47, 119, 119, - 105, 105, 105, 107, 107, 108, 108, 109, 109, 109, - 109, 110, 110, 111, 112, 113, 114, 115, 116, 121, - 119, 122, 72, 72, 72, 35, 143, 152, 160, 70, - 121, 134, 155, 148, 72, 77, 72, 69, 155, 161, - 162, 144, 154, 42, 70, 74, 119, 121, 79, 70, - 11, 78, 145, 149, 150, 70, 121, 149, 144, 142, - 79 -}; - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror ("syntax error: cannot back up");\ - YYERROR; \ - } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.first_line = Rhs[1].first_line; \ - Current.first_column = Rhs[1].first_column; \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; -#endif - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) - -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (cinluded). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short *bottom, short *top) -#else -static void -yy_stack_print (bottom, top) - short *bottom; - short *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; -#endif -{ - int yyi; - unsigned int yylineno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - register const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# endif -# endif - -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - register char *yyd = yydest; - register const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -#endif /* !YYERROR_VERBOSE */ - - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yydestruct (int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - /* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; - - - -#define YYPOPSTACK (yyvsp--, yyssp--) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyoverflowlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - short *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - yystate = yyn; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 210 "glslang.y" - { - // The symbol table search was done in the lexical phase - const TSymbol* symbol = yyvsp[0].lex.symbol; - const TVariable* variable; - if (symbol == 0) { - parseContext.error(yyvsp[0].lex.line, "undeclared identifier", yyvsp[0].lex.string->c_str(), ""); - parseContext.recover(); - TType type(EbtFloat); - TVariable* fakeVariable = new TVariable(yyvsp[0].lex.string, type); - parseContext.symbolTable.insert(*fakeVariable); - variable = fakeVariable; - } else { - // This identifier can only be a variable type symbol - if (! symbol->isVariable()) { - parseContext.error(yyvsp[0].lex.line, "variable expected", yyvsp[0].lex.string->c_str(), ""); - parseContext.recover(); - } - variable = static_cast(symbol); - } - - // don't delete $1.string, it's used by error recovery, and the pool - // pop will reclaim the memory - - if (variable->getType().getQualifier() == EvqConst ) { - constUnion* constArray = variable->getConstPointer(); - TType t(variable->getType()); - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(constArray, t, yyvsp[0].lex.line); - } else - yyval.interm.intermTypedNode = parseContext.intermediate.addSymbol(variable->getUniqueId(), - variable->getName(), - variable->getType(), yyvsp[0].lex.line); - ;} - break; - - case 3: -#line 245 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 4: -#line 248 "glslang.y" - { - // - // INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders, - // check for overflow for constants - // - if (abs(yyvsp[0].lex.i) >= (1 << 16)) { - parseContext.error(yyvsp[0].lex.line, " integer constant overflow", "", ""); - parseContext.recover(); - } - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = yyvsp[0].lex.i; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line); - ;} - break; - - case 5: -#line 261 "glslang.y" - { - constUnion *unionArray = new constUnion[1]; - unionArray->fConst = yyvsp[0].lex.f; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), yyvsp[0].lex.line); - ;} - break; - - case 6: -#line 266 "glslang.y" - { - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = yyvsp[0].lex.b; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[0].lex.line); - ;} - break; - - case 7: -#line 271 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[-1].interm.intermTypedNode; - ;} - break; - - case 8: -#line 277 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 9: -#line 280 "glslang.y" - { - if (!yyvsp[-3].interm.intermTypedNode->isArray() && !yyvsp[-3].interm.intermTypedNode->isMatrix() && !yyvsp[-3].interm.intermTypedNode->isVector()) { - if (yyvsp[-3].interm.intermTypedNode->getAsSymbolNode()) - parseContext.error(yyvsp[-2].lex.line, " left of '[' is not of type array, matrix, or vector ", yyvsp[-3].interm.intermTypedNode->getAsSymbolNode()->getSymbol().c_str(), ""); - else - parseContext.error(yyvsp[-2].lex.line, " left of '[' is not of type array, matrix, or vector ", "expression", ""); - parseContext.recover(); - } - if (yyvsp[-3].interm.intermTypedNode->getType().getQualifier() == EvqConst && !yyvsp[-3].interm.intermTypedNode->isArray() && yyvsp[-1].interm.intermTypedNode->getQualifier() == EvqConst) { - if (yyvsp[-3].interm.intermTypedNode->isVector()) { // constant folding for vectors - TVectorFields fields; - fields.num = 1; - fields.offsets[0] = yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst; // need to do it this way because v.xy sends fields integer array - yyval.interm.intermTypedNode = parseContext.addConstVectorNode(fields, yyvsp[-3].interm.intermTypedNode, yyvsp[-2].lex.line); - } else if (yyvsp[-3].interm.intermTypedNode->isMatrix()) { // constant folding for matrices - yyval.interm.intermTypedNode = parseContext.addConstMatrixNode(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst, yyvsp[-3].interm.intermTypedNode, yyvsp[-2].lex.line); - } - } else { - if (yyvsp[-1].interm.intermTypedNode->getQualifier() == EvqConst) { - if ((yyvsp[-3].interm.intermTypedNode->isVector() || yyvsp[-3].interm.intermTypedNode->isMatrix()) && yyvsp[-3].interm.intermTypedNode->getType().getNominalSize() <= yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst && !yyvsp[-3].interm.intermTypedNode->isArray() ) { - parseContext.error(yyvsp[-2].lex.line, "", "[", "field selection out of range '%d'", yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst); - parseContext.recover(); - } else { - if (yyvsp[-3].interm.intermTypedNode->isArray()) { - if (yyvsp[-3].interm.intermTypedNode->getType().getArraySize() == 0) { - if (yyvsp[-3].interm.intermTypedNode->getType().getMaxArraySize() <= yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst) { - if (parseContext.arraySetMaxSize(yyvsp[-3].interm.intermTypedNode->getAsSymbolNode(), yyvsp[-3].interm.intermTypedNode->getTypePointer(), yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst, true, yyvsp[-2].lex.line)) - parseContext.recover(); - } else { - if (parseContext.arraySetMaxSize(yyvsp[-3].interm.intermTypedNode->getAsSymbolNode(), yyvsp[-3].interm.intermTypedNode->getTypePointer(), 0, false, yyvsp[-2].lex.line)) - parseContext.recover(); - } - } else if ( yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst >= yyvsp[-3].interm.intermTypedNode->getType().getArraySize()) { - parseContext.error(yyvsp[-2].lex.line, "", "[", "array index out of range '%d'", yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst); - parseContext.recover(); - } - } - yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-3].interm.intermTypedNode, yyvsp[-1].interm.intermTypedNode, yyvsp[-2].lex.line); - } - } else { - if (yyvsp[-3].interm.intermTypedNode->isArray() && yyvsp[-3].interm.intermTypedNode->getType().getArraySize() == 0) { - parseContext.error(yyvsp[-2].lex.line, "", "[", "array must be redeclared with a size before being indexed with a variable"); - parseContext.recover(); - } - - yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexIndirect, yyvsp[-3].interm.intermTypedNode, yyvsp[-1].interm.intermTypedNode, yyvsp[-2].lex.line); - } - } - if (yyval.interm.intermTypedNode == 0) { - constUnion *unionArray = new constUnion[1]; - unionArray->fConst = 0.0; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), yyvsp[-2].lex.line); - } else if (yyvsp[-3].interm.intermTypedNode->isArray()) { - if (yyvsp[-3].interm.intermTypedNode->getType().getStruct()) - yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getType().getStruct(), yyvsp[-3].interm.intermTypedNode->getType().getTypeName())); - else - yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqTemporary, yyvsp[-3].interm.intermTypedNode->getNominalSize(), yyvsp[-3].interm.intermTypedNode->isMatrix())); - } else if (yyvsp[-3].interm.intermTypedNode->isMatrix() && yyvsp[-3].interm.intermTypedNode->getType().getQualifier() == EvqConst) - yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqConst, yyvsp[-3].interm.intermTypedNode->getNominalSize())); - else if (yyvsp[-3].interm.intermTypedNode->isMatrix()) - yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqTemporary, yyvsp[-3].interm.intermTypedNode->getNominalSize())); - else if (yyvsp[-3].interm.intermTypedNode->isVector() && yyvsp[-3].interm.intermTypedNode->getType().getQualifier() == EvqConst) - yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqConst)); - else if (yyvsp[-3].interm.intermTypedNode->isVector()) - yyval.interm.intermTypedNode->setType(TType(yyvsp[-3].interm.intermTypedNode->getBasicType(), EvqTemporary)); - else - yyval.interm.intermTypedNode->setType(yyvsp[-3].interm.intermTypedNode->getType()); - ;} - break; - - case 10: -#line 348 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 11: -#line 351 "glslang.y" - { - if (yyvsp[-2].interm.intermTypedNode->isArray()) { - parseContext.error(yyvsp[0].lex.line, "cannot apply dot operator to an array", ".", ""); - parseContext.recover(); - } - - if (yyvsp[-2].interm.intermTypedNode->isVector()) { - TVectorFields fields; - if (! parseContext.parseVectorFields(*yyvsp[0].lex.string, yyvsp[-2].interm.intermTypedNode->getNominalSize(), fields, yyvsp[0].lex.line)) { - fields.num = 1; - fields.offsets[0] = 0; - parseContext.recover(); - } - - if (yyvsp[-2].interm.intermTypedNode->getType().getQualifier() == EvqConst) { // constant folding for vector fields - yyval.interm.intermTypedNode = parseContext.addConstVectorNode(fields, yyvsp[-2].interm.intermTypedNode, yyvsp[0].lex.line); - if (yyval.interm.intermTypedNode == 0) { - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - else - yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType(), EvqConst, (int) (*yyvsp[0].lex.string).size())); - } else { - if (fields.num == 1) { - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = fields.offsets[0]; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line); - yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType())); - } else { - TString vectorString = *yyvsp[0].lex.string; - TIntermTyped* index = parseContext.intermediate.addSwizzle(fields, yyvsp[0].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpVectorSwizzle, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line); - yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType(),EvqTemporary, (int) vectorString.size())); - } - } - } else if (yyvsp[-2].interm.intermTypedNode->isMatrix()) { - TMatrixFields fields; - if (! parseContext.parseMatrixFields(*yyvsp[0].lex.string, yyvsp[-2].interm.intermTypedNode->getNominalSize(), fields, yyvsp[0].lex.line)) { - fields.wholeRow = false; - fields.wholeCol = false; - fields.row = 0; - fields.col = 0; - parseContext.recover(); - } - - if (fields.wholeRow || fields.wholeCol) { - parseContext.error(yyvsp[-1].lex.line, " non-scalar fields not implemented yet", ".", ""); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = 0; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line); - yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType(), EvqTemporary, yyvsp[-2].interm.intermTypedNode->getNominalSize())); - } else { - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = fields.col * yyvsp[-2].interm.intermTypedNode->getNominalSize() + fields.row; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirect, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line); - yyval.interm.intermTypedNode->setType(TType(yyvsp[-2].interm.intermTypedNode->getBasicType())); - } - } else if (yyvsp[-2].interm.intermTypedNode->getBasicType() == EbtStruct) { - bool fieldFound = false; - TTypeList* fields = yyvsp[-2].interm.intermTypedNode->getType().getStruct(); - if (fields == 0) { - parseContext.error(yyvsp[-1].lex.line, "structure has no fields", "Internal Error", ""); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } else { - unsigned int i; - for (i = 0; i < fields->size(); ++i) { - if ((*fields)[i].type->getFieldName() == *yyvsp[0].lex.string) { - fieldFound = true; - break; - } - } - if (fieldFound) { - if (yyvsp[-2].interm.intermTypedNode->getType().getQualifier() == EvqConst) { - yyval.interm.intermTypedNode = parseContext.addConstStruct(*yyvsp[0].lex.string, yyvsp[-2].interm.intermTypedNode, yyvsp[-1].lex.line); - if (yyval.interm.intermTypedNode == 0) { - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - else { - yyval.interm.intermTypedNode->setType(*(*fields)[i].type); - // change the qualifier of the return type, not of the structure field - // as the structure definition is shared between various structures. - yyval.interm.intermTypedNode->getTypePointer()->changeQualifier(EvqConst); - } - } else { - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = i; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), yyvsp[0].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addIndex(EOpIndexDirectStruct, yyvsp[-2].interm.intermTypedNode, index, yyvsp[-1].lex.line); - yyval.interm.intermTypedNode->setType(*(*fields)[i].type); - } - } else { - parseContext.error(yyvsp[-1].lex.line, " no such field in structure", yyvsp[0].lex.string->c_str(), ""); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - } - } else { - parseContext.error(yyvsp[-1].lex.line, " field selection requires structure, vector, or matrix on left hand side", yyvsp[0].lex.string->c_str(), ""); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - // don't delete $3.string, it's from the pool - ;} - break; - - case 12: -#line 460 "glslang.y" - { - if (parseContext.lValueErrorCheck(yyvsp[0].lex.line, "++", yyvsp[-1].interm.intermTypedNode)) - parseContext.recover(); - yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPostIncrement, yyvsp[-1].interm.intermTypedNode, yyvsp[0].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.unaryOpError(yyvsp[0].lex.line, "++", yyvsp[-1].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-1].interm.intermTypedNode; - } - ;} - break; - - case 13: -#line 470 "glslang.y" - { - if (parseContext.lValueErrorCheck(yyvsp[0].lex.line, "--", yyvsp[-1].interm.intermTypedNode)) - parseContext.recover(); - yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPostDecrement, yyvsp[-1].interm.intermTypedNode, yyvsp[0].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.unaryOpError(yyvsp[0].lex.line, "--", yyvsp[-1].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-1].interm.intermTypedNode; - } - ;} - break; - - case 14: -#line 483 "glslang.y" - { - if (parseContext.integerErrorCheck(yyvsp[0].interm.intermTypedNode, "[]")) - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 15: -#line 491 "glslang.y" - { - TFunction* fnCall = yyvsp[0].interm.function; - TOperator op = fnCall->getBuiltInOp(); - - if (op != EOpNull) { - // - // Then this should be a constructor. - // - TType type(EbtVoid); // use this to get the type back - if (parseContext.constructorErrorCheck(yyvsp[0].interm.line, yyvsp[0].interm.intermNode, *fnCall, op, &type)) { - yyval.interm.intermTypedNode = 0; - } else { - // - // It's a constructor, of type 'type'. - // - yyval.interm.intermTypedNode = parseContext.addConstructor(yyvsp[0].interm.intermNode, &type, op, fnCall, yyvsp[0].interm.line); - } - - if (yyval.interm.intermTypedNode == 0) { - parseContext.recover(); - yyval.interm.intermTypedNode = parseContext.intermediate.setAggregateOperator(0, op, yyvsp[0].interm.line); - } - yyval.interm.intermTypedNode->setType(type); - } else { - // - // Not a constructor. Find it in the symbol table. - // - const TFunction* fnCandidate; - bool builtIn; - fnCandidate = parseContext.findFunction(yyvsp[0].interm.line, fnCall, &builtIn); - if (fnCandidate) { - // - // A declared function. But, it might still map to a built-in - // operation. - // - op = fnCandidate->getBuiltInOp(); - if (builtIn && op != EOpNull) { - // - // A function call mapped to a built-in operation. - // - if (fnCandidate->getParamCount() == 1) { - // - // Treat it like a built-in unary operator. - // - yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(op, yyvsp[0].interm.intermNode, 0, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.error(yyvsp[0].interm.intermNode->getLine(), " wrong operand type", "Internal Error", - "built in unary operator function. Type: %s", - static_cast(yyvsp[0].interm.intermNode)->getCompleteString().c_str()); - YYERROR; - } - } else { - yyval.interm.intermTypedNode = parseContext.intermediate.setAggregateOperator(yyvsp[0].interm.intermAggregate, op, yyvsp[0].interm.line); - } - } else { - // This is a real function call - - yyval.interm.intermTypedNode = parseContext.intermediate.setAggregateOperator(yyvsp[0].interm.intermAggregate, EOpFunctionCall, yyvsp[0].interm.line); - yyval.interm.intermTypedNode->setType(fnCandidate->getReturnType()); - - // this is how we know whether the given function is a builtIn function or a user defined function - // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also - // if builtIn == true, it's definitely a builtIn function with EOpNull - if (!builtIn) - yyval.interm.intermTypedNode->getAsAggregate()->setUserDefined(); - yyval.interm.intermTypedNode->getAsAggregate()->setName(fnCandidate->getMangledName()); - - TQualifier qual; - TQualifierList& qualifierList = yyval.interm.intermTypedNode->getAsAggregate()->getQualifier(); - for (int i = 0; i < fnCandidate->getParamCount(); ++i) { - qual = (*fnCandidate)[i].type->getQualifier(); - if (qual == EvqOut || qual == EvqInOut) { - if (parseContext.lValueErrorCheck(yyval.interm.intermTypedNode->getLine(), "assign", yyval.interm.intermTypedNode->getAsAggregate()->getSequence()[i]->getAsTyped())) { - parseContext.error(yyvsp[0].interm.intermNode->getLine(), "Constant value cannot be passed for 'out' or 'inout' parameters.", "Error", ""); - parseContext.recover(); - } - } - qualifierList.push_back(qual); - } - } - yyval.interm.intermTypedNode->setType(fnCandidate->getReturnType()); - } else { - // error message was put out by PaFindFunction() - // Put on a dummy node for error recovery - constUnion *unionArray = new constUnion[1]; - unionArray->fConst = 0.0; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), yyvsp[0].interm.line); - parseContext.recover(); - } - } - delete fnCall; - ;} - break; - - case 16: -#line 586 "glslang.y" - { - yyval.interm = yyvsp[-1].interm; - yyval.interm.line = yyvsp[0].lex.line; - ;} - break; - - case 17: -#line 590 "glslang.y" - { - yyval.interm = yyvsp[-1].interm; - yyval.interm.line = yyvsp[0].lex.line; - ;} - break; - - case 18: -#line 597 "glslang.y" - { - yyval.interm.function = yyvsp[-1].interm.function; - yyval.interm.intermNode = 0; - ;} - break; - - case 19: -#line 601 "glslang.y" - { - yyval.interm.function = yyvsp[0].interm.function; - yyval.interm.intermNode = 0; - ;} - break; - - case 20: -#line 608 "glslang.y" - { - TParameter param = { 0, new TType(yyvsp[0].interm.intermTypedNode->getType()) }; - yyvsp[-1].interm.function->addParameter(param); - yyval.interm.function = yyvsp[-1].interm.function; - yyval.interm.intermNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 21: -#line 614 "glslang.y" - { - TParameter param = { 0, new TType(yyvsp[0].interm.intermTypedNode->getType()) }; - yyvsp[-2].interm.function->addParameter(param); - yyval.interm.function = yyvsp[-2].interm.function; - yyval.interm.intermNode = parseContext.intermediate.growAggregate(yyvsp[-2].interm.intermNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line); - ;} - break; - - case 22: -#line 623 "glslang.y" - { - yyval.interm.function = yyvsp[-1].interm.function; - ;} - break; - - case 23: -#line 629 "glslang.y" - { - if (yyvsp[0].interm.op == EOpConstructStruct) { - TString tempString = ""; - TFunction *function = new TFunction(&tempString, *(yyvsp[0].interm.type.userDef), yyvsp[0].interm.op); - yyval.interm.function = function; - } - else { - TFunction *function = new TFunction(yyvsp[0].interm.op); - yyval.interm.function = function; - } - ;} - break; - - case 24: -#line 640 "glslang.y" - { - if (parseContext.reservedErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string)) - parseContext.recover(); - TType type(EbtVoid); - TFunction *function = new TFunction(yyvsp[0].lex.string, type); - yyval.interm.function = function; - ;} - break; - - case 25: -#line 656 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructFloat; ;} - break; - - case 26: -#line 657 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructInt; ;} - break; - - case 27: -#line 658 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBool; ;} - break; - - case 28: -#line 659 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructVec2; ;} - break; - - case 29: -#line 660 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructVec3; ;} - break; - - case 30: -#line 661 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructVec4; ;} - break; - - case 31: -#line 662 "glslang.y" - { FRAG_VERT_ONLY("bvec2", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBVec2; ;} - break; - - case 32: -#line 663 "glslang.y" - { FRAG_VERT_ONLY("bvec3", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBVec3; ;} - break; - - case 33: -#line 664 "glslang.y" - { FRAG_VERT_ONLY("bvec4", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructBVec4; ;} - break; - - case 34: -#line 665 "glslang.y" - { FRAG_VERT_ONLY("ivec2", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructIVec2; ;} - break; - - case 35: -#line 666 "glslang.y" - { FRAG_VERT_ONLY("ivec3", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructIVec3; ;} - break; - - case 36: -#line 667 "glslang.y" - { FRAG_VERT_ONLY("ivec4", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructIVec4; ;} - break; - - case 37: -#line 668 "glslang.y" - { FRAG_VERT_ONLY("mat2", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructMat2; ;} - break; - - case 38: -#line 669 "glslang.y" - { FRAG_VERT_ONLY("mat3", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructMat3; ;} - break; - - case 39: -#line 670 "glslang.y" - { FRAG_VERT_ONLY("mat4", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpConstructMat4; ;} - break; - - case 40: -#line 671 "glslang.y" - { - TType& structure = static_cast(yyvsp[0].lex.symbol)->getType(); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtStruct, qual, 1, false, false, &structure, yyvsp[0].lex.line }; - yyval.interm.type = t; - yyval.interm.line = yyvsp[0].lex.line; - yyval.interm.op = EOpConstructStruct; - ;} - break; - - case 41: -#line 682 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 42: -#line 685 "glslang.y" - { - if (parseContext.lValueErrorCheck(yyvsp[-1].lex.line, "++", yyvsp[0].interm.intermTypedNode)) - parseContext.recover(); - yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPreIncrement, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.unaryOpError(yyvsp[-1].lex.line, "++", yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - } - ;} - break; - - case 43: -#line 695 "glslang.y" - { - if (parseContext.lValueErrorCheck(yyvsp[-1].lex.line, "--", yyvsp[0].interm.intermTypedNode)) - parseContext.recover(); - yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(EOpPreDecrement, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.unaryOpError(yyvsp[-1].lex.line, "--", yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - } - ;} - break; - - case 44: -#line 705 "glslang.y" - { - if (yyvsp[-1].interm.op != EOpNull) { - yyval.interm.intermTypedNode = parseContext.intermediate.addUnaryMath(yyvsp[-1].interm.op, yyvsp[0].interm.intermTypedNode, yyvsp[-1].interm.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - char* errorOp = ""; - switch(yyvsp[-1].interm.op) { - case EOpNegative: errorOp = "-"; break; - case EOpLogicalNot: errorOp = "!"; break; - case EOpBitwiseNot: errorOp = "~"; break; - default: break; - } - parseContext.unaryOpError(yyvsp[-1].interm.line, errorOp, yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - } - } else - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 45: -#line 727 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpNull; ;} - break; - - case 46: -#line 728 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpNegative; ;} - break; - - case 47: -#line 729 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpLogicalNot; ;} - break; - - case 48: -#line 730 "glslang.y" - { PACK_UNPACK_ONLY("~", yyvsp[0].lex.line); - yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpBitwiseNot; ;} - break; - - case 49: -#line 736 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 50: -#line 737 "glslang.y" - { - FRAG_VERT_ONLY("*", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpMul, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "*", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 51: -#line 746 "glslang.y" - { - FRAG_VERT_ONLY("/", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpDiv, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "/", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 52: -#line 755 "glslang.y" - { - PACK_UNPACK_ONLY("%", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpMod, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "%", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 53: -#line 767 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 54: -#line 768 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpAdd, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "+", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 55: -#line 776 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpSub, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "-", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 56: -#line 787 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 57: -#line 788 "glslang.y" - { - PACK_UNPACK_ONLY("<<", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLeftShift, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "<<", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 58: -#line 797 "glslang.y" - { - PACK_UNPACK_ONLY(">>", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpRightShift, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, ">>", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 59: -#line 809 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 60: -#line 810 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLessThan, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "<", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 61: -#line 820 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpGreaterThan, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, ">", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 62: -#line 830 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLessThanEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "<=", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 63: -#line 840 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpGreaterThanEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, ">=", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 64: -#line 853 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 65: -#line 854 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "==", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 66: -#line 864 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpNotEqual, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "!=", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 67: -#line 877 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 68: -#line 878 "glslang.y" - { - PACK_UNPACK_ONLY("&", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpAnd, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "&", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 69: -#line 890 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 70: -#line 891 "glslang.y" - { - PACK_UNPACK_ONLY("^", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpExclusiveOr, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "^", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 71: -#line 903 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 72: -#line 904 "glslang.y" - { - PACK_UNPACK_ONLY("|", yyvsp[-1].lex.line); - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpInclusiveOr, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "|", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 73: -#line 916 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 74: -#line 917 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLogicalAnd, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "&&", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 75: -#line 930 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 76: -#line 931 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLogicalXor, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "^^", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 77: -#line 944 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 78: -#line 945 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addBinaryMath(EOpLogicalOr, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line, parseContext.symbolTable); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, "||", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - yyval.interm.intermTypedNode = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), yyvsp[-1].lex.line); - } - ;} - break; - - case 79: -#line 958 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 80: -#line 959 "glslang.y" - { - if (parseContext.boolErrorCheck(yyvsp[-3].lex.line, yyvsp[-4].interm.intermTypedNode)) - parseContext.recover(); - - yyval.interm.intermTypedNode = parseContext.intermediate.addSelection(yyvsp[-4].interm.intermTypedNode, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-3].lex.line); - if (yyvsp[-2].interm.intermTypedNode->getType() != yyvsp[0].interm.intermTypedNode->getType()) - yyval.interm.intermTypedNode = 0; - - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-3].lex.line, ":", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - } - ;} - break; - - case 81: -#line 976 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 82: -#line 977 "glslang.y" - { - if (parseContext.lValueErrorCheck(yyvsp[-1].interm.line, "assign", yyvsp[-2].interm.intermTypedNode)) - parseContext.recover(); - yyval.interm.intermTypedNode = parseContext.intermediate.addAssign(yyvsp[-1].interm.op, yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].interm.line); - if (yyval.interm.intermTypedNode == 0) { - parseContext.assignError(yyvsp[-1].interm.line, "assign", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[-2].interm.intermTypedNode; - } - ;} - break; - - case 83: -#line 990 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpAssign; ;} - break; - - case 84: -#line 991 "glslang.y" - { FRAG_VERT_ONLY("*=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpMulAssign; ;} - break; - - case 85: -#line 992 "glslang.y" - { FRAG_VERT_ONLY("/=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpDivAssign; ;} - break; - - case 86: -#line 993 "glslang.y" - { PACK_UNPACK_ONLY("%=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpModAssign; ;} - break; - - case 87: -#line 994 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpAddAssign; ;} - break; - - case 88: -#line 995 "glslang.y" - { yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpSubAssign; ;} - break; - - case 89: -#line 996 "glslang.y" - { PACK_UNPACK_ONLY("<<=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpLeftShiftAssign; ;} - break; - - case 90: -#line 997 "glslang.y" - { PACK_UNPACK_ONLY("<<=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpRightShiftAssign; ;} - break; - - case 91: -#line 998 "glslang.y" - { PACK_UNPACK_ONLY("&=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpAndAssign; ;} - break; - - case 92: -#line 999 "glslang.y" - { PACK_UNPACK_ONLY("^=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpExclusiveOrAssign; ;} - break; - - case 93: -#line 1000 "glslang.y" - { PACK_UNPACK_ONLY("|=", yyvsp[0].lex.line); yyval.interm.line = yyvsp[0].lex.line; yyval.interm.op = EOpInclusiveOrAssign; ;} - break; - - case 94: -#line 1004 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 95: -#line 1007 "glslang.y" - { - yyval.interm.intermTypedNode = parseContext.intermediate.addComma(yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.intermTypedNode, yyvsp[-1].lex.line); - if (yyval.interm.intermTypedNode == 0) { - parseContext.binaryOpError(yyvsp[-1].lex.line, ",", yyvsp[-2].interm.intermTypedNode->getCompleteString(), yyvsp[0].interm.intermTypedNode->getCompleteString()); - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - } - ;} - break; - - case 96: -#line 1018 "glslang.y" - { - if (parseContext.constErrorCheck(yyvsp[0].interm.intermTypedNode)) - parseContext.recover(); - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 97: -#line 1026 "glslang.y" - { yyval.interm.intermNode = 0; ;} - break; - - case 98: -#line 1027 "glslang.y" - { - if (yyvsp[-1].interm.intermAggregate) - yyvsp[-1].interm.intermAggregate->setOperator(EOpSequence); - yyval.interm.intermNode = yyvsp[-1].interm.intermAggregate; - ;} - break; - - case 99: -#line 1035 "glslang.y" - { - // - // Multiple declarations of the same function are allowed. - // - // If this is a definition, the definition production code will check for redefinitions - // (we don't know at this point if it's a definition or not). - // - // Redeclarations are allowed. But, return types and parameter qualifiers must match. - // - TFunction* prevDec = static_cast(parseContext.symbolTable.find(yyvsp[-1].interm.function->getMangledName())); - if (prevDec) { - if (prevDec->getReturnType() != yyvsp[-1].interm.function->getReturnType()) { - parseContext.error(yyvsp[0].lex.line, "overloaded functions must have the same return type", yyvsp[-1].interm.function->getReturnType().getBasicString(), ""); - parseContext.recover(); - } - for (int i = 0; i < prevDec->getParamCount(); ++i) { - if ((*prevDec)[i].type->getQualifier() != (*yyvsp[-1].interm.function)[i].type->getQualifier()) { - parseContext.error(yyvsp[0].lex.line, "overloaded functions must have the same parameter qualifiers", (*yyvsp[-1].interm.function)[i].type->getQualifierString(), ""); - parseContext.recover(); - } - } - } - - // - // If this is a redeclaration, it could also be a definition, - // in which case, we want to use the variable names from this one, and not the one that's - // being redeclared. So, pass back up this declaration, not the one in the symbol table. - // - yyval.interm.function = yyvsp[-1].interm.function; - yyval.interm.line = yyvsp[0].lex.line; - - parseContext.symbolTable.insert(*yyval.interm.function); - ;} - break; - - case 100: -#line 1071 "glslang.y" - { - yyval.interm.function = yyvsp[0].interm.function; - ;} - break; - - case 101: -#line 1074 "glslang.y" - { - yyval.interm.function = yyvsp[0].interm.function; - ;} - break; - - case 102: -#line 1081 "glslang.y" - { - // Add the parameter - yyval.interm.function = yyvsp[-1].interm.function; - if (yyvsp[0].interm.param.type->getBasicType() != EbtVoid) - yyvsp[-1].interm.function->addParameter(yyvsp[0].interm.param); - else - delete yyvsp[0].interm.param.type; - ;} - break; - - case 103: -#line 1089 "glslang.y" - { - // - // Only first parameter of one-parameter functions can be void - // The check for named parameters not being void is done in parameter_declarator - // - if (yyvsp[0].interm.param.type->getBasicType() == EbtVoid) { - // - // This parameter > first is void - // - parseContext.error(yyvsp[-1].lex.line, "cannot be an argument type except for '(void)'", "void", ""); - parseContext.recover(); - delete yyvsp[0].interm.param.type; - } else { - // Add the parameter - yyval.interm.function = yyvsp[-2].interm.function; - yyvsp[-2].interm.function->addParameter(yyvsp[0].interm.param); - } - ;} - break; - - case 104: -#line 1110 "glslang.y" - { - if (yyvsp[-2].interm.type.qualifier != EvqGlobal && yyvsp[-2].interm.type.qualifier != EvqTemporary) { - parseContext.error(yyvsp[-1].lex.line, "no qualifiers allowed for function return", getQualifierString(yyvsp[-2].interm.type.qualifier), ""); - parseContext.recover(); - } - // make sure a sampler is not involved as well... - if (parseContext.structQualifierErrorCheck(yyvsp[-1].lex.line, yyvsp[-2].interm.type)) - parseContext.recover(); - - // Add the function as a prototype after parsing it (we do not support recursion) - TFunction *function; - TType type(yyvsp[-2].interm.type); - function = new TFunction(yyvsp[-1].lex.string, type); - yyval.interm.function = function; - ;} - break; - - case 105: -#line 1129 "glslang.y" - { - if (yyvsp[-1].interm.type.type == EbtVoid) { - parseContext.error(yyvsp[0].lex.line, "illegal use of type 'void'", yyvsp[0].lex.string->c_str(), ""); - parseContext.recover(); - } - if (parseContext.reservedErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string)) - parseContext.recover(); - TParameter param = {yyvsp[0].lex.string, new TType(yyvsp[-1].interm.type)}; - yyval.interm.line = yyvsp[0].lex.line; - yyval.interm.param = param; - ;} - break; - - case 106: -#line 1140 "glslang.y" - { - // Check that we can make an array out of this type - if (yyvsp[-4].interm.type.array) { - parseContext.error(yyvsp[-2].lex.line, "cannot declare arrays of this type", TType(yyvsp[-4].interm.type).getCompleteString().c_str(), ""); - parseContext.recover(); - } - if (parseContext.reservedErrorCheck(yyvsp[-3].lex.line, *yyvsp[-3].lex.string)) - parseContext.recover(); - yyvsp[-4].interm.type.array = true; - TType* type = new TType(yyvsp[-4].interm.type); - if (yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()) - type->setArraySize(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst); - TParameter param = { yyvsp[-3].lex.string, type }; - yyval.interm.line = yyvsp[-3].lex.line; - yyval.interm.param = param; - ;} - break; - - case 107: -#line 1167 "glslang.y" - { - yyval.interm = yyvsp[0].interm; - if (parseContext.paramErrorCheck(yyvsp[0].interm.line, yyvsp[-2].interm.type.qualifier, yyvsp[-1].interm.qualifier, yyval.interm.param.type)) - parseContext.recover(); - ;} - break; - - case 108: -#line 1172 "glslang.y" - { - yyval.interm = yyvsp[0].interm; - if (parseContext.parameterSamplerErrorCheck(yyvsp[0].interm.line, yyvsp[-1].interm.qualifier, *yyvsp[0].interm.param.type)) - parseContext.recover(); - if (parseContext.paramErrorCheck(yyvsp[0].interm.line, EvqTemporary, yyvsp[-1].interm.qualifier, yyval.interm.param.type)) - parseContext.recover(); - ;} - break; - - case 109: -#line 1182 "glslang.y" - { - yyval.interm = yyvsp[0].interm; - if (parseContext.paramErrorCheck(yyvsp[0].interm.line, yyvsp[-2].interm.type.qualifier, yyvsp[-1].interm.qualifier, yyval.interm.param.type)) - parseContext.recover(); - ;} - break; - - case 110: -#line 1187 "glslang.y" - { - yyval.interm = yyvsp[0].interm; - if (parseContext.parameterSamplerErrorCheck(yyvsp[0].interm.line, yyvsp[-1].interm.qualifier, *yyvsp[0].interm.param.type)) - parseContext.recover(); - if (parseContext.paramErrorCheck(yyvsp[0].interm.line, EvqTemporary, yyvsp[-1].interm.qualifier, yyval.interm.param.type)) - parseContext.recover(); - ;} - break; - - case 111: -#line 1197 "glslang.y" - { - yyval.interm.qualifier = EvqIn; - ;} - break; - - case 112: -#line 1200 "glslang.y" - { - yyval.interm.qualifier = EvqIn; - ;} - break; - - case 113: -#line 1203 "glslang.y" - { - yyval.interm.qualifier = EvqOut; - ;} - break; - - case 114: -#line 1206 "glslang.y" - { - yyval.interm.qualifier = EvqInOut; - ;} - break; - - case 115: -#line 1212 "glslang.y" - { - TParameter param = { 0, new TType(yyvsp[0].interm.type) }; - yyval.interm.param = param; - - ;} - break; - - case 116: -#line 1217 "glslang.y" - { - // Check that we can make an array out of this type - if (yyvsp[-3].interm.type.array) { - parseContext.error(yyvsp[-2].lex.line, "cannot declare arrays of this type", TType(yyvsp[-3].interm.type).getCompleteString().c_str(), ""); - parseContext.recover(); - } - yyvsp[-3].interm.type.array = true; - TType* type = new TType(yyvsp[-3].interm.type); - if (yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()) - type->setArraySize(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst); - - TParameter param = { 0, type }; - yyval.interm.line = yyvsp[-2].lex.line; - yyval.interm.param = param; - ;} - break; - - case 117: -#line 1235 "glslang.y" - { - yyval.interm = yyvsp[0].interm; - ;} - break; - - case 118: -#line 1238 "glslang.y" - { - yyval.interm = yyvsp[-2].interm; - if (parseContext.structQualifierErrorCheck(yyvsp[0].lex.line, yyvsp[-2].interm.type)) - parseContext.recover(); - - if (parseContext.nonInitErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string, yyval.interm.type)) - parseContext.recover(); - ;} - break; - - case 119: -#line 1246 "glslang.y" - { - yyval.interm = yyvsp[-4].interm; - if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-4].interm.type)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck(yyvsp[-1].lex.line, *yyvsp[-2].lex.string, yyval.interm.type, 0)) - parseContext.recover(); - ;} - break; - - case 120: -#line 1254 "glslang.y" - { - yyval.interm = yyvsp[-5].interm; - if (parseContext.structQualifierErrorCheck(yyvsp[-3].lex.line, yyvsp[-5].interm.type)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck(yyvsp[-2].lex.line, *yyvsp[-3].lex.string, yyval.interm.type, yyvsp[-1].interm.intermTypedNode)) - parseContext.recover(); - ;} - break; - - case 121: -#line 1262 "glslang.y" - { - yyval.interm = yyvsp[-4].interm; - if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-4].interm.type)) - parseContext.recover(); - - TIntermNode* intermNode; - if (!parseContext.executeInitializer(yyvsp[-2].lex.line, *yyvsp[-2].lex.string, yyvsp[-4].interm.type, yyvsp[0].interm.intermTypedNode, intermNode)) { - // - // build the intermediate representation - // - if (intermNode) - yyval.interm.intermAggregate = parseContext.intermediate.growAggregate(yyvsp[-4].interm.intermNode, intermNode, yyvsp[-1].lex.line); - else - yyval.interm.intermAggregate = yyvsp[-4].interm.intermAggregate; - } else { - parseContext.recover(); - yyval.interm.intermAggregate = 0; - } - ;} - break; - - case 122: -#line 1284 "glslang.y" - { - yyval.interm.type = yyvsp[0].interm.type; - yyval.interm.intermAggregate = 0; - ;} - break; - - case 123: -#line 1288 "glslang.y" - { - yyval.interm.intermAggregate = 0; - yyval.interm.type = yyvsp[-1].interm.type; - if (parseContext.structQualifierErrorCheck(yyvsp[0].lex.line, yyvsp[-1].interm.type)) - parseContext.recover(); - - if (parseContext.nonInitErrorCheck(yyvsp[0].lex.line, *yyvsp[0].lex.string, yyval.interm.type)) - parseContext.recover(); - ;} - break; - - case 124: -#line 1297 "glslang.y" - { - yyval.interm.intermAggregate = 0; - yyval.interm.type = yyvsp[-3].interm.type; - if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck(yyvsp[-1].lex.line, *yyvsp[-2].lex.string, yyval.interm.type, 0)) - parseContext.recover(); - ;} - break; - - case 125: -#line 1306 "glslang.y" - { - yyval.interm.intermAggregate = 0; - yyval.interm.type = yyvsp[-4].interm.type; - if (parseContext.structQualifierErrorCheck(yyvsp[-3].lex.line, yyvsp[-4].interm.type)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck(yyvsp[-2].lex.line, *yyvsp[-3].lex.string, yyval.interm.type, yyvsp[-1].interm.intermTypedNode)) - parseContext.recover(); - ;} - break; - - case 126: -#line 1315 "glslang.y" - { - yyval.interm.type = yyvsp[-3].interm.type; - if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type)) - parseContext.recover(); - - TIntermNode* intermNode; - if (!parseContext.executeInitializer(yyvsp[-2].lex.line, *yyvsp[-2].lex.string, yyvsp[-3].interm.type, yyvsp[0].interm.intermTypedNode, intermNode)) { - // - // Build intermediate representation - // - if (intermNode) - yyval.interm.intermAggregate = parseContext.intermediate.makeAggregate(intermNode, yyvsp[-1].lex.line); - else - yyval.interm.intermAggregate = 0; - } else { - parseContext.recover(); - yyval.interm.intermAggregate = 0; - } - ;} - break; - - case 127: -#line 1405 "glslang.y" - { - yyval.interm.type = yyvsp[0].interm.type; - ;} - break; - - case 128: -#line 1408 "glslang.y" - { - TPublicType t = { yyvsp[0].interm.type.type, yyvsp[-1].interm.type.qualifier, yyvsp[0].interm.type.size, yyvsp[0].interm.type.matrix, false, yyvsp[0].interm.type.userDef, 0 }; - if (yyvsp[-1].interm.type.qualifier == EvqAttribute && - (yyvsp[0].interm.type.type == EbtBool || yyvsp[0].interm.type.type == EbtInt)) { - parseContext.error(yyvsp[0].interm.type.line, "cannot be bool or int", getQualifierString(yyvsp[-1].interm.type.qualifier), ""); - parseContext.recover(); - } - if ((yyvsp[-1].interm.type.qualifier == EvqVaryingIn || yyvsp[-1].interm.type.qualifier == EvqVaryingOut) && - (yyvsp[0].interm.type.type == EbtBool || yyvsp[0].interm.type.type == EbtInt)) { - parseContext.error(yyvsp[0].interm.type.line, "cannot be bool or int", getQualifierString(yyvsp[-1].interm.type.qualifier), ""); - parseContext.recover(); - } - yyval.interm.type = t; - ;} - break; - - case 129: -#line 1425 "glslang.y" - { - TPublicType t = { EbtVoid, EvqConst, 1, false, false, 0 }; - yyval.interm.type = t; - ;} - break; - - case 130: -#line 1429 "glslang.y" - { - VERTEX_ONLY("attribute", yyvsp[0].lex.line); - if (parseContext.globalErrorCheck(yyvsp[0].lex.line, parseContext.symbolTable.atGlobalLevel(), "attribute")) - parseContext.recover(); - TPublicType t = { EbtVoid, EvqAttribute, 1, false, false, 0 }; - yyval.interm.type = t; - ;} - break; - - case 131: -#line 1436 "glslang.y" - { - if (parseContext.globalErrorCheck(yyvsp[0].lex.line, parseContext.symbolTable.atGlobalLevel(), "varying")) - parseContext.recover(); - TPublicType t = { EbtVoid, EvqVaryingIn, 1, false, false, 0 }; - if (parseContext.language == EShLangVertex) - t.qualifier = EvqVaryingOut; - yyval.interm.type = t; - ;} - break; - - case 132: -#line 1444 "glslang.y" - { - if (parseContext.globalErrorCheck(yyvsp[0].lex.line, parseContext.symbolTable.atGlobalLevel(), "uniform")) - parseContext.recover(); - TPublicType t = { EbtVoid, EvqUniform, 1, false, false, 0 }; - yyval.interm.type = t; - ;} - break; - - case 133: -#line 1453 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtVoid, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 134: -#line 1458 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 135: -#line 1463 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 136: -#line 1468 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 137: -#line 1479 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 2, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 138: -#line 1484 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 3, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 139: -#line 1489 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 4, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 140: -#line 1494 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 2, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 141: -#line 1499 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 3, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 142: -#line 1504 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 4, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 143: -#line 1509 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 2, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 144: -#line 1514 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 3, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 145: -#line 1519 "glslang.y" - { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 4, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 146: -#line 1524 "glslang.y" - { - FRAG_VERT_ONLY("mat2", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 2, true, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 147: -#line 1530 "glslang.y" - { - FRAG_VERT_ONLY("mat3", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 3, true, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 148: -#line 1536 "glslang.y" - { - FRAG_VERT_ONLY("mat4", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 4, true, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 149: -#line 1542 "glslang.y" - { - FRAG_VERT_ONLY("sampler1D", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler1D, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 150: -#line 1548 "glslang.y" - { - FRAG_VERT_ONLY("sampler2D", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler2D, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 151: -#line 1554 "glslang.y" - { - FRAG_VERT_ONLY("sampler3D", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler3D, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 152: -#line 1560 "glslang.y" - { - FRAG_VERT_ONLY("samplerCube", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSamplerCube, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 153: -#line 1566 "glslang.y" - { - FRAG_VERT_ONLY("sampler1DShadow", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler1DShadow, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 154: -#line 1572 "glslang.y" - { - FRAG_VERT_ONLY("sampler2DShadow", yyvsp[0].lex.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler2DShadow, qual, 1, false, false, 0, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 155: -#line 1578 "glslang.y" - { - FRAG_VERT_ONLY("struct", yyvsp[0].interm.type.line); - yyval.interm.type = yyvsp[0].interm.type; - yyval.interm.type.qualifier = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - ;} - break; - - case 156: -#line 1583 "glslang.y" - { - // - // This is for user defined type names. The lexical phase looked up the - // type. - // - TType& structure = static_cast(yyvsp[0].lex.symbol)->getType(); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtStruct, qual, 1, false, false, &structure, yyvsp[0].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 157: -#line 1596 "glslang.y" - { - TType* structure = new TType(yyvsp[-1].interm.typeList, *yyvsp[-3].lex.string); - TVariable* userTypeDef = new TVariable(yyvsp[-3].lex.string, *structure, true); - if (! parseContext.symbolTable.insert(*userTypeDef)) { - parseContext.error(yyvsp[-3].lex.line, "redefinition", yyvsp[-3].lex.string->c_str(), "struct"); - parseContext.recover(); - } - TPublicType t = { EbtStruct, EvqTemporary, 1, false, false, structure, yyvsp[-4].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 158: -#line 1606 "glslang.y" - { - TType* structure = new TType(yyvsp[-1].interm.typeList, TString("")); - TPublicType t = { EbtStruct, EvqTemporary, 1, false, false, structure, yyvsp[-3].lex.line }; - yyval.interm.type = t; - ;} - break; - - case 159: -#line 1614 "glslang.y" - { - yyval.interm.typeList = yyvsp[0].interm.typeList; - ;} - break; - - case 160: -#line 1617 "glslang.y" - { - yyval.interm.typeList = yyvsp[-1].interm.typeList; - for (unsigned int i = 0; i < yyvsp[0].interm.typeList->size(); ++i) { - for (unsigned int j = 0; j < yyval.interm.typeList->size(); ++j) { - if ((*yyval.interm.typeList)[j].type->getFieldName() == (*yyvsp[0].interm.typeList)[i].type->getFieldName()) { - parseContext.error((*yyvsp[0].interm.typeList)[i].line, "duplicate field name in structure:", "struct", (*yyvsp[0].interm.typeList)[i].type->getFieldName().c_str()); - parseContext.recover(); - } - } - yyval.interm.typeList->push_back((*yyvsp[0].interm.typeList)[i]); - } - ;} - break; - - case 161: -#line 1632 "glslang.y" - { - yyval.interm.typeList = yyvsp[-1].interm.typeList; - - if (parseContext.voidErrorCheck(yyvsp[-2].interm.type.line, (*yyvsp[-1].interm.typeList)[0].type->getFieldName(), yyvsp[-2].interm.type)) { - parseContext.recover(); - } - for (unsigned int i = 0; i < yyval.interm.typeList->size(); ++i) { - // - // Careful not to replace already know aspects of type, like array-ness - // - (*yyval.interm.typeList)[i].type->setType(yyvsp[-2].interm.type.type, yyvsp[-2].interm.type.size, yyvsp[-2].interm.type.matrix, yyvsp[-2].interm.type.userDef); - if (yyvsp[-2].interm.type.userDef) - (*yyval.interm.typeList)[i].type->setTypeName(yyvsp[-2].interm.type.userDef->getTypeName()); - } - ;} - break; - - case 162: -#line 1650 "glslang.y" - { - yyval.interm.typeList = NewPoolTTypeList(); - yyval.interm.typeList->push_back(yyvsp[0].interm.typeLine); - ;} - break; - - case 163: -#line 1654 "glslang.y" - { - yyval.interm.typeList->push_back(yyvsp[0].interm.typeLine); - ;} - break; - - case 164: -#line 1660 "glslang.y" - { - yyval.interm.typeLine.type = new TType(EbtVoid); - yyval.interm.typeLine.line = yyvsp[0].lex.line; - yyval.interm.typeLine.type->setFieldName(*yyvsp[0].lex.string); - ;} - break; - - case 165: -#line 1665 "glslang.y" - { - yyval.interm.typeLine.type = new TType(EbtVoid); - yyval.interm.typeLine.line = yyvsp[-3].lex.line; - yyval.interm.typeLine.type->setFieldName(*yyvsp[-3].lex.string); - - if (yyvsp[-1].interm.intermTypedNode->getAsConstantUnion() == 0 || yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getBasicType() != EbtInt || - yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst <= 0) { - parseContext.error(yyvsp[-2].lex.line, "structure field array size must be a positive integer", yyvsp[-3].lex.string->c_str(), ""); - parseContext.recover(); - } else { - yyval.interm.typeLine.type->setArraySize(yyvsp[-1].interm.intermTypedNode->getAsConstantUnion()->getUnionArrayPointer()->iConst); - } - ;} - break; - - case 166: -#line 1681 "glslang.y" - { yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; ;} - break; - - case 167: -#line 1685 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 168: -#line 1689 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermAggregate; ;} - break; - - case 169: -#line 1690 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 170: -#line 1696 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 171: -#line 1697 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 172: -#line 1698 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 173: -#line 1699 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 174: -#line 1700 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 175: -#line 1704 "glslang.y" - { yyval.interm.intermAggregate = 0; ;} - break; - - case 176: -#line 1705 "glslang.y" - { parseContext.symbolTable.push(); ;} - break; - - case 177: -#line 1705 "glslang.y" - { parseContext.symbolTable.pop(); ;} - break; - - case 178: -#line 1705 "glslang.y" - { - if (yyvsp[-2].interm.intermAggregate != 0) - yyvsp[-2].interm.intermAggregate->setOperator(EOpSequence); - yyval.interm.intermAggregate = yyvsp[-2].interm.intermAggregate; - ;} - break; - - case 179: -#line 1713 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 180: -#line 1714 "glslang.y" - { yyval.interm.intermNode = yyvsp[0].interm.intermNode; ;} - break; - - case 181: -#line 1719 "glslang.y" - { - yyval.interm.intermNode = 0; - ;} - break; - - case 182: -#line 1722 "glslang.y" - { - if (yyvsp[-1].interm.intermAggregate) - yyvsp[-1].interm.intermAggregate->setOperator(EOpSequence); - yyval.interm.intermNode = yyvsp[-1].interm.intermAggregate; - ;} - break; - - case 183: -#line 1730 "glslang.y" - { - yyval.interm.intermAggregate = parseContext.intermediate.makeAggregate(yyvsp[0].interm.intermNode, 0); - ;} - break; - - case 184: -#line 1733 "glslang.y" - { - yyval.interm.intermAggregate = parseContext.intermediate.growAggregate(yyvsp[-1].interm.intermAggregate, yyvsp[0].interm.intermNode, 0); - ;} - break; - - case 185: -#line 1739 "glslang.y" - { yyval.interm.intermNode = 0; ;} - break; - - case 186: -#line 1740 "glslang.y" - { yyval.interm.intermNode = static_cast(yyvsp[-1].interm.intermTypedNode); ;} - break; - - case 187: -#line 1744 "glslang.y" - { - if (parseContext.boolErrorCheck(yyvsp[-4].lex.line, yyvsp[-2].interm.intermTypedNode)) - parseContext.recover(); - yyval.interm.intermNode = parseContext.intermediate.addSelection(yyvsp[-2].interm.intermTypedNode, yyvsp[0].interm.nodePair, yyvsp[-4].lex.line); - ;} - break; - - case 188: -#line 1752 "glslang.y" - { - yyval.interm.nodePair.node1 = yyvsp[-2].interm.intermNode; - yyval.interm.nodePair.node2 = yyvsp[0].interm.intermNode; - ;} - break; - - case 189: -#line 1756 "glslang.y" - { - yyval.interm.nodePair.node1 = yyvsp[0].interm.intermNode; - yyval.interm.nodePair.node2 = 0; - ;} - break; - - case 190: -#line 1766 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - if (parseContext.boolErrorCheck(yyvsp[0].interm.intermTypedNode->getLine(), yyvsp[0].interm.intermTypedNode)) - parseContext.recover(); - ;} - break; - - case 191: -#line 1771 "glslang.y" - { - TIntermNode* intermNode; - if (parseContext.structQualifierErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type)) - parseContext.recover(); - if (parseContext.boolErrorCheck(yyvsp[-2].lex.line, yyvsp[-3].interm.type)) - parseContext.recover(); - - if (!parseContext.executeInitializer(yyvsp[-2].lex.line, *yyvsp[-2].lex.string, yyvsp[-3].interm.type, yyvsp[0].interm.intermTypedNode, intermNode)) - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - else { - parseContext.recover(); - yyval.interm.intermTypedNode = 0; - } - ;} - break; - - case 192: -#line 1788 "glslang.y" - { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ;} - break; - - case 193: -#line 1788 "glslang.y" - { - parseContext.symbolTable.pop(); - yyval.interm.intermNode = parseContext.intermediate.addLoop(yyvsp[0].interm.intermNode, yyvsp[-2].interm.intermTypedNode, 0, true, yyvsp[-5].lex.line); - --parseContext.loopNestingLevel; - ;} - break; - - case 194: -#line 1793 "glslang.y" - { ++parseContext.loopNestingLevel; ;} - break; - - case 195: -#line 1793 "glslang.y" - { - if (parseContext.boolErrorCheck(yyvsp[0].lex.line, yyvsp[-2].interm.intermTypedNode)) - parseContext.recover(); - - yyval.interm.intermNode = parseContext.intermediate.addLoop(yyvsp[-5].interm.intermNode, yyvsp[-2].interm.intermTypedNode, 0, false, yyvsp[-4].lex.line); - --parseContext.loopNestingLevel; - ;} - break; - - case 196: -#line 1800 "glslang.y" - { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ;} - break; - - case 197: -#line 1800 "glslang.y" - { - parseContext.symbolTable.pop(); - yyval.interm.intermNode = parseContext.intermediate.makeAggregate(yyvsp[-3].interm.intermNode, yyvsp[-5].lex.line); - yyval.interm.intermNode = parseContext.intermediate.growAggregate( - yyval.interm.intermNode, - parseContext.intermediate.addLoop(yyvsp[0].interm.intermNode, reinterpret_cast(yyvsp[-2].interm.nodePair.node1), reinterpret_cast(yyvsp[-2].interm.nodePair.node2), true, yyvsp[-6].lex.line), - yyvsp[-6].lex.line); - yyval.interm.intermNode->getAsAggregate()->setOperator(EOpSequence); - --parseContext.loopNestingLevel; - ;} - break; - - case 198: -#line 1813 "glslang.y" - { - yyval.interm.intermNode = yyvsp[0].interm.intermNode; - ;} - break; - - case 199: -#line 1816 "glslang.y" - { - yyval.interm.intermNode = yyvsp[0].interm.intermNode; - ;} - break; - - case 200: -#line 1822 "glslang.y" - { - yyval.interm.intermTypedNode = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 201: -#line 1825 "glslang.y" - { - yyval.interm.intermTypedNode = 0; - ;} - break; - - case 202: -#line 1831 "glslang.y" - { - yyval.interm.nodePair.node1 = yyvsp[-1].interm.intermTypedNode; - yyval.interm.nodePair.node2 = 0; - ;} - break; - - case 203: -#line 1835 "glslang.y" - { - yyval.interm.nodePair.node1 = yyvsp[-2].interm.intermTypedNode; - yyval.interm.nodePair.node2 = yyvsp[0].interm.intermTypedNode; - ;} - break; - - case 204: -#line 1842 "glslang.y" - { - if (parseContext.loopNestingLevel <= 0) { - parseContext.error(yyvsp[-1].lex.line, "continue statement only allowed in loops", "", ""); - parseContext.recover(); - } - yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpContinue, yyvsp[-1].lex.line); - ;} - break; - - case 205: -#line 1849 "glslang.y" - { - if (parseContext.loopNestingLevel <= 0) { - parseContext.error(yyvsp[-1].lex.line, "break statement only allowed in loops", "", ""); - parseContext.recover(); - } - yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpBreak, yyvsp[-1].lex.line); - ;} - break; - - case 206: -#line 1856 "glslang.y" - { - yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpReturn, yyvsp[-1].lex.line); - if (parseContext.currentFunctionType->getBasicType() != EbtVoid) { - parseContext.error(yyvsp[-1].lex.line, "non-void function must return a value", "return", ""); - parseContext.recover(); - } - ;} - break; - - case 207: -#line 1863 "glslang.y" - { - yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpReturn, yyvsp[-1].interm.intermTypedNode, yyvsp[-2].lex.line); - parseContext.functionReturnsValue = true; - if (parseContext.currentFunctionType->getBasicType() == EbtVoid) { - parseContext.error(yyvsp[-2].lex.line, "void function cannot return a value", "return", ""); - parseContext.recover(); - } else if (*(parseContext.currentFunctionType) != yyvsp[-1].interm.intermTypedNode->getType()) { - parseContext.error(yyvsp[-2].lex.line, "function return is not matching type:", "return", ""); - parseContext.recover(); - } - ;} - break; - - case 208: -#line 1874 "glslang.y" - { - FRAG_ONLY("discard", yyvsp[-1].lex.line); - yyval.interm.intermNode = parseContext.intermediate.addBranch(EOpKill, yyvsp[-1].lex.line); - ;} - break; - - case 209: -#line 1883 "glslang.y" - { - yyval.interm.intermNode = yyvsp[0].interm.intermNode; - parseContext.treeRoot = yyval.interm.intermNode; - ;} - break; - - case 210: -#line 1887 "glslang.y" - { - yyval.interm.intermNode = parseContext.intermediate.growAggregate(yyvsp[-1].interm.intermNode, yyvsp[0].interm.intermNode, 0); - parseContext.treeRoot = yyval.interm.intermNode; - ;} - break; - - case 211: -#line 1894 "glslang.y" - { - yyval.interm.intermNode = yyvsp[0].interm.intermNode; - ;} - break; - - case 212: -#line 1897 "glslang.y" - { - yyval.interm.intermNode = yyvsp[0].interm.intermNode; - ;} - break; - - case 213: -#line 1903 "glslang.y" - { - TFunction& function = *(yyvsp[0].interm.function); - TFunction* prevDec = static_cast(parseContext.symbolTable.find(function.getMangledName())); - // - // Note: 'prevDec' could be 'function' if this is the first time we've seen function - // as it would have just been put in the symbol table. Otherwise, we're looking up - // an earlier occurance. - // - if (prevDec->isDefined()) { - // - // Then this function already has a body. - // - parseContext.error(yyvsp[0].interm.line, "function already has a body", function.getName().c_str(), ""); - parseContext.recover(); - } - prevDec->setDefined(); - - // - // Raise error message if main function takes any parameters or return anything other than void - // - if (function.getName() == "main") { - if (function.getParamCount() > 0) { - parseContext.error(yyvsp[0].interm.line, "function cannot take any parameter(s)", function.getName().c_str(), ""); - parseContext.recover(); - } - if (function.getReturnType().getBasicType() != EbtVoid) { - parseContext.error(yyvsp[0].interm.line, "", function.getReturnType().getBasicString(), "main function cannot return a value" ); - parseContext.recover(); - } - } - - // - // New symbol table scope for body of function plus its arguments - // - parseContext.symbolTable.push(); - - // - // Remember the return type for later checking for RETURN statements. - // - parseContext.currentFunctionType = &(prevDec->getReturnType()); - parseContext.functionReturnsValue = false; - - // - // Insert parameters into the symbol table. - // If the parameter has no name, it's not an error, just don't insert it - // (could be used for unused args). - // - // Also, accumulate the list of parameters into the HIL, so lower level code - // knows where to find parameters. - // - TIntermAggregate* paramNodes = new TIntermAggregate; - for (int i = 0; i < function.getParamCount(); i++) { - TParameter& param = function[i]; - if (param.name != 0) { - TVariable *variable = new TVariable(param.name, *param.type); - // - // Insert the parameters with name in the symbol table. - // - if (! parseContext.symbolTable.insert(*variable)) { - parseContext.error(yyvsp[0].interm.line, "redefinition", variable->getName().c_str(), ""); - parseContext.recover(); - delete variable; - } - // - // Transfer ownership of name pointer to symbol table. - // - param.name = 0; - - // - // Add the parameter to the HIL - // - paramNodes = parseContext.intermediate.growAggregate( - paramNodes, - parseContext.intermediate.addSymbol(variable->getUniqueId(), - variable->getName(), - variable->getType(), yyvsp[0].interm.line), - yyvsp[0].interm.line); - } else { - paramNodes = parseContext.intermediate.growAggregate(paramNodes, parseContext.intermediate.addSymbol(0, "", *param.type, yyvsp[0].interm.line), yyvsp[0].interm.line); - } - } - parseContext.intermediate.setAggregateOperator(paramNodes, EOpParameters, yyvsp[0].interm.line); - yyvsp[0].interm.intermAggregate = paramNodes; - parseContext.loopNestingLevel = 0; - ;} - break; - - case 214: -#line 1988 "glslang.y" - { - //?? Check that all paths return a value if return type != void ? - // May be best done as post process phase on intermediate code - if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) { - parseContext.error(yyvsp[-2].interm.line, "function does not return a value:", "", yyvsp[-2].interm.function->getName().c_str()); - parseContext.recover(); - } - parseContext.symbolTable.pop(); - yyval.interm.intermNode = parseContext.intermediate.growAggregate(yyvsp[-2].interm.intermAggregate, yyvsp[0].interm.intermNode, 0); - parseContext.intermediate.setAggregateOperator(yyval.interm.intermNode, EOpFunction, yyvsp[-2].interm.line); - yyval.interm.intermNode->getAsAggregate()->setName(yyvsp[-2].interm.function->getMangledName().c_str()); - yyval.interm.intermNode->getAsAggregate()->setType(yyvsp[-2].interm.function->getReturnType()); - - // store the pragma information for debug and optimize and other vendor specific - // information. This information can be queried from the parse tree - yyval.interm.intermNode->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); - yyval.interm.intermNode->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - yyval.interm.intermNode->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); - ;} - break; - - - } - -/* Line 999 of yacc.c. */ -#line 4158 "glslang.tab.c" - - yyvsp -= yylen; - yyssp -= yylen; - - - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - char *yymsg; - int yyx, yycount; - - yycount = 0; - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - yysize += yystrlen ("syntax error, unexpected ") + 1; - yysize += yystrlen (yytname[yytype]); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); - yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - /* Return failure if at end of input. */ - if (yychar == YYEOF) - { - /* Pop the error token. */ - YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyss < yyssp) - { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - YYPOPSTACK; - } - YYABORT; - } - - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; - - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*----------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action. | -`----------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - yyvsp--; - yystate = *--yyssp; - - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - YYDPRINTF ((stderr, "Shifting error token, ")); - - *++yyvsp = yylval; - - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - return yyresult; -} - - -#line 209 "glslang.y" - - diff --git a/src/mesa/shader/slang/MachineIndependent/InfoSink.cpp b/src/mesa/shader/slang/MachineIndependent/InfoSink.cpp deleted file mode 100755 index 9a1aaa26f9..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/InfoSink.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "Include/InfoSink.h" - -#ifdef _WIN32 - #include -#endif - -void TInfoSinkBase::append(const char *s) -{ - if (outputStream & EString) { - checkMem(strlen(s)); - sink.append(s); - } - -#ifdef _WIN32 - if (outputStream & EDebugger) - OutputDebugString(s); -#endif - - if (outputStream & EStdOut) - fprintf(stdout, "%s", s); -} - -void TInfoSinkBase::append(int count, char c) -{ - if (outputStream & EString) { - checkMem(count); - sink.append(count, c); - } - -#ifdef _WIN32 - if (outputStream & EDebugger) { - char str[2]; - str[0] = c; - str[1] = '\0'; - OutputDebugString(str); - } -#endif - - if (outputStream & EStdOut) - fprintf(stdout, "%c", c); -} - -void TInfoSinkBase::append(const TPersistString& t) -{ - if (outputStream & EString) { - checkMem(t.size()); - sink.append(t); - } - -#ifdef _WIN32 - if (outputStream & EDebugger) - OutputDebugString(t.c_str()); -#endif - - if (outputStream & EStdOut) - fprintf(stdout, "%s", t.c_str()); -} - -void TInfoSinkBase::append(const TString& t) -{ - if (outputStream & EString) { - checkMem(t.size()); - sink.append(t.c_str()); - } - -#ifdef _WIN32 - if (outputStream & EDebugger) - OutputDebugString(t.c_str()); -#endif - - if (outputStream & EStdOut) - fprintf(stdout, "%s", t.c_str()); -} diff --git a/src/mesa/shader/slang/MachineIndependent/Initialize.cpp b/src/mesa/shader/slang/MachineIndependent/Initialize.cpp deleted file mode 100755 index 0913e531af..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/Initialize.cpp +++ /dev/null @@ -1,948 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -// -// Create strings that declare built-in definitions, add built-ins that -// cannot be expressed in the files, and establish mappings between -// built-in functions and operators. -// - -#include "../Include/intermediate.h" -#include "Initialize.h" - -void TBuiltIns::initialize() -{ - // - // Initialize all the built-in strings for parsing. - // - TString BuiltInFunctions; - TString BuiltInFunctionsVertex; - TString BuiltInFunctionsFragment; - TString StandardVertexVaryings; - TString StandardFragmentVaryings; - TString StandardVertexAttributes; - TString StandardUniforms; - - { - //============================================================================ - // - // Prototypes for built-in functions seen by both vertex and fragment shaders. - // - //============================================================================ - - TString& s = BuiltInFunctions; - - // - // Angle and Trigonometric Functions. - // - s.append(TString("float radians(float degrees);")); - s.append(TString("vec2 radians(vec2 degrees);")); - s.append(TString("vec3 radians(vec3 degrees);")); - s.append(TString("vec4 radians(vec4 degrees);")); - - s.append(TString("float degrees(float radians);")); - s.append(TString("vec2 degrees(vec2 radians);")); - s.append(TString("vec3 degrees(vec3 radians);")); - s.append(TString("vec4 degrees(vec4 radians);")); - - s.append(TString("float sin(float angle);")); - s.append(TString("vec2 sin(vec2 angle);")); - s.append(TString("vec3 sin(vec3 angle);")); - s.append(TString("vec4 sin(vec4 angle);")); - - s.append(TString("float cos(float angle);")); - s.append(TString("vec2 cos(vec2 angle);")); - s.append(TString("vec3 cos(vec3 angle);")); - s.append(TString("vec4 cos(vec4 angle);")); - - s.append(TString("float tan(float angle);")); - s.append(TString("vec2 tan(vec2 angle);")); - s.append(TString("vec3 tan(vec3 angle);")); - s.append(TString("vec4 tan(vec4 angle);")); - - s.append(TString("float asin(float x);")); - s.append(TString("vec2 asin(vec2 x);")); - s.append(TString("vec3 asin(vec3 x);")); - s.append(TString("vec4 asin(vec4 x);")); - - s.append(TString("float acos(float x);")); - s.append(TString("vec2 acos(vec2 x);")); - s.append(TString("vec3 acos(vec3 x);")); - s.append(TString("vec4 acos(vec4 x);")); - - s.append(TString("float atan(float y, float x);")); - s.append(TString("vec2 atan(vec2 y, vec2 x);")); - s.append(TString("vec3 atan(vec3 y, vec3 x);")); - s.append(TString("vec4 atan(vec4 y, vec4 x);")); - - s.append(TString("float atan(float y_over_x);")); - s.append(TString("vec2 atan(vec2 y_over_x);")); - s.append(TString("vec3 atan(vec3 y_over_x);")); - s.append(TString("vec4 atan(vec4 y_over_x);")); - - // - // Exponential Functions. - // - s.append(TString("float pow(float x, float y);")); - s.append(TString("vec2 pow(vec2 x, vec2 y);")); - s.append(TString("vec3 pow(vec3 x, vec3 y);")); - s.append(TString("vec4 pow(vec4 x, vec4 y);")); - - s.append(TString("float exp(float x);")); - s.append(TString("vec2 exp(vec2 x);")); - s.append(TString("vec3 exp(vec3 x);")); - s.append(TString("vec4 exp(vec4 x);")); - - s.append(TString("float log(float x);")); - s.append(TString("vec2 log(vec2 x);")); - s.append(TString("vec3 log(vec3 x);")); - s.append(TString("vec4 log(vec4 x);")); - - s.append(TString("float exp2(float x);")); - s.append(TString("vec2 exp2(vec2 x);")); - s.append(TString("vec3 exp2(vec3 x);")); - s.append(TString("vec4 exp2(vec4 x);")); - - s.append(TString("float log2(float x);")); - s.append(TString("vec2 log2(vec2 x);")); - s.append(TString("vec3 log2(vec3 x);")); - s.append(TString("vec4 log2(vec4 x);")); - - s.append(TString("float sqrt(float x);")); - s.append(TString("vec2 sqrt(vec2 x);")); - s.append(TString("vec3 sqrt(vec3 x);")); - s.append(TString("vec4 sqrt(vec4 x);")); - - s.append(TString("float inversesqrt(float x);")); - s.append(TString("vec2 inversesqrt(vec2 x);")); - s.append(TString("vec3 inversesqrt(vec3 x);")); - s.append(TString("vec4 inversesqrt(vec4 x);")); - - // - // Common Functions. - // - s.append(TString("float abs(float x);")); - s.append(TString("vec2 abs(vec2 x);")); - s.append(TString("vec3 abs(vec3 x);")); - s.append(TString("vec4 abs(vec4 x);")); - - s.append(TString("float sign(float x);")); - s.append(TString("vec2 sign(vec2 x);")); - s.append(TString("vec3 sign(vec3 x);")); - s.append(TString("vec4 sign(vec4 x);")); - - s.append(TString("float floor(float x);")); - s.append(TString("vec2 floor(vec2 x);")); - s.append(TString("vec3 floor(vec3 x);")); - s.append(TString("vec4 floor(vec4 x);")); - - s.append(TString("float ceil(float x);")); - s.append(TString("vec2 ceil(vec2 x);")); - s.append(TString("vec3 ceil(vec3 x);")); - s.append(TString("vec4 ceil(vec4 x);")); - - s.append(TString("float fract(float x);")); - s.append(TString("vec2 fract(vec2 x);")); - s.append(TString("vec3 fract(vec3 x);")); - s.append(TString("vec4 fract(vec4 x);")); - - s.append(TString("float mod(float x, float y);")); - s.append(TString("vec2 mod(vec2 x, float y);")); - s.append(TString("vec3 mod(vec3 x, float y);")); - s.append(TString("vec4 mod(vec4 x, float y);")); - s.append(TString("vec2 mod(vec2 x, vec2 y);")); - s.append(TString("vec3 mod(vec3 x, vec3 y);")); - s.append(TString("vec4 mod(vec4 x, vec4 y);")); - - s.append(TString("float min(float x, float y);")); - s.append(TString("vec2 min(vec2 x, float y);")); - s.append(TString("vec3 min(vec3 x, float y);")); - s.append(TString("vec4 min(vec4 x, float y);")); - s.append(TString("vec2 min(vec2 x, vec2 y);")); - s.append(TString("vec3 min(vec3 x, vec3 y);")); - s.append(TString("vec4 min(vec4 x, vec4 y);")); - - s.append(TString("float max(float x, float y);")); - s.append(TString("vec2 max(vec2 x, float y);")); - s.append(TString("vec3 max(vec3 x, float y);")); - s.append(TString("vec4 max(vec4 x, float y);")); - s.append(TString("vec2 max(vec2 x, vec2 y);")); - s.append(TString("vec3 max(vec3 x, vec3 y);")); - s.append(TString("vec4 max(vec4 x, vec4 y);")); - - s.append(TString("float clamp(float x, float minVal, float maxVal);")); - s.append(TString("vec2 clamp(vec2 x, float minVal, float maxVal);")); - s.append(TString("vec3 clamp(vec3 x, float minVal, float maxVal);")); - s.append(TString("vec4 clamp(vec4 x, float minVal, float maxVal);")); - s.append(TString("vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);")); - s.append(TString("vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);")); - s.append(TString("vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);")); - - s.append(TString("float mix(float x, float y, float a);")); - s.append(TString("vec2 mix(vec2 x, vec2 y, float a);")); - s.append(TString("vec3 mix(vec3 x, vec3 y, float a);")); - s.append(TString("vec4 mix(vec4 x, vec4 y, float a);")); - s.append(TString("vec2 mix(vec2 x, vec2 y, vec2 a);")); - s.append(TString("vec3 mix(vec3 x, vec3 y, vec3 a);")); - s.append(TString("vec4 mix(vec4 x, vec4 y, vec4 a);")); - - s.append(TString("float step(float edge, float x);")); - s.append(TString("vec2 step(vec2 edge, vec2 x);")); - s.append(TString("vec3 step(vec3 edge, vec3 x);")); - s.append(TString("vec4 step(vec4 edge, vec4 x);")); - s.append(TString("vec2 step(float edge, vec2 x);")); - s.append(TString("vec3 step(float edge, vec3 x);")); - s.append(TString("vec4 step(float edge, vec4 x);")); - - s.append(TString("float smoothstep(float edge0, float edge1, float x);")); - s.append(TString("vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);")); - s.append(TString("vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);")); - s.append(TString("vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);")); - s.append(TString("vec2 smoothstep(float edge0, float edge1, vec2 x);")); - s.append(TString("vec3 smoothstep(float edge0, float edge1, vec3 x);")); - s.append(TString("vec4 smoothstep(float edge0, float edge1, vec4 x);")); - - // - // Geometric Functions. - // - s.append(TString("float length(float x);")); - s.append(TString("float length(vec2 x);")); - s.append(TString("float length(vec3 x);")); - s.append(TString("float length(vec4 x);")); - - s.append(TString("float distance(float p0, float p1);")); - s.append(TString("float distance(vec2 p0, vec2 p1);")); - s.append(TString("float distance(vec3 p0, vec3 p1);")); - s.append(TString("float distance(vec4 p0, vec4 p1);")); - - s.append(TString("float dot(float x, float y);")); - s.append(TString("float dot(vec2 x, vec2 y);")); - s.append(TString("float dot(vec3 x, vec3 y);")); - s.append(TString("float dot(vec4 x, vec4 y);")); - - s.append(TString("vec3 cross(vec3 x, vec3 y);")); - s.append(TString("float normalize(float x);")); - s.append(TString("vec2 normalize(vec2 x);")); - s.append(TString("vec3 normalize(vec3 x);")); - s.append(TString("vec4 normalize(vec4 x);")); - - s.append(TString("float faceforward(float N, float I, float Nref);")); - s.append(TString("vec2 faceforward(vec2 N, vec2 I, vec2 Nref);")); - s.append(TString("vec3 faceforward(vec3 N, vec3 I, vec3 Nref);")); - s.append(TString("vec4 faceforward(vec4 N, vec4 I, vec4 Nref);")); - - s.append(TString("float reflect(float I, float N);")); - s.append(TString("vec2 reflect(vec2 I, vec2 N);")); - s.append(TString("vec3 reflect(vec3 I, vec3 N);")); - s.append(TString("vec4 reflect(vec4 I, vec4 N);")); - - s.append(TString("float refract(float I, float N, float eta);")); - s.append(TString("vec2 refract(vec2 I, vec2 N, float eta);")); - s.append(TString("vec3 refract(vec3 I, vec3 N, float eta);")); - s.append(TString("vec4 refract(vec4 I, vec4 N, float eta);")); - - // - // Matrix Functions. - // - s.append(TString("mat2 matrixCompMult(mat2 x, mat2 y);")); - s.append(TString("mat3 matrixCompMult(mat3 x, mat3 y);")); - s.append(TString("mat4 matrixCompMult(mat4 x, mat4 y);")); - - // - // Vector relational functions. - // - s.append(TString("bvec2 lessThan(vec2 x, vec2 y);")); - s.append(TString("bvec3 lessThan(vec3 x, vec3 y);")); - s.append(TString("bvec4 lessThan(vec4 x, vec4 y);")); - - s.append(TString("bvec2 lessThan(ivec2 x, ivec2 y);")); - s.append(TString("bvec3 lessThan(ivec3 x, ivec3 y);")); - s.append(TString("bvec4 lessThan(ivec4 x, ivec4 y);")); - - s.append(TString("bvec2 lessThanEqual(vec2 x, vec2 y);")); - s.append(TString("bvec3 lessThanEqual(vec3 x, vec3 y);")); - s.append(TString("bvec4 lessThanEqual(vec4 x, vec4 y);")); - - s.append(TString("bvec2 lessThanEqual(ivec2 x, ivec2 y);")); - s.append(TString("bvec3 lessThanEqual(ivec3 x, ivec3 y);")); - s.append(TString("bvec4 lessThanEqual(ivec4 x, ivec4 y);")); - - s.append(TString("bvec2 greaterThan(vec2 x, vec2 y);")); - s.append(TString("bvec3 greaterThan(vec3 x, vec3 y);")); - s.append(TString("bvec4 greaterThan(vec4 x, vec4 y);")); - - s.append(TString("bvec2 greaterThan(ivec2 x, ivec2 y);")); - s.append(TString("bvec3 greaterThan(ivec3 x, ivec3 y);")); - s.append(TString("bvec4 greaterThan(ivec4 x, ivec4 y);")); - - s.append(TString("bvec2 greaterThanEqual(vec2 x, vec2 y);")); - s.append(TString("bvec3 greaterThanEqual(vec3 x, vec3 y);")); - s.append(TString("bvec4 greaterThanEqual(vec4 x, vec4 y);")); - - s.append(TString("bvec2 greaterThanEqual(ivec2 x, ivec2 y);")); - s.append(TString("bvec3 greaterThanEqual(ivec3 x, ivec3 y);")); - s.append(TString("bvec4 greaterThanEqual(ivec4 x, ivec4 y);")); - - s.append(TString("bvec2 equal(vec2 x, vec2 y);")); - s.append(TString("bvec3 equal(vec3 x, vec3 y);")); - s.append(TString("bvec4 equal(vec4 x, vec4 y);")); - - s.append(TString("bvec2 equal(ivec2 x, ivec2 y);")); - s.append(TString("bvec3 equal(ivec3 x, ivec3 y);")); - s.append(TString("bvec4 equal(ivec4 x, ivec4 y);")); - - s.append(TString("bvec2 equal(bvec2 x, bvec2 y);")); - s.append(TString("bvec3 equal(bvec3 x, bvec3 y);")); - s.append(TString("bvec4 equal(bvec4 x, bvec4 y);")); - - s.append(TString("bvec2 notEqual(vec2 x, vec2 y);")); - s.append(TString("bvec3 notEqual(vec3 x, vec3 y);")); - s.append(TString("bvec4 notEqual(vec4 x, vec4 y);")); - - s.append(TString("bvec2 notEqual(ivec2 x, ivec2 y);")); - s.append(TString("bvec3 notEqual(ivec3 x, ivec3 y);")); - s.append(TString("bvec4 notEqual(ivec4 x, ivec4 y);")); - - s.append(TString("bvec2 notEqual(bvec2 x, bvec2 y);")); - s.append(TString("bvec3 notEqual(bvec3 x, bvec3 y);")); - s.append(TString("bvec4 notEqual(bvec4 x, bvec4 y);")); - - s.append(TString("bool any(bvec2 x);")); - s.append(TString("bool any(bvec3 x);")); - s.append(TString("bool any(bvec4 x);")); - - s.append(TString("bool all(bvec2 x);")); - s.append(TString("bool all(bvec3 x);")); - s.append(TString("bool all(bvec4 x);")); - - s.append(TString("bvec2 not(bvec2 x);")); - s.append(TString("bvec3 not(bvec3 x);")); - s.append(TString("bvec4 not(bvec4 x);")); - - // - // Texture Functions. - // - s.append(TString("vec4 texture1D(sampler1D sampler, float coord);")); - s.append(TString("vec4 texture1DProj(sampler1D sampler, vec2 coord);")); - s.append(TString("vec4 texture1DProj(sampler1D sampler, vec4 coord);")); - - s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord);")); - s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord);")); - s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord);")); - - s.append(TString("vec4 texture3D(sampler3D sampler, vec3 coord);")); - s.append(TString("vec4 texture3DProj(sampler3D sampler, vec4 coord);")); - - s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord);")); - - s.append(TString("vec4 shadow1D(sampler1DShadow sampler, vec3 coord);")); - - s.append(TString("vec4 shadow2D(sampler2DShadow sampler, vec3 coord);")); - - s.append(TString("vec4 shadow1DProj(sampler1DShadow sampler, vec4 coord);")); - - s.append(TString("vec4 shadow2DProj(sampler2DShadow sampler, vec4 coord);")); - - - // - // Noise functions. - // - s.append(TString("float noise1(float x);")); - s.append(TString("float noise1(vec2 x);")); - s.append(TString("float noise1(vec3 x);")); - s.append(TString("float noise1(vec4 x);")); - - s.append(TString("vec2 noise2(float x);")); - s.append(TString("vec2 noise2(vec2 x);")); - s.append(TString("vec2 noise2(vec3 x);")); - s.append(TString("vec2 noise2(vec4 x);")); - - s.append(TString("vec3 noise3(float x);")); - s.append(TString("vec3 noise3(vec2 x);")); - s.append(TString("vec3 noise3(vec3 x);")); - s.append(TString("vec3 noise3(vec4 x);")); - - s.append(TString("vec4 noise4(float x);")); - s.append(TString("vec4 noise4(vec2 x);")); - s.append(TString("vec4 noise4(vec3 x);")); - s.append(TString("vec4 noise4(vec4 x);")); - - s.append(TString("\n")); - } - { - //============================================================================ - // - // Prototypes for built-in functions seen by vertex shaders only. - // - //============================================================================ - - TString& s = BuiltInFunctionsVertex; - - // - // Geometric Functions. - // - s.append(TString("vec4 ftransform();")); - - // - // Texture Functions. - // - s.append(TString("vec4 texture1DLod(sampler1D sampler, float coord, float lod);")); - s.append(TString("vec4 texture1DProjLod(sampler1D sampler, vec2 coord, float lod);")); - s.append(TString("vec4 texture1DProjLod(sampler1D sampler, vec4 coord, float lod);")); - - s.append(TString("vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);")); - s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);")); - s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);")); - - s.append(TString("vec4 texture3DLod(sampler3D sampler, vec3 coord, float lod);")); - s.append(TString("vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod);")); - s.append(TString("vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);")); - - s.append(TString("vec4 shadow1DLod(sampler1DShadow sampler, vec3 coord, float lod);")); - s.append(TString("vec4 shadow2DLod(sampler2DShadow sampler, vec3 coord, float lod);")); - s.append(TString("vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod);")); - s.append(TString("vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod);")); - - s.append(TString("\n")); - } - { - //============================================================================ - // - // Prototypes for built-in functions seen by fragment shaders only. - // - //============================================================================ - - TString& s = BuiltInFunctionsFragment; - - // - // Texture Functions. - // - s.append(TString("vec4 texture1D(sampler1D sampler, float coord, float bias);")); - s.append(TString("vec4 texture1DProj(sampler1D sampler, vec2 coord, float bias);")); - s.append(TString("vec4 texture1DProj(sampler1D sampler, vec4 coord, float bias);")); - - s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord, float bias);")); - s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);")); - s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);")); - - s.append(TString("vec4 texture3D(sampler3D sampler, vec3 coord, float bias);")); - s.append(TString("vec4 texture3DProj(sampler3D sampler, vec4 coord, float bias);")); - s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord, float bias);")); - - s.append(TString("vec4 shadow1D(sampler1DShadow sampler, vec3 coord, float bias);")); - s.append(TString("vec4 shadow2D(sampler2DShadow sampler, vec3 coord, float bias);")); - s.append(TString("vec4 shadow1DProj(sampler1DShadow sampler, vec4 coord, float bias);")); - s.append(TString("vec4 shadow2DProj(sampler2DShadow sampler, vec4 coord, float bias);")); - - s.append(TString("float dFdx(float p);")); - s.append(TString("vec2 dFdx(vec2 p);")); - s.append(TString("vec3 dFdx(vec3 p);")); - s.append(TString("vec4 dFdx(vec4 p);")); - - s.append(TString("float dFdy(float p);")); - s.append(TString("vec2 dFdy(vec2 p);")); - s.append(TString("vec3 dFdy(vec3 p);")); - s.append(TString("vec4 dFdy(vec4 p);")); - - s.append(TString("float fwidth(float p);")); - s.append(TString("vec2 fwidth(vec2 p);")); - s.append(TString("vec3 fwidth(vec3 p);")); - s.append(TString("vec4 fwidth(vec4 p);")); - - s.append(TString("\n")); - } - { - //============================================================================ - // - // Standard Uniforms - // - //============================================================================ - - TString& s = StandardUniforms; - - - // - // OpenGL'uniform' state. Page numbers are in reference to version - // 1.4 of the OpenGL specification. - // - - // - // Matrix state. p. 31, 32, 37, 39, 40. - // - s.append(TString("uniform mat4 gl_ModelViewMatrix;")); - s.append(TString("uniform mat4 gl_ProjectionMatrix;")); - s.append(TString("uniform mat4 gl_ModelViewProjectionMatrix;")); - - // - // Derived matrix state that provides inverse and transposed versions - // of the matrices above. - // - s.append(TString("uniform mat3 gl_NormalMatrix;")); - - s.append(TString("uniform mat4 gl_ModelViewMatrixInverse;")); - s.append(TString("uniform mat4 gl_ProjectionMatrixInverse;")); - s.append(TString("uniform mat4 gl_ModelViewProjectionMatrixInverse;")); - - s.append(TString("uniform mat4 gl_ModelViewMatrixTranspose;")); - s.append(TString("uniform mat4 gl_ProjectionMatrixTranspose;")); - s.append(TString("uniform mat4 gl_ModelViewProjectionMatrixTranspose;")); - - s.append(TString("uniform mat4 gl_ModelViewMatrixInverseTranspose;")); - s.append(TString("uniform mat4 gl_ProjectionMatrixInverseTranspose;")); - s.append(TString("uniform mat4 gl_ModelViewProjectionMatrixInverseTranspose;")); - - // - // Normal scaling p. 39. - // - s.append(TString("uniform float gl_NormalScale;")); - - // - // Depth range in window coordinates, p. 33 - // - s.append(TString("struct gl_DepthRangeParameters {")); - s.append(TString(" float near;")); // n - s.append(TString(" float far;")); // f - s.append(TString(" float diff;")); // f - n - s.append(TString("};")); - s.append(TString("uniform gl_DepthRangeParameters gl_DepthRange;")); - - - // - // Point Size, p. 66, 67. - // - s.append(TString("struct gl_PointParameters {")); - s.append(TString(" float size;")); - s.append(TString(" float sizeMin;")); - s.append(TString(" float sizeMax;")); - s.append(TString(" float fadeThresholdSize;")); - s.append(TString(" float distanceConstantAttenuation;")); - s.append(TString(" float distanceLinearAttenuation;")); - s.append(TString(" float distanceQuadraticAttenuation;")); - s.append(TString("};")); - - s.append(TString("uniform gl_PointParameters gl_Point;")); - - // - // Material State p. 50, 55. - // - s.append(TString("struct gl_MaterialParameters {")); - s.append(TString(" vec4 emission;")); // Ecm - s.append(TString(" vec4 ambient;")); // Acm - s.append(TString(" vec4 diffuse;")); // Dcm - s.append(TString(" vec4 specular;")); // Scm - s.append(TString(" float shininess;")); // Srm - s.append(TString("};")); - s.append(TString("uniform gl_MaterialParameters gl_FrontMaterial;")); - s.append(TString("uniform gl_MaterialParameters gl_BackMaterial;")); - - // - // Light State p 50, 53, 55. - // - - s.append(TString("struct gl_LightSourceParameters {")); - s.append(TString(" vec4 ambient;")); // Acli - s.append(TString(" vec4 diffuse;")); // Dcli - s.append(TString(" vec4 specular;")); // Scli - s.append(TString(" vec4 position;")); // Ppli - s.append(TString(" vec4 halfVector;")); // Derived: Hi - s.append(TString(" vec3 spotDirection;")); // Sdli - s.append(TString(" float spotExponent;")); // Srli - s.append(TString(" float spotCutoff;")); // Crli - // (range: [0.0,90.0], 180.0) - s.append(TString(" float spotCosCutoff;")); // Derived: cos(Crli) - // (range: [1.0,0.0],-1.0) - s.append(TString(" float constantAttenuation;")); // K0 - s.append(TString(" float linearAttenuation;")); // K1 - s.append(TString(" float quadraticAttenuation;"));// K2 - s.append(TString("};")); - - - s.append(TString("struct gl_LightModelParameters {")); - s.append(TString(" vec4 ambient;")); // Acs - s.append(TString("};")); - - s.append(TString("uniform gl_LightModelParameters gl_LightModel;")); - - // - // Derived state from products of light and material. - // - - s.append(TString("struct gl_LightModelProducts {")); - s.append(TString(" vec4 sceneColor;")); // Derived. Ecm + Acm * Acs - s.append(TString("};")); - - s.append(TString("uniform gl_LightModelProducts gl_FrontLightModelProduct;")); - s.append(TString("uniform gl_LightModelProducts gl_BackLightModelProduct;")); - - s.append(TString("struct gl_LightProducts {")); - s.append(TString(" vec4 ambient;")); // Acm * Acli - s.append(TString(" vec4 diffuse;")); // Dcm * Dcli - s.append(TString(" vec4 specular;")); // Scm * Scli - s.append(TString("};")); - - - - - // - // Fog p. 161 - // - s.append(TString("struct gl_FogParameters {")); - s.append(TString(" vec4 color;")); - s.append(TString(" float density;")); - s.append(TString(" float start;")); - s.append(TString(" float end;")); - s.append(TString(" float scale;")); // 1 / (gl_FogEnd - gl_FogStart) - s.append(TString("};")); - - s.append(TString("uniform gl_FogParameters gl_Fog;")); - - s.append(TString("\n")); - } - { - //============================================================================ - // - // Vertex attributes, p. 19. - // - //============================================================================ - - TString& s = StandardVertexAttributes; - - s.append(TString("attribute vec4 gl_Color;")); - s.append(TString("attribute vec4 gl_SecondaryColor;")); - s.append(TString("attribute vec3 gl_Normal;")); - s.append(TString("attribute vec4 gl_Vertex;")); - s.append(TString("attribute vec4 gl_MultiTexCoord0;")); - s.append(TString("attribute vec4 gl_MultiTexCoord1;")); - s.append(TString("attribute vec4 gl_MultiTexCoord2;")); - s.append(TString("attribute vec4 gl_MultiTexCoord3;")); - s.append(TString("attribute vec4 gl_MultiTexCoord4;")); - s.append(TString("attribute vec4 gl_MultiTexCoord5;")); - s.append(TString("attribute vec4 gl_MultiTexCoord6;")); - s.append(TString("attribute vec4 gl_MultiTexCoord7;")); - s.append(TString("attribute float gl_FogCoord;")); - - s.append(TString("\n")); - } - { - //============================================================================ - // - // Define the output varying interface from the vertex shader. - // - //============================================================================ - - TString& s = StandardVertexVaryings; - - s.append(TString("varying vec4 gl_FrontColor;")); - s.append(TString("varying vec4 gl_BackColor;")); - s.append(TString("varying vec4 gl_FrontSecondaryColor;")); - s.append(TString("varying vec4 gl_BackSecondaryColor;")); - s.append(TString("varying vec4 gl_TexCoord[];")); - s.append(TString("varying float gl_FogFragCoord;")); - - s.append(TString("\n")); - } - { - //============================================================================ - // - // Define the input varying interface to the fragment shader. - // - //============================================================================ - - TString& s = StandardFragmentVaryings; - - s.append(TString("varying vec4 gl_Color;")); - s.append(TString("varying vec4 gl_SecondaryColor;")); - s.append(TString("varying vec4 gl_TexCoord[];")); - s.append(TString("varying float gl_FogFragCoord;")); - - s.append(TString("\n")); - } - - builtInStrings[EShLangFragment].push_back(BuiltInFunctions.c_str()); - builtInStrings[EShLangFragment].push_back(BuiltInFunctionsFragment); - builtInStrings[EShLangFragment].push_back(StandardUniforms); - builtInStrings[EShLangFragment].push_back(StandardFragmentVaryings); - - builtInStrings[EShLangVertex].push_back(BuiltInFunctions); - builtInStrings[EShLangVertex].push_back(BuiltInFunctionsVertex); - builtInStrings[EShLangVertex].push_back(StandardVertexVaryings); - builtInStrings[EShLangVertex].push_back(StandardVertexAttributes); - builtInStrings[EShLangVertex].push_back(StandardUniforms); -} - - -void TBuiltIns::initialize(const TBuiltInResource &resources) -{ - // - // Initialize all the built-in strings for parsing. - // - TString StandardUniforms; - - { - //============================================================================ - // - // Standard Uniforms - // - //============================================================================ - - TString& s = StandardUniforms; - - // - // Implementation dependent constants. The example values below - // are the minimum values allowed for these maximums. - // - char builtInConstant[80]; - sprintf(builtInConstant, "const int gl_MaxLights = %d;", resources.maxLights); // GL 1.0 - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxClipPlanes = %d;", resources.maxClipPlanes); // GL 1.0 - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxTextureUnits = %d;", resources.maxTextureUnits); // GL 1.2 - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxTextureCoords = %d;", resources.maxTextureCoords); // ARB_fragment_program - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs); // ARB_vertex_shader - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents); // ARB_vertex_shader - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats); // ARB_vertex_shader - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxVertexTextureImageUnits = %d;", resources.maxVertexTextureImageUnits); // ARB_vertex_shader - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxCombinedTextureImageUnits = %d;", resources.maxCombinedTextureImageUnits); // ARB_vertex_shader - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxTextureImageUnits = %d;", resources.maxTextureImageUnits); // ARB_fragment_shader - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxFragmentUniformComponents = %d;", resources.maxFragmentUniformComponents); // ARB_fragment_shader - s.append(TString(builtInConstant)); - - sprintf(builtInConstant, "const int gl_MaxDrawBuffers = %d;", resources.maxDrawBuffers); // proposed ARB_draw_buffers - s.append(TString(builtInConstant)); - - // - // OpenGL'uniform' state. Page numbers are in reference to version - // 1.4 of the OpenGL specification. - // - - // - // Matrix state. p. 31, 32, 37, 39, 40. - // - s.append(TString("uniform mat4 gl_TextureMatrix[gl_MaxTextureCoords];")); - - // - // Derived matrix state that provides inverse and transposed versions - // of the matrices above. - // - s.append(TString("uniform mat4 gl_TextureMatrixInverse[gl_MaxTextureCoords];")); - - s.append(TString("uniform mat4 gl_TextureMatrixTranspose[gl_MaxTextureCoords];")); - - s.append(TString("uniform mat4 gl_TextureMatrixInverseTranspose[gl_MaxTextureCoords];")); - - // - // Clip planes p. 42. - // - s.append(TString("uniform vec4 gl_ClipPlane[gl_MaxClipPlanes];")); - - // - // Light State p 50, 53, 55. - // - s.append(TString("uniform gl_LightSourceParameters gl_LightSource[gl_MaxLights];")); - - // - // Derived state from products of light. - // - s.append(TString("uniform gl_LightProducts gl_FrontLightProduct[gl_MaxLights];")); - s.append(TString("uniform gl_LightProducts gl_BackLightProduct[gl_MaxLights];")); - - // - // Textureg Environment and Generation, p. 152, p. 40-42. - // - s.append(TString("uniform vec4 gl_TextureEnvColor[gl_MaxTextureImageUnits];")); - s.append(TString("uniform vec4 gl_EyePlaneS[gl_MaxTextureCoords];")); - s.append(TString("uniform vec4 gl_EyePlaneT[gl_MaxTextureCoords];")); - s.append(TString("uniform vec4 gl_EyePlaneR[gl_MaxTextureCoords];")); - s.append(TString("uniform vec4 gl_EyePlaneQ[gl_MaxTextureCoords];")); - s.append(TString("uniform vec4 gl_ObjectPlaneS[gl_MaxTextureCoords];")); - s.append(TString("uniform vec4 gl_ObjectPlaneT[gl_MaxTextureCoords];")); - s.append(TString("uniform vec4 gl_ObjectPlaneR[gl_MaxTextureCoords];")); - s.append(TString("uniform vec4 gl_ObjectPlaneQ[gl_MaxTextureCoords];")); - - s.append(TString("\n")); - } - - builtInStrings[EShLangFragment].push_back(StandardUniforms); - builtInStrings[EShLangVertex].push_back(StandardUniforms); -} - -void IdentifyBuiltIns(EShLanguage language, TSymbolTable& symbolTable) -{ - // - // First, insert some special built-in variables that are not in - // the built-in header files. - // - switch(language) { - - case EShLangFragment: { - symbolTable.insert(*new TVariable(NewPoolTString("gl_FrontFacing"), TType(EbtBool, EvqFace, 1))); - symbolTable.insert(*new TVariable(NewPoolTString("gl_FragCoord"), TType(EbtFloat, EvqFragCoord, 4))); - symbolTable.insert(*new TVariable(NewPoolTString("gl_FragColor"), TType(EbtFloat, EvqFragColor, 4))); - symbolTable.insert(*new TVariable(NewPoolTString("gl_FragDepth"), TType(EbtFloat, EvqFragDepth, 1))); - - } - break; - - case EShLangVertex: - symbolTable.insert(*new TVariable(NewPoolTString("gl_Position"), TType(EbtFloat, EvqPosition, 4))); - symbolTable.insert(*new TVariable(NewPoolTString("gl_PointSize"), TType(EbtFloat, EvqPointSize, 1))); - symbolTable.insert(*new TVariable(NewPoolTString("gl_ClipVertex"), TType(EbtFloat, EvqClipVertex, 4))); - break; - default: break; - } - - // - // Next, identify which built-ins from the already loaded headers have - // a mapping to an operator. Those that are not identified as such are - // expected to be resolved through a library of functions, versus as - // operations. - // - symbolTable.relateToOperator("not", EOpVectorLogicalNot); - - symbolTable.relateToOperator("matrixCompMult", EOpMul); - symbolTable.relateToOperator("mod", EOpMod); - - symbolTable.relateToOperator("equal", EOpVectorEqual); - symbolTable.relateToOperator("notEqual", EOpVectorNotEqual); - symbolTable.relateToOperator("lessThan", EOpLessThan); - symbolTable.relateToOperator("greaterThan", EOpGreaterThan); - symbolTable.relateToOperator("lessThanEqual", EOpLessThanEqual); - symbolTable.relateToOperator("greaterThanEqual", EOpGreaterThanEqual); - - symbolTable.relateToOperator("radians", EOpRadians); - symbolTable.relateToOperator("degrees", EOpDegrees); - symbolTable.relateToOperator("sin", EOpSin); - symbolTable.relateToOperator("cos", EOpCos); - symbolTable.relateToOperator("tan", EOpTan); - symbolTable.relateToOperator("asin", EOpAsin); - symbolTable.relateToOperator("acos", EOpAcos); - symbolTable.relateToOperator("atan", EOpAtan); - - symbolTable.relateToOperator("pow", EOpPow); - symbolTable.relateToOperator("exp2", EOpExp2); - symbolTable.relateToOperator("log", EOpLog); - symbolTable.relateToOperator("exp", EOpExp); - symbolTable.relateToOperator("log2", EOpLog2); - symbolTable.relateToOperator("sqrt", EOpSqrt); - symbolTable.relateToOperator("inversesqrt", EOpInverseSqrt); - - symbolTable.relateToOperator("abs", EOpAbs); - symbolTable.relateToOperator("sign", EOpSign); - symbolTable.relateToOperator("floor", EOpFloor); - symbolTable.relateToOperator("ceil", EOpCeil); - symbolTable.relateToOperator("fract", EOpFract); - symbolTable.relateToOperator("min", EOpMin); - symbolTable.relateToOperator("max", EOpMax); - symbolTable.relateToOperator("clamp", EOpClamp); - symbolTable.relateToOperator("mix", EOpMix); - symbolTable.relateToOperator("step", EOpStep); - symbolTable.relateToOperator("smoothstep", EOpSmoothStep); - - symbolTable.relateToOperator("length", EOpLength); - symbolTable.relateToOperator("distance", EOpDistance); - symbolTable.relateToOperator("dot", EOpDot); - symbolTable.relateToOperator("cross", EOpCross); - symbolTable.relateToOperator("normalize", EOpNormalize); - symbolTable.relateToOperator("forward", EOpFaceForward); - symbolTable.relateToOperator("reflect", EOpReflect); - symbolTable.relateToOperator("refract", EOpRefract); - - symbolTable.relateToOperator("any", EOpAny); - symbolTable.relateToOperator("all", EOpAll); - - switch(language) { - - case EShLangVertex: - break; - - case EShLangFragment: - symbolTable.relateToOperator("dFdx", EOpDPdx); - symbolTable.relateToOperator("dFdy", EOpDPdy); - symbolTable.relateToOperator("fwidth", EOpFwidth); - - break; - - case EShLangPack: - case EShLangUnpack: - symbolTable.relateToOperator("itof", EOpItof); - symbolTable.relateToOperator("ftoi", EOpFtoi); - symbolTable.relateToOperator("skipPixels", EOpSkipPixels); - symbolTable.relateToOperator("readInput", EOpReadInput); - symbolTable.relateToOperator("writePixel", EOpWritePixel); - symbolTable.relateToOperator("bitmapLSB", EOpBitmapLsb); - symbolTable.relateToOperator("bitmapMSB", EOpBitmapMsb); - symbolTable.relateToOperator("writeOutput", EOpWriteOutput); - symbolTable.relateToOperator("readPixel", EOpReadPixel); - break; - default: assert (false && "Language not supported"); - } -} - -void IdentifyBuiltIns(EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) -{ - // - // First, insert some special built-in variables that are not in - // the built-in header files. - // - switch(language) { - - case EShLangFragment: { - // Set up gl_FragData. The array size. - TType fragData(EbtFloat, EvqFragColor, 4, false, true); - fragData.setArraySize(resources.maxDrawBuffers); - symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData)); - } - break; - - default: break; - } -} diff --git a/src/mesa/shader/slang/MachineIndependent/Initialize.h b/src/mesa/shader/slang/MachineIndependent/Initialize.h deleted file mode 100755 index b273f06cae..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/Initialize.h +++ /dev/null @@ -1,58 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _INITIALIZE_INCLUDED_ -#define _INITIALIZE_INCLUDED_ - -#include "Include/ResourceLimits.h" -#include "../Include/Common.h" -#include "../Include/ShHandle.h" -#include "SymbolTable.h" - -typedef TVector TBuiltInStrings; - -class TBuiltIns { -public: - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - void initialize(); - void initialize(const TBuiltInResource& resources); - TBuiltInStrings* getBuiltInStrings() { return builtInStrings; } -protected: - TBuiltInStrings builtInStrings[EShLangCount]; -}; - -void IdentifyBuiltIns(EShLanguage, TSymbolTable&); -void IdentifyBuiltIns(EShLanguage, TSymbolTable&, const TBuiltInResource &resources); - -#endif // _INITIALIZE_INCLUDED_ diff --git a/src/mesa/shader/slang/MachineIndependent/IntermTraverse.cpp b/src/mesa/shader/slang/MachineIndependent/IntermTraverse.cpp deleted file mode 100755 index da77806ddc..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/IntermTraverse.cpp +++ /dev/null @@ -1,243 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "../Include/intermediate.h" - -// -// Traverse the intermediate representation tree, and -// call a node type specific function for each node. -// Done recursively through the member function Traverse(). -// Node types can be skipped if their function to call is 0, -// but their subtree will still be traversed. -// Nodes with children can have their whole subtree skipped -// if preVisit is turned on and the type specific function -// returns false. -// -// preVisit, postVisit, and rightToLeft control what order -// nodes are visited in. -// - -// -// Traversal functions for terminals are straighforward.... -// -void TIntermSymbol::traverse(TIntermTraverser* it) -{ - if (it->visitSymbol) - it->visitSymbol(this, it); -} - -void TIntermConstantUnion::traverse(TIntermTraverser* it) -{ - if (it->visitConstantUnion) - it->visitConstantUnion(this, it); -} - -// -// Traverse a binary node. -// -void TIntermBinary::traverse(TIntermTraverser* it) -{ - bool visit = true; - - // - // visit the node before children if pre-visiting. - // - if (it->preVisit && it->visitBinary) - visit = it->visitBinary(true, this, it); - - // - // Visit the children, in the right order. - // - if (visit) { - ++it->depth; - if (it->rightToLeft) { - if (right) - right->traverse(it); - if (left) - left->traverse(it); - } else { - if (left) - left->traverse(it); - if (right) - right->traverse(it); - } - --it->depth; - } - - // - // Visit the node after the children, if requested and the traversal - // hasn't been cancelled yet. - // - if (visit && it->postVisit && it->visitBinary) - it->visitBinary(false, this, it); -} - -// -// Traverse a unary node. Same comments in binary node apply here. -// -void TIntermUnary::traverse(TIntermTraverser* it) -{ - bool visit = true; - - if (it->preVisit && it->visitUnary) - visit = it->visitUnary(true, this, it); - - if (visit) { - ++it->depth; - operand->traverse(it); - --it->depth; - } - - if (visit && it->postVisit && it->visitUnary) - it->visitUnary(false, this, it); -} - -// -// Traverse an aggregate node. Same comments in binary node apply here. -// -void TIntermAggregate::traverse(TIntermTraverser* it) -{ - bool visit = true; - - if (it->preVisit && it->visitAggregate) - visit = it->visitAggregate(true, this, it); - - if (visit) { - ++it->depth; - - TIntermSequence::iterator sit; - if (it->rightToLeft) { - sit = sequence.end(); - while (sit != sequence.begin()) { - --sit; - (*sit)->traverse(it); - } - } else { - for (sit = sequence.begin(); sit != sequence.end(); ++sit) - (*sit)->traverse(it); - } - - --it->depth; - } - - if (visit && it->postVisit && it->visitAggregate) - it->visitAggregate(false, this, it); -} - -// -// Traverse a selection node. Same comments in binary node apply here. -// -void TIntermSelection::traverse(TIntermTraverser* it) -{ - bool visit = true; - - if (it->preVisit && it->visitSelection) - visit = it->visitSelection(true, this, it); - - if (visit) { - ++it->depth; - if (it->rightToLeft) { - if (falseBlock) - falseBlock->traverse(it); - if (trueBlock) - trueBlock->traverse(it); - condition->traverse(it); - } else { - condition->traverse(it); - if (trueBlock) - trueBlock->traverse(it); - if (falseBlock) - falseBlock->traverse(it); - } - --it->depth; - } - - if (visit && it->postVisit && it->visitSelection) - it->visitSelection(false, this, it); -} - -// -// Traverse a loop node. Same comments in binary node apply here. -// -void TIntermLoop::traverse(TIntermTraverser* it) -{ - bool visit = true; - - if (it->preVisit && it->visitLoop) - visit = it->visitLoop(true, this, it); - - if (visit) { - ++it->depth; - if (it->rightToLeft) { - if (terminal) - terminal->traverse(it); - if (body) - body->traverse(it); - if (test) - test->traverse(it); - } else { - if (test) - test->traverse(it); - if (body) - body->traverse(it); - if (terminal) - terminal->traverse(it); - } - --it->depth; - } - - if (visit && it->postVisit && it->visitLoop) - it->visitLoop(false, this, it); -} - -// -// Traverse a branch node. Same comments in binary node apply here. -// -void TIntermBranch::traverse(TIntermTraverser* it) -{ - bool visit = true; - - if (it->preVisit && it->visitBranch) - visit = it->visitBranch(true, this, it); - - if (visit && expression) { - ++it->depth; - expression->traverse(it); - --it->depth; - } - - if (visit && it->postVisit && it->visitBranch) - it->visitBranch(false, this, it); -} - diff --git a/src/mesa/shader/slang/MachineIndependent/Intermediate.cpp b/src/mesa/shader/slang/MachineIndependent/Intermediate.cpp deleted file mode 100755 index 056fe17de0..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/Intermediate.cpp +++ /dev/null @@ -1,2110 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -// -// Build the intermediate representation. -// - -#include "../Include/ShHandle.h" -#include "localintermediate.h" -#include "QualifierAlive.h" -#include "RemoveTree.h" -#include - -//////////////////////////////////////////////////////////////////////////// -// -// First set of functions are to help build the intermediate representation. -// These functions are not member functions of the nodes. -// They are called from parser productions. -// -///////////////////////////////////////////////////////////////////////////// - -// -// Add a terminal node for an identifier in an expression. -// -// Returns the added node. -// -TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, TSourceLoc line) -{ - TIntermSymbol* node = new TIntermSymbol(id, name, type); - node->setLine(line); - - return node; -} - -// -// Connect two nodes with a new parent that does a binary operation on the nodes. -// -// Returns the added node. -// -TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line, TSymbolTable& symbolTable) -{ - switch (op) { - case EOpLessThan: - case EOpGreaterThan: - case EOpLessThanEqual: - case EOpGreaterThanEqual: - if (left->getType().isMatrix() || left->getType().isArray() || left->getType().isVector() || left->getType().getBasicType() == EbtStruct) { - return 0; - } - break; - case EOpLogicalOr: - case EOpLogicalXor: - case EOpLogicalAnd: - if (left->getType().getBasicType() != EbtBool || left->getType().isMatrix() || left->getType().isArray() || left->getType().isVector()) { - return 0; - } - break; - case EOpAdd: - case EOpSub: - case EOpDiv: - case EOpMul: - if (left->getType().getBasicType() == EbtStruct || left->getType().getBasicType() == EbtBool) - return 0; - default: break; - } - - // - // First try converting the children to compatible types. - // - - if (!(left->getType().getStruct() && right->getType().getStruct())) { - TIntermTyped* child = addConversion(op, left->getType(), right); - if (child) - right = child; - else { - child = addConversion(op, right->getType(), left); - if (child) - left = child; - else - return 0; - } - } else { - if (left->getType() != right->getType()) - return 0; - } - - - // - // Need a new node holding things together then. Make - // one and promote it to the right type. - // - TIntermBinary* node = new TIntermBinary(op); - if (line == 0) - line = right->getLine(); - node->setLine(line); - - node->setLeft(left); - node->setRight(right); - if (! node->promote(infoSink)) - return 0; - - TIntermConstantUnion *leftTempConstant = left->getAsConstantUnion(); - TIntermConstantUnion *rightTempConstant = right->getAsConstantUnion(); - - if (leftTempConstant) - leftTempConstant = copyConstUnion(left->getAsConstantUnion())->getAsConstantUnion(); - - if (rightTempConstant) - rightTempConstant = copyConstUnion(right->getAsConstantUnion())->getAsConstantUnion(); - - if (right->getType().getQualifier() == EvqConst && left->getType().getQualifier() == EvqConst) { - if (right->getAsAggregate()) { - rightTempConstant = changeAggrToTempConst(right->getAsAggregate(), symbolTable, line); - if (rightTempConstant->getUnionArrayPointer() == 0) - return 0; - } - - if (left->getAsAggregate()) { - leftTempConstant = changeAggrToTempConst(left->getAsAggregate(), symbolTable, line); - if (leftTempConstant->getUnionArrayPointer() == 0) - return 0; - } - } - - // - // See if we can fold constants. - // - - TIntermTyped* typedReturnNode = 0; - if ( leftTempConstant && rightTempConstant) { - if (leftTempConstant->getSize() == 1 && rightTempConstant->getSize() > 1) - typedReturnNode = rightTempConstant->fold(node->getOp(), leftTempConstant, infoSink, false); - else - typedReturnNode = leftTempConstant->fold(node->getOp(), rightTempConstant, infoSink, true); - - if (typedReturnNode) - return typedReturnNode; - else { - node->setLeft(leftTempConstant); - node->setRight(rightTempConstant); - } - } else if (leftTempConstant) { - node->setLeft(copyConstUnion(leftTempConstant)); - } else if (rightTempConstant) { - node->setRight(rightTempConstant); - } - - return node; -} - -// -// Connect two nodes through an assignment. -// -// Returns the added node. -// -TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line) -{ - // - // Like adding binary math, except the conversion can only go - // from right to left. - // - TIntermBinary* node = new TIntermBinary(op); - if (line == 0) - line = left->getLine(); - node->setLine(line); - - if (right->getAsConstantUnion()) { // if the right node of assignment is a TempConstant node, allocate its own new space and remove the pointer to the symbol table value - right = copyConstUnion(right->getAsConstantUnion()) ; - if (right == 0) - return 0; - } - - TIntermTyped* child = addConversion(op, left->getType(), right); - if (child == 0) - return 0; - - node->setLeft(left); - node->setRight(child); - if (! node->promote(infoSink)) - return 0; - - return node; -} - -// -// Connect two nodes through an index operator, where the left node is the base -// of an array or struct, and the right node is a direct or indirect offset. -// -// Returns the added node. -// The caller should set the type of the returned node. -// -TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc line) -{ - TIntermBinary* node = new TIntermBinary(op); - if (line == 0) - line = index->getLine(); - node->setLine(line); - node->setLeft(base); - node->setRight(index); - - // caller should set the type - - return node; -} - -// -// Add one node as the parent of another that it operates on. -// -// Returns the added node. -// -TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode, TSourceLoc line, TSymbolTable& symbolTable) -{ - TIntermUnary* node; - TIntermTyped* child = childNode->getAsTyped(); - - if (child == 0) { - infoSink.info.message(EPrefixInternalError, "Bad type in AddUnaryMath", line); - return 0; - } - - switch (op) { - case EOpLogicalNot: - if (child->getType().getBasicType() != EbtBool || child->getType().isMatrix() || child->getType().isArray() || child->getType().isVector()) { - return 0; - } - break; - - case EOpPostIncrement: - case EOpPreIncrement: - case EOpPostDecrement: - case EOpPreDecrement: - case EOpNegative: - if (child->getType().getBasicType() == EbtStruct) - return 0; - default: break; - } - - // - // Do we need to promote the operand? - // - // Note: Implicit promotions were removed from the language. - // - TBasicType newType = EbtVoid; - switch (op) { - case EOpConstructInt: newType = EbtInt; break; - case EOpConstructBool: newType = EbtBool; break; - case EOpConstructFloat: newType = EbtFloat; break; - default: break; - } - - if (newType != EbtVoid) { - child = addConversion(op, TType(newType, EvqTemporary, child->getNominalSize(), - child->isMatrix(), - child->isArray()), - child); - if (child == 0) - return 0; - } - - // - // For constructors, we are now done, it's all in the conversion. - // - switch (op) { - case EOpConstructInt: - case EOpConstructBool: - case EOpConstructFloat: - return child; - default: break; - } - - if (child->getAsConstantUnion()) - child = copyConstUnion(child->getAsConstantUnion()); - - if (child->getAsAggregate() && child->getType().getQualifier() == EvqConst) { - child = changeAggrToTempConst(child->getAsAggregate(), symbolTable, line); - if (child->getAsConstantUnion()->getUnionArrayPointer() == 0) - return 0; - } - - TIntermConstantUnion *childTempConstant = child->getAsConstantUnion(); - - // - // Make a new node for the operator. - // - node = new TIntermUnary(op); - if (line == 0) - line = child->getLine(); - node->setLine(line); - node->setOperand(child); - - if (! node->promote(infoSink)) - return 0; - - if (childTempConstant) { - TIntermTyped* newChild = childTempConstant->fold(op, 0, infoSink, true); - - if (newChild) { - return newChild; - } - } - - return node; -} - -// -// This is the safe way to change the operator on an aggregate, as it -// does lots of error checking and fixing. Especially for establishing -// a function call's operation on it's set of parameters. Sequences -// of instructions are also aggregates, but they just direnctly set -// their operator to EOpSequence. -// -// Returns an aggregate node, which could be the one passed in if -// it was already an aggregate. -// -TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, TSourceLoc line) -{ - TIntermAggregate* aggNode; - - // - // Make sure we have an aggregate. If not turn it into one. - // - if (node) { - aggNode = node->getAsAggregate(); - if (aggNode == 0 || aggNode->getOp() != EOpNull) { - // - // Make an aggregate containing this node. - // - aggNode = new TIntermAggregate(); - aggNode->getSequence().push_back(node); - if (line == 0) - line = node->getLine(); - } - } else - aggNode = new TIntermAggregate(); - - // - // Set the operator. - // - aggNode->setOperator(op); - if (line != 0) - aggNode->setLine(line); - - return aggNode; -} - -// -// Convert one type to another. -// -// Returns the node representing the conversion, which could be the same -// node passed in if no conversion was needed. -// -// Return 0 if a conversion can't be done. -// -TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node) -{ - // - // Does the base type allow operation? - // - switch (node->getBasicType()) { - case EbtVoid: - case EbtSampler1D: - case EbtSampler2D: - case EbtSampler3D: - case EbtSamplerCube: - case EbtSampler1DShadow: - case EbtSampler2DShadow: - return 0; - default: break; - } - - // - // Otherwise, if types are identical, no problem - // - if (type == node->getType()) - return node; - - // - // If one's a structure, then no conversions. - // - if (type.getStruct() || node->getType().getStruct()) - return 0; - - TBasicType promoteTo; - - switch (op) { - // - // Explicit conversions - // - case EOpConstructBool: - promoteTo = EbtBool; - break; - case EOpConstructFloat: - promoteTo = EbtFloat; - break; - case EOpConstructInt: - promoteTo = EbtInt; - break; - default: - // - // implicit conversions were removed from the language. - // - if (type.getBasicType() != node->getType().getBasicType()) - return 0; - // - // Size and structure could still differ, but that's - // handled by operator promotion. - // - return node; - } - - // - // Do conversion. - // - bool allConstant = true; - // check to see if there is an aggregate node - if (node->getAsAggregate()) { - if (node->getAsAggregate()->getOp() != EOpFunctionCall) { - // if the aggregate node is a constructor or a comma operator, look at its children, if they are constant - // convert them into the right type - TIntermSequence &sequenceVector = node->getAsAggregate()->getSequence() ; - for (TIntermSequence::iterator p = sequenceVector.begin(); - p != sequenceVector.end(); p++) { - if (!(*p)->getAsTyped()->getAsConstantUnion()) - allConstant = false; - } - } else - allConstant = false; - } - if (allConstant && node->getAsAggregate()) { // we can do the constant folding here as all the nodes of the aggregate are const - TIntermSequence &sequenceVector = node->getAsAggregate()->getSequence() ; - for (TIntermSequence::iterator p = sequenceVector.begin(); - p != sequenceVector.end(); p++) { - TIntermTyped* newNode = 0; - constUnion *unionArray = new constUnion[1]; - - switch (promoteTo) { - case EbtFloat: - switch ((*p)->getAsTyped()->getType().getBasicType()) { - - case EbtInt: - unionArray->fConst = static_cast((*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->iConst); - newNode = addConstantUnion(unionArray, TType(EbtFloat, EvqConst), node->getLine()); break; - case EbtBool: - unionArray->fConst = static_cast((*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->bConst); - newNode = newNode = addConstantUnion(unionArray, TType(EbtFloat, EvqConst), node->getLine()); break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); - return 0; - } - break; - case EbtInt: - switch ((*p)->getAsTyped()->getType().getBasicType()) { - case EbtFloat: - unionArray->iConst = static_cast((*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->fConst); - newNode = addConstantUnion(unionArray, TType(EbtInt, EvqConst), node->getLine()); - break; - case EbtBool: - unionArray->iConst = static_cast((*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->bConst); - newNode = addConstantUnion(unionArray, TType(EbtInt, EvqConst), node->getLine()); - break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); - return 0; - } - break; - case EbtBool: - switch ((*p)->getAsTyped()->getType().getBasicType()) { - case EbtFloat: - unionArray->bConst = (*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->fConst != 0.0 ; - newNode = addConstantUnion(unionArray, TType(EbtBool, EvqConst), node->getLine()); - break; - case EbtInt: - unionArray->bConst = (*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->iConst != 0 ; - newNode = addConstantUnion(unionArray, TType(EbtBool, EvqConst), node->getLine()); - break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); - return 0; - } - break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); - return 0; - } - if (newNode) { - sequenceVector.erase(p); - sequenceVector.insert(p, newNode); - } - } - return node->getAsAggregate(); - } else if (node->getAsConstantUnion()) { - - return (promoteConstantUnion(promoteTo, node->getAsConstantUnion())); - } else { - - // - // Add a new newNode for the conversion. - // - TIntermUnary* newNode = 0; - - TOperator newOp = EOpNull; - switch (promoteTo) { - case EbtFloat: - switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToFloat; break; - case EbtBool: newOp = EOpConvBoolToFloat; break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); - return 0; - } - break; - case EbtBool: - switch (node->getBasicType()) { - case EbtInt: newOp = EOpConvIntToBool; break; - case EbtFloat: newOp = EOpConvFloatToBool; break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); - return 0; - } - break; - case EbtInt: - switch (node->getBasicType()) { - case EbtBool: newOp = EOpConvBoolToInt; break; - case EbtFloat: newOp = EOpConvFloatToInt; break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine()); - return 0; - } - break; - default: - infoSink.info.message(EPrefixInternalError, "Bad promotion type", node->getLine()); - return 0; - } - - TType type(promoteTo, EvqTemporary, node->getNominalSize(), node->isMatrix(), node->isArray()); - newNode = new TIntermUnary(newOp, type); - newNode->setLine(node->getLine()); - newNode->setOperand(node); - - return newNode; - } -} - -// -// Safe way to combine two nodes into an aggregate. Works with null pointers, -// a node that's not a aggregate yet, etc. -// -// Returns the resulting aggregate, unless 0 was passed in for -// both existing nodes. -// -TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right, TSourceLoc line) -{ - if (left == 0 && right == 0) - return 0; - - TIntermAggregate* aggNode = 0; - if (left) - aggNode = left->getAsAggregate(); - if (!aggNode || aggNode->getOp() != EOpNull) { - aggNode = new TIntermAggregate; - if (left) - aggNode->getSequence().push_back(left); - } - - if (right) - aggNode->getSequence().push_back(right); - - if (line != 0) - aggNode->setLine(line); - - return aggNode; -} - -// -// Turn an existing node into an aggregate. -// -// Returns an aggregate, unless 0 was passed in for the existing node. -// -TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, TSourceLoc line) -{ - if (node == 0) - return 0; - - TIntermAggregate* aggNode = new TIntermAggregate; - aggNode->getSequence().push_back(node); - - if (line != 0) - aggNode->setLine(line); - else - aggNode->setLine(node->getLine()); - - return aggNode; -} - -// -// For "if" test nodes. There are three children; a condition, -// a true path, and a false path. The two paths are in the -// nodePair. -// -// Returns the selection node created. -// -TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, TSourceLoc line) -{ - // - // For compile time constant selections, prune the code and - // test now. - // - - if (cond->getAsTyped() && cond->getAsTyped()->getAsConstantUnion()) { - if (cond->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->bConst) - return nodePair.node1; - else - return nodePair.node2; - } - - TIntermSelection* node = new TIntermSelection(cond, nodePair.node1, nodePair.node2); - node->setLine(line); - - return node; -} - - -TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc line) -{ - if (left->getType().getQualifier() == EvqConst && right->getType().getQualifier() == EvqConst) { - return right; - } else { - TIntermTyped *commaAggregate = growAggregate(left, right, line); - commaAggregate->getAsAggregate()->setOperator(EOpComma); - commaAggregate->setType(right->getType()); - commaAggregate->getTypePointer()->changeQualifier(EvqTemporary); - return commaAggregate; - } -} - -// -// For "?:" test nodes. There are three children; a condition, -// a true path, and a false path. The two paths are specified -// as separate parameters. -// -// Returns the selection node created, or 0 if one could not be. -// -TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc line) -{ - // - // Get compatible types. - // - TIntermTyped* child = addConversion(EOpSequence, trueBlock->getType(), falseBlock); - if (child) - falseBlock = child; - else { - child = addConversion(EOpSequence, falseBlock->getType(), trueBlock); - if (child) - trueBlock = child; - else - return 0; - } - - // - // See if condition is constant, and select now. - // - - if (cond->getAsConstantUnion()) { - if (cond->getAsConstantUnion()->getUnionArrayPointer()->bConst) - return trueBlock; - else - return falseBlock; - } - - // - // Make a selection node. - // - TIntermSelection* node = new TIntermSelection(cond, trueBlock, falseBlock, trueBlock->getType()); - node->setLine(line); - - return node; -} - -// -// Constant terminal nodes. Has a union that contains bool, float or int constants -// -// Returns the constant union node created. -// - -TIntermConstantUnion* TIntermediate::addConstantUnion(constUnion* unionArrayPointer, const TType& t, TSourceLoc line) -{ - TIntermConstantUnion* node = new TIntermConstantUnion(unionArrayPointer, t); - node->setLine(line); - - return node; -} - -TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, TSourceLoc line) -{ - - TIntermAggregate* node = new TIntermAggregate(EOpSequence); - - node->setLine(line); - TIntermConstantUnion* constIntNode; - TIntermSequence &sequenceVector = node->getSequence(); - constUnion* unionArray; - - for (int i = 0; i < fields.num; i++) { - unionArray = new constUnion[1]; - unionArray->iConst = fields.offsets[i]; - constIntNode = addConstantUnion(unionArray, TType(EbtInt, EvqConst), line); - sequenceVector.push_back(constIntNode); - } - - return node; -} - -// -// Create loop nodes. -// -TIntermNode* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, TSourceLoc line) -{ - TIntermNode* node = new TIntermLoop(body, test, terminal, testFirst); - node->setLine(line); - - return node; -} - -// -// Add branches. -// -TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TSourceLoc line) -{ - return addBranch(branchOp, 0, line); -} - -TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expression, TSourceLoc line) -{ - TIntermBranch* node = new TIntermBranch(branchOp, expression); - node->setLine(line); - - return node; -} - -// -// This is to be executed once the final root is put on top by the parsing -// process. -// -bool TIntermediate::postProcess(TIntermNode* root, EShLanguage language) -{ - if (root == 0) - return true; - - // - // First, finish off the top level sequence, if any - // - TIntermAggregate* aggRoot = root->getAsAggregate(); - if (aggRoot && aggRoot->getOp() == EOpNull) - aggRoot->setOperator(EOpSequence); - - return true; -} - -// -// This deletes the tree. -// -void TIntermediate::remove(TIntermNode* root) -{ - if (root) - RemoveAllTreeNodes(root); -} - -//////////////////////////////////////////////////////////////// -// -// Member functions of the nodes used for building the tree. -// -//////////////////////////////////////////////////////////////// - -// -// Say whether or not an operation node changes the value of a variable. -// -// Returns true if state is modified. -// -bool TIntermOperator::modifiesState() const -{ - switch (op) { - case EOpPostIncrement: - case EOpPostDecrement: - case EOpPreIncrement: - case EOpPreDecrement: - case EOpAssign: - case EOpAddAssign: - case EOpSubAssign: - case EOpMulAssign: - case EOpVectorTimesMatrixAssign: - case EOpVectorTimesScalarAssign: - case EOpMatrixTimesScalarAssign: - case EOpMatrixTimesMatrixAssign: - case EOpDivAssign: - case EOpModAssign: - case EOpAndAssign: - case EOpInclusiveOrAssign: - case EOpExclusiveOrAssign: - case EOpLeftShiftAssign: - case EOpRightShiftAssign: - return true; - default: - return false; - } -} - -// -// returns true if the operator is for one of the constructors -// -bool TIntermOperator::isConstructor() const -{ - switch (op) { - case EOpConstructVec2: - case EOpConstructVec3: - case EOpConstructVec4: - case EOpConstructMat2: - case EOpConstructMat3: - case EOpConstructMat4: - case EOpConstructFloat: - case EOpConstructIVec2: - case EOpConstructIVec3: - case EOpConstructIVec4: - case EOpConstructInt: - case EOpConstructBVec2: - case EOpConstructBVec3: - case EOpConstructBVec4: - case EOpConstructBool: - case EOpConstructStruct: - return true; - default: - return false; - } -} -// -// Make sure the type of a unary operator is appropriate for its -// combination of operation and operand type. -// -// Returns false in nothing makes sense. -// -bool TIntermUnary::promote(TInfoSink&) -{ - switch (op) { - case EOpLogicalNot: - if (operand->getBasicType() != EbtBool) - return false; - break; - case EOpBitwiseNot: - if (operand->getBasicType() != EbtInt) - return false; - break; - case EOpNegative: - case EOpPostIncrement: - case EOpPostDecrement: - case EOpPreIncrement: - case EOpPreDecrement: - if (operand->getBasicType() == EbtBool) - return false; - break; - - // operators for built-ins are already type checked against their prototype - case EOpAny: - case EOpAll: - case EOpVectorLogicalNot: - return true; - - default: - if (operand->getBasicType() != EbtFloat) - return false; - } - - setType(operand->getType()); - - return true; -} - -// -// Establishes the type of the resultant operation, as well as -// makes the operator the correct one for the operands. -// -// Returns false if operator can't work on operands. -// -bool TIntermBinary::promote(TInfoSink& infoSink) -{ - int size = left->getNominalSize(); - if (right->getNominalSize() > size) - size = right->getNominalSize(); - - TBasicType type = left->getBasicType(); - - // - // Don't operate on arrays. - // - if (left->isArray() || right->isArray()) - return false; - - // - // Base assumption: just make the type the same as the left - // operand. Then only deviations from this need be coded. - // - setType(TType(type, EvqTemporary, left->getNominalSize(), left->isMatrix())); - - // - // All scalars. Code after this test assumes this case is removed! - // - if (size == 1) { - - switch (op) { - - // - // Promote to conditional - // - case EOpEqual: - case EOpNotEqual: - case EOpLessThan: - case EOpGreaterThan: - case EOpLessThanEqual: - case EOpGreaterThanEqual: - setType(TType(EbtBool)); - break; - - // - // And and Or operate on conditionals - // - case EOpLogicalAnd: - case EOpLogicalOr: - if (left->getBasicType() != EbtBool || right->getBasicType() != EbtBool) - return false; - setType(TType(EbtBool)); - break; - - // - // Check for integer only operands. - // - case EOpMod: - case EOpRightShift: - case EOpLeftShift: - case EOpAnd: - case EOpInclusiveOr: - case EOpExclusiveOr: - if (left->getBasicType() != EbtInt || right->getBasicType() != EbtInt) - return false; - break; - case EOpModAssign: - case EOpAndAssign: - case EOpInclusiveOrAssign: - case EOpExclusiveOrAssign: - case EOpLeftShiftAssign: - case EOpRightShiftAssign: - if (left->getBasicType() != EbtInt || right->getBasicType() != EbtInt) - return false; - // fall through - - // - // Everything else should have matching types - // - default: - if (left->getBasicType() != right->getBasicType() || - left->isMatrix() != right->isMatrix()) - return false; - } - - return true; - } - - // - // Are the sizes compatible? - // - if ( left->getNominalSize() != size && left->getNominalSize() != 1 || - right->getNominalSize() != size && right->getNominalSize() != 1) - return false; - - // - // Can these two operands be combined? - // - switch (op) { - case EOpMul: - if (!left->isMatrix() && right->isMatrix()) { - if (left->isVector()) - op = EOpVectorTimesMatrix; - else { - op = EOpMatrixTimesScalar; - setType(TType(type, EvqTemporary, size, true)); - } - } else if (left->isMatrix() && !right->isMatrix()) { - if (right->isVector()) { - op = EOpMatrixTimesVector; - setType(TType(type, EvqTemporary, size, false)); - } else { - op = EOpMatrixTimesScalar; - } - } else if (left->isMatrix() && right->isMatrix()) { - op = EOpMatrixTimesMatrix; - } else if (!left->isMatrix() && !right->isMatrix()) { - if (left->isVector() && right->isVector()) { - // leave as component product - } else if (left->isVector() || right->isVector()) { - op = EOpVectorTimesScalar; - setType(TType(type, EvqTemporary, size, false)); - } - } else { - infoSink.info.message(EPrefixInternalError, "Missing elses", getLine()); - return false; - } - break; - case EOpMulAssign: - if (!left->isMatrix() && right->isMatrix()) { - if (left->isVector()) - op = EOpVectorTimesMatrixAssign; - else { - return false; - } - } else if (left->isMatrix() && !right->isMatrix()) { - if (right->isVector()) { - return false; - } else { - op = EOpMatrixTimesScalarAssign; - } - } else if (left->isMatrix() && right->isMatrix()) { - op = EOpMatrixTimesMatrixAssign; - } else if (!left->isMatrix() && !right->isMatrix()) { - if (left->isVector() && right->isVector()) { - // leave as component product - } else if (left->isVector() || right->isVector()) { - if (! left->isVector()) - return false; - op = EOpVectorTimesScalarAssign; - setType(TType(type, EvqTemporary, size, false)); - } - } else { - infoSink.info.message(EPrefixInternalError, "Missing elses", getLine()); - return false; - } - break; - case EOpAssign: - if (left->getNominalSize() != right->getNominalSize()) - return false; - // fall through - case EOpAdd: - case EOpSub: - case EOpDiv: - case EOpMod: - case EOpAddAssign: - case EOpSubAssign: - case EOpDivAssign: - case EOpModAssign: - if (left->isMatrix() && right->isVector() || - left->isVector() && right->isMatrix() || - left->getBasicType() != right->getBasicType()) - return false; - setType(TType(type, EvqTemporary, size, left->isMatrix() || right->isMatrix())); - break; - - case EOpEqual: - case EOpNotEqual: - case EOpLessThan: - case EOpGreaterThan: - case EOpLessThanEqual: - case EOpGreaterThanEqual: - if (left->isMatrix() && right->isVector() || - left->isVector() && right->isMatrix() || - left->getBasicType() != right->getBasicType()) - return false; - setType(TType(EbtBool)); - break; - -default: - return false; - } - - // - // One more check for assignment. The Resulting type has to match the left operand. - // - switch (op) { - case EOpAssign: - case EOpAddAssign: - case EOpSubAssign: - case EOpMulAssign: - case EOpDivAssign: - case EOpModAssign: - case EOpAndAssign: - case EOpInclusiveOrAssign: - case EOpExclusiveOrAssign: - case EOpLeftShiftAssign: - case EOpRightShiftAssign: - if (getType() != left->getType()) - return false; - break; - default: - break; - } - - return true; -} - -bool compareStructure(const TType& leftNodeType, constUnion* rightUnionArray, constUnion* leftUnionArray, int& index) -{ - TTypeList* fields = leftNodeType.getStruct(); - - size_t structSize = fields->size(); - - for (size_t j = 0; j < structSize; j++) { - int size = (*fields)[j].type->getInstanceSize(); - for (int i = 0; i < size; i++) { - switch ((*fields)[j].type->getBasicType()) { - case EbtFloat: - if (leftUnionArray[index].fConst != rightUnionArray[index].fConst) - return false; - index++; - break; - case EbtInt: - if (leftUnionArray[index].iConst != rightUnionArray[index].iConst) - return false; - index++; - break; - case EbtBool: - if (leftUnionArray[index].bConst != rightUnionArray[index].bConst) - return false; - index++; - break; - case EbtStruct: - if (!compareStructure(*(*fields)[j].type, rightUnionArray, leftUnionArray, index)) - return false; - break; - default: - assert(true && "Cannot compare"); - break; - } - - } - } - return true; -} - -// -// The fold functions see if an operation on a constant can be done in place, -// without generating run-time code. -// -// Returns the node to keep using, which may or may not be the node passed in. -// - -TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNode, TInfoSink& infoSink, bool leftOperand) -{ - constUnion *unionArray = this->getUnionArrayPointer(); - - if (constantNode) { - if (constantNode->getAsConstantUnion() && constantNode->getSize() == 1 && constantNode->getType().getBasicType() != EbtStruct - && this->getSize() > 1) { - TIntermConstantUnion *node = constantNode->getAsConstantUnion(); - TIntermConstantUnion *newNode; - constUnion* tempConstArray; - switch(op) { - case EOpAdd: - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: tempConstArray[i].fConst = unionArray[i].fConst + node->getUnionArrayPointer()->fConst; break; - case EbtInt: tempConstArray[i].iConst = unionArray[i].iConst + node->getUnionArrayPointer()->iConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"+\"", this->getLine()); - return 0; - } - } - } - break; - case EOpMatrixTimesScalar: - case EOpVectorTimesScalar: - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: tempConstArray[i].fConst = unionArray[i].fConst * node->getUnionArrayPointer()->fConst; break; - case EbtInt: tempConstArray[i].iConst = unionArray[i].iConst * node->getUnionArrayPointer()->iConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"*\"", this->getLine()); - return 0; - } - } - } - break; - case EOpSub: - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: - if (leftOperand) - tempConstArray[i].fConst = unionArray[i].fConst - node->getUnionArrayPointer()->fConst; - else - tempConstArray[i].fConst = node->getUnionArrayPointer()->fConst - unionArray[i].fConst; - break; - - case EbtInt: - if (leftOperand) - tempConstArray[i].iConst = unionArray[i].iConst - node->getUnionArrayPointer()->iConst; - else - tempConstArray[i].iConst = node->getUnionArrayPointer()->iConst - unionArray[i].iConst; - break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"-\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpDiv: - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: - if (leftOperand) { - if (node->getUnionArrayPointer()->fConst == 0.0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].fConst = FLT_MAX; - } else - tempConstArray[i].fConst = unionArray[i].fConst / node->getUnionArrayPointer()->fConst; - } else { - if (unionArray[i].fConst == 0.0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].fConst = FLT_MAX; - } else - tempConstArray[i].fConst = node->getUnionArrayPointer()->fConst / unionArray[i].fConst; - } - break; - - case EbtInt: - if (leftOperand) { - if (node->getUnionArrayPointer()->iConst == 0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].iConst = INT_MAX; - } else - tempConstArray[i].iConst = unionArray[i].iConst / node->getUnionArrayPointer()->iConst; - } else { - if (unionArray[i].iConst == 0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].iConst = INT_MAX; - } else - tempConstArray[i].iConst = node->getUnionArrayPointer()->iConst / unionArray[i].iConst; - } - break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"/\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtBool: tempConstArray[i].bConst = unionArray[i].bConst && node->getUnionArrayPointer()->bConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"&&\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpLogicalXor: // this code is written for possible future use, will not get executed currently - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtBool: tempConstArray[i].bConst = unionArray[i].bConst ^ node->getUnionArrayPointer()->bConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"^^\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpLogicalOr: // this code is written for possible future use, will not get executed currently - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtBool: tempConstArray[i].bConst = unionArray[i].bConst || node->getUnionArrayPointer()->bConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"||\"", this->getLine()); - return 0; - } - } - } - break; - - default: - infoSink.info.message(EPrefixInternalError, "Invalid operator for constant folding", this->getLine()); - return 0; - } - newNode = new TIntermConstantUnion(tempConstArray, this->getType()); - newNode->setLine(this->getLine()); - - return newNode; - } else if (constantNode->getAsConstantUnion() && (this->getSize() > 1 || this->getType().getBasicType() == EbtStruct)) { - TIntermConstantUnion *node = constantNode->getAsConstantUnion(); - constUnion *rightUnionArray = node->getUnionArrayPointer(); - constUnion* tempConstArray = 0; - TIntermConstantUnion *tempNode; - int index = 0; - bool boolNodeFlag = false; - switch(op) { - case EOpAdd: - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: tempConstArray[i].fConst = unionArray[i].fConst + rightUnionArray[i].fConst; break; - case EbtInt: tempConstArray[i].iConst = unionArray[i].iConst + rightUnionArray[i].iConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"+\"", this->getLine()); - return 0; - } - } - } - break; - case EOpSub: - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: - if (leftOperand) - tempConstArray[i].fConst = unionArray[i].fConst - rightUnionArray[i].fConst; - else - tempConstArray[i].fConst = rightUnionArray[i].fConst - unionArray[i].fConst; - break; - - case EbtInt: - if (leftOperand) - tempConstArray[i].iConst = unionArray[i].iConst - rightUnionArray[i].iConst; - else - tempConstArray[i].iConst = rightUnionArray[i].iConst - unionArray[i].iConst; - break; - - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"-\"", this->getLine()); - return 0; - } - } - } - break; - case EOpMul: - if (this->isVector()) { // two vectors multiplied together - int size = this->getSize(); - tempConstArray = new constUnion[size]; - - for (int i = 0; i < size; i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: tempConstArray[i].fConst = unionArray[i].fConst * rightUnionArray[i].fConst; break; - case EbtInt: tempConstArray[i].iConst = unionArray[i].iConst * rightUnionArray[i].iConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for vector multiply", this->getLine()); - return 0; - } - } - } - break; - case EOpMatrixTimesMatrix: - if (this->getType().getBasicType() != EbtFloat || node->getBasicType() != EbtFloat) { - infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for matrix multiply", this->getLine()); - return 0; - } - {// support MSVC++6.0 - int size = this->getNominalSize(); - tempConstArray = new constUnion[size*size]; - for (int row = 0; row < size; row++) { - for (int column = 0; column < size; column++) { - tempConstArray[size * column + row].fConst = 0.0; - for (int i = 0; i < size; i++) { - tempConstArray[size * column + row].fConst += unionArray[i * size + row].fConst * (rightUnionArray[column * size + i].fConst); - } - } - } - } - break; - case EOpDiv: - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtFloat: - if (leftOperand) { - if (rightUnionArray[i].fConst == 0.0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].fConst = FLT_MAX; - } else - tempConstArray[i].fConst = unionArray[i].fConst / rightUnionArray[i].fConst; - } else { - if (unionArray[i].fConst == 0.0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].fConst = FLT_MAX; - } else - tempConstArray[i].fConst = rightUnionArray[i].fConst / unionArray[i].fConst; - } - break; - - case EbtInt: - if (leftOperand) { - if (rightUnionArray[i].iConst == 0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].iConst = INT_MAX; - } else - tempConstArray[i].iConst = unionArray[i].iConst / rightUnionArray[i].iConst; - } else { - if (unionArray[i].iConst == 0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - tempConstArray[i].iConst = INT_MAX; - } else - tempConstArray[i].iConst = rightUnionArray[i].iConst / unionArray[i].iConst; - } - break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"/\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpMatrixTimesVector: - if (node->getBasicType() != EbtFloat) { - infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for matrix times vector", this->getLine()); - return 0; - } - tempConstArray = new constUnion[this->getNominalSize()]; - - {// support MSVC++6.0 - for (int size = this->getNominalSize(), i = 0; i < size; i++) { - tempConstArray[i].fConst = 0.0; - for (int j = 0; j < size; j++) { - tempConstArray[i].fConst += ((unionArray[j*size + i].fConst) * rightUnionArray[j].fConst); - } - } - } - - tempNode = new TIntermConstantUnion(tempConstArray, node->getType()); - tempNode->setLine(this->getLine()); - - return tempNode; - - case EOpVectorTimesMatrix: - if (this->getType().getBasicType() != EbtFloat) { - infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for vector times matrix", this->getLine()); - return 0; - } - - tempConstArray = new constUnion[this->getNominalSize()]; - {// support MSVC++6.0 - for (int size = this->getNominalSize(), i = 0; i < size; i++) { - tempConstArray[i].fConst = 0.0; - for (int j = 0; j < size; j++) { - tempConstArray[i].fConst += ((unionArray[j].fConst) * rightUnionArray[i*size + j].fConst); - } - } - } - break; - - case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtBool: tempConstArray[i].bConst = unionArray[i].bConst && rightUnionArray[i].bConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"&&\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpLogicalXor: // this code is written for possible future use, will not get executed currently - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtBool: tempConstArray[i].bConst = unionArray[i].bConst ^ rightUnionArray[i].bConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"^^\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpLogicalOr: // this code is written for possible future use, will not get executed currently - tempConstArray = new constUnion[this->getSize()]; - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - switch (this->getType().getBasicType()) { - case EbtBool: tempConstArray[i].bConst = unionArray[i].bConst || rightUnionArray[i].bConst; break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"||\"", this->getLine()); - return 0; - } - } - } - break; - - case EOpEqual: - - switch (this->getType().getBasicType()) { - case EbtFloat: - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - if (unionArray[i].fConst != rightUnionArray[i].fConst) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - break; - - case EbtInt: - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - if (unionArray[i].iConst != rightUnionArray[i].iConst) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - break; - case EbtBool: - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - if (unionArray[i].bConst != rightUnionArray[i].bConst) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - break; - case EbtStruct: - if (!compareStructure(node->getType(), node->getUnionArrayPointer(), unionArray, index)) - boolNodeFlag = true; - break; - - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"==\"", this->getLine()); - return 0; - } - - tempConstArray = new constUnion[1]; - if (!boolNodeFlag) { - tempConstArray->bConst = true; - } - else { - tempConstArray->bConst = false; - } - - tempNode = new TIntermConstantUnion(tempConstArray, TType(EbtBool, EvqConst)); - tempNode->setLine(this->getLine()); - - return tempNode; - - case EOpNotEqual: - switch (this->getType().getBasicType()) { - case EbtFloat: - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - if (unionArray[i].fConst == rightUnionArray[i].fConst) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - break; - - case EbtInt: - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - if (unionArray[i].iConst == rightUnionArray[i].iConst) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - break; - case EbtBool: - {// support MSVC++6.0 - for (int i = 0; i < this->getSize(); i++) { - if (unionArray[i].bConst == rightUnionArray[i].bConst) { - boolNodeFlag = true; - break; // break out of for loop - } - } - } - break; - case EbtStruct: - if (compareStructure(node->getType(), node->getUnionArrayPointer(), unionArray, index)) - boolNodeFlag = true; - break; - default: - infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"!=\"", this->getLine()); - return 0; - } - - tempConstArray = new constUnion[1]; - if (!boolNodeFlag) { - tempConstArray->bConst = true; - } - else { - tempConstArray->bConst = false; - } - - tempNode = new TIntermConstantUnion(tempConstArray, TType(EbtBool, EvqConst)); - tempNode->setLine(this->getLine()); - - return tempNode; - - default: - infoSink.info.message(EPrefixInternalError, "Invalid operator for constant folding", this->getLine()); - return 0; - } - tempNode = new TIntermConstantUnion(tempConstArray, this->getType()); - tempNode->setLine(this->getLine()); - - return tempNode; - } else if (this->getSize() == 1 && this->getType().getBasicType() != EbtStruct - && constantNode->getSize() == 1 && constantNode->getType().getBasicType() != EbtStruct ) { // scalar constant folding - constUnion *unionArray = new constUnion[1]; - TIntermConstantUnion* newNode = 0; - - switch (this->getType().getBasicType()) { - case EbtInt: - { - // - // Dealing with two operands, us and constant. - // - // Do Binary operations. - // - int rightValue = constantNode->getAsConstantUnion()->getUnionArrayPointer()->iConst; - int leftValue = this->getUnionArrayPointer()->iConst; - //int line = this->getLine(); - - switch(op) { - //?? add constant intrinsics - case EOpAdd: unionArray->iConst = leftValue + rightValue; break; - case EOpSub: unionArray->iConst = leftValue - rightValue; break; - case EOpMul: unionArray->iConst = leftValue * rightValue; break; - case EOpDiv: - if (rightValue == 0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - unionArray->iConst = INT_MAX; - } else - unionArray->iConst = leftValue / rightValue; break; - - case EOpMod: unionArray->iConst = leftValue % rightValue; break; - - case EOpRightShift: unionArray->iConst = leftValue >> rightValue; break; - case EOpLeftShift: unionArray->iConst = leftValue << rightValue; break; - - case EOpAnd: unionArray->iConst = leftValue & rightValue; break; - case EOpInclusiveOr: unionArray->iConst = leftValue | rightValue; break; - case EOpExclusiveOr: unionArray->iConst = leftValue ^ rightValue; break; - - // the following assume it's okay to have memory leaks - case EOpEqual: - unionArray->bConst = leftValue == rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpNotEqual: - unionArray->bConst = leftValue != rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpLessThan: - unionArray->bConst = leftValue < rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpGreaterThan: - unionArray->bConst = leftValue > rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpLessThanEqual: - unionArray->bConst = leftValue <= rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpGreaterThanEqual: - unionArray->bConst = leftValue >= rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - - default: - //infoSink.info.message(EPrefixInternalError, "Binary operation not folded into constant int", line); - return 0; - } - if (!newNode) { - newNode = new TIntermConstantUnion(unionArray, TType(EbtInt, EvqConst)); - } - newNode->setLine(constantNode->getLine()); - return newNode; - } - case EbtFloat: - { - float rightValue = constantNode->getAsConstantUnion()->getUnionArrayPointer()->fConst; - float leftValue = this->getUnionArrayPointer()->fConst; - - switch(op) { - //?? add constant intrinsics - case EOpAdd: unionArray->fConst = leftValue + rightValue; break; - case EOpSub: unionArray->fConst = leftValue - rightValue; break; - case EOpMul: unionArray->fConst = leftValue * rightValue; break; - case EOpDiv: - if (rightValue == 0.0) { - infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", this->getLine()); - unionArray->fConst = FLT_MAX; - } else - unionArray->fConst = leftValue / rightValue; break; - - // the following assume it's okay to have memory leaks (cleaned up by pool allocator) - case EOpEqual: - unionArray->bConst = leftValue == rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpNotEqual: - unionArray->bConst = leftValue != rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpLessThan: - unionArray->bConst = leftValue < rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpGreaterThan: - unionArray->bConst = leftValue > rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpLessThanEqual: - unionArray->bConst = leftValue <= rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - case EOpGreaterThanEqual: - unionArray->bConst = leftValue >= rightValue; - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - break; - - default: - //infoSink.info.message(EPrefixInternalError, "Binary operation not folded into constant float", line); - return 0; - } - if (!newNode) { - newNode = new TIntermConstantUnion(unionArray, TType(EbtFloat, EvqConst)); - } - newNode->setLine(constantNode->getLine()); - return newNode; - } - case EbtBool: - { - bool rightValue = constantNode->getAsConstantUnion()->getUnionArrayPointer()->bConst; - bool leftValue = this->getUnionArrayPointer()->bConst; - - switch(op) { - //?? add constant intrinsics - case EOpLogicalAnd: unionArray->bConst = leftValue & rightValue; break; - case EOpLogicalXor: unionArray->bConst = leftValue ^ rightValue; break; - case EOpLogicalOr: unionArray->bConst = leftValue | rightValue; break; - default: - infoSink.info.message(EPrefixInternalError, "Binary operator cannot be folded into constant bool", line); - return 0; - } - newNode = new TIntermConstantUnion(unionArray, TType(EbtBool, EvqConst)); - newNode->setLine(constantNode->getLine()); - return newNode; - } - default: - infoSink.info.message(EPrefixInternalError, "Cannot fold constant", this->getLine()); - return 0; - } - } - } else { - // - // Do unary operations - // - TIntermConstantUnion *newNode = 0; - constUnion* tempConstArray = new constUnion[this->getSize()]; - if (this->getSize() > 1) { - for (int i = 0; i < this->getSize(); i++) { - switch(op) { - case EOpNegative: - switch (this->getType().getBasicType()) { - case EbtFloat: tempConstArray[i].fConst = -(unionArray[i].fConst); break; - case EbtInt: tempConstArray[i].iConst = -(unionArray[i].iConst); break; - default: - infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", this->getLine()); - return 0; - } - break; - case EOpLogicalNot: // this code is written for possible future use, will not get executed currently - switch (this->getType().getBasicType()) { - case EbtBool: tempConstArray[i].bConst = !(unionArray[i].bConst); break; - default: - infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", this->getLine()); - return 0; - } - break; - default: - return 0; - } - } - newNode = new TIntermConstantUnion(tempConstArray, this->getType()); - newNode->setLine(this->getLine()); - return newNode; - } else { - switch(op) { - //?? add constant intrinsics - case EOpNegative: - switch (this->getType().getBasicType()) { - case EbtInt: - tempConstArray->iConst = -(this->getUnionArrayPointer()->iConst); - newNode = new TIntermConstantUnion(tempConstArray, TType(EbtInt, EvqConst)); - break; - case EbtFloat: - tempConstArray->fConst = -(this->getUnionArrayPointer()->fConst); - newNode = new TIntermConstantUnion(tempConstArray, TType(EbtFloat, EvqConst)); - break; - default: - infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", line); - return 0; - } - break; - case EOpLogicalNot: - switch (this->getType().getBasicType()) { - case EbtBool: - tempConstArray->bConst = !this->getUnionArrayPointer()->bConst; - newNode = new TIntermConstantUnion(tempConstArray, TType(EbtBool, EvqConst)); - break; - default: - infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", line); - return 0; - } - break; - default: - return 0; - } - newNode->setLine(this->getLine()); - return newNode; - - } - } - - return this; -} - -TIntermConstantUnion* TIntermediate::changeAggrToTempConst(TIntermAggregate* node, TSymbolTable& symbolTable, TSourceLoc line) -{ - constUnion* unionArray = new constUnion[node->getType().getInstanceSize()]; - bool returnVal; - - if (node->getSequence().size() == 1 && node->getSequence()[0]->getAsTyped()->getAsConstantUnion()) { - returnVal = parseConstTree(line, node, unionArray, node->getOp(), symbolTable, node->getType(), true); - } - else { - returnVal = parseConstTree(line, node, unionArray, node->getOp(), symbolTable, node->getType()); - } - - if (returnVal) - unionArray = 0; - - return (addConstantUnion(unionArray, node->getType(), node->getLine())); -} - -TIntermTyped* TIntermediate::copyConstUnion(TIntermConstantUnion* node) -{ - constUnion *unionArray = node->getUnionArrayPointer(); - - if (!unionArray) - return 0; - - int size; - if (node->getType().getBasicType() == EbtStruct) - //?? We should actually be calling getStructSize() function and not setStructSize. This problem occurs in case - // of nested/embedded structs. - size = node->getType().setStructSize(node->getType().getStruct()); - //size = node->getType().getStructSize(); - else - size = node->getType().getInstanceSize(); - - constUnion *newSpace = new constUnion[size]; - - for (int i = 0; i < size; i++) - newSpace[i] = unionArray[i]; - - node->setUnionArrayPointer(newSpace); - return node; -} - -TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node) -{ - constUnion *rightUnionArray = node->getUnionArrayPointer(); - int size = node->getType().getInstanceSize(); - - constUnion *leftUnionArray = new constUnion[size]; - - for (int i=0; i < size; i++) { - - switch (promoteTo) { - case EbtFloat: - switch (node->getType().getBasicType()) { - case EbtInt: - (leftUnionArray[i]).fConst = static_cast(rightUnionArray[i].iConst); - break; - case EbtBool: - (leftUnionArray[i]).fConst = static_cast(rightUnionArray[i].bConst); - break; - case EbtFloat: - (leftUnionArray[i]).fConst = rightUnionArray[i].fConst; - break; - default: - infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine()); - return 0; - } - break; - case EbtInt: - switch (node->getType().getBasicType()) { - case EbtInt: - (leftUnionArray[i]).iConst = rightUnionArray[i].iConst; - break; - case EbtBool: - (leftUnionArray[i]).iConst = static_cast(rightUnionArray[i].bConst); - break; - case EbtFloat: - (leftUnionArray[i]).iConst = static_cast(rightUnionArray[i].fConst); - break; - default: - infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine()); - return 0; - } - break; - case EbtBool: - switch (node->getType().getBasicType()) { - case EbtInt: - (leftUnionArray[i]).bConst = rightUnionArray[i].iConst != 0; - break; - case EbtBool: - (leftUnionArray[i]).bConst = rightUnionArray[i].bConst; - break; - case EbtFloat: - (leftUnionArray[i]).bConst = rightUnionArray[i].fConst != 0.0; - break; - default: - infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine()); - return 0; - } - - break; - default: - infoSink.info.message(EPrefixInternalError, "Incorrect data type found", node->getLine()); - return 0; - } - - } - - const TType& t = node->getType(); - - return addConstantUnion(leftUnionArray, TType(promoteTo, t.getQualifier(), t.getNominalSize(), t.isMatrix(), t.isArray()), node->getLine()); -} - -// -// This method inserts the child nodes into the parent node at the given location specified -// by parentNodeIter. offset tells the integer offset into the parent vector that points to -// the child node. sequenceVector is the parent vector. -// Returns reference to the last inserted child node -// increments the offset based on the number of child nodes added -// -void TIntermediate::removeChildNode(TIntermSequence &parentSequence, TType& parentType, int& offset, TIntermSequence::iterator& parentNodeIter, TIntermAggregate* child) -{ - if (!child) - return; - - parentNodeIter = parentSequence.begin() + offset; - - TIntermSequence& childSequence = child->getSequence(); - int oldSize = static_cast(parentSequence.size()); - if (childSequence.size() == 1) { - if (!removeMatrixConstNode(parentSequence, parentType, child, offset)) { - for (int i = 0; i < child->getType().getInstanceSize(); i++) { - constUnion* constantUnion = new constUnion[1]; - *constantUnion = *(childSequence[0]->getAsConstantUnion()->getUnionArrayPointer()); - TIntermConstantUnion *constant = new TIntermConstantUnion(constantUnion, - childSequence[0]->getAsConstantUnion()->getType()); - constant->setLine(child->getLine()); - parentNodeIter = parentSequence.begin() + offset; - parentSequence.insert(parentNodeIter, constant); - } - } - } else - parentSequence.insert(parentNodeIter, childSequence.begin(), childSequence.end()); - - int newSize = static_cast(parentSequence.size()); - offset = offset + newSize - oldSize; - parentNodeIter = parentSequence.begin() + offset; - parentNodeIter = parentSequence.erase(parentNodeIter); - offset--; - parentNodeIter--; -} - -// -// The parent has only one child node. This method is not implemented -// for parent that is a structure -// -TIntermTyped* TIntermediate::removeChildNode(TIntermTyped* parent, TType* parentType, TIntermAggregate* child) -{ - TIntermTyped* resultNode = 0; - - if (parentType->getInstanceSize() == 1) { - resultNode = child->getSequence()[0]->getAsTyped(); - } else { - int size = parentType->getInstanceSize(); - TIntermSequence& parentSequence = parent->getAsAggregate()->getSequence(); - TIntermSequence& childSequence = child->getSequence(); - - if (childSequence.size() == 1) { - if (!removeMatrixConstNode(parentSequence, *parentType, child, 1)) - parentSequence.push_back(child->getSequence()[0]); - } else { - for (int i = 0; i < size; i++) { - parentSequence.push_back(child->getSequence()[i]); - } - } - parentSequence.erase(parentSequence.begin()); - - return parent; - } - - return resultNode; -} - -bool TIntermediate::removeMatrixConstNode(TIntermSequence &parentSequence, TType& parentType, TIntermAggregate* child, int offset) -{ - if (!child) - return false; - - TIntermSequence::iterator parentNodeIter; - TIntermSequence &childSequence = child->getSequence(); - - switch (child->getOp()) { - case EOpConstructMat2: - case EOpConstructMat3: - case EOpConstructMat4: - {// support MSVC++6.0 - for (int i = 0; i < child->getType().getInstanceSize(); i++) { - constUnion* constantUnion = new constUnion[1]; - if (i % (child->getType().getNominalSize() + 1) == 0) { - *constantUnion = *(childSequence[0]->getAsConstantUnion()->getUnionArrayPointer()); - } else { - switch (parentType.getBasicType()) { - case EbtInt: constantUnion->iConst = 0; break; - case EbtFloat: constantUnion->fConst = 0.0; break; - case EbtBool: constantUnion->bConst = false; break; - default: ; /* default added by BrianP */ - } - } - TIntermConstantUnion *constant = new TIntermConstantUnion(constantUnion, - childSequence[0]->getAsConstantUnion()->getType()); - constant->setLine(child->getLine()); - parentNodeIter = parentSequence.begin() + offset + i; - parentSequence.insert(parentNodeIter, constant); - } - } - return true; - default: - return false; - } -} - -void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable) -{ - assert (!pragmaTable); - pragmaTable = new TPragmaTable(); - *pragmaTable = pTable; -} - diff --git a/src/mesa/shader/slang/MachineIndependent/MMap.h b/src/mesa/shader/slang/MachineIndependent/MMap.h deleted file mode 100755 index 66703cdd9b..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/MMap.h +++ /dev/null @@ -1,84 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _MMAP_INCLUDED_ -#define _MMAP_INCLUDED_ - -// -// Encapsulate memory mapped files -// - -class TMMap { -public: - TMMap(const char* fileName) : - fSize(-1), // -1 is the error value returned by GetFileSize() - fp(NULL), - fBuff(0) // 0 is the error value returned by MapViewOfFile() - { - if ((fp = fopen(fileName, "r")) == NULL) - return; - char c = getc(fp); - fSize = 0; - while (c != EOF) { - fSize++; - c = getc(fp); - } - if (c == EOF) - fSize++; - rewind(fp); - fBuff = (char*)malloc(sizeof(char) * fSize); - int count = 0; - c = getc(fp); - while (c != EOF) { - fBuff[count++] = c; - c = getc(fp); - } - fBuff[count++] = c; - } - - char* getData() { return fBuff; } - int getSize() { return fSize; } - - ~TMMap() { - if (fp != NULL) - fclose(fp); - } - -private: - int fSize; // size of file to map in - FILE *fp; - char* fBuff; // the actual data; -}; - -#endif // _MMAP_INCLUDED_ diff --git a/src/mesa/shader/slang/MachineIndependent/ParseHelper.cpp b/src/mesa/shader/slang/MachineIndependent/ParseHelper.cpp deleted file mode 100755 index cfc42746ae..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/ParseHelper.cpp +++ /dev/null @@ -1,1452 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "ParseHelper.h" -#include "Include/InitializeParseContext.h" -#include "osinclude.h" -#include -/////////////////////////////////////////////////////////////////////// -// -// Sub- vector and matrix fields -// -//////////////////////////////////////////////////////////////////////// - -// -// Look at a '.' field selector string and change it into offsets -// for a vector. -// -bool TParseContext::parseVectorFields(const TString& compString, int vecSize, TVectorFields& fields, int line) -{ - fields.num = (int) compString.size(); - if (fields.num > 4) { - error(line, "illegal vector field selection", compString.c_str(), ""); - return false; - } - - enum { - exyzw, - ergba, - estpq - } fieldSet[4]; - - for (int i = 0; i < fields.num; ++i) { - switch (compString[i]) { - case 'x': - fields.offsets[i] = 0; - fieldSet[i] = exyzw; - break; - case 'r': - fields.offsets[i] = 0; - fieldSet[i] = ergba; - break; - case 's': - fields.offsets[i] = 0; - fieldSet[i] = estpq; - break; - case 'y': - fields.offsets[i] = 1; - fieldSet[i] = exyzw; - break; - case 'g': - fields.offsets[i] = 1; - fieldSet[i] = ergba; - break; - case 't': - fields.offsets[i] = 1; - fieldSet[i] = estpq; - break; - case 'z': - fields.offsets[i] = 2; - fieldSet[i] = exyzw; - break; - case 'b': - fields.offsets[i] = 2; - fieldSet[i] = ergba; - break; - case 'p': - fields.offsets[i] = 2; - fieldSet[i] = estpq; - break; - - case 'w': - fields.offsets[i] = 3; - fieldSet[i] = exyzw; - break; - case 'a': - fields.offsets[i] = 3; - fieldSet[i] = ergba; - break; - case 'q': - fields.offsets[i] = 3; - fieldSet[i] = estpq; - break; - default: - error(line, "illegal vector field selection", compString.c_str(), ""); - return false; - } - } - - for (int i = 0; i < fields.num; ++i) { - if (fields.offsets[i] >= vecSize) { - error(line, "vector field selection out of range", compString.c_str(), ""); - return false; - } - - if (i > 0) { - if (fieldSet[i] != fieldSet[i-1]) { - error(line, "illegal - vector component fields not from the same set", compString.c_str(), ""); - return false; - } - } - } - - return true; -} - - -// -// Look at a '.' field selector string and change it into offsets -// for a matrix. -// -bool TParseContext::parseMatrixFields(const TString& compString, int matSize, TMatrixFields& fields, int line) -{ - fields.wholeRow = false; - fields.wholeCol = false; - fields.row = -1; - fields.col = -1; - - if (compString.size() != 2) { - error(line, "illegal length of matrix field selection", compString.c_str(), ""); - return false; - } - - if (compString[0] == '_') { - if (compString[1] < '0' || compString[1] > '3') { - error(line, "illegal matrix field selection", compString.c_str(), ""); - return false; - } - fields.wholeCol = true; - fields.col = compString[1] - '0'; - } else if (compString[1] == '_') { - if (compString[0] < '0' || compString[0] > '3') { - error(line, "illegal matrix field selection", compString.c_str(), ""); - return false; - } - fields.wholeRow = true; - fields.row = compString[0] - '0'; - } else { - if (compString[0] < '0' || compString[0] > '3' || - compString[1] < '0' || compString[1] > '3') { - error(line, "illegal matrix field selection", compString.c_str(), ""); - return false; - } - fields.row = compString[0] - '0'; - fields.col = compString[1] - '0'; - } - - if (fields.row >= matSize || fields.col >= matSize) { - error(line, "matrix field selection out of range", compString.c_str(), ""); - return false; - } - - return true; -} - -/////////////////////////////////////////////////////////////////////// -// -// Errors -// -//////////////////////////////////////////////////////////////////////// - -// -// Track whether errors have occurred. -// -void TParseContext::recover() -{ - recoveredFromError = true; -} - -// -// Used by flex/bison to output all syntax and parsing errors. -// -void C_DECL TParseContext::error(TSourceLoc nLine, const char *szReason, const char *szToken, - const char *szExtraInfoFormat, ...) -{ - char szExtraInfo[400]; - va_list marker; - - va_start(marker, szExtraInfoFormat); - - _vsnprintf(szExtraInfo, sizeof(szExtraInfo), szExtraInfoFormat, marker); - - /* VC++ format: file(linenum) : error #: 'token' : extrainfo */ - infoSink.info.prefix(EPrefixError); - infoSink.info.location(nLine); - infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n"; - - va_end(marker); - - ++numErrors; -} - -// -// Same error message for all places assignments don't work. -// -void TParseContext::assignError(int line, const char* op, TString left, TString right) -{ - error(line, "", op, "cannot convert from '%s' to '%s'", - right.c_str(), left.c_str()); -} - -// -// Same error message for all places unary operations don't work. -// -void TParseContext::unaryOpError(int line, char* op, TString operand) -{ - error(line, " wrong operand type", op, - "no operation '%s' exists that takes an operand of type %s (or there is no acceptable conversion)", - op, operand.c_str()); -} - -// -// Same error message for all binary operations don't work. -// -void TParseContext::binaryOpError(int line, char* op, TString left, TString right) -{ - error(line, " wrong operand types ", op, - "no operation '%s' exists that takes a left-hand operand of type '%s' and " - "a right operand of type '%s' (or there is no acceptable conversion)", - op, left.c_str(), right.c_str()); -} - -// -// Both test and if necessary, spit out an error, to see if the node is really -// an l-value that can be operated on this way. -// -// Returns true if the was an error. -// -bool TParseContext::lValueErrorCheck(int line, char* op, TIntermTyped* node) -{ - TIntermSymbol* symNode = node->getAsSymbolNode(); - TIntermBinary* binaryNode = node->getAsBinaryNode(); - - if (binaryNode) { - bool errorReturn; - - switch(binaryNode->getOp()) { - case EOpIndexDirect: - case EOpIndexIndirect: - case EOpIndexDirectStruct: - return lValueErrorCheck(line, op, binaryNode->getLeft()); - case EOpVectorSwizzle: - errorReturn = lValueErrorCheck(line, op, binaryNode->getLeft()); - if (!errorReturn) { - int offset[4] = {0,0,0,0}; - - TIntermTyped* rightNode = binaryNode->getRight(); - TIntermAggregate *aggrNode = rightNode->getAsAggregate(); - - for (TIntermSequence::iterator p = aggrNode->getSequence().begin(); - p != aggrNode->getSequence().end(); p++) { - int value = (*p)->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->iConst; - offset[value]++; - if (offset[value] > 1) { - error(line, " l-value of swizzle cannot have duplicate components", op, "", ""); - - return true; - } - } - } - - return errorReturn; - default: - break; - } - error(line, " l-value required", op, "", ""); - - return true; - } - - - const char* symbol = 0; - if (symNode != 0) - symbol = symNode->getSymbol().c_str(); - - char* message = 0; - switch (node->getQualifier()) { - case EvqConst: message = "can't modify a const"; break; - case EvqConstReadOnly: message = "can't modify a const"; break; - case EvqAttribute: message = "can't modify an attribute"; break; - case EvqUniform: message = "can't modify a uniform"; break; - case EvqVaryingIn: message = "can't modify a varying"; break; - case EvqInput: message = "can't modify an input"; break; - case EvqFace: message = "can't modify gl_FrontFace"; break; - case EvqFragCoord: message = "can't modify gl_FragCoord"; break; - default: - - // - // Type that can't be written to? - // - switch (node->getBasicType()) { - case EbtSampler1D: - case EbtSampler2D: - case EbtSampler3D: - case EbtSamplerCube: - case EbtSampler1DShadow: - case EbtSampler2DShadow: - message = "can't modify a sampler"; - break; - case EbtVoid: - message = "can't modify void"; - break; - default: - break; - } - } - - if (message == 0 && binaryNode == 0 && symNode == 0) { - error(line, " l-value required", op, "", ""); - - return true; - } - - - // - // Everything else is okay, no error. - // - if (message == 0) - return false; - - // - // If we get here, we have an error and a message. - // - if (symNode) - error(line, " l-value required", op, "\"%s\" (%s)", symbol, message); - else - error(line, " l-value required", op, "(%s)", message); - - return true; -} - -// -// Both test, and if necessary spit out an error, to see if the node is really -// a constant. -// -// Returns true if the was an error. -// -bool TParseContext::constErrorCheck(TIntermTyped* node) -{ - if (node->getQualifier() == EvqConst) - return false; - - error(node->getLine(), "constant expression required", "", ""); - - return true; -} - -// -// Both test, and if necessary spit out an error, to see if the node is really -// an integer. -// -// Returns true if the was an error. -// -bool TParseContext::integerErrorCheck(TIntermTyped* node, char* token) -{ - if (node->getBasicType() == EbtInt && node->getNominalSize() == 1) - return false; - - error(node->getLine(), "integer expression required", token, ""); - - return true; -} - -// -// Both test, and if necessary spit out an error, to see if we are currently -// globally scoped. -// -// Returns true if the was an error. -// -bool TParseContext::globalErrorCheck(int line, bool global, char* token) -{ - if (global) - return false; - - error(line, "only allowed at global scope", token, ""); - - return true; -} - -// -// For now, keep it simple: if it starts "gl_", it's reserved, independent -// of scope. Except, if the symbol table is at the built-in push-level, -// which is when we are parsing built-ins. -// -// Returns true if there was an error. -// -bool TParseContext::reservedErrorCheck(int line, const TString& identifier) -{ - if (symbolTable.atBuiltInLevel() || - identifier.substr(0, 3) != TString("gl_")) - return false; - - error(line, "reserved built-in name", "gl_", ""); - - return true; -} - -// -// Make sure there is enough data provided to the constructor to build -// something of the type of the constructor. Also returns the type of -// the constructor. -// -// Returns true if there was an error in construction. -// -bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction& function, TOperator op, TType* type) -{ - switch(op) { - case EOpConstructInt: *type = TType(EbtInt); break; - case EOpConstructBool: *type = TType(EbtBool); break; - case EOpConstructFloat: *type = TType(EbtFloat); break; - case EOpConstructVec2: *type = TType(EbtFloat, EvqTemporary, 2); break; - case EOpConstructVec3: *type = TType(EbtFloat, EvqTemporary, 3); break; - case EOpConstructVec4: *type = TType(EbtFloat, EvqTemporary, 4); break; - case EOpConstructBVec2: *type = TType(EbtBool, EvqTemporary, 2); break; - case EOpConstructBVec3: *type = TType(EbtBool, EvqTemporary, 3); break; - case EOpConstructBVec4: *type = TType(EbtBool, EvqTemporary, 4); break; - case EOpConstructIVec2: *type = TType(EbtInt, EvqTemporary, 2); break; - case EOpConstructIVec3: *type = TType(EbtInt, EvqTemporary, 3); break; - case EOpConstructIVec4: *type = TType(EbtInt, EvqTemporary, 4); break; - case EOpConstructMat2: *type = TType(EbtFloat, EvqTemporary, 2, true); break; - case EOpConstructMat3: *type = TType(EbtFloat, EvqTemporary, 3, true); break; - case EOpConstructMat4: *type = TType(EbtFloat, EvqTemporary, 4, true); break; - case EOpConstructStruct: *type = TType(function.getReturnType().getStruct(), function.getReturnType().getTypeName()); break; - default: - error(line, "expected constructor", "Internal Error", ""); - return true; - } - - bool constructingMatrix = false; - switch(op) { - case EOpConstructMat2: - case EOpConstructMat3: - case EOpConstructMat4: - constructingMatrix = true; - break; - default: - break; - } - - // - // Note: It's okay to have too many components available, but not okay to have unused - // arguments. 'full' will go to true when enough args have been seen. If we loop - // again, there is an extra argument, so 'overfull' will become true. - // - - int size = 0; - bool constType = true; - bool full = false; - bool overFull = false; - bool matrixInMatrix = false; - for (int i = 0; i < function.getParamCount(); ++i) { - size += function[i].type->getInstanceSize(); - if (constructingMatrix && function[i].type->isMatrix()) - matrixInMatrix = true; - if (full) - overFull = true; - if (op != EOpConstructStruct && size >= type->getInstanceSize()) - full = true; - if (function[i].type->getQualifier() != EvqConst) - constType = false; - } - - if (constType) - type->changeQualifier(EvqConst); - - if (matrixInMatrix) { - error(line, "constructing matrix from matrix", "constructor", "(reserved)"); - return true; - } - - if (overFull) { - error(line, "too many arguments", "constructor", ""); - return true; - } - - if (size != 1 && size < type->getInstanceSize() || (size < 1) && op == EOpConstructStruct) { - error(line, "not enough data provided for construction", "constructor", ""); - return true; - } - - TIntermTyped* typed = node->getAsTyped(); - if (typed == 0) { - error(line, "constructor argument does not have a type", "constructor", ""); - return true; - } - if (op != EOpConstructStruct && IsSampler(typed->getBasicType())) { - error(line, "cannot convert a sampler", "constructor", ""); - return true; - } - if (typed->getBasicType() == EbtVoid) { - error(line, "cannot convert a void", "constructor", ""); - return true; - } - - return false; -} - -// This function checks to see if a void variable has been declared and raise an error message for such a case -// -// returns true in case of an error -// -bool TParseContext::voidErrorCheck(int line, const TString& identifier, const TPublicType& pubType) -{ - if (pubType.type == EbtVoid) { - error(line, "illegal use of type 'void'", identifier.c_str(), ""); - return true; - } - - return false; -} - -// This function checks to see if the node (for the expression) contains a scalar boolean expression or not -// -// returns true in case of an error -// -bool TParseContext::boolErrorCheck(int line, const TIntermTyped* type) -{ - if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector()) { - error(line, "boolean expression expected", "", ""); - return true; - } - - return false; -} - -// This function checks to see if the node (for the expression) contains a scalar boolean expression or not -// -// returns true in case of an error -// -bool TParseContext::boolErrorCheck(int line, const TPublicType& pType) -{ - if (pType.type != EbtBool || pType.array || pType.matrix || (pType.size > 1)) { - error(line, "boolean expression expected", "", ""); - return true; - } - - return false; -} - -bool TParseContext::samplerErrorCheck(int line, const TPublicType& pType, const char* reason) -{ - if (pType.type == EbtStruct) { - if (containsSampler(*pType.userDef)) { - error(line, reason, TType::getBasicString(pType.type), "(structure contains a sampler)"); - - return true; - } - - return false; - } else if (IsSampler(pType.type)) { - error(line, reason, TType::getBasicString(pType.type), ""); - - return true; - } - - return false; -} - -bool TParseContext::structQualifierErrorCheck(int line, const TPublicType& pType) -{ - if ((pType.qualifier == EvqVaryingIn || pType.qualifier == EvqVaryingOut || pType.qualifier == EvqAttribute) && - pType.type == EbtStruct) { - error(line, "cannot be used with a structure", getQualifierString(pType.qualifier), ""); - - return true; - } - - if (pType.qualifier != EvqUniform && samplerErrorCheck(line, pType, "samplers must be uniform")) - return true; - - return false; -} - -bool TParseContext::parameterSamplerErrorCheck(int line, TQualifier qualifier, const TType& type) -{ - if ((qualifier == EvqOut || qualifier == EvqInOut) && - type.getBasicType() != EbtStruct && IsSampler(type.getBasicType())) { - error(line, "samplers cannot be output parameters", type.getBasicString(), ""); - return true; - } - - return false; -} - -bool TParseContext::containsSampler(TType& type) -{ - if (IsSampler(type.getBasicType())) - return true; - - if (type.getBasicType() == EbtStruct) { - TTypeList& structure = *type.getStruct(); - for (unsigned int i = 0; i < structure.size(); ++i) { - if (containsSampler(*structure[i].type)) - return true; - } - } - - return false; -} - -bool TParseContext::insertBuiltInArrayAtGlobalLevel() -{ - TString *name = NewPoolTString("gl_TexCoord"); - TSymbol* symbol = symbolTable.find(*name); - if (!symbol) { - error(0, "INTERNAL ERROR finding symbol", name->c_str(), ""); - return true; - } - TVariable* variable = static_cast(symbol); - - TVariable* newVariable = new TVariable(name, variable->getType()); - - if (! symbolTable.insert(*newVariable)) { - delete newVariable; - error(0, "INTERNAL ERROR inserting new symbol", name->c_str(), ""); - return true; - } - - return false; -} - -// -// Do all the semantic checking for declaring an array, with and -// without a size, and make the right changes to the symbol table. -// -// size == 0 means no specified size. -// -// Returns true if there was an error. -// -bool TParseContext::arrayErrorCheck(int line, TString& identifier, TPublicType type, TIntermTyped* size) -{ - // - // Don't check for reserved word use until after we know it's not in the symbol table, - // because reserved arrays can be redeclared. - // - - // - // Can the type be an array? - // - if (type.array || type.qualifier == EvqAttribute || type.qualifier == EvqConst) { - error(line, "cannot declare arrays of this type", TType(type).getCompleteString().c_str(), ""); - return true; - } - type.array = true; - - // - // size will be 0 if there is no size declared, otherwise it contains the size - // declared. - // - TIntermConstantUnion* constant = 0; - if (size) { - constant = size->getAsConstantUnion(); - if (constant == 0 || constant->getBasicType() != EbtInt || constant->getUnionArrayPointer()->iConst <= 0) { - error(line, "array size must be a positive integer", identifier.c_str(), ""); - return true; - } - } - - bool builtIn = false; - bool sameScope = false; - TSymbol* symbol = symbolTable.find(identifier, &builtIn, &sameScope); - if (symbol == 0 || !sameScope) { - if (reservedErrorCheck(line, identifier)) - return true; - - TVariable* variable = new TVariable(&identifier, TType(type)); - - if (size) - variable->getType().setArraySize(constant->getUnionArrayPointer()->iConst); - - if (! symbolTable.insert(*variable)) { - delete variable; - error(line, "INTERNAL ERROR inserting new symbol", identifier.c_str(), ""); - return true; - } - } else { - if (! symbol->isVariable()) { - error(line, "variable expected", identifier.c_str(), ""); - return true; - } - - TVariable* variable = static_cast(symbol); - if (! variable->getType().isArray()) { - error(line, "redeclaring non-array as array", identifier.c_str(), ""); - return true; - } - if (variable->getType().getArraySize() > 0) { - error(line, "redeclaration of array with size", identifier.c_str(), ""); - return true; - } - - if (variable->getType() != TType(type)) { - error(line, "redeclaration of array with a different type", identifier.c_str(), ""); - return true; - } - - TType* t = variable->getArrayInformationType(); - while (t != 0) { - if (t->getMaxArraySize() > constant->getUnionArrayPointer()->iConst) { - error(line, "higher index value already used for the array", identifier.c_str(), ""); - return true; - } - t->setArraySize(constant->getUnionArrayPointer()->iConst); - t = t->getArrayInformationType(); - } - - if (size) - variable->getType().setArraySize(constant->getUnionArrayPointer()->iConst); - } - - if (voidErrorCheck(line, identifier, type)) - return true; - - return false; -} - -bool TParseContext::arraySetMaxSize(TIntermSymbol *node, TType* type, int size, bool updateFlag, TSourceLoc line) -{ - bool builtIn = false; - TSymbol* symbol = symbolTable.find(node->getSymbol(), &builtIn); - if (symbol == 0) { - error(line, " undeclared identifier", node->getSymbol().c_str(), ""); - return true; - } - TVariable* variable = static_cast(symbol); - - type->setArrayInformationType(variable->getArrayInformationType()); - variable->updateArrayInformationType(type); - - // we dont want to update the maxArraySize when this flag is not set, we just want to include this - // node type in the chain of node types so that its updated when a higher maxArraySize comes in. - if (!updateFlag) - return false; - - size++; - variable->getType().setMaxArraySize(size); - type->setMaxArraySize(size); - TType* tt = type; - - while(tt->getArrayInformationType() != 0) { - tt = tt->getArrayInformationType(); - tt->setMaxArraySize(size); - } - - return false; -} - -// -// Do semantic checking for a variable declaration that has no initializer, -// and update the symbol table. -// -// Returns true if there was an error. -// -bool TParseContext::nonInitErrorCheck(int line, TString& identifier, TPublicType& type) -{ - if (reservedErrorCheck(line, identifier)) - recover(); - - // - // Make the qualifier make sense, error is issued in a little bit. - // - bool constError = false; - if (type.qualifier == EvqConst) { - type.qualifier = EvqTemporary; - constError = true; - } - - TVariable* variable = new TVariable(&identifier, TType(type)); - - if (! symbolTable.insert(*variable)) { - error(line, "redefinition", variable->getName().c_str(), ""); - delete variable; - return true; - } - if (constError) { - error(line, "variables with qualifier 'const' must be initialized", identifier.c_str(), ""); - return true; - } - - if (voidErrorCheck(line, identifier, type)) - return true; - - return false; -} - -bool TParseContext::paramErrorCheck(int line, TQualifier qualifier, TQualifier paramQualifier, TType* type) -{ - if (qualifier != EvqConst && qualifier != EvqTemporary) { - error(line, "qualifier not allowed on function parameter", getQualifierString(qualifier), ""); - return true; - } - if (qualifier == EvqConst && paramQualifier != EvqIn) { - error(line, "qualifier not allowed with ", getQualifierString(qualifier), getQualifierString(paramQualifier)); - return true; - } - - if (qualifier == EvqConst) - type->changeQualifier(EvqConstReadOnly); - else - type->changeQualifier(paramQualifier); - - return false; -} - -///////////////////////////////////////////////////////////////////////////////// -// -// Non-Errors. -// -///////////////////////////////////////////////////////////////////////////////// - -// -// Look up a function name in the symbol table, and make sure it is a function. -// -// Return the function symbol if found, otherwise 0. -// -const TFunction* TParseContext::findFunction(int line, TFunction* call, bool *builtIn) -{ - const TSymbol* symbol = symbolTable.find(call->getMangledName(), builtIn); - - if (symbol == 0) { - error(line, "no matching overloaded function found", call->getName().c_str(), ""); - return 0; - } - - if (! symbol->isFunction()) { - error(line, "function name expected", call->getName().c_str(), ""); - return 0; - } - - const TFunction* function = static_cast(symbol); - - return function; -} -// -// Initializers show up in several places in the grammar. Have one set of -// code to handle them here. -// -bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPublicType& pType, - TIntermTyped* initializer, TIntermNode*& intermNode) -{ - if (reservedErrorCheck(line, identifier)) - return true; - - if (voidErrorCheck(line, identifier, pType)) - return true; - - // - // add variable to symbol table - // - TVariable* variable = new TVariable(&identifier, TType(pType)); - if (! symbolTable.insert(*variable)) { - error(line, "redefinition", variable->getName().c_str(), ""); - return true; - // don't delete variable, it's used by error recovery, and the pool - // pop will take care of the memory - } - - // - // identifier must be of type constant, a global, or a temporary - // - TQualifier qualifier = variable->getType().getQualifier(); - if ((qualifier != EvqTemporary) && (qualifier != EvqGlobal) && (qualifier != EvqConst)) { - error(line, " cannot initialize this type of qualifier ", variable->getType().getQualifierString(), ""); - return true; - } - // - // test for and propagate constant - // - - if (qualifier == EvqConst) { - if (qualifier != initializer->getType().getQualifier()) { - error(line, " assigning non-constant to", "=", "'%s'", variable->getType().getCompleteString().c_str()); - variable->getType().changeQualifier(EvqTemporary); - return true; - } - if (TType(pType) != initializer->getType()) { - error(line, " non-matching types for const initializer ", - variable->getType().getQualifierString(), ""); - variable->getType().changeQualifier(EvqTemporary); - return true; - } - if (initializer->getAsConstantUnion()) { - constUnion* unionArray = variable->getConstPointer(); - - if (pType.size == 1 && TType(pType).getBasicType() != EbtStruct) { - switch (pType.type ) { - case EbtInt: - unionArray->iConst = (initializer->getAsConstantUnion()->getUnionArrayPointer())[0].iConst; - break; - case EbtFloat: - unionArray->fConst = (initializer->getAsConstantUnion()->getUnionArrayPointer())[0].fConst; - break; - case EbtBool: - unionArray->bConst = (initializer->getAsConstantUnion()->getUnionArrayPointer())[0].bConst; - break; - default: - error(line, " cannot initialize constant of this type", "", ""); - return true; - } - } else { - variable->shareConstPointer(initializer->getAsConstantUnion()->getUnionArrayPointer()); - } - } else if (initializer->getAsAggregate()) { - bool returnVal = false; - constUnion* unionArray = variable->getConstPointer(); - if (initializer->getAsAggregate()->getSequence().size() == 1 && initializer->getAsAggregate()->getSequence()[0]->getAsTyped()->getAsConstantUnion()) { - returnVal = intermediate.parseConstTree(line, initializer, unionArray, initializer->getAsAggregate()->getOp(), symbolTable, variable->getType(), true); - } - else { - returnVal = intermediate.parseConstTree(line, initializer, unionArray, initializer->getAsAggregate()->getOp(), symbolTable, variable->getType()); - } - intermNode = 0; - constUnion *arrayUnion = unionArray; - if (returnVal) { - arrayUnion = 0; - variable->getType().changeQualifier(EvqTemporary); - } - return returnVal; - } else if (initializer->getAsSymbolNode()) { - const TSymbol* symbol = symbolTable.find(initializer->getAsSymbolNode()->getSymbol()); - const TVariable* tVar = static_cast(symbol); - - constUnion* constArray = tVar->getConstPointer(); - variable->shareConstPointer(constArray); - } else { - error(line, " assigning non-constant to", "=", "'%s'", variable->getType().getCompleteString().c_str()); - variable->getType().changeQualifier(EvqTemporary); - return true; - } - } - - if (qualifier != EvqConst) { - TIntermSymbol* intermSymbol = intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), line); - intermNode = intermediate.addAssign(EOpAssign, intermSymbol, initializer, line); - if (intermNode == 0) { - assignError(line, "=", intermSymbol->getCompleteString(), initializer->getCompleteString()); - return true; - } - } else - intermNode = 0; - - return false; -} - -// -// This method checks to see if the given aggregate node has all its children nodes as constants -// This method does not test if structure members are constant -// -bool TParseContext::canNodeBeRemoved(TIntermNode* childNode) -{ - TIntermAggregate *aggrNode = childNode->getAsAggregate(); - if (!aggrNode) - return false; - - if (!aggrNode->isConstructor() || aggrNode->getOp() == EOpConstructStruct) - return false; - - bool allConstant = true; - - // check if all the child nodes are constants so that they can be inserted into - // the parent node - if (aggrNode) { - TIntermSequence &childSequenceVector = aggrNode->getSequence() ; - for (TIntermSequence::iterator p = childSequenceVector.begin(); - p != childSequenceVector.end(); p++) { - if (!(*p)->getAsTyped()->getAsConstantUnion()) - return false; - } - } - - return allConstant; -} - -// This function is used to test for the correctness of the parameters passed to various constructor functions -// and also convert them to the right datatype if it is allowed and required. -// -// Returns 0 for an error or the constructed node (aggregate or typed) for no error. -// -TIntermTyped* TParseContext::addConstructor(TIntermNode* node, TType* type, TOperator op, TFunction* fnCall, TSourceLoc line) -{ - if (node == 0) - return 0; - - TIntermAggregate* aggrNode = node->getAsAggregate(); - - TTypeList::iterator list; - TTypeList* structure = 0; // Store the information (vector) about the return type of the structure. - if (op == EOpConstructStruct) { - const TType& ttype = fnCall->getReturnType(); - structure = ttype.getStruct(); - list = (*structure).begin(); - } - - bool singleArg; - if (aggrNode) { - if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1) - singleArg = true; - else - singleArg = false; - } else - singleArg = true; - - TIntermTyped *newNode; - if (singleArg) { - if (op == EOpConstructStruct) { - // If structure constructor is being called for only one parameter inside the structure, - // we need to call constructStruct function once. - if (structure->size() != 1) { - error(line, "Number of constructor parameters does not match the number of structure fields", "constructor", ""); - - return 0; - } else - return constructStruct(node, (*list).type, 1, node->getLine(), false); - } else { - newNode = constructBuiltIn(type, op, node, node->getLine(), false); - if (newNode && newNode->getAsAggregate()) { - if (canNodeBeRemoved(newNode->getAsAggregate()->getSequence()[0])) { - TIntermAggregate* returnAggNode = newNode->getAsAggregate()->getSequence()[0]->getAsAggregate(); - newNode = intermediate.removeChildNode(newNode, type, returnAggNode); - } - } - return newNode; - } - } - - // - // Handle list of arguments. - // - TIntermSequence &sequenceVector = aggrNode->getSequence() ; // Stores the information about the parameter to the constructor - // if the structure constructor contains more than one parameter, then construct - // each parameter - if (op == EOpConstructStruct) { - if (structure->size() != sequenceVector.size()) { // If the number of parameters to the constructor does not match the expected number of parameters - error(line, "Number of constructor parameters does not match the number of structure fields", "constructor", ""); - - return 0; - } - } - - int paramCount = 0; // keeps a track of the constructor parameter number being checked - - // for each parameter to the constructor call, check to see if the right type is passed or convert them - // to the right type if possible (and allowed). - // for structure constructors, just check if the right type is passed, no conversion is allowed. - - for (TIntermSequence::iterator p = sequenceVector.begin(); - p != sequenceVector.end(); p++, paramCount++) { - bool move = false; - if (op == EOpConstructStruct) { - newNode = constructStruct(*p, (list[paramCount]).type, paramCount+1, node->getLine(), true); - if (newNode) - move = true; - } else { - newNode = constructBuiltIn(type, op, *p, node->getLine(), true); - - if (newNode) { - if (canNodeBeRemoved(newNode)) - intermediate.removeChildNode(sequenceVector, *type, paramCount, p, newNode->getAsAggregate()); - else - move = true; - } - } - if (move) { - sequenceVector.erase(p); - sequenceVector.insert(p, newNode); - } - } - - return intermediate.setAggregateOperator(aggrNode, op, line); -} - -// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value -// for the parameter to the constructor (passed to this function). Essentially, it converts -// the parameter types correctly. If a constructor expects an int (like ivec2) and is passed a -// float, then float is converted to int. -// -// Returns 0 for an error or the constructed node. -// -TIntermTyped* TParseContext::constructBuiltIn(TType* type, TOperator op, TIntermNode* node, TSourceLoc line, bool subset) -{ - TIntermTyped* newNode; - TOperator basicOp; - - // - // First, convert types as needed. - // - switch (op) { - case EOpConstructVec2: - case EOpConstructVec3: - case EOpConstructVec4: - case EOpConstructMat2: - case EOpConstructMat3: - case EOpConstructMat4: - case EOpConstructFloat: - basicOp = EOpConstructFloat; - break; - - case EOpConstructIVec2: - case EOpConstructIVec3: - case EOpConstructIVec4: - case EOpConstructInt: - basicOp = EOpConstructInt; - break; - - case EOpConstructBVec2: - case EOpConstructBVec3: - case EOpConstructBVec4: - case EOpConstructBool: - basicOp = EOpConstructBool; - break; - - default: - error(line, "unsupported construction", "", ""); - recover(); - - return 0; - } - newNode = intermediate.addUnaryMath(basicOp, node, node->getLine(), symbolTable); - if (newNode == 0) { - error(line, "can't convert", "constructor", ""); - return 0; - } - - // - // Now, if there still isn't an operation to do the construction, and we need one, add one. - // - - // Otherwise, skip out early. - if (subset || newNode != node && newNode->getType() == *type) - return newNode; - - // setAggregateOperator will insert a new node for the constructor, as needed. - return intermediate.setAggregateOperator(newNode, op, line); -} - -// This function tests for the type of the parameters to the structures constructors. Raises -// an error message if the expected type does not match the parameter passed to the constructor. -// -// Returns 0 for an error or the input node itself if the expected and the given parameter types match. -// -TIntermTyped* TParseContext::constructStruct(TIntermNode* node, TType* type, int paramCount, TSourceLoc line, bool subset) -{ - if (*type == node->getAsTyped()->getType()) { - if (subset) - return node->getAsTyped(); - else - return intermediate.setAggregateOperator(node->getAsTyped(), EOpConstructStruct, line); - } else { - error(line, "", "constructor", "cannot convert parameter %d from '%s' to '%s'", paramCount, - node->getAsTyped()->getType().getBasicString(), type->getBasicString()); - recover(); - } - - return 0; -} - -// -// This function returns the tree representation for the vector field(s) being accessed from contant vector. -// If only one component of vector is accessed (v.x or v[0] where v is a contant vector), then a contant node is -// returned, else an aggregate node is returned (for v.xy). The input to this function could either be the symbol -// node or it could be the intermediate tree representation of accessing fields in a constant structure or column of -// a constant matrix. -// -TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTyped* node, TSourceLoc line) -{ - TIntermTyped* typedNode; - TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion(); - TIntermAggregate* aggregateNode = node->getAsAggregate(); - - constUnion *unionArray; - if (tempConstantNode) { - unionArray = tempConstantNode->getUnionArrayPointer(); - - if (!unionArray) { // this error message should never be raised - infoSink.info.message(EPrefixInternalError, "constUnion not initialized in addConstVectorNode function", line); - recover(); - - return node; - } - } else if (aggregateNode) { // if an aggregate node is present, the value has to be taken from the parse tree - // for a case like vec(4).xz - unionArray = new constUnion[aggregateNode->getType().getInstanceSize()]; - - bool returnVal = false; - if (aggregateNode->getAsAggregate()->getSequence().size() == 1 && aggregateNode->getAsAggregate()->getSequence()[0]->getAsTyped()->getAsConstantUnion()) { - returnVal = intermediate.parseConstTree(line, aggregateNode, unionArray, aggregateNode->getOp(), symbolTable, aggregateNode->getType(), true); - } - else { - returnVal = intermediate.parseConstTree(line, aggregateNode, unionArray, aggregateNode->getOp(), symbolTable, aggregateNode->getType()); - } - - if (returnVal) - return 0; - - } else { // The node has to be either a symbol node or an aggregate node or a tempConstant node, else, its an error - error(line, "No aggregate or constant union node available", "Internal Error", ""); - recover(); - - return 0; - } - - constUnion* constArray = new constUnion[fields.num]; - - for (int i = 0; i < fields.num; i++) { - if (fields.offsets[i] >= node->getType().getInstanceSize()) { - error(line, "", "[", "vector field selection out of range '%d'", fields.offsets[i]); - recover(); - fields.offsets[i] = 0; - } - - constArray[i] = unionArray[fields.offsets[i]]; - - } - typedNode = intermediate.addConstantUnion(constArray, node->getType(), line); - return typedNode; -} - -// -// This function returns the column being accessed from a constant matrix. The values are retrieved from -// the symbol table and parse-tree is built for a vector (each column of a matrix is a vector). The input -// to the function could either be a symbol node (m[0] where m is a constant matrix)that represents a -// constant matrix or it could be the tree representation of the constant matrix (s.m1[0] where s is a constant structure) -// -TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, TSourceLoc line) -{ - TIntermTyped* typedNode; - TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion(); - TIntermAggregate* aggregateNode = node->getAsAggregate(); - - if (index >= node->getType().getNominalSize()) { - error(line, "", "[", "matrix field selection out of range '%d'", index); - recover(); - index = 0; - } - - if (tempConstantNode) { - constUnion* unionArray = tempConstantNode->getUnionArrayPointer(); - int size = tempConstantNode->getType().getNominalSize(); - typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), line); - } else if (aggregateNode) { - // for a case like mat4(5)[0] - constUnion* unionArray = new constUnion[aggregateNode->getType().getInstanceSize()]; - int size = aggregateNode->getType().getNominalSize(); - - bool returnVal = false; - if (aggregateNode->getAsAggregate()->getSequence().size() == 1 && aggregateNode->getAsAggregate()->getSequence()[0]->getAsTyped()->getAsConstantUnion()) { - returnVal = intermediate.parseConstTree(line, aggregateNode, unionArray, aggregateNode->getOp(), symbolTable, aggregateNode->getType(), true); - } - else { - returnVal = intermediate.parseConstTree(line, aggregateNode, unionArray, aggregateNode->getOp(), symbolTable, aggregateNode->getType()); - } - - if (!returnVal) - typedNode = intermediate.addConstantUnion(&unionArray[size*index], aggregateNode->getType(), line); - else - return 0; - - } else { - error(line, "No Aggregate or Constant Union node available", "Internal Error", ""); - recover(); - - return 0; - } - - return typedNode; -} - -// -// This function returns the value of a particular field inside a constant structure from the symbol table. -// If there is an embedded/nested struct, it appropriately calls addConstStructNested or addConstStructFromAggr -// function and returns the parse-tree with the values of the embedded/nested struct. -// -TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* node, TSourceLoc line) -{ - TTypeList* fields = node->getType().getStruct(); - TIntermTyped *typedNode; - int instanceSize = 0; - unsigned int index = 0; - TIntermConstantUnion *tempConstantNode = node->getAsConstantUnion(); - TIntermAggregate* aggregateNode = node->getAsAggregate(); - - for ( index = 0; index < fields->size(); ++index) { - if ((*fields)[index].type->getFieldName() == identifier) { - break; - } else { - if ((*fields)[index].type->getStruct()) - //?? We should actually be calling getStructSize() function and not setStructSize. This problem occurs in case - // of nested/embedded structs. - instanceSize += (*fields)[index].type->setStructSize((*fields)[index].type->getStruct()); - else - instanceSize += (*fields)[index].type->getInstanceSize(); - } - } - - if (tempConstantNode) { - constUnion* constArray = tempConstantNode->getUnionArrayPointer(); - - typedNode = intermediate.addConstantUnion(constArray+instanceSize, tempConstantNode->getType(), line); // type will be changed in the calling function - } else if (aggregateNode) { - // for a case like constStruct(1,v3).i where structure fields is int i and vec3 v3. - - constUnion* unionArray = new constUnion[aggregateNode->getType().getStructSize()]; - - bool returnVal = false; - if (aggregateNode->getAsAggregate()->getSequence().size() == 1 && aggregateNode->getAsAggregate()->getSequence()[0]->getAsTyped()->getAsConstantUnion()) { - returnVal = intermediate.parseConstTree(line, aggregateNode, unionArray, aggregateNode->getOp(), symbolTable, aggregateNode->getType(), true); - } - else { - returnVal = intermediate.parseConstTree(line, aggregateNode, unionArray, aggregateNode->getOp(), symbolTable, aggregateNode->getType()); - } - - if (!returnVal) - typedNode = intermediate.addConstantUnion(unionArray+instanceSize, aggregateNode->getType(), line); - else - return 0; - - } else { - error(line, "No Aggregate or Constant Union node available", "Internal Error", ""); - recover(); - - return 0; - } - - return typedNode; -} - -// -// Initialize all supported extensions to disable -// -void TParseContext::initializeExtensionBehavior() -{ - // - // example code: extensionBehavior["test"] = EDisable; // where "test" is the name of - // supported extension - // -} - -OS_TLSIndex GlobalParseContextIndex = OS_INVALID_TLS_INDEX; - -bool InitializeParseContextIndex() -{ - if (GlobalParseContextIndex != OS_INVALID_TLS_INDEX) { - assert(0 && "InitializeParseContextIndex(): Parse Context already initalised"); - return false; - } - - // - // Allocate a TLS index. - // - GlobalParseContextIndex = OS_AllocTLSIndex(); - - if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitializeParseContextIndex(): Parse Context already initalised"); - return false; - } - - return true; -} - -bool InitializeGlobalParseContext() -{ - if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitializeGlobalParseContext(): Parse Context index not initalised"); - return false; - } - - TThreadParseContext *lpParseContext = static_cast(OS_GetTLSValue(GlobalParseContextIndex)); - if (lpParseContext != 0) { - assert(0 && "InitializeParseContextIndex(): Parse Context already initalised"); - return false; - } - - TThreadParseContext *lpThreadData = new TThreadParseContext(); - if (lpThreadData == 0) { - assert(0 && "InitializeGlobalParseContext(): Unable to create thread parse context"); - return false; - } - - lpThreadData->lpGlobalParseContext = 0; - OS_SetTLSValue(GlobalParseContextIndex, lpThreadData); - - return true; -} - -TParseContextPointer& GetGlobalParseContext() -{ - // - // Minimal error checking for speed - // - - TThreadParseContext *lpParseContext = static_cast(OS_GetTLSValue(GlobalParseContextIndex)); - - return lpParseContext->lpGlobalParseContext; -} - -bool FreeParseContext() -{ - if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "FreeParseContext(): Parse Context index not initalised"); - return false; - } - - TThreadParseContext *lpParseContext = static_cast(OS_GetTLSValue(GlobalParseContextIndex)); - if (lpParseContext) - delete lpParseContext; - - return true; -} - -bool FreeParseContextIndex() -{ - OS_TLSIndex tlsiIndex = GlobalParseContextIndex; - - if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "FreeParseContextIndex(): Parse Context index not initalised"); - return false; - } - - GlobalParseContextIndex = OS_INVALID_TLS_INDEX; - - return OS_FreeTLSIndex(tlsiIndex); -} diff --git a/src/mesa/shader/slang/MachineIndependent/ParseHelper.h b/src/mesa/shader/slang/MachineIndependent/ParseHelper.h deleted file mode 100755 index 00552b8554..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/ParseHelper.h +++ /dev/null @@ -1,143 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// -#ifndef _PARSER_HELPER_INCLUDED_ -#define _PARSER_HELPER_INCLUDED_ - -#include "../Include/ShHandle.h" -#include "SymbolTable.h" -#include "localintermediate.h" - -struct TMatrixFields { - bool wholeRow; - bool wholeCol; - int row; - int col; -}; - -typedef enum { - EBhRequire, - EBhEnable, - EBhWarn, - EBhDisable -} TBehavior; - -struct TPragma { - TPragma(bool o, bool d) : optimize(o), debug(d) { } - bool optimize; - bool debug; - TPragmaTable pragmaTable; -}; - -// -// The following are extra variables needed during parsing, grouped together so -// they can be passed to the parser without needing a global. -// -struct TParseContext { - TParseContext(TSymbolTable& symt, TIntermediate& interm, EShLanguage L, TInfoSink& is) : - intermediate(interm), symbolTable(symt), infoSink(is), language(L), treeRoot(0), - recoveredFromError(false), numErrors(0), lexAfterType(false), loopNestingLevel(0), - inTypeParen(false), contextPragma(true, false) { } - TIntermediate& intermediate; // to hold and build a parse tree - TSymbolTable& symbolTable; // symbol table that goes with the language currently being parsed - TInfoSink& infoSink; - EShLanguage language; // vertex or fragment language (future: pack or unpack) - TIntermNode* treeRoot; // root of parse tree being created - bool recoveredFromError; // true if a parse error has occurred, but we continue to parse - int numErrors; - bool lexAfterType; // true if we've recognized a type, so can only be looking for an identifier - int loopNestingLevel; // 0 if outside all loops - bool inTypeParen; // true if in parentheses, looking only for an identifier - const TType* currentFunctionType; // the return type of the function that's currently being parsed - bool functionReturnsValue; // true if a non-void function has a return - TMap extensionBehavior; - void initializeExtensionBehavior(); - - void C_DECL error(TSourceLoc, const char *szReason, const char *szToken, - const char *szExtraInfoFormat, ...); - bool reservedErrorCheck(int line, const TString& identifier); - void recover(); - - bool parseVectorFields(const TString&, int vecSize, TVectorFields&, int line); - bool parseMatrixFields(const TString&, int matSize, TMatrixFields&, int line); - void assignError(int line, const char* op, TString left, TString right); - void unaryOpError(int line, char* op, TString operand); - void binaryOpError(int line, char* op, TString left, TString right); - bool lValueErrorCheck(int line, char* op, TIntermTyped*); - bool constErrorCheck(TIntermTyped* node); - bool integerErrorCheck(TIntermTyped* node, char* token); - bool globalErrorCheck(int line, bool global, char* token); - bool constructorErrorCheck(int line, TIntermNode*, TFunction&, TOperator, TType*); - bool arrayErrorCheck(int line, TString& identifier, TPublicType type, TIntermTyped* size); - bool insertBuiltInArrayAtGlobalLevel(); - bool voidErrorCheck(int, const TString&, const TPublicType&); - bool boolErrorCheck(int, const TIntermTyped*); - bool boolErrorCheck(int, const TPublicType&); - bool samplerErrorCheck(int line, const TPublicType& pType, const char* reason); - bool structQualifierErrorCheck(int line, const TPublicType& pType); - bool parameterSamplerErrorCheck(int line, TQualifier qualifier, const TType& type); - bool containsSampler(TType& type); - bool nonInitErrorCheck(int line, TString& identifier, TPublicType& type); - bool paramErrorCheck(int line, TQualifier qualifier, TQualifier paramQualifier, TType* type); - const TFunction* findFunction(int line, TFunction* pfnCall, bool *builtIn = 0); - bool executeInitializer(TSourceLoc line, TString& identifier, TPublicType& pType, - TIntermTyped* initializer, TIntermNode*& intermNode); - bool canNodeBeRemoved(TIntermNode*); - TIntermTyped* addConstructor(TIntermNode*, TType*, TOperator, TFunction*, TSourceLoc); - TIntermTyped* constructStruct(TIntermNode*, TType*, int, TSourceLoc, bool subset); - TIntermTyped* constructBuiltIn(TType*, TOperator, TIntermNode*, TSourceLoc, bool subset); - TIntermTyped* addConstVectorNode(TVectorFields&, TIntermTyped*, TSourceLoc); - TIntermTyped* addConstMatrixNode(int , TIntermTyped*, TSourceLoc); - TIntermTyped* addConstStruct(TString& , TIntermTyped*, TSourceLoc); - bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, TSourceLoc); - struct TPragma contextPragma; - TString HashErrMsg; - bool AfterEOF; -}; - -int PaParseStrings(char* argv[], int strLen[], int argc, TParseContext&); -void PaReservedWord(); -int PaIdentOrType(TString& id, TParseContext&, TSymbol*&); -int PaParseComment(int &lineno, TParseContext&); -void setInitialState(); - -typedef TParseContext* TParseContextPointer; -extern TParseContextPointer& GetGlobalParseContext(); -#define GlobalParseContext GetGlobalParseContext() - -typedef struct TThreadParseContextRec -{ - TParseContext *lpGlobalParseContext; -} TThreadParseContext; - -#endif // _PARSER_HELPER_INCLUDED_ diff --git a/src/mesa/shader/slang/MachineIndependent/PoolAlloc.cpp b/src/mesa/shader/slang/MachineIndependent/PoolAlloc.cpp deleted file mode 100755 index ba717fce12..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/PoolAlloc.cpp +++ /dev/null @@ -1,349 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "../Include/PoolAlloc.h" -#include "../Include/Common.h" - -#include "Include/InitializeGlobals.h" -#include "osinclude.h" - -OS_TLSIndex PoolIndex; - -void InitializeGlobalPools() -{ - TThreadGlobalPools* globalPools= static_cast(OS_GetTLSValue(PoolIndex)); - if (globalPools) - return; - - TPoolAllocator *globalPoolAllocator = new TPoolAllocator(true); - - TThreadGlobalPools* threadData = new TThreadGlobalPools(); - - threadData->globalPoolAllocator = globalPoolAllocator; - - OS_SetTLSValue(PoolIndex, threadData); - globalPoolAllocator->push(); -} - -void FreeGlobalPools() -{ - // Release the allocated memory for this thread. - TThreadGlobalPools* globalPools= static_cast(OS_GetTLSValue(PoolIndex)); - if (!globalPools) - return; - - GlobalPoolAllocator.popAll(); - delete &GlobalPoolAllocator; - delete globalPools; -} - -bool InitializePoolIndex() -{ - // Allocate a TLS index. - if ((PoolIndex = OS_AllocTLSIndex()) == OS_INVALID_TLS_INDEX) - return false; - - return true; -} - -void FreePoolIndex() -{ - // Release the TLS index. - OS_FreeTLSIndex(PoolIndex); -} - -TPoolAllocator& GetGlobalPoolAllocator() -{ - TThreadGlobalPools* threadData = static_cast(OS_GetTLSValue(PoolIndex)); - - return *threadData->globalPoolAllocator; -} - -void SetGlobalPoolAllocatorPtr(TPoolAllocator* poolAllocator) -{ - TThreadGlobalPools* threadData = static_cast(OS_GetTLSValue(PoolIndex)); - - threadData->globalPoolAllocator = poolAllocator; -} - -// -// Implement the functionality of the TPoolAllocator class, which -// is documented in PoolAlloc.h. -// -TPoolAllocator::TPoolAllocator(bool g, int growthIncrement, int allocationAlignment) : - global(g), - pageSize(growthIncrement), - alignment(allocationAlignment), - freeList(0), - inUseList(0), - numCalls(0) -{ - // - // Don't allow page sizes we know are smaller than all common - // OS page sizes. - // - if (pageSize < 4*1024) - pageSize = 4*1024; - - // - // A large currentPageOffset indicates a new page needs to - // be obtained to allocate memory. - // - currentPageOffset = pageSize; - - // - // Adjust alignment to be at least pointer aligned and - // power of 2. - // - size_t minAlign = sizeof(void*); - alignment &= ~(minAlign - 1); - if (alignment < minAlign) - alignment = minAlign; - size_t a = 1; - while (a < alignment) - a <<= 1; - alignment = a; - alignmentMask = a - 1; - - // - // Align header skip - // - headerSkip = minAlign; - if (headerSkip < sizeof(tHeader)) { - headerSkip = (sizeof(tHeader) + alignmentMask) & ~alignmentMask; - } - - // - // Put a marker at the beginning of the stack. We won't - // pop() past this. - // - tAllocState start = { currentPageOffset, 0 }; - stack.push_back(start); -} - -TPoolAllocator::~TPoolAllocator() -{ - if (!global) { - // - // Then we know that this object is not being - // allocated after other, globally scoped objects - // that depend on it. So we can delete the "in use" memory. - // - while (inUseList) { - tHeader* next = inUseList->nextPage; - inUseList->~tHeader(); - delete [] reinterpret_cast(inUseList); - inUseList = next; - } - } - - // - // Always delete the free list memory - it can't be being - // (correctly) referenced, whether the pool allocator was - // global or not. We should not check the guard blocks - // here, because we did it already when the block was - // placed into the free list. - // - while (freeList) { - tHeader* next = freeList->nextPage; - delete [] reinterpret_cast(freeList); - freeList = next; - } -} - -// Support MSVC++ 6.0 -const unsigned char TAllocation::guardBlockBeginVal = 0xfb; -const unsigned char TAllocation::guardBlockEndVal = 0xfe; -const unsigned char TAllocation::userDataFill = 0xcd; - -# ifdef GUARD_BLOCKS - const size_t TAllocation::guardBlockSize = 16; -# else - const size_t TAllocation::guardBlockSize = 0; -# endif - -// -// Check a single guard block for damage -// -void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, char* locText) const -{ - for (int x = 0; x < guardBlockSize; x++) { - if (blockMem[x] != val) { - char assertMsg[80]; - - // We don't print the assert message. It's here just to be helpful. - sprintf(assertMsg, "PoolAlloc: Damage %s %u byte allocation at 0x%p\n", - locText, size, data()); - assert(0 && "PoolAlloc: Damage in guard block"); - } - } -} - - -void TPoolAllocator::push() -{ - tAllocState state = { currentPageOffset, inUseList }; - - stack.push_back(state); - - // - // Indicate there is no current page to allocate from. - // - currentPageOffset = pageSize; -} - -// -// Do a mass-deallocation of all the individual allocations -// that have occurred since the last push(), or since the -// last pop(), or since the object's creation. -// -// The deallocated pages are saved for future allocations. -// -void TPoolAllocator::pop() -{ - if (stack.size() < 1) - return; - - tHeader* page = stack.back().page; - currentPageOffset = stack.back().offset; - - while (inUseList != page) { - // invoke destructor to free allocation list - inUseList->~tHeader(); - - tHeader* nextInUse = inUseList->nextPage; - if (inUseList->pageCount > 1) - delete [] reinterpret_cast(inUseList); - else { - inUseList->nextPage = freeList; - freeList = inUseList; - } - inUseList = nextInUse; - } - - stack.pop_back(); -} - -// -// Do a mass-deallocation of all the individual allocations -// that have occurred. -// -void TPoolAllocator::popAll() -{ - while (stack.size() > 0) - pop(); -} - -void* TPoolAllocator::allocate(size_t numBytes) -{ - // If we are using guard blocks, all allocations are bracketed by - // them: [guardblock][allocation][guardblock]. numBytes is how - // much memory the caller asked for. allocationSize is the total - // size including guard blocks. In release build, - // guardBlockSize=0 and this all gets optimized away. - size_t allocationSize = TAllocation::allocationSize(numBytes); - - // - // Just keep some interesting statistics. - // - ++numCalls; - totalBytes += numBytes; - - // - // Do the allocation, most likely case first, for efficiency. - // This step could be moved to be inline sometime. - // - if (currentPageOffset + allocationSize <= pageSize) { - // - // Safe to allocate from currentPageOffset. - // - unsigned char* memory = reinterpret_cast(inUseList) + currentPageOffset; - currentPageOffset += allocationSize; - currentPageOffset = (currentPageOffset + alignmentMask) & ~alignmentMask; - - return initializeAllocation(inUseList, memory, numBytes); - } - - if (allocationSize + headerSkip > pageSize) { - // - // Do a multi-page allocation. Don't mix these with the others. - // The OS is efficient and allocating and free-ing multiple pages. - // - size_t numBytesToAlloc = allocationSize + headerSkip; - tHeader* memory = reinterpret_cast(::new char[numBytesToAlloc]); - if (memory == 0) - return 0; - - // Use placement-new to initialize header - new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize); - inUseList = memory; - - currentPageOffset = pageSize; // make next allocation come from a new page - - // No guard blocks for multi-page allocations (yet) - return reinterpret_cast(reinterpret_cast(memory) + headerSkip); - } - - // - // Need a simple page to allocate from. - // - tHeader* memory; - if (freeList) { - memory = freeList; - freeList = freeList->nextPage; - } else { - memory = reinterpret_cast(::new char[pageSize]); - if (memory == 0) - return 0; - } - - // Use placement-new to initialize header - new(memory) tHeader(inUseList, 1); - inUseList = memory; - - unsigned char* ret = reinterpret_cast(inUseList) + headerSkip; - currentPageOffset = (headerSkip + allocationSize + alignmentMask) & ~alignmentMask; - - return initializeAllocation(inUseList, ret, numBytes); -} - - -// -// Check all allocations in a list for damage by calling check on each. -// -void TAllocation::checkAllocList() const -{ - for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc) - alloc->check(); -} diff --git a/src/mesa/shader/slang/MachineIndependent/QualifierAlive.cpp b/src/mesa/shader/slang/MachineIndependent/QualifierAlive.cpp deleted file mode 100755 index 2897f48b19..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/QualifierAlive.cpp +++ /dev/null @@ -1,91 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "../Include/intermediate.h" - -class TAliveTraverser : public TIntermTraverser { -public: - TAliveTraverser(TQualifier q) : TIntermTraverser(), found(false), qualifier(q) - { - visitSymbol = AliveSymbol; - visitSelection = AliveSelection; - rightToLeft = true; - } - bool wasFound() { return found; } -protected: - bool found; - TQualifier qualifier; - - friend void AliveSymbol(TIntermSymbol*, TIntermTraverser*); - friend bool AliveSelection(bool, TIntermSelection*, TIntermTraverser*); -}; - -// -// Report whether or not a variable of the given qualifier type -// is guaranteed written. Not always possible to determine if -// it is written conditionally. -// -// ?? It does not do this well yet, this is just a place holder -// that simply determines if it was reference at all, anywhere. -// -bool QualifierWritten(TIntermNode* node, TQualifier qualifier) -{ - TAliveTraverser it(qualifier); - - if (node) - node->traverse(&it); - - return it.wasFound(); -} - -void AliveSymbol(TIntermSymbol* node, TIntermTraverser* it) -{ - TAliveTraverser* lit = static_cast(it); - - // - // If it's what we're looking for, record it. - // - if (node->getQualifier() == lit->qualifier) - lit->found = true; -} - -bool AliveSelection(bool preVisit, TIntermSelection* node, TIntermTraverser* it) -{ - TAliveTraverser* lit = static_cast(it); - - if (lit->wasFound()) - return false; - - return true; -} diff --git a/src/mesa/shader/slang/MachineIndependent/QualifierAlive.h b/src/mesa/shader/slang/MachineIndependent/QualifierAlive.h deleted file mode 100755 index 73e902cd0d..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/QualifierAlive.h +++ /dev/null @@ -1,35 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -bool QualifierWritten(TIntermNode* root, TQualifier); diff --git a/src/mesa/shader/slang/MachineIndependent/RemoveTree.cpp b/src/mesa/shader/slang/MachineIndependent/RemoveTree.cpp deleted file mode 100755 index 2435a485b6..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/RemoveTree.cpp +++ /dev/null @@ -1,98 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "../Include/intermediate.h" -#include "RemoveTree.h" -// -// Code to recursively delete the intermediate tree. -// - -void RemoveSymbol(TIntermSymbol* node, TIntermTraverser* it) -{ - delete node; -} - -bool RemoveBinary(bool /*preVisit*/ , TIntermBinary* node, TIntermTraverser*) -{ - delete node; - - return true; -} - -bool RemoveUnary(bool /*preVisit */, TIntermUnary* node, TIntermTraverser*) -{ - delete node; - - return true; -} - -bool RemoveAggregate(bool /*preVisit*/ , TIntermAggregate* node, TIntermTraverser*) -{ - delete node; - - return true; -} - -bool RemoveSelection(bool /*preVisit*/ , TIntermSelection* node, TIntermTraverser*) -{ - delete node; - - return true; -} - -void RemoveConstantUnion(TIntermConstantUnion* node, TIntermTraverser*) -{ - delete node; -} - -// -// Entry point. -// -void RemoveAllTreeNodes(TIntermNode* root) -{ - TIntermTraverser it; - - it.visitAggregate = RemoveAggregate; - it.visitBinary = RemoveBinary; - it.visitConstantUnion = RemoveConstantUnion; - it.visitSelection = RemoveSelection; - it.visitSymbol = RemoveSymbol; - it.visitUnary = RemoveUnary; - - it.preVisit = false; - it.postVisit = true; - - root->traverse(&it); -} - diff --git a/src/mesa/shader/slang/MachineIndependent/RemoveTree.h b/src/mesa/shader/slang/MachineIndependent/RemoveTree.h deleted file mode 100755 index 171092f1ab..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/RemoveTree.h +++ /dev/null @@ -1,35 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -void RemoveAllTreeNodes(TIntermNode*); diff --git a/src/mesa/shader/slang/MachineIndependent/ShaderLang.cpp b/src/mesa/shader/slang/MachineIndependent/ShaderLang.cpp deleted file mode 100755 index 3f37e15f37..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/ShaderLang.cpp +++ /dev/null @@ -1,607 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -// -// Implement the top-level of interface to the compiler/linker, -// as defined in ShaderLang.h -// -#include "SymbolTable.h" -#include "ParseHelper.h" -#include "../Include/ShHandle.h" -#include "Initialisation.h" - -#define SH_EXPORTING -#include "../Public/ShaderLangExt.h" - -#include "Include/ResourceLimits.h" -#include "Initialize.h" - -extern "C" int InitPreprocessor(void); -extern "C" int FinalizePreprocessor(void); -extern void SetGlobalPoolAllocatorPtr(TPoolAllocator* poolAllocator); - -bool generateBuiltInSymbolTable(const TBuiltInResource* resources, TInfoSink&, TSymbolTable*, EShLanguage language = EShLangCount); -bool initializeSymbolTable(TBuiltInStrings* BuiltInStrings, EShLanguage language, TInfoSink& infoSink, const TBuiltInResource *resources, TSymbolTable*); - -// -// A symbol table for each language. Each has a different -// set of built-ins, and we want to preserve that from -// compile to compile. -// -TSymbolTable SymbolTables[EShLangCount]; - -TPoolAllocator* PerProcessGPA = 0; -// -// This is the platform independent interface between an OGL driver -// and the shading language compiler/linker. -// - -// -// Driver must call this first, once, before doing any other -// compiler/linker operations. -// -int ShInitialize() -{ - TInfoSink infoSink; - bool ret = true; - - if (!InitProcess()) - return 0; - - // This method should be called once per process. If its called by multiple threads, then - // we need to have thread synchronization code around the initialization of per process - // global pool allocator - if (!PerProcessGPA) { - TPoolAllocator *builtInPoolAllocator = new TPoolAllocator(true); - builtInPoolAllocator->push(); - TPoolAllocator* gPoolAllocator = &GlobalPoolAllocator; - SetGlobalPoolAllocatorPtr(builtInPoolAllocator); - - TSymbolTable symTables[EShLangCount]; - generateBuiltInSymbolTable(0, infoSink, symTables); - - PerProcessGPA = new TPoolAllocator(true); - PerProcessGPA->push(); - SetGlobalPoolAllocatorPtr(PerProcessGPA); - - SymbolTables[EShLangVertex].copyTable(symTables[EShLangVertex]); - SymbolTables[EShLangFragment].copyTable(symTables[EShLangFragment]); - - SetGlobalPoolAllocatorPtr(gPoolAllocator); - - symTables[EShLangVertex].pop(); - symTables[EShLangFragment].pop(); - - builtInPoolAllocator->popAll(); - delete builtInPoolAllocator; - - } - - return ret ? 1 : 0; -} - -// -// Driver calls these to create and destroy compiler/linker -// objects. -// - -ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions) -{ - if (!InitThread()) - return 0; - - TShHandleBase* base = static_cast(ConstructCompiler(language, debugOptions)); - - return reinterpret_cast(base); -} - -ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions) -{ - if (!InitThread()) - return 0; - - TShHandleBase* base = static_cast(ConstructLinker(executable, debugOptions)); - - return reinterpret_cast(base); -} - -ShHandle ShConstructUniformMap() -{ - if (!InitThread()) - return 0; - - TShHandleBase* base = static_cast(ConstructUniformMap()); - - return reinterpret_cast(base); -} - -void ShDestruct(ShHandle handle) -{ - if (handle == 0) - return; - - TShHandleBase* base = static_cast(handle); - - if (base->getAsCompiler()) - DeleteCompiler(base->getAsCompiler()); - else if (base->getAsLinker()) - DeleteLinker(base->getAsLinker()); - else if (base->getAsUniformMap()) - DeleteUniformMap(base->getAsUniformMap()); -} - -// -// Cleanup symbol tables -// -int __fastcall ShFinalize() -{ - if (PerProcessGPA) { - PerProcessGPA->popAll(); - delete PerProcessGPA; - } - return 1; -} - -// -// This function should be called only once by the Master Dll. Currently, this is being called for each thread -// which is incorrect. This is required to keep the Sh interface working for now and will eventually be called -// from master dll once. -// -bool generateBuiltInSymbolTable(const TBuiltInResource* resources, TInfoSink& infoSink, TSymbolTable* symbolTables, EShLanguage language) -{ - TBuiltIns builtIns; - - if (resources) { - builtIns.initialize(*resources); - initializeSymbolTable(builtIns.getBuiltInStrings(), language, infoSink, resources, symbolTables); - } else { - builtIns.initialize(); - initializeSymbolTable(builtIns.getBuiltInStrings(), EShLangVertex, infoSink, resources, symbolTables); - initializeSymbolTable(builtIns.getBuiltInStrings(), EShLangFragment, infoSink, resources, symbolTables); - } - - return true; -} - -bool initializeSymbolTable(TBuiltInStrings* BuiltInStrings, EShLanguage language, TInfoSink& infoSink, const TBuiltInResource* resources, TSymbolTable* symbolTables) -{ - TIntermediate intermediate(infoSink); - TSymbolTable* symbolTable; - - if (resources) - symbolTable = symbolTables; - else - symbolTable = &symbolTables[language]; - - TParseContext parseContext(*symbolTable, intermediate, language, infoSink); - - GlobalParseContext = &parseContext; - - setInitialState(); - - assert (symbolTable->isEmpty() || symbolTable->atSharedBuiltInLevel()); - - // - // Parse the built-ins. This should only happen once per - // language symbol table. - // - // Push the symbol table to give it an initial scope. This - // push should not have a corresponding pop, so that built-ins - // are preserved, and the test for an empty table fails. - // - - symbolTable->push(); - - //Initialize the Preprocessor - int ret = InitPreprocessor(); - if (ret) { - infoSink.info.message(EPrefixInternalError, "Unable to intialize the Preprocessor"); - return false; - } - - for (TBuiltInStrings::iterator i = BuiltInStrings[parseContext.language].begin(); - i != BuiltInStrings[parseContext.language].end(); - ++i) { - const char* builtInShaders[1]; - int builtInLengths[1]; - - builtInShaders[0] = (*i).c_str(); - builtInLengths[0] = (int) (*i).size(); - - if (PaParseStrings(const_cast(builtInShaders), builtInLengths, 1, parseContext) != 0) { - infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins"); - return false; - } - } - - if (resources) { - IdentifyBuiltIns(parseContext.language, *symbolTable, *resources); - } else { - IdentifyBuiltIns(parseContext.language, *symbolTable); - } - - FinalizePreprocessor(); - - return true; -} - - -// -// Do an actual compile on the given strings. The result is left -// in the given compile object. -// -// Return: The return value of ShCompile is really boolean, indicating -// success or failure. -// -int ShCompile( - const ShHandle handle, - const char* const shaderStrings[], - const int numStrings, - const EShOptimizationLevel optLevel, - const TBuiltInResource* resources, - int debugOptions - ) -{ - if (!InitThread()) - return 0; - - if (handle == 0) - return 0; - - TShHandleBase* base = reinterpret_cast(handle); - TCompiler* compiler = base->getAsCompiler(); - if (compiler == 0) - return 0; - - GlobalPoolAllocator.push(); - compiler->infoSink.info.erase(); - compiler->infoSink.debug.erase(); - - if (numStrings == 0) - return 1; - - TIntermediate intermediate(compiler->infoSink); - TSymbolTable symbolTable(SymbolTables[compiler->getLanguage()]); - - generateBuiltInSymbolTable(resources, compiler->infoSink, &symbolTable, compiler->getLanguage()); - - TParseContext parseContext(symbolTable, intermediate, compiler->getLanguage(), compiler->infoSink); - parseContext.initializeExtensionBehavior(); - - GlobalParseContext = &parseContext; - - setInitialState(); - - InitPreprocessor(); - // - // Parse the application's shaders. All the following symbol table - // work will be throw-away, so push a new allocation scope that can - // be thrown away, then push a scope for the current shader's globals. - // - bool success = true; - - symbolTable.push(); - if (!symbolTable.atGlobalLevel()) - parseContext.infoSink.info.message(EPrefixInternalError, "Wrong symbol table level"); - - if (parseContext.insertBuiltInArrayAtGlobalLevel()) - success = false; - - int ret = PaParseStrings(const_cast(shaderStrings), 0, numStrings, parseContext); - if (ret) - success = false; - - if (success && parseContext.treeRoot) { - if (optLevel == EShOptNoGeneration) - parseContext.infoSink.info.message(EPrefixNone, "No errors. No code generation or linking was requested."); - else { - success = intermediate.postProcess(parseContext.treeRoot, parseContext.language); - - if (success) { - - if (debugOptions & EDebugOpIntermediate) - intermediate.outputTree(parseContext.treeRoot); - - // - // Call the machine dependent compiler - // - if (! compiler->compile(parseContext.treeRoot)) - success = false; - } - } - } else if (!success) { - parseContext.infoSink.info.prefix(EPrefixError); - parseContext.infoSink.info << parseContext.numErrors << " compilation errors. No code generated.\n\n"; - success = false; - if (debugOptions & EDebugOpIntermediate) - intermediate.outputTree(parseContext.treeRoot); - } - - intermediate.remove(parseContext.treeRoot); - - // - // Ensure symbol table is returned to the built-in level, - // throwing away all but the built-ins. - // - while (! symbolTable.atSharedBuiltInLevel()) - symbolTable.pop(); - - FinalizePreprocessor(); - // - // Throw away all the temporary memory used by the compilation process. - // - GlobalPoolAllocator.pop(); - - return success ? 1 : 0; -} - -// -// Do an actual link on the given compile objects. -// -// Return: The return value of is really boolean, indicating -// success or failure. -// -int ShLink( - const ShHandle linkHandle, - const ShHandle compHandles[], - const int numHandles, - ShHandle uniformMapHandle, - short int** uniformsAccessed, - int* numUniformsAccessed) - -{ - if (!InitThread()) - return 0; - - TShHandleBase* base = reinterpret_cast(linkHandle); - TLinker* linker = static_cast(base->getAsLinker()); - if (linker == 0) - return 0; - - int returnValue; - GlobalPoolAllocator.push(); - returnValue = ShLinkExt(linkHandle, compHandles, numHandles); - GlobalPoolAllocator.pop(); - - if (returnValue) - return 1; - - return 0; -} -// -// This link method will be eventually used once the ICD supports the new linker interface -// -int ShLinkExt( - const ShHandle linkHandle, - const ShHandle compHandles[], - const int numHandles) -{ - if (linkHandle == 0 || numHandles == 0) - return 0; - - THandleList cObjects; - - {// support MSVC++6.0 - for (int i = 0; i < numHandles; ++i) { - if (compHandles[i] == 0) - return 0; - TShHandleBase* base = reinterpret_cast(compHandles[i]); - if (base->getAsLinker()) { - cObjects.push_back(base->getAsLinker()); - } - if (base->getAsCompiler()) - cObjects.push_back(base->getAsCompiler()); - - - if (cObjects[i] == 0) - return 0; - } - } - - TShHandleBase* base = reinterpret_cast(linkHandle); - TLinker* linker = static_cast(base->getAsLinker()); - - if (linker == 0) - return 0; - - linker->infoSink.info.erase(); - - {// support MSVC++6.0 - for (int i = 0; i < numHandles; ++i) { - if (cObjects[i]->getAsCompiler()) { - if (! cObjects[i]->getAsCompiler()->linkable()) { - linker->infoSink.info.message(EPrefixError, "Not all shaders have valid object code."); - return 0; - } - } - } - } - - bool ret = linker->link(cObjects); - - return ret ? 1 : 0; -} - -// -// ShSetEncrpytionMethod is a place-holder for specifying -// how source code is encrypted. -// -void ShSetEncryptionMethod(ShHandle handle) -{ - if (handle == 0) - return; -} - -// -// Return any compiler/linker/uniformmap log of messages for the application. -// -const char* ShGetInfoLog(const ShHandle handle) -{ - if (!InitThread()) - return 0; - - if (handle == 0) - return 0; - - TShHandleBase* base = static_cast(handle); - TInfoSink* infoSink; - - if (base->getAsCompiler()) - infoSink = &(base->getAsCompiler()->getInfoSink()); - else if (base->getAsLinker()) - infoSink = &(base->getAsLinker()->getInfoSink()); - - infoSink->info << infoSink->debug.c_str(); - return infoSink->info.c_str(); -} - -// -// Return the resulting binary code from the link process. Structure -// is machine dependent. -// -const void* ShGetExecutable(const ShHandle handle) -{ - if (!InitThread()) - return 0; - - if (handle == 0) - return 0; - - TShHandleBase* base = reinterpret_cast(handle); - - TLinker* linker = static_cast(base->getAsLinker()); - if (linker == 0) - return 0; - - return linker->getObjectCode(); -} - -// -// Let the linker know where the application said it's attributes are bound. -// The linker does not use these values, they are remapped by the ICD or -// hardware. It just needs them to know what's aliased. -// -// Return: The return value of is really boolean, indicating -// success or failure. -// -// This is to preserve the old linker API, P20 code can use the generic -// ShConstructBinding() and ShAddBinding() APIs -// -int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table) -{ - if (!InitThread()) - return 0; - - if (handle == 0) - return 0; - - TShHandleBase* base = reinterpret_cast(handle); - TLinker* linker = static_cast(base->getAsLinker()); - - if (linker == 0) - return 0; - - linker->setAppAttributeBindings(table); - - return 1; -} - -// -// Let the linker know where the predefined attributes have to live. -// This is to preserve the old linker API, P20 code can use the generic -// ShConstructBinding() and ShAddBinding() APIs -// -int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table) -{ - if (!InitThread()) - return 0; - - if (handle == 0) - return 0; - - TShHandleBase* base = reinterpret_cast(handle); - TLinker* linker = static_cast(base->getAsLinker()); - - if (linker == 0) - return 0; - - linker->setFixedAttributeBindings(table); - return 1; -} - -// -// Some attribute locations are off-limits to the linker... -// -int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) -{ - if (!InitThread()) - return 0; - - if (handle == 0) - return 0; - - TShHandleBase* base = reinterpret_cast(handle); - TLinker* linker = static_cast(base->getAsLinker()); - if (linker == 0) - return 0; - - linker->setExcludedAttributes(attributes, count); - - return 1; -} - -// -// Return the index for OpenGL to use for knowing where a uniform lives. -// -// Return: The return value of is really boolean, indicating -// success or failure. -// -// We dont have to change this code for now since the TUniformMap being -// passed back to ICD by the linker is the same as being used for the old P10 linker -// -int ShGetUniformLocation(const ShHandle handle, const char* name) -{ - if (!InitThread()) - return 0; - - if (handle == 0) - return -1; - - TShHandleBase* base = reinterpret_cast(handle); - TUniformMap* uniformMap= base->getAsUniformMap(); - if (uniformMap == 0) - return -1; - - return uniformMap->getLocation(name); -} diff --git a/src/mesa/shader/slang/MachineIndependent/SymbolTable.cpp b/src/mesa/shader/slang/MachineIndependent/SymbolTable.cpp deleted file mode 100755 index 0e052c2ea7..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/SymbolTable.cpp +++ /dev/null @@ -1,235 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -// -// Symbol table for parsing. Most functionaliy and main ideas -// are documented in the header file. -// - -#include "SymbolTable.h" - -// -// TType helper function needs a place to live. -// - -// -// Recursively generate mangled names. -// -void TType::buildMangledName(TString& mangledName) -{ - if (isMatrix()) - mangledName += 'm'; - else if (isVector()) - mangledName += 'v'; - - switch (type) { - case EbtFloat: mangledName += 'f'; break; - case EbtInt: mangledName += 'i'; break; - case EbtBool: mangledName += 'b'; break; - case EbtSampler1D: mangledName += "s1"; break; - case EbtSampler2D: mangledName += "s2"; break; - case EbtSampler3D: mangledName += "s3"; break; - case EbtSamplerCube: mangledName += "sC"; break; - case EbtSampler1DShadow: mangledName += "sS1"; break; - case EbtSampler2DShadow: mangledName += "sS2"; break; - case EbtStruct: - mangledName += "struct-"; - if (typeName) - mangledName += *typeName; - {// support MSVC++6.0 - for (unsigned int i = 0; i < structure->size(); ++i) { - mangledName += '-'; - (*structure)[i].type->buildMangledName(mangledName); - } - } - default: - break; - } - - mangledName += static_cast('0' + getNominalSize()); - if (isArray()) { - char buf[10]; - sprintf(buf, "%d", arraySize); - mangledName += '['; - mangledName += buf; - mangledName += ']'; - } -} - -// -// Dump functions. -// - -void TVariable::dump(TInfoSink& infoSink) const -{ - infoSink.debug << getName().c_str() << ": " << type.getQualifierString() << " " << type.getBasicString(); - if (type.isArray()) { - infoSink.debug << "[0]"; - } - infoSink.debug << "\n"; -} - -void TFunction::dump(TInfoSink &infoSink) const -{ - infoSink.debug << getName().c_str() << ": " << returnType.getBasicString() << " " << getMangledName().c_str() << "\n"; -} - -void TSymbolTableLevel::dump(TInfoSink &infoSink) const -{ - tLevel::const_iterator it; - for (it = level.begin(); it != level.end(); ++it) - (*it).second->dump(infoSink); -} - -void TSymbolTable::dump(TInfoSink &infoSink) const -{ - for (int level = currentLevel(); level >= 0; --level) { - infoSink.debug << "LEVEL " << level << "\n"; - table[level]->dump(infoSink); - } -} - -// -// Functions have buried pointers to delete. -// -TFunction::~TFunction() -{ - for (TParamList::iterator i = parameters.begin(); i != parameters.end(); ++i) - delete (*i).type; -} - -// -// Symbol table levels are a map of pointers to symbols that have to be deleted. -// -TSymbolTableLevel::~TSymbolTableLevel() -{ - for (tLevel::iterator it = level.begin(); it != level.end(); ++it) - delete (*it).second; -} - -// -// Change all function entries in the table with the non-mangled name -// to be related to the provided built-in operation. This is a low -// performance operation, and only intended for symbol tables that -// live across a large number of compiles. -// -void TSymbolTableLevel::relateToOperator(const char* name, TOperator op) -{ - tLevel::iterator it; - for (it = level.begin(); it != level.end(); ++it) { - if ((*it).second->isFunction()) { - TFunction* function = static_cast((*it).second); - if (function->getName() == name) - function->relateToOperator(op); - } - } -} - - -TSymbol::TSymbol(const TSymbol& copyOf) -{ - name = NewPoolTString(copyOf.name->c_str()); - uniqueId = copyOf.uniqueId; -} - -TVariable::TVariable(const TVariable& copyOf, TStructureMap& remapper) : TSymbol(copyOf) -{ - type.copyType(copyOf.type, remapper); - userType = copyOf.userType; - // for builtIn symbol table level, unionArray and arrayInformation pointers should be NULL - assert(copyOf.arrayInformationType == 0); - arrayInformationType = 0; - - if (copyOf.unionArray) { - assert(!copyOf.type.getStruct()); - assert(copyOf.type.getInstanceSize() == 1); - unionArray = new constUnion[1]; - switch (type.getBasicType()) { - case EbtFloat: unionArray[0].fConst = copyOf.unionArray[0].fConst; break; - case EbtInt: unionArray[0].iConst = copyOf.unionArray[0].iConst; break; - case EbtBool: unionArray[0].bConst = copyOf.unionArray[0].bConst; break; - default: - assert (false && "Unknown type"); - } - } else - unionArray = 0; -} - -TVariable* TVariable::clone(TStructureMap& remapper) -{ - TVariable *variable = new TVariable(*this, remapper); - - return variable; -} - -TFunction::TFunction(const TFunction& copyOf, TStructureMap& remapper) : TSymbol(copyOf) -{ - for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) { - TParameter param; - parameters.push_back(param); - parameters.back().copyParam(copyOf.parameters[i], remapper); - } - - returnType.copyType(copyOf.returnType, remapper); - mangledName = copyOf.mangledName; - op = copyOf.op; - defined = copyOf.defined; -} - -TFunction* TFunction::clone(TStructureMap& remapper) -{ - TFunction *function = new TFunction(*this, remapper); - - return function; -} - -TSymbolTableLevel* TSymbolTableLevel::clone(TStructureMap& remapper) -{ - TSymbolTableLevel *symTableLevel = new TSymbolTableLevel(); - tLevel::iterator iter; - for (iter = level.begin(); iter != level.end(); ++iter) { - symTableLevel->insert(*iter->second->clone(remapper)); - } - - return symTableLevel; -} - -void TSymbolTable::copyTable(const TSymbolTable& copyOf) -{ - TStructureMap remapper; - uniqueId = copyOf.uniqueId; - for (unsigned int i = 0; i < copyOf.table.size(); ++i) { - table.push_back(copyOf.table[i]->clone(remapper)); - } -} diff --git a/src/mesa/shader/slang/MachineIndependent/SymbolTable.h b/src/mesa/shader/slang/MachineIndependent/SymbolTable.h deleted file mode 100755 index 7e4ff68247..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/SymbolTable.h +++ /dev/null @@ -1,320 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _SYMBOL_TABLE_INCLUDED_ -#define _SYMBOL_TABLE_INCLUDED_ - -// -// Symbol table for parsing. Has these design characteristics: -// -// * Same symbol table can be used to compile many shaders, to preserve -// effort of creating and loading with the large numbers of built-in -// symbols. -// -// * Name mangling will be used to give each function a unique name -// so that symbol table lookups are never ambiguous. This allows -// a simpler symbol table structure. -// -// * Pushing and popping of scope, so symbol table will really be a stack -// of symbol tables. Searched from the top, with new inserts going into -// the top. -// -// * Constants: Compile time constant symbols will keep their values -// in the symbol table. The parser can substitute constants at parse -// time, including doing constant folding and constant propagation. -// -// * No temporaries: Temporaries made from operations (+, --, .xy, etc.) -// are tracked in the intermediate representation, not the symbol table. -// - -#include "Include/Common.h" -#include "Include/intermediate.h" -#include "Include/InfoSink.h" - -// -// Symbol base class. (Can build functions or variables out of these...) -// -class TSymbol { -public: - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - TSymbol(const TString *n) : name(n) { } - virtual ~TSymbol() { /* don't delete name, it's from the pool */ } - const TString& getName() const { return *name; } - virtual const TString& getMangledName() const { return getName(); } - virtual bool isFunction() const { return false; } - virtual bool isVariable() const { return false; } - void setUniqueId(int id) { uniqueId = id; } - int getUniqueId() const { return uniqueId; } - virtual void dump(TInfoSink &infoSink) const = 0; - TSymbol(const TSymbol&); - virtual TSymbol* clone(TStructureMap& remapper) = 0; - -protected: - const TString *name; - unsigned int uniqueId; // For real comparing during code generation -}; - -// -// Variable class, meaning a symbol that's not a function. -// -// There could be a separate class heirarchy for Constant variables; -// Only one of int, bool, or float, (or none) is correct for -// any particular use, but it's easy to do this way, and doesn't -// seem worth having separate classes, and "getConst" can't simply return -// different values for different types polymorphically, so this is -// just simple and pragmatic. -// -class TVariable : public TSymbol { -public: - TVariable(const TString *name, const TType& t, bool uT = false ) : TSymbol(name), type(t), userType(uT), unionArray(0), arrayInformationType(0) { } - virtual ~TVariable() { } - virtual bool isVariable() const { return true; } - TType& getType() { return type; } - const TType& getType() const { return type; } - bool isUserType() const { return userType; } - void changeQualifier(TQualifier qualifier) { type.changeQualifier(qualifier); } - void updateArrayInformationType(TType *t) { arrayInformationType = t; } - TType* getArrayInformationType() { return arrayInformationType; } - - virtual void dump(TInfoSink &infoSink) const; - - constUnion* getConstPointer() { - if (!unionArray) { - if (!type.getStruct()) - unionArray = new constUnion[type.getInstanceSize()]; - else - unionArray = new constUnion[type.getStructSize()]; - } - return unionArray; - } - - constUnion* getConstPointer() const { return unionArray; } - - void shareConstPointer( constUnion *constArray) - { - delete unionArray; - unionArray = constArray; - } - TVariable(const TVariable&, TStructureMap& remapper); // copy constructor - virtual TVariable* clone(TStructureMap& remapper); - -protected: - TType type; - bool userType; - // we are assuming that Pool Allocator will free the memory allocated to unionArray - // when this object is destroyed - constUnion *unionArray; - TType *arrayInformationType; // this is used for updating maxArraySize in all the references to a given symbol -}; - -// -// The function sub-class of symbols and the parser will need to -// share this definition of a function parameter. -// -struct TParameter { - TString *name; - TType* type; - void copyParam(const TParameter& param, TStructureMap& remapper) { - name = NewPoolTString(param.name->c_str()); - type = param.type->clone(remapper); - } -}; - -// -// The function sub-class of a symbol. -// -class TFunction : public TSymbol { -public: - TFunction(TOperator o) : - TSymbol(0), - returnType(TType(EbtVoid)), - op(o), - defined(false) { } - TFunction(const TString *name, TType& retType, TOperator tOp = EOpNull) : - TSymbol(name), - returnType(retType), - mangledName(*name + '('), - op(tOp), - defined(false) { } - virtual ~TFunction(); - virtual bool isFunction() const { return true; } - - void addParameter(TParameter& p) - { - parameters.push_back(p); - mangledName = mangledName + p.type->getMangledName(); - } - - const TString& getMangledName() const { return mangledName; } - const TType& getReturnType() const { return returnType; } - void relateToOperator(TOperator o) { op = o; } - TOperator getBuiltInOp() const { return op; } - void setDefined() { defined = true; } - bool isDefined() { return defined; } - - int getParamCount() const { return static_cast(parameters.size()); } - TParameter& operator [](int i) { return parameters[i]; } - const TParameter& operator [](int i) const { return parameters[i]; } - - virtual void dump(TInfoSink &infoSink) const; - TFunction(const TFunction&, TStructureMap& remapper); - virtual TFunction* clone(TStructureMap& remapper); - -protected: - typedef TVector TParamList; - TParamList parameters; - TType returnType; - TString mangledName; - TOperator op; - bool defined; -}; - - -class TSymbolTableLevel { -public: - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - TSymbolTableLevel() { } - ~TSymbolTableLevel(); - - bool insert(TSymbol& symbol) - { - // - // returning true means symbol was added to the table - // - tInsertResult result; - result = level.insert(tLevelPair(symbol.getMangledName(), &symbol)); - - return result.second; - } - - TSymbol* find(const TString& name) const - { - tLevel::const_iterator it = level.find(name); - if (it == level.end()) - return 0; - else - return (*it).second; - } - - void relateToOperator(const char* name, TOperator op); - void dump(TInfoSink &infoSink) const; - TSymbolTableLevel* clone(TStructureMap& remapper); - -protected: - typedef std::map, pool_allocator > > tLevel; - typedef const tLevel::value_type tLevelPair; - typedef std::pair tInsertResult; - - tLevel level; -}; - -class TSymbolTable { -public: - TSymbolTable() : uniqueId(0) - { - // - // The symbol table cannot be used until push() is called, but - // the lack of an initial call to push() can be used to detect - // that the symbol table has not been preloaded with built-ins. - // - } - - TSymbolTable(TSymbolTable& symTable) - { - table.push_back(symTable.table[0]); - uniqueId = symTable.uniqueId; - } - - ~TSymbolTable() - { - // level 0 is always built In symbols, so we never pop that out - while (table.size() > 1) - pop(); - } - - // - // When the symbol table is initialized with the built-ins, there should - // 'push' calls, so that built-ins are at level 0 and the shader - // globals are at level 1. - // - bool isEmpty() { return table.size() == 0; } - bool atBuiltInLevel() { return atSharedBuiltInLevel() || atDynamicBuiltInLevel(); } - bool atSharedBuiltInLevel() { return table.size() == 1; } - bool atGlobalLevel() { return table.size() <= 3; } - void push() { - table.push_back(new TSymbolTableLevel); - } - - void pop() { - delete table[currentLevel()]; - table.pop_back(); - } - - bool insert(TSymbol& symbol) - { - symbol.setUniqueId(++uniqueId); - return table[currentLevel()]->insert(symbol); - } - - TSymbol* find(const TString& name, bool* builtIn = 0, bool *sameScope = 0) - { - int level = currentLevel(); - TSymbol* symbol; - do { - symbol = table[level]->find(name); - --level; - } while (symbol == 0 && level >= 0); - level++; - if (builtIn) - *builtIn = level == 0; - if (sameScope) - *sameScope = level == currentLevel(); - return symbol; - } - - TSymbolTableLevel* getGlobalLevel() { assert (table.size() >= 3); return table[2]; } - void relateToOperator(const char* name, TOperator op) { table[0]->relateToOperator(name, op); } - int getMaxSymbolId() { return uniqueId; } - void dump(TInfoSink &infoSink) const; - void copyTable(const TSymbolTable& copyOf); - -protected: - int currentLevel() const { return static_cast(table.size()) - 1; } - bool atDynamicBuiltInLevel() { return table.size() == 2; } - - std::vector table; - int uniqueId; // for unique identification in code generation -}; - -#endif // _SYMBOL_TABLE_INCLUDED_ diff --git a/src/mesa/shader/slang/MachineIndependent/glslang.l b/src/mesa/shader/slang/MachineIndependent/glslang.l deleted file mode 100644 index f6cd3ca663..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/glslang.l +++ /dev/null @@ -1,614 +0,0 @@ -/* -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// -*/ -/* Based on -ANSI C grammar, Lex specification - -In 1985, Jeff Lee published this Lex specification together with a Yacc -grammar for the April 30, 1985 ANSI C draft. Tom Stockfisch reposted -both to net.sources in 1987; that original, as mentioned in the answer -to question 17.25 of the comp.lang.c FAQ, can be ftp'ed from ftp.uu.net, -file usenet/net.sources/ansi.c.grammar.Z. - -I intend to keep this version as close to the current C Standard grammar -as possible; please let me know if you discover discrepancies. - -Jutta Degener, 1995 -*/ - -D [0-9] -L [a-zA-Z_] -H [a-fA-F0-9] -E [Ee][+-]?{D}+ -O [0-7] - -%option nounput -%{ -#include -#include -#include "ParseHelper.h" -#include "glslang_tab.h" - -/* windows only pragma */ -#ifdef _MSC_VER -#pragma warning(disable : 4102) -#endif - -int yy_input(char* buf, int max_size); -TSourceLoc yylineno; - -#ifdef _WIN32 - extern int yyparse(TParseContext&); - #define YY_DECL int yylex(YYSTYPE* pyylval, TParseContext& parseContext) -#else - extern int yyparse(void*); - #define YY_DECL int yylex(YYSTYPE* pyylval, void* parseContextLocal) - #define parseContext (*((TParseContext*)(parseContextLocal))) -#endif - -#define YY_INPUT(buf,result,max_size) (result = yy_input(buf, max_size)) - -%} - -%option noyywrap -%option never-interactive -%option outfile="Gen_glslang.cpp" -%x FIELDS - - -%% -<*>"//"[^\n]*"\n" { /* ?? carriage and/or line-feed? */ }; - -"attribute" { pyylval->lex.line = yylineno; return(ATTRIBUTE); } -"const" { pyylval->lex.line = yylineno; return(CONST_QUAL); } -"uniform" { pyylval->lex.line = yylineno; return(UNIFORM); } -"varying" { pyylval->lex.line = yylineno; return(VARYING); } - -"break" { pyylval->lex.line = yylineno; return(BREAK); } -"continue" { pyylval->lex.line = yylineno; return(CONTINUE); } -"do" { pyylval->lex.line = yylineno; return(DO); } -"for" { pyylval->lex.line = yylineno; return(FOR); } -"while" { pyylval->lex.line = yylineno; return(WHILE); } - -"if" { pyylval->lex.line = yylineno; return(IF); } -"else" { pyylval->lex.line = yylineno; return(ELSE); } - -"in" { pyylval->lex.line = yylineno; return(IN_QUAL); } -"out" { pyylval->lex.line = yylineno; return(OUT_QUAL); } -"inout" { pyylval->lex.line = yylineno; return(INOUT_QUAL); } - -"float" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(FLOAT_TYPE); } -"int" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(INT_TYPE); } -"void" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(VOID_TYPE); } -"bool" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(BOOL_TYPE); } -"true" { pyylval->lex.line = yylineno; pyylval->lex.b = true; return(BOOLCONSTANT); } -"false" { pyylval->lex.line = yylineno; pyylval->lex.b = false; return(BOOLCONSTANT); } - -"discard" { pyylval->lex.line = yylineno; return(DISCARD); } -"return" { pyylval->lex.line = yylineno; return(RETURN); } - -"mat2" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX2); } -"mat3" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX3); } -"mat4" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX4); } - -"vec2" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC2); } -"vec3" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC3); } -"vec4" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC4); } -"ivec2" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC2); } -"ivec3" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC3); } -"ivec4" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC4); } -"bvec2" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC2); } -"bvec3" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC3); } -"bvec4" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC4); } - -"sampler1D" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER1D; } -"sampler2D" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER2D; } -"sampler3D" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER3D; } -"samplerCube" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLERCUBE; } -"sampler1DShadow" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER1DSHADOW; } -"sampler2DShadow" { pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER2DSHADOW; } - -"struct" { pyylval->lex.line = yylineno; return(STRUCT); } - -"asm" { PaReservedWord(); return 0; } - -"class" { PaReservedWord(); return 0; } -"union" { PaReservedWord(); return 0; } -"enum" { PaReservedWord(); return 0; } -"typedef" { PaReservedWord(); return 0; } -"template" { PaReservedWord(); return 0; } -"this" { PaReservedWord(); return 0; } -"packed" { PaReservedWord(); return 0; } - -"goto" { PaReservedWord(); return 0; } -"switch" { PaReservedWord(); return 0; } -"default" { PaReservedWord(); return 0; } - -"inline" { PaReservedWord(); return 0; } -"noinline" { PaReservedWord(); return 0; } -"volatile" { PaReservedWord(); return 0; } -"public" { PaReservedWord(); return 0; } -"static" { PaReservedWord(); return 0; } -"extern" { PaReservedWord(); return 0; } -"external" { PaReservedWord(); return 0; } -"interface" { PaReservedWord(); return 0; } - -"long" { PaReservedWord(); return 0; } -"short" { PaReservedWord(); return 0; } -"double" { PaReservedWord(); return 0; } -"half" { PaReservedWord(); return 0; } -"fixed" { PaReservedWord(); return 0; } -"unsigned" { PaReservedWord(); return 0; } - -"input" { PaReservedWord(); return 0; } -"output" { PaReservedWord(); return 0; } - -"hvec2" { PaReservedWord(); return 0; } -"hvec3" { PaReservedWord(); return 0; } -"hvec4" { PaReservedWord(); return 0; } -"fvec2" { PaReservedWord(); return 0; } -"fvec3" { PaReservedWord(); return 0; } -"fvec4" { PaReservedWord(); return 0; } -"dvec2" { PaReservedWord(); return 0; } -"dvec3" { PaReservedWord(); return 0; } -"dvec4" { PaReservedWord(); return 0; } - -"sampler2DRect" { PaReservedWord(); return 0; } -"sampler3DRect" { PaReservedWord(); return 0; } -"sampler2DRectShadow" { PaReservedWord(); return 0; } - -"sizeof" { PaReservedWord(); return 0; } -"cast" { PaReservedWord(); return 0; } - -"namespace" { PaReservedWord(); return 0; } -"using" { PaReservedWord(); return 0; } - -{L}({L}|{D})* { - pyylval->lex.line = yylineno; - pyylval->lex.string = NewPoolTString(yytext); - return PaIdentOrType(*pyylval->lex.string, parseContext, pyylval->lex.symbol); -} - -0[xX]{H}+ { pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); } -0{O}+ { pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); } -0{D}+ { pyylval->lex.line = yylineno; parseContext.error(yylineno, "Invalid Octal number.", yytext, "", ""); parseContext.recover(); return 0;} -{D}+ { pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); } - -{D}+{E} { pyylval->lex.line = yylineno; pyylval->lex.f = static_cast(atof(yytext)); return(FLOATCONSTANT); } -{D}+"."{D}*({E})? { pyylval->lex.line = yylineno; pyylval->lex.f = static_cast(atof(yytext)); return(FLOATCONSTANT); } -"."{D}+({E})? { pyylval->lex.line = yylineno; pyylval->lex.f = static_cast(atof(yytext)); return(FLOATCONSTANT); } - -"/*" { int ret = PaParseComment(pyylval->lex.line, parseContext); if (!ret) return ret; } - -"+=" { pyylval->lex.line = yylineno; return(ADD_ASSIGN); } -"-=" { pyylval->lex.line = yylineno; return(SUB_ASSIGN); } -"*=" { pyylval->lex.line = yylineno; return(MUL_ASSIGN); } -"/=" { pyylval->lex.line = yylineno; return(DIV_ASSIGN); } -"%=" { pyylval->lex.line = yylineno; return(MOD_ASSIGN); } -"<<=" { pyylval->lex.line = yylineno; return(LEFT_ASSIGN); } -">>=" { pyylval->lex.line = yylineno; return(RIGHT_ASSIGN); } -"&=" { pyylval->lex.line = yylineno; return(AND_ASSIGN); } -"^=" { pyylval->lex.line = yylineno; return(XOR_ASSIGN); } -"|=" { pyylval->lex.line = yylineno; return(OR_ASSIGN); } - -"++" { pyylval->lex.line = yylineno; return(INC_OP); } -"--" { pyylval->lex.line = yylineno; return(DEC_OP); } -"&&" { pyylval->lex.line = yylineno; return(AND_OP); } -"||" { pyylval->lex.line = yylineno; return(OR_OP); } -"^^" { pyylval->lex.line = yylineno; return(XOR_OP); } -"<=" { pyylval->lex.line = yylineno; return(LE_OP); } -">=" { pyylval->lex.line = yylineno; return(GE_OP); } -"==" { pyylval->lex.line = yylineno; return(EQ_OP); } -"!=" { pyylval->lex.line = yylineno; return(NE_OP); } -"<<" { pyylval->lex.line = yylineno; return(LEFT_OP); } -">>" { pyylval->lex.line = yylineno; return(RIGHT_OP); } -";" { pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(SEMICOLON); } -("{"|"<%") { pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(LEFT_BRACE); } -("}"|"%>") { pyylval->lex.line = yylineno; return(RIGHT_BRACE); } -"," { pyylval->lex.line = yylineno; if (parseContext.inTypeParen) parseContext.lexAfterType = false; return(COMMA); } -":" { pyylval->lex.line = yylineno; return(COLON); } -"=" { pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(EQUAL); } -"(" { pyylval->lex.line = yylineno; parseContext.lexAfterType = false; parseContext.inTypeParen = true; return(LEFT_PAREN); } -")" { pyylval->lex.line = yylineno; parseContext.inTypeParen = false; return(RIGHT_PAREN); } -("["|"<:") { pyylval->lex.line = yylineno; return(LEFT_BRACKET); } -("]"|":>") { pyylval->lex.line = yylineno; return(RIGHT_BRACKET); } -"." { BEGIN(FIELDS); return(DOT); } -"!" { pyylval->lex.line = yylineno; return(BANG); } -"-" { pyylval->lex.line = yylineno; return(DASH); } -"~" { pyylval->lex.line = yylineno; return(TILDE); } -"+" { pyylval->lex.line = yylineno; return(PLUS); } -"*" { pyylval->lex.line = yylineno; return(STAR); } -"/" { pyylval->lex.line = yylineno; return(SLASH); } -"%" { pyylval->lex.line = yylineno; return(PERCENT); } -"<" { pyylval->lex.line = yylineno; return(LEFT_ANGLE); } -">" { pyylval->lex.line = yylineno; return(RIGHT_ANGLE); } -"|" { pyylval->lex.line = yylineno; return(VERTICAL_BAR); } -"^" { pyylval->lex.line = yylineno; return(CARET); } -"&" { pyylval->lex.line = yylineno; return(AMPERSAND); } -"?" { pyylval->lex.line = yylineno; return(QUESTION); } - -{L}({L}|{D})* { -BEGIN(INITIAL); - pyylval->lex.line = yylineno; - pyylval->lex.string = NewPoolTString(yytext); - return FIELD_SELECTION; } -[ \t\v\f\r] {} - -[ \t\v\n\f\r] { } -<*><> { (&parseContext)->AfterEOF = true; yy_delete_buffer(YY_CURRENT_BUFFER); yyterminate();} -<*>. { parseContext.infoSink.info << "FLEX: Unknown char " << yytext << "\n"; - return 0; } - -%% - - -//Including Pre-processor. -extern "C" { - #include "./preprocessor/preprocess.h" -} - -// -// The YY_INPUT macro just calls this. Maybe this could be just put into -// the macro directly. -// - -int yy_input(char* buf, int max_size) -{ - char *char_token =NULL; - int len; - - if ((len = yylex_CPP(buf, max_size)) == 0) - return 0; - if (len >= max_size) - YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); - - buf[len] = ' '; - return len+1; -} - - -// -// Parse an array of strings using yyparse. We set up globals used by -// yywrap. -// -// Returns 0 for success, as per yyparse(). -// -int PaParseStrings(char* argv[], int strLen[], int argc, TParseContext& parseContextLocal) -{ - int argv0len; - ScanFromString(argv[0]); - - //Storing the Current Compiler Parse context into the cpp structure. - cpp->pC = (void*)&parseContextLocal; - - if (!argv || argc == 0 || !argv[0]) - return 1; - - if (!strLen) { - argv0len = (int) strlen(argv[0]); - strLen = &argv0len; - } - yyrestart(0); - (&parseContextLocal)->AfterEOF = false; - cpp->PaWhichStr = 0; - cpp->PaArgv = argv; - cpp->PaArgc = argc; - cpp->PaStrLen = strLen; - yylineno = 1; - - if (*cpp->PaStrLen >= 0) { - int ret; - #ifdef _WIN32 - ret = yyparse(parseContextLocal); - #else - ret = yyparse((void*)(&parseContextLocal)); - #endif - if (cpp->CompileError == 1 || parseContextLocal.recoveredFromError || parseContextLocal.numErrors > 0) - return 1; - else - return 0; - } - else - return 0; -} - -void yyerror(char *s) -{ - if (((TParseContext *)cpp->pC)->AfterEOF) { - if (cpp->tokensBeforeEOF == 1) { - GlobalParseContext->error(yylineno, "syntax error", "pre-mature EOF", s, ""); - GlobalParseContext->recover(); - } - } else { - GlobalParseContext->error(yylineno, "syntax error", yytext, s, ""); - GlobalParseContext->recover(); - } -} - -void PaReservedWord() -{ - GlobalParseContext->error(yylineno, "Reserved word.", yytext, "", ""); - GlobalParseContext->recover(); -} - -int PaIdentOrType(TString& id, TParseContext& parseContextLocal, TSymbol*& symbol) -{ - symbol = parseContextLocal.symbolTable.find(id); - if (parseContextLocal.lexAfterType == false && symbol && symbol->isVariable()) { - TVariable* variable = static_cast(symbol); - if (variable->isUserType()) { - parseContextLocal.lexAfterType = true; - return TYPE_NAME; - } - } - - return IDENTIFIER; -} - -int PaParseComment(int &lineno, TParseContext& parseContextLocal) -{ - int transitionFlag = 0; - int nextChar; - - while (transitionFlag != 2) { - nextChar = yyinput(); - if (nextChar == '\n') - lineno++; - switch (nextChar) { - case '*' : - transitionFlag = 1; - break; - case '/' : /* if star is the previous character, then it is the end of comment */ - if (transitionFlag == 1) { - return 1 ; - } - break; - case EOF : - /* Raise error message here */ - parseContextLocal.error(yylineno, "End of shader found before end of comment.", "", "", ""); - GlobalParseContext->recover(); - return YY_NULL; - default : /* Any other character will be a part of the comment */ - transitionFlag = 0; - } - } - return 1; -} - -extern "C" { - -void CPPDebugLogMsg(const char *msg) -{ - ((TParseContext *)cpp->pC)->infoSink.debug.message(EPrefixNone, msg); -} - -void CPPWarningToInfoLog(const char *msg) -{ - ((TParseContext *)cpp->pC)->infoSink.info.message(EPrefixWarning, msg, yylineno); -} - -void CPPShInfoLogMsg(const char *msg) -{ - ((TParseContext *)cpp->pC)->error(yylineno,"", "",msg,""); - GlobalParseContext->recover(); -} - -void CPPErrorToInfoLog(char *msg) -{ - ((TParseContext *)cpp->pC)->error(yylineno,"syntax error", "",msg,""); - GlobalParseContext->recover(); -} - -void SetLineNumber(int line) -{ - yylineno &= ~SourceLocLineMask; - yylineno |= line; -} - -void SetStringNumber(int string) -{ - yylineno = (string << SourceLocStringShift) | (yylineno & SourceLocLineMask); -} - -int GetStringNumber(void) -{ - return yylineno >> 16; -} - -int GetLineNumber(void) -{ - return yylineno & SourceLocLineMask; -} - -void IncLineNumber(void) -{ - if ((yylineno & SourceLocLineMask) <= SourceLocLineMask) - ++yylineno; -} - -void DecLineNumber(void) -{ - if ((yylineno & SourceLocLineMask) > 0) - --yylineno; -} - -void HandlePragma(const char **tokens, int numTokens) -{ - if (!strcmp(tokens[0], "optimize")) { - if (numTokens != 4) { - CPPShInfoLogMsg("optimize pragma syntax is incorrect"); - return; - } - - if (strcmp(tokens[1], "(")) { - CPPShInfoLogMsg("\"(\" expected after 'optimize' keyword"); - return; - } - - if (!strcmp(tokens[2], "on")) - ((TParseContext *)cpp->pC)->contextPragma.optimize = true; - else if (!strcmp(tokens[2], "off")) - ((TParseContext *)cpp->pC)->contextPragma.optimize = false; - else { - CPPShInfoLogMsg("\"on\" or \"off\" expected after '(' for 'optimize' pragma"); - return; - } - - if (strcmp(tokens[3], ")")) { - CPPShInfoLogMsg("\")\" expected to end 'optimize' pragma"); - return; - } - } else if (!strcmp(tokens[0], "debug")) { - if (numTokens != 4) { - CPPShInfoLogMsg("debug pragma syntax is incorrect"); - return; - } - - if (strcmp(tokens[1], "(")) { - CPPShInfoLogMsg("\"(\" expected after 'debug' keyword"); - return; - } - - if (!strcmp(tokens[2], "on")) - ((TParseContext *)cpp->pC)->contextPragma.debug = true; - else if (!strcmp(tokens[2], "off")) - ((TParseContext *)cpp->pC)->contextPragma.debug = false; - else { - CPPShInfoLogMsg("\"on\" or \"off\" expected after '(' for 'debug' pragma"); - return; - } - - if (strcmp(tokens[3], ")")) { - CPPShInfoLogMsg("\")\" expected to end 'debug' pragma"); - return; - } - } else { - /* - // implementation specific pragma - // use ((TParseContext *)cpp->pC)->contextPragma.pragmaTable to store the information about pragma - // For now, just ignore the pragma that the implementation cannot recognize - // An Example of one such implementation for a pragma that has a syntax like - // #pragma pragmaname(pragmavalue) - // This implementation stores the current pragmavalue against the pragma name in pragmaTable. - if (numTokens == 4 && !strcmp(tokens[1], "(") && !strcmp(tokens[3], ")")) { - TPragmaTable& pragmaTable = ((TParseContext *)cpp->pC)->contextPragma.pragmaTable; - TPragmaTable::iterator iter; - iter = pragmaTable.find(TString(tokens[0])); - if (iter != pragmaTable.end()) { - iter->second = tokens[2]; - } else { - pragmaTable[tokens[0]] = tokens[2]; - } - } - */ - } -} - -void StoreStr(char *string) -{ - TString strSrc; - strSrc = TString(string); - - ((TParseContext *)cpp->pC)->HashErrMsg = ((TParseContext *)cpp->pC)->HashErrMsg + " " + strSrc; -} - -const char* GetStrfromTStr(void) -{ - cpp->ErrMsg = (((TParseContext *)cpp->pC)->HashErrMsg).c_str(); - return cpp->ErrMsg; -} - -void ResetTString(void) -{ - ((TParseContext *)cpp->pC)->HashErrMsg = ""; -} - -TBehavior GetBehavior(const char* behavior) -{ - if (!strcmp("require", behavior)) - return EBhRequire; - else if (!strcmp("enable", behavior)) - return EBhEnable; - else if (!strcmp("disable", behavior)) - return EBhDisable; - else if (!strcmp("warn", behavior)) - return EBhWarn; - else { - CPPShInfoLogMsg((TString("behavior '") + behavior + "' is not supported").c_str()); - return EBhDisable; - } -} - -void updateExtensionBehavior(const char* extName, const char* behavior) -{ - TBehavior behaviorVal = GetBehavior(behavior); - TMap:: iterator iter; - TString msg; - - // special cased for all extension - if (!strcmp(extName, "all")) { - if (behaviorVal == EBhRequire || behaviorVal == EBhEnable) { - CPPShInfoLogMsg("extension 'all' cannot have 'require' or 'enable' behavior"); - return; - } else { - for (iter = ((TParseContext *)cpp->pC)->extensionBehavior.begin(); iter != ((TParseContext *)cpp->pC)->extensionBehavior.end(); ++iter) - iter->second = behaviorVal; - } - } else { - iter = ((TParseContext *)cpp->pC)->extensionBehavior.find(TString(extName)); - if (iter == ((TParseContext *)cpp->pC)->extensionBehavior.end()) { - switch (behaviorVal) { - case EBhRequire: - CPPShInfoLogMsg((TString("extension '") + extName + "' is not supported").c_str()); - break; - case EBhEnable: - case EBhWarn: - case EBhDisable: - msg = TString("extension '") + extName + "' is not supported"; - ((TParseContext *)cpp->pC)->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno); - break; - } - return; - } else - iter->second = behaviorVal; - } -} - -} - -void setInitialState() -{ - yy_start = 1; -} diff --git a/src/mesa/shader/slang/MachineIndependent/glslang.y b/src/mesa/shader/slang/MachineIndependent/glslang.y deleted file mode 100644 index d2dc1db376..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/glslang.y +++ /dev/null @@ -1,2009 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -/** - * This is bison grammar and production code for parsing the OpenGL 2.0 shading - * languages. - */ -%{ - -/* Based on: -ANSI C Yacc grammar - -In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a -matching Lex specification) for the April 30, 1985 draft version of the -ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that -original, as mentioned in the answer to question 17.25 of the comp.lang.c -FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z. - -I intend to keep this version as close to the current C Standard grammar as -possible; please let me know if you discover discrepancies. - -Jutta Degener, 1995 -*/ - -#include "SymbolTable.h" -#include "ParseHelper.h" -#include "../Public/ShaderLang.h" - -#ifdef _WIN32 - #define YYPARSE_PARAM parseContext - #define YYPARSE_PARAM_DECL TParseContext& - #define YY_DECL int yylex(YYSTYPE* pyylval, TParseContext& parseContext) - #define YYLEX_PARAM parseContext -#else - #define YYPARSE_PARAM parseContextLocal - #define parseContext (*((TParseContext*)(parseContextLocal))) - #define YY_DECL int yylex(YYSTYPE* pyylval, void* parseContextLocal) - #define YYLEX_PARAM (void*)(parseContextLocal) - extern void yyerror(char*); -#endif - -#define FRAG_VERT_ONLY(S, L) { \ - if (parseContext.language != EShLangFragment && \ - parseContext.language != EShLangVertex) { \ - parseContext.error(L, " supported in vertex/fragment shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define VERTEX_ONLY(S, L) { \ - if (parseContext.language != EShLangVertex) { \ - parseContext.error(L, " supported in vertex shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define FRAG_ONLY(S, L) { \ - if (parseContext.language != EShLangFragment) { \ - parseContext.error(L, " supported in fragment shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define PACK_ONLY(S, L) { \ - if (parseContext.language != EShLangPack) { \ - parseContext.error(L, " supported in pack shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define UNPACK_ONLY(S, L) { \ - if (parseContext.language != EShLangUnpack) { \ - parseContext.error(L, " supported in unpack shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} - -#define PACK_UNPACK_ONLY(S, L) { \ - if (parseContext.language != EShLangUnpack && \ - parseContext.language != EShLangPack) { \ - parseContext.error(L, " supported in pack/unpack shaders only ", S, "", ""); \ - parseContext.recover(); \ - } \ -} -%} -%union { - struct { - TSourceLoc line; - union { - TString *string; - float f; - int i; - bool b; - }; - TSymbol* symbol; - } lex; - struct { - TSourceLoc line; - TOperator op; - union { - TIntermNode* intermNode; - TIntermNodePair nodePair; - TIntermTyped* intermTypedNode; - TIntermAggregate* intermAggregate; - }; - union { - TPublicType type; - TQualifier qualifier; - TFunction* function; - TParameter param; - TTypeLine typeLine; - TTypeList* typeList; - }; - } interm; -} - -%{ -#ifndef _WIN32 - extern int yylex(YYSTYPE*, void*); -#endif -%} - -%pure_parser /* Just in case is called from multiple threads */ -%expect 1 /* One shift reduce conflict because of if | else */ -%token ATTRIBUTE CONST_QUAL BOOL_TYPE FLOAT_TYPE INT_TYPE -%token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN -%token BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 VEC2 VEC3 VEC4 -%token MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING -%token STRUCT VOID_TYPE WHILE -%token SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER1DSHADOW SAMPLER2DSHADOW - -%token IDENTIFIER TYPE_NAME FLOATCONSTANT INTCONSTANT BOOLCONSTANT -%token FIELD_SELECTION -%token LEFT_OP RIGHT_OP -%token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP -%token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN -%token MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN -%token SUB_ASSIGN - -%token LEFT_PAREN RIGHT_PAREN LEFT_BRACKET RIGHT_BRACKET LEFT_BRACE RIGHT_BRACE DOT -%token COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT -%token LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION - -%type assignment_operator constructor_identifier unary_operator -%type variable_identifier primary_expression postfix_expression -%type expression integer_expression assignment_expression -%type unary_expression multiplicative_expression additive_expression -%type relational_expression equality_expression -%type conditional_expression constant_expression -%type logical_or_expression logical_xor_expression logical_and_expression -%type shift_expression and_expression exclusive_or_expression inclusive_or_expression -%type function_call initializer condition conditionopt - -%type translation_unit function_definition -%type statement simple_statement -%type statement_list compound_statement -%type declaration_statement selection_statement expression_statement -%type declaration external_declaration -%type for_init_statement compound_statement_no_new_scope -%type selection_rest_statement for_rest_statement -%type iteration_statement jump_statement statement_no_new_scope -%type single_declaration init_declarator_list - -%type parameter_declaration parameter_declarator parameter_type_specifier -%type parameter_qualifier - -%type type_qualifier fully_specified_type type_specifier -%type struct_specifier -%type struct_declarator -%type struct_declarator_list struct_declaration struct_declaration_list -%type function_header function_declarator function_identifier -%type function_header_with_parameters function_call_header -%type function_call_header_with_parameters function_call_header_no_parameters function_call_generic function_prototype - -%start translation_unit -%% - -variable_identifier - : IDENTIFIER { - // The symbol table search was done in the lexical phase - const TSymbol* symbol = $1.symbol; - const TVariable* variable; - if (symbol == 0) { - parseContext.error($1.line, "undeclared identifier", $1.string->c_str(), ""); - parseContext.recover(); - TType type(EbtFloat); - TVariable* fakeVariable = new TVariable($1.string, type); - parseContext.symbolTable.insert(*fakeVariable); - variable = fakeVariable; - } else { - // This identifier can only be a variable type symbol - if (! symbol->isVariable()) { - parseContext.error($1.line, "variable expected", $1.string->c_str(), ""); - parseContext.recover(); - } - variable = static_cast(symbol); - } - - // don't delete $1.string, it's used by error recovery, and the pool - // pop will reclaim the memory - - if (variable->getType().getQualifier() == EvqConst ) { - constUnion* constArray = variable->getConstPointer(); - TType t(variable->getType()); - $$ = parseContext.intermediate.addConstantUnion(constArray, t, $1.line); - } else - $$ = parseContext.intermediate.addSymbol(variable->getUniqueId(), - variable->getName(), - variable->getType(), $1.line); - } - ; - -primary_expression - : variable_identifier { - $$ = $1; - } - | INTCONSTANT { - // - // INT_TYPE is only 16-bit plus sign bit for vertex/fragment shaders, - // check for overflow for constants - // - if (abs($1.i) >= (1 << 16)) { - parseContext.error($1.line, " integer constant overflow", "", ""); - parseContext.recover(); - } - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = $1.i; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), $1.line); - } - | FLOATCONSTANT { - constUnion *unionArray = new constUnion[1]; - unionArray->fConst = $1.f; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), $1.line); - } - | BOOLCONSTANT { - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = $1.b; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $1.line); - } - | LEFT_PAREN expression RIGHT_PAREN { - $$ = $2; - } - ; - -postfix_expression - : primary_expression { - $$ = $1; - } - | postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET { - if (!$1->isArray() && !$1->isMatrix() && !$1->isVector()) { - if ($1->getAsSymbolNode()) - parseContext.error($2.line, " left of '[' is not of type array, matrix, or vector ", $1->getAsSymbolNode()->getSymbol().c_str(), ""); - else - parseContext.error($2.line, " left of '[' is not of type array, matrix, or vector ", "expression", ""); - parseContext.recover(); - } - if ($1->getType().getQualifier() == EvqConst && !$1->isArray() && $3->getQualifier() == EvqConst) { - if ($1->isVector()) { // constant folding for vectors - TVectorFields fields; - fields.num = 1; - fields.offsets[0] = $3->getAsConstantUnion()->getUnionArrayPointer()->iConst; // need to do it this way because v.xy sends fields integer array - $$ = parseContext.addConstVectorNode(fields, $1, $2.line); - } else if ($1->isMatrix()) { // constant folding for matrices - $$ = parseContext.addConstMatrixNode($3->getAsConstantUnion()->getUnionArrayPointer()->iConst, $1, $2.line); - } - } else { - if ($3->getQualifier() == EvqConst) { - if (($1->isVector() || $1->isMatrix()) && $1->getType().getNominalSize() <= $3->getAsConstantUnion()->getUnionArrayPointer()->iConst && !$1->isArray() ) { - parseContext.error($2.line, "", "[", "field selection out of range '%d'", $3->getAsConstantUnion()->getUnionArrayPointer()->iConst); - parseContext.recover(); - } else { - if ($1->isArray()) { - if ($1->getType().getArraySize() == 0) { - if ($1->getType().getMaxArraySize() <= $3->getAsConstantUnion()->getUnionArrayPointer()->iConst) { - if (parseContext.arraySetMaxSize($1->getAsSymbolNode(), $1->getTypePointer(), $3->getAsConstantUnion()->getUnionArrayPointer()->iConst, true, $2.line)) - parseContext.recover(); - } else { - if (parseContext.arraySetMaxSize($1->getAsSymbolNode(), $1->getTypePointer(), 0, false, $2.line)) - parseContext.recover(); - } - } else if ( $3->getAsConstantUnion()->getUnionArrayPointer()->iConst >= $1->getType().getArraySize()) { - parseContext.error($2.line, "", "[", "array index out of range '%d'", $3->getAsConstantUnion()->getUnionArrayPointer()->iConst); - parseContext.recover(); - } - } - $$ = parseContext.intermediate.addIndex(EOpIndexDirect, $1, $3, $2.line); - } - } else { - if ($1->isArray() && $1->getType().getArraySize() == 0) { - parseContext.error($2.line, "", "[", "array must be redeclared with a size before being indexed with a variable"); - parseContext.recover(); - } - - $$ = parseContext.intermediate.addIndex(EOpIndexIndirect, $1, $3, $2.line); - } - } - if ($$ == 0) { - constUnion *unionArray = new constUnion[1]; - unionArray->fConst = 0.0; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), $2.line); - } else if ($1->isArray()) { - if ($1->getType().getStruct()) - $$->setType(TType($1->getType().getStruct(), $1->getType().getTypeName())); - else - $$->setType(TType($1->getBasicType(), EvqTemporary, $1->getNominalSize(), $1->isMatrix())); - } else if ($1->isMatrix() && $1->getType().getQualifier() == EvqConst) - $$->setType(TType($1->getBasicType(), EvqConst, $1->getNominalSize())); - else if ($1->isMatrix()) - $$->setType(TType($1->getBasicType(), EvqTemporary, $1->getNominalSize())); - else if ($1->isVector() && $1->getType().getQualifier() == EvqConst) - $$->setType(TType($1->getBasicType(), EvqConst)); - else if ($1->isVector()) - $$->setType(TType($1->getBasicType(), EvqTemporary)); - else - $$->setType($1->getType()); - } - | function_call { - $$ = $1; - } - | postfix_expression DOT FIELD_SELECTION { - if ($1->isArray()) { - parseContext.error($3.line, "cannot apply dot operator to an array", ".", ""); - parseContext.recover(); - } - - if ($1->isVector()) { - TVectorFields fields; - if (! parseContext.parseVectorFields(*$3.string, $1->getNominalSize(), fields, $3.line)) { - fields.num = 1; - fields.offsets[0] = 0; - parseContext.recover(); - } - - if ($1->getType().getQualifier() == EvqConst) { // constant folding for vector fields - $$ = parseContext.addConstVectorNode(fields, $1, $3.line); - if ($$ == 0) { - parseContext.recover(); - $$ = $1; - } - else - $$->setType(TType($1->getBasicType(), EvqConst, (int) (*$3.string).size())); - } else { - if (fields.num == 1) { - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = fields.offsets[0]; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), $3.line); - $$ = parseContext.intermediate.addIndex(EOpIndexDirect, $1, index, $2.line); - $$->setType(TType($1->getBasicType())); - } else { - TString vectorString = *$3.string; - TIntermTyped* index = parseContext.intermediate.addSwizzle(fields, $3.line); - $$ = parseContext.intermediate.addIndex(EOpVectorSwizzle, $1, index, $2.line); - $$->setType(TType($1->getBasicType(),EvqTemporary, (int) vectorString.size())); - } - } - } else if ($1->isMatrix()) { - TMatrixFields fields; - if (! parseContext.parseMatrixFields(*$3.string, $1->getNominalSize(), fields, $3.line)) { - fields.wholeRow = false; - fields.wholeCol = false; - fields.row = 0; - fields.col = 0; - parseContext.recover(); - } - - if (fields.wholeRow || fields.wholeCol) { - parseContext.error($2.line, " non-scalar fields not implemented yet", ".", ""); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = 0; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), $3.line); - $$ = parseContext.intermediate.addIndex(EOpIndexDirect, $1, index, $2.line); - $$->setType(TType($1->getBasicType(), EvqTemporary, $1->getNominalSize())); - } else { - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = fields.col * $1->getNominalSize() + fields.row; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), $3.line); - $$ = parseContext.intermediate.addIndex(EOpIndexDirect, $1, index, $2.line); - $$->setType(TType($1->getBasicType())); - } - } else if ($1->getBasicType() == EbtStruct) { - bool fieldFound = false; - TTypeList* fields = $1->getType().getStruct(); - if (fields == 0) { - parseContext.error($2.line, "structure has no fields", "Internal Error", ""); - parseContext.recover(); - $$ = $1; - } else { - unsigned int i; - for (i = 0; i < fields->size(); ++i) { - if ((*fields)[i].type->getFieldName() == *$3.string) { - fieldFound = true; - break; - } - } - if (fieldFound) { - if ($1->getType().getQualifier() == EvqConst) { - $$ = parseContext.addConstStruct(*$3.string, $1, $2.line); - if ($$ == 0) { - parseContext.recover(); - $$ = $1; - } - else { - $$->setType(*(*fields)[i].type); - // change the qualifier of the return type, not of the structure field - // as the structure definition is shared between various structures. - $$->getTypePointer()->changeQualifier(EvqConst); - } - } else { - constUnion *unionArray = new constUnion[1]; - unionArray->iConst = i; - TIntermTyped* index = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtInt, EvqConst), $3.line); - $$ = parseContext.intermediate.addIndex(EOpIndexDirectStruct, $1, index, $2.line); - $$->setType(*(*fields)[i].type); - } - } else { - parseContext.error($2.line, " no such field in structure", $3.string->c_str(), ""); - parseContext.recover(); - $$ = $1; - } - } - } else { - parseContext.error($2.line, " field selection requires structure, vector, or matrix on left hand side", $3.string->c_str(), ""); - parseContext.recover(); - $$ = $1; - } - // don't delete $3.string, it's from the pool - } - | postfix_expression INC_OP { - if (parseContext.lValueErrorCheck($2.line, "++", $1)) - parseContext.recover(); - $$ = parseContext.intermediate.addUnaryMath(EOpPostIncrement, $1, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.unaryOpError($2.line, "++", $1->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - | postfix_expression DEC_OP { - if (parseContext.lValueErrorCheck($2.line, "--", $1)) - parseContext.recover(); - $$ = parseContext.intermediate.addUnaryMath(EOpPostDecrement, $1, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.unaryOpError($2.line, "--", $1->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -integer_expression - : expression { - if (parseContext.integerErrorCheck($1, "[]")) - parseContext.recover(); - $$ = $1; - } - ; - -function_call - : function_call_generic { - TFunction* fnCall = $1.function; - TOperator op = fnCall->getBuiltInOp(); - - if (op != EOpNull) { - // - // Then this should be a constructor. - // - TType type(EbtVoid); // use this to get the type back - if (parseContext.constructorErrorCheck($1.line, $1.intermNode, *fnCall, op, &type)) { - $$ = 0; - } else { - // - // It's a constructor, of type 'type'. - // - $$ = parseContext.addConstructor($1.intermNode, &type, op, fnCall, $1.line); - } - - if ($$ == 0) { - parseContext.recover(); - $$ = parseContext.intermediate.setAggregateOperator(0, op, $1.line); - } - $$->setType(type); - } else { - // - // Not a constructor. Find it in the symbol table. - // - const TFunction* fnCandidate; - bool builtIn; - fnCandidate = parseContext.findFunction($1.line, fnCall, &builtIn); - if (fnCandidate) { - // - // A declared function. But, it might still map to a built-in - // operation. - // - op = fnCandidate->getBuiltInOp(); - if (builtIn && op != EOpNull) { - // - // A function call mapped to a built-in operation. - // - if (fnCandidate->getParamCount() == 1) { - // - // Treat it like a built-in unary operator. - // - $$ = parseContext.intermediate.addUnaryMath(op, $1.intermNode, 0, parseContext.symbolTable); - if ($$ == 0) { - parseContext.error($1.intermNode->getLine(), " wrong operand type", "Internal Error", - "built in unary operator function. Type: %s", - static_cast($1.intermNode)->getCompleteString().c_str()); - YYERROR; - } - } else { - $$ = parseContext.intermediate.setAggregateOperator($1.intermAggregate, op, $1.line); - } - } else { - // This is a real function call - - $$ = parseContext.intermediate.setAggregateOperator($1.intermAggregate, EOpFunctionCall, $1.line); - $$->setType(fnCandidate->getReturnType()); - - // this is how we know whether the given function is a builtIn function or a user defined function - // if builtIn == false, it's a userDefined -> could be an overloaded builtIn function also - // if builtIn == true, it's definitely a builtIn function with EOpNull - if (!builtIn) - $$->getAsAggregate()->setUserDefined(); - $$->getAsAggregate()->setName(fnCandidate->getMangledName()); - - TQualifier qual; - TQualifierList& qualifierList = $$->getAsAggregate()->getQualifier(); - for (int i = 0; i < fnCandidate->getParamCount(); ++i) { - qual = (*fnCandidate)[i].type->getQualifier(); - if (qual == EvqOut || qual == EvqInOut) { - if (parseContext.lValueErrorCheck($$->getLine(), "assign", $$->getAsAggregate()->getSequence()[i]->getAsTyped())) { - parseContext.error($1.intermNode->getLine(), "Constant value cannot be passed for 'out' or 'inout' parameters.", "Error", ""); - parseContext.recover(); - } - } - qualifierList.push_back(qual); - } - } - $$->setType(fnCandidate->getReturnType()); - } else { - // error message was put out by PaFindFunction() - // Put on a dummy node for error recovery - constUnion *unionArray = new constUnion[1]; - unionArray->fConst = 0.0; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtFloat, EvqConst), $1.line); - parseContext.recover(); - } - } - delete fnCall; - } - ; - -function_call_generic - : function_call_header_with_parameters RIGHT_PAREN { - $$ = $1; - $$.line = $2.line; - } - | function_call_header_no_parameters RIGHT_PAREN { - $$ = $1; - $$.line = $2.line; - } - ; - -function_call_header_no_parameters - : function_call_header VOID_TYPE { - $$.function = $1; - $$.intermNode = 0; - } - | function_call_header { - $$.function = $1; - $$.intermNode = 0; - } - ; - -function_call_header_with_parameters - : function_call_header assignment_expression { - TParameter param = { 0, new TType($2->getType()) }; - $1->addParameter(param); - $$.function = $1; - $$.intermNode = $2; - } - | function_call_header_with_parameters COMMA assignment_expression { - TParameter param = { 0, new TType($3->getType()) }; - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, $3, $2.line); - } - ; - -function_call_header - : function_identifier LEFT_PAREN { - $$ = $1; - } - ; - -function_identifier - : constructor_identifier { - if ($1.op == EOpConstructStruct) { - TString tempString = ""; - TFunction *function = new TFunction(&tempString, *($1.type.userDef), $1.op); - $$ = function; - } - else { - TFunction *function = new TFunction($1.op); - $$ = function; - } - } - | IDENTIFIER { - if (parseContext.reservedErrorCheck($1.line, *$1.string)) - parseContext.recover(); - TType type(EbtVoid); - TFunction *function = new TFunction($1.string, type); - $$ = function; - } - ; - -// Grammar Note: Constructors look like functions, but lexical anaylsis recognized most of them as keywords. - -// -// Don't go through the symbol table for constructors. -// Their parameters will be verified algorithmically. -// -constructor_identifier - : FLOAT_TYPE { $$.line = $1.line; $$.op = EOpConstructFloat; } - | INT_TYPE { $$.line = $1.line; $$.op = EOpConstructInt; } - | BOOL_TYPE { $$.line = $1.line; $$.op = EOpConstructBool; } - | VEC2 { $$.line = $1.line; $$.op = EOpConstructVec2; } - | VEC3 { $$.line = $1.line; $$.op = EOpConstructVec3; } - | VEC4 { $$.line = $1.line; $$.op = EOpConstructVec4; } - | BVEC2 { FRAG_VERT_ONLY("bvec2", $1.line); $$.line = $1.line; $$.op = EOpConstructBVec2; } - | BVEC3 { FRAG_VERT_ONLY("bvec3", $1.line); $$.line = $1.line; $$.op = EOpConstructBVec3; } - | BVEC4 { FRAG_VERT_ONLY("bvec4", $1.line); $$.line = $1.line; $$.op = EOpConstructBVec4; } - | IVEC2 { FRAG_VERT_ONLY("ivec2", $1.line); $$.line = $1.line; $$.op = EOpConstructIVec2; } - | IVEC3 { FRAG_VERT_ONLY("ivec3", $1.line); $$.line = $1.line; $$.op = EOpConstructIVec3; } - | IVEC4 { FRAG_VERT_ONLY("ivec4", $1.line); $$.line = $1.line; $$.op = EOpConstructIVec4; } - | MATRIX2 { FRAG_VERT_ONLY("mat2", $1.line); $$.line = $1.line; $$.op = EOpConstructMat2; } - | MATRIX3 { FRAG_VERT_ONLY("mat3", $1.line); $$.line = $1.line; $$.op = EOpConstructMat3; } - | MATRIX4 { FRAG_VERT_ONLY("mat4", $1.line); $$.line = $1.line; $$.op = EOpConstructMat4; } - | TYPE_NAME { - TType& structure = static_cast($1.symbol)->getType(); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtStruct, qual, 1, false, false, &structure, $1.line }; - $$.type = t; - $$.line = $1.line; - $$.op = EOpConstructStruct; - } - ; - -unary_expression - : postfix_expression { - $$ = $1; - } - | INC_OP unary_expression { - if (parseContext.lValueErrorCheck($1.line, "++", $2)) - parseContext.recover(); - $$ = parseContext.intermediate.addUnaryMath(EOpPreIncrement, $2, $1.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.unaryOpError($1.line, "++", $2->getCompleteString()); - parseContext.recover(); - $$ = $2; - } - } - | DEC_OP unary_expression { - if (parseContext.lValueErrorCheck($1.line, "--", $2)) - parseContext.recover(); - $$ = parseContext.intermediate.addUnaryMath(EOpPreDecrement, $2, $1.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.unaryOpError($1.line, "--", $2->getCompleteString()); - parseContext.recover(); - $$ = $2; - } - } - | unary_operator unary_expression { - if ($1.op != EOpNull) { - $$ = parseContext.intermediate.addUnaryMath($1.op, $2, $1.line, parseContext.symbolTable); - if ($$ == 0) { - char* errorOp = ""; - switch($1.op) { - case EOpNegative: errorOp = "-"; break; - case EOpLogicalNot: errorOp = "!"; break; - case EOpBitwiseNot: errorOp = "~"; break; - default: break; - } - parseContext.unaryOpError($1.line, errorOp, $2->getCompleteString()); - parseContext.recover(); - $$ = $2; - } - } else - $$ = $2; - } - ; -// Grammar Note: No traditional style type casts. - -unary_operator - : PLUS { $$.line = $1.line; $$.op = EOpNull; } - | DASH { $$.line = $1.line; $$.op = EOpNegative; } - | BANG { $$.line = $1.line; $$.op = EOpLogicalNot; } - | TILDE { PACK_UNPACK_ONLY("~", $1.line); - $$.line = $1.line; $$.op = EOpBitwiseNot; } - ; -// Grammar Note: No '*' or '&' unary ops. Pointers are not supported. - -multiplicative_expression - : unary_expression { $$ = $1; } - | multiplicative_expression STAR unary_expression { - FRAG_VERT_ONLY("*", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpMul, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "*", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - | multiplicative_expression SLASH unary_expression { - FRAG_VERT_ONLY("/", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpDiv, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "/", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - | multiplicative_expression PERCENT unary_expression { - PACK_UNPACK_ONLY("%", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpMod, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "%", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -additive_expression - : multiplicative_expression { $$ = $1; } - | additive_expression PLUS multiplicative_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpAdd, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "+", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - | additive_expression DASH multiplicative_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpSub, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "-", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -shift_expression - : additive_expression { $$ = $1; } - | shift_expression LEFT_OP additive_expression { - PACK_UNPACK_ONLY("<<", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpLeftShift, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "<<", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - | shift_expression RIGHT_OP additive_expression { - PACK_UNPACK_ONLY(">>", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpRightShift, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, ">>", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -relational_expression - : shift_expression { $$ = $1; } - | relational_expression LEFT_ANGLE shift_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpLessThan, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "<", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - | relational_expression RIGHT_ANGLE shift_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpGreaterThan, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, ">", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - | relational_expression LE_OP shift_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpLessThanEqual, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "<=", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - | relational_expression GE_OP shift_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpGreaterThanEqual, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, ">=", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - ; - -equality_expression - : relational_expression { $$ = $1; } - | equality_expression EQ_OP relational_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpEqual, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "==", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - | equality_expression NE_OP relational_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpNotEqual, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "!=", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - ; - -and_expression - : equality_expression { $$ = $1; } - | and_expression AMPERSAND equality_expression { - PACK_UNPACK_ONLY("&", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpAnd, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "&", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -exclusive_or_expression - : and_expression { $$ = $1; } - | exclusive_or_expression CARET and_expression { - PACK_UNPACK_ONLY("^", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpExclusiveOr, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "^", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -inclusive_or_expression - : exclusive_or_expression { $$ = $1; } - | inclusive_or_expression VERTICAL_BAR exclusive_or_expression { - PACK_UNPACK_ONLY("|", $2.line); - $$ = parseContext.intermediate.addBinaryMath(EOpInclusiveOr, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "|", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -logical_and_expression - : inclusive_or_expression { $$ = $1; } - | logical_and_expression AND_OP inclusive_or_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpLogicalAnd, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "&&", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - ; - -logical_xor_expression - : logical_and_expression { $$ = $1; } - | logical_xor_expression XOR_OP logical_and_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpLogicalXor, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "^^", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - ; - -logical_or_expression - : logical_xor_expression { $$ = $1; } - | logical_or_expression OR_OP logical_xor_expression { - $$ = parseContext.intermediate.addBinaryMath(EOpLogicalOr, $1, $3, $2.line, parseContext.symbolTable); - if ($$ == 0) { - parseContext.binaryOpError($2.line, "||", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - constUnion *unionArray = new constUnion[1]; - unionArray->bConst = false; - $$ = parseContext.intermediate.addConstantUnion(unionArray, TType(EbtBool, EvqConst), $2.line); - } - } - ; - -conditional_expression - : logical_or_expression { $$ = $1; } - | logical_or_expression QUESTION expression COLON assignment_expression { - if (parseContext.boolErrorCheck($2.line, $1)) - parseContext.recover(); - - $$ = parseContext.intermediate.addSelection($1, $3, $5, $2.line); - if ($3->getType() != $5->getType()) - $$ = 0; - - if ($$ == 0) { - parseContext.binaryOpError($2.line, ":", $3->getCompleteString(), $5->getCompleteString()); - parseContext.recover(); - $$ = $5; - } - } - ; - -assignment_expression - : conditional_expression { $$ = $1; } - | unary_expression assignment_operator assignment_expression { - if (parseContext.lValueErrorCheck($2.line, "assign", $1)) - parseContext.recover(); - $$ = parseContext.intermediate.addAssign($2.op, $1, $3, $2.line); - if ($$ == 0) { - parseContext.assignError($2.line, "assign", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $1; - } - } - ; - -assignment_operator - : EQUAL { $$.line = $1.line; $$.op = EOpAssign; } - | MUL_ASSIGN { FRAG_VERT_ONLY("*=", $1.line); $$.line = $1.line; $$.op = EOpMulAssign; } - | DIV_ASSIGN { FRAG_VERT_ONLY("/=", $1.line); $$.line = $1.line; $$.op = EOpDivAssign; } - | MOD_ASSIGN { PACK_UNPACK_ONLY("%=", $1.line); $$.line = $1.line; $$.op = EOpModAssign; } - | ADD_ASSIGN { $$.line = $1.line; $$.op = EOpAddAssign; } - | SUB_ASSIGN { $$.line = $1.line; $$.op = EOpSubAssign; } - | LEFT_ASSIGN { PACK_UNPACK_ONLY("<<=", $1.line); $$.line = $1.line; $$.op = EOpLeftShiftAssign; } - | RIGHT_ASSIGN { PACK_UNPACK_ONLY("<<=", $1.line); $$.line = $1.line; $$.op = EOpRightShiftAssign; } - | AND_ASSIGN { PACK_UNPACK_ONLY("&=", $1.line); $$.line = $1.line; $$.op = EOpAndAssign; } - | XOR_ASSIGN { PACK_UNPACK_ONLY("^=", $1.line); $$.line = $1.line; $$.op = EOpExclusiveOrAssign; } - | OR_ASSIGN { PACK_UNPACK_ONLY("|=", $1.line); $$.line = $1.line; $$.op = EOpInclusiveOrAssign; } - ; - -expression - : assignment_expression { - $$ = $1; - } - | expression COMMA assignment_expression { - $$ = parseContext.intermediate.addComma($1, $3, $2.line); - if ($$ == 0) { - parseContext.binaryOpError($2.line, ",", $1->getCompleteString(), $3->getCompleteString()); - parseContext.recover(); - $$ = $3; - } - } - ; - -constant_expression - : conditional_expression { - if (parseContext.constErrorCheck($1)) - parseContext.recover(); - $$ = $1; - } - ; - -declaration - : function_prototype SEMICOLON { $$ = 0; } - | init_declarator_list SEMICOLON { - if ($1.intermAggregate) - $1.intermAggregate->setOperator(EOpSequence); - $$ = $1.intermAggregate; - } - ; - -function_prototype - : function_declarator RIGHT_PAREN { - // - // Multiple declarations of the same function are allowed. - // - // If this is a definition, the definition production code will check for redefinitions - // (we don't know at this point if it's a definition or not). - // - // Redeclarations are allowed. But, return types and parameter qualifiers must match. - // - TFunction* prevDec = static_cast(parseContext.symbolTable.find($1->getMangledName())); - if (prevDec) { - if (prevDec->getReturnType() != $1->getReturnType()) { - parseContext.error($2.line, "overloaded functions must have the same return type", $1->getReturnType().getBasicString(), ""); - parseContext.recover(); - } - for (int i = 0; i < prevDec->getParamCount(); ++i) { - if ((*prevDec)[i].type->getQualifier() != (*$1)[i].type->getQualifier()) { - parseContext.error($2.line, "overloaded functions must have the same parameter qualifiers", (*$1)[i].type->getQualifierString(), ""); - parseContext.recover(); - } - } - } - - // - // If this is a redeclaration, it could also be a definition, - // in which case, we want to use the variable names from this one, and not the one that's - // being redeclared. So, pass back up this declaration, not the one in the symbol table. - // - $$.function = $1; - $$.line = $2.line; - - parseContext.symbolTable.insert(*$$.function); - } - ; - -function_declarator - : function_header { - $$ = $1; - } - | function_header_with_parameters { - $$ = $1; - } - ; - - -function_header_with_parameters - : function_header parameter_declaration { - // Add the parameter - $$ = $1; - if ($2.param.type->getBasicType() != EbtVoid) - $1->addParameter($2.param); - else - delete $2.param.type; - } - | function_header_with_parameters COMMA parameter_declaration { - // - // Only first parameter of one-parameter functions can be void - // The check for named parameters not being void is done in parameter_declarator - // - if ($3.param.type->getBasicType() == EbtVoid) { - // - // This parameter > first is void - // - parseContext.error($2.line, "cannot be an argument type except for '(void)'", "void", ""); - parseContext.recover(); - delete $3.param.type; - } else { - // Add the parameter - $$ = $1; - $1->addParameter($3.param); - } - } - ; - -function_header - : fully_specified_type IDENTIFIER LEFT_PAREN { - if ($1.qualifier != EvqGlobal && $1.qualifier != EvqTemporary) { - parseContext.error($2.line, "no qualifiers allowed for function return", getQualifierString($1.qualifier), ""); - parseContext.recover(); - } - // make sure a sampler is not involved as well... - if (parseContext.structQualifierErrorCheck($2.line, $1)) - parseContext.recover(); - - // Add the function as a prototype after parsing it (we do not support recursion) - TFunction *function; - TType type($1); - function = new TFunction($2.string, type); - $$ = function; - } - ; - -parameter_declarator - // Type + name - : type_specifier IDENTIFIER { - if ($1.type == EbtVoid) { - parseContext.error($2.line, "illegal use of type 'void'", $2.string->c_str(), ""); - parseContext.recover(); - } - if (parseContext.reservedErrorCheck($2.line, *$2.string)) - parseContext.recover(); - TParameter param = {$2.string, new TType($1)}; - $$.line = $2.line; - $$.param = param; - } - | type_specifier IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET { - // Check that we can make an array out of this type - if ($1.array) { - parseContext.error($3.line, "cannot declare arrays of this type", TType($1).getCompleteString().c_str(), ""); - parseContext.recover(); - } - if (parseContext.reservedErrorCheck($2.line, *$2.string)) - parseContext.recover(); - $1.array = true; - TType* type = new TType($1); - if ($4->getAsConstantUnion()) - type->setArraySize($4->getAsConstantUnion()->getUnionArrayPointer()->iConst); - TParameter param = { $2.string, type }; - $$.line = $2.line; - $$.param = param; - } - ; - -parameter_declaration - // - // The only parameter qualifier a parameter can have are - // IN_QUAL, OUT_QUAL, INOUT_QUAL, or CONST. - // - - // - // Type + name - // - : type_qualifier parameter_qualifier parameter_declarator { - $$ = $3; - if (parseContext.paramErrorCheck($3.line, $1.qualifier, $2, $$.param.type)) - parseContext.recover(); - } - | parameter_qualifier parameter_declarator { - $$ = $2; - if (parseContext.parameterSamplerErrorCheck($2.line, $1, *$2.param.type)) - parseContext.recover(); - if (parseContext.paramErrorCheck($2.line, EvqTemporary, $1, $$.param.type)) - parseContext.recover(); - } - // - // Only type - // - | type_qualifier parameter_qualifier parameter_type_specifier { - $$ = $3; - if (parseContext.paramErrorCheck($3.line, $1.qualifier, $2, $$.param.type)) - parseContext.recover(); - } - | parameter_qualifier parameter_type_specifier { - $$ = $2; - if (parseContext.parameterSamplerErrorCheck($2.line, $1, *$2.param.type)) - parseContext.recover(); - if (parseContext.paramErrorCheck($2.line, EvqTemporary, $1, $$.param.type)) - parseContext.recover(); - } - ; - -parameter_qualifier - : /* empty */ { - $$ = EvqIn; - } - | IN_QUAL { - $$ = EvqIn; - } - | OUT_QUAL { - $$ = EvqOut; - } - | INOUT_QUAL { - $$ = EvqInOut; - } - ; - -parameter_type_specifier - : type_specifier { - TParameter param = { 0, new TType($1) }; - $$.param = param; - - } - | type_specifier LEFT_BRACKET constant_expression RIGHT_BRACKET { - // Check that we can make an array out of this type - if ($1.array) { - parseContext.error($2.line, "cannot declare arrays of this type", TType($1).getCompleteString().c_str(), ""); - parseContext.recover(); - } - $1.array = true; - TType* type = new TType($1); - if ($3->getAsConstantUnion()) - type->setArraySize($3->getAsConstantUnion()->getUnionArrayPointer()->iConst); - - TParameter param = { 0, type }; - $$.line = $2.line; - $$.param = param; - } - ; - -init_declarator_list - : single_declaration { - $$ = $1; - } - | init_declarator_list COMMA IDENTIFIER { - $$ = $1; - if (parseContext.structQualifierErrorCheck($3.line, $1.type)) - parseContext.recover(); - - if (parseContext.nonInitErrorCheck($3.line, *$3.string, $$.type)) - parseContext.recover(); - } - | init_declarator_list COMMA IDENTIFIER LEFT_BRACKET RIGHT_BRACKET { - $$ = $1; - if (parseContext.structQualifierErrorCheck($3.line, $1.type)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck($4.line, *$3.string, $$.type, 0)) - parseContext.recover(); - } - | init_declarator_list COMMA IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET { - $$ = $1; - if (parseContext.structQualifierErrorCheck($3.line, $1.type)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck($4.line, *$3.string, $$.type, $5)) - parseContext.recover(); - } - | init_declarator_list COMMA IDENTIFIER EQUAL initializer { - $$ = $1; - if (parseContext.structQualifierErrorCheck($3.line, $1.type)) - parseContext.recover(); - - TIntermNode* intermNode; - if (!parseContext.executeInitializer($3.line, *$3.string, $1.type, $5, intermNode)) { - // - // build the intermediate representation - // - if (intermNode) - $$.intermAggregate = parseContext.intermediate.growAggregate($1.intermNode, intermNode, $4.line); - else - $$.intermAggregate = $1.intermAggregate; - } else { - parseContext.recover(); - $$.intermAggregate = 0; - } - } - ; - -single_declaration - : fully_specified_type { - $$.type = $1; - $$.intermAggregate = 0; - } - | fully_specified_type IDENTIFIER { - $$.intermAggregate = 0; - $$.type = $1; - if (parseContext.structQualifierErrorCheck($2.line, $1)) - parseContext.recover(); - - if (parseContext.nonInitErrorCheck($2.line, *$2.string, $$.type)) - parseContext.recover(); - } - | fully_specified_type IDENTIFIER LEFT_BRACKET RIGHT_BRACKET { - $$.intermAggregate = 0; - $$.type = $1; - if (parseContext.structQualifierErrorCheck($2.line, $1)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck($3.line, *$2.string, $$.type, 0)) - parseContext.recover(); - } - | fully_specified_type IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET { - $$.intermAggregate = 0; - $$.type = $1; - if (parseContext.structQualifierErrorCheck($2.line, $1)) - parseContext.recover(); - - if (parseContext.arrayErrorCheck($3.line, *$2.string, $$.type, $4)) - parseContext.recover(); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - $$.type = $1; - if (parseContext.structQualifierErrorCheck($2.line, $1)) - parseContext.recover(); - - TIntermNode* intermNode; - if (!parseContext.executeInitializer($2.line, *$2.string, $1, $4, intermNode)) { - // - // Build intermediate representation - // - if (intermNode) - $$.intermAggregate = parseContext.intermediate.makeAggregate(intermNode, $3.line); - else - $$.intermAggregate = 0; - } else { - parseContext.recover(); - $$.intermAggregate = 0; - } - } - -// -// Place holder for the pack/unpack languages. -// -// | buffer_specifier { -// $$.intermAggregate = 0; -// } - ; - -// Grammar Note: No 'enum', or 'typedef'. - -// -// Place holder for the pack/unpack languages. -// -//%type buffer_declaration -//%type buffer_specifier input_or_output buffer_declaration_list -//buffer_specifier -// : input_or_output LEFT_BRACE buffer_declaration_list RIGHT_BRACE { -// } -// ; -// -//input_or_output -// : INPUT { -// if (parseContext.globalErrorCheck($1.line, parseContext.symbolTable.atGlobalLevel(), "input")) -// parseContext.recover(); -// UNPACK_ONLY("input", $1.line); -// $$.qualifier = EvqInput; -// } -// | OUTPUT { -// if (parseContext.globalErrorCheck($1.line, parseContext.symbolTable.atGlobalLevel(), "output")) -// parseContext.recover(); -// PACK_ONLY("output", $1.line); -// $$.qualifier = EvqOutput; -// } -// ; - -// -// Place holder for the pack/unpack languages. -// -//buffer_declaration_list -// : buffer_declaration { -// } -// | buffer_declaration_list buffer_declaration { -// } -// ; - -// -// Input/output semantics: -// float must be 16 or 32 bits -// float alignment restrictions? -// check for only one input and only one output -// sum of bitfields has to be multiple of 32 -// - -// -// Place holder for the pack/unpack languages. -// -//buffer_declaration -// : type_specifier IDENTIFIER COLON constant_expression SEMICOLON { -// if (parseContext.reservedErrorCheck($2.line, *$2.string, parseContext)) -// parseContext.recover(); -// $$.variable = new TVariable($2.string, $1); -// if (! parseContext.symbolTable.insert(*$$.variable)) { -// parseContext.error($2.line, "redefinition", $$.variable->getName().c_str(), ""); -// parseContext.recover(); -// // don't have to delete $$.variable, the pool pop will take care of it -// } -// } -// ; - -fully_specified_type - : type_specifier { - $$ = $1; - } - | type_qualifier type_specifier { - TPublicType t = { $2.type, $1.qualifier, $2.size, $2.matrix, false, $2.userDef, 0 }; - if ($1.qualifier == EvqAttribute && - ($2.type == EbtBool || $2.type == EbtInt)) { - parseContext.error($2.line, "cannot be bool or int", getQualifierString($1.qualifier), ""); - parseContext.recover(); - } - if (($1.qualifier == EvqVaryingIn || $1.qualifier == EvqVaryingOut) && - ($2.type == EbtBool || $2.type == EbtInt)) { - parseContext.error($2.line, "cannot be bool or int", getQualifierString($1.qualifier), ""); - parseContext.recover(); - } - $$ = t; - } - ; - -type_qualifier - : CONST_QUAL { - TPublicType t = { EbtVoid, EvqConst, 1, false, false, 0 }; - $$ = t; - } - | ATTRIBUTE { - VERTEX_ONLY("attribute", $1.line); - if (parseContext.globalErrorCheck($1.line, parseContext.symbolTable.atGlobalLevel(), "attribute")) - parseContext.recover(); - TPublicType t = { EbtVoid, EvqAttribute, 1, false, false, 0 }; - $$ = t; - } - | VARYING { - if (parseContext.globalErrorCheck($1.line, parseContext.symbolTable.atGlobalLevel(), "varying")) - parseContext.recover(); - TPublicType t = { EbtVoid, EvqVaryingIn, 1, false, false, 0 }; - if (parseContext.language == EShLangVertex) - t.qualifier = EvqVaryingOut; - $$ = t; - } - | UNIFORM { - if (parseContext.globalErrorCheck($1.line, parseContext.symbolTable.atGlobalLevel(), "uniform")) - parseContext.recover(); - TPublicType t = { EbtVoid, EvqUniform, 1, false, false, 0 }; - $$ = t; - } - ; - -type_specifier - : VOID_TYPE { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtVoid, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | FLOAT_TYPE { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | INT_TYPE { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | BOOL_TYPE { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 1, false, false, 0, $1.line }; - $$ = t; - } -// | UNSIGNED INT_TYPE { -// PACK_UNPACK_ONLY("unsigned", $1.line); -// TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; -// TPublicType t = { EbtInt, qual, 1, false, false, 0, $1.line }; -// $$ = t; -// } - | VEC2 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 2, false, false, 0, $1.line }; - $$ = t; - } - | VEC3 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 3, false, false, 0, $1.line }; - $$ = t; - } - | VEC4 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 4, false, false, 0, $1.line }; - $$ = t; - } - | BVEC2 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 2, false, false, 0, $1.line }; - $$ = t; - } - | BVEC3 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 3, false, false, 0, $1.line }; - $$ = t; - } - | BVEC4 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtBool, qual, 4, false, false, 0, $1.line }; - $$ = t; - } - | IVEC2 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 2, false, false, 0, $1.line }; - $$ = t; - } - | IVEC3 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 3, false, false, 0, $1.line }; - $$ = t; - } - | IVEC4 { - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtInt, qual, 4, false, false, 0, $1.line }; - $$ = t; - } - | MATRIX2 { - FRAG_VERT_ONLY("mat2", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 2, true, false, 0, $1.line }; - $$ = t; - } - | MATRIX3 { - FRAG_VERT_ONLY("mat3", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 3, true, false, 0, $1.line }; - $$ = t; - } - | MATRIX4 { - FRAG_VERT_ONLY("mat4", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtFloat, qual, 4, true, false, 0, $1.line }; - $$ = t; - } - | SAMPLER1D { - FRAG_VERT_ONLY("sampler1D", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler1D, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | SAMPLER2D { - FRAG_VERT_ONLY("sampler2D", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler2D, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | SAMPLER3D { - FRAG_VERT_ONLY("sampler3D", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler3D, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | SAMPLERCUBE { - FRAG_VERT_ONLY("samplerCube", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSamplerCube, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | SAMPLER1DSHADOW { - FRAG_VERT_ONLY("sampler1DShadow", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler1DShadow, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | SAMPLER2DSHADOW { - FRAG_VERT_ONLY("sampler2DShadow", $1.line); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtSampler2DShadow, qual, 1, false, false, 0, $1.line }; - $$ = t; - } - | struct_specifier { - FRAG_VERT_ONLY("struct", $1.line); - $$ = $1; - $$.qualifier = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - } - | TYPE_NAME { - // - // This is for user defined type names. The lexical phase looked up the - // type. - // - TType& structure = static_cast($1.symbol)->getType(); - TQualifier qual = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - TPublicType t = { EbtStruct, qual, 1, false, false, &structure, $1.line }; - $$ = t; - } - ; - -struct_specifier - : STRUCT IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($4, *$2.string); - TVariable* userTypeDef = new TVariable($2.string, *structure, true); - if (! parseContext.symbolTable.insert(*userTypeDef)) { - parseContext.error($2.line, "redefinition", $2.string->c_str(), "struct"); - parseContext.recover(); - } - TPublicType t = { EbtStruct, EvqTemporary, 1, false, false, structure, $1.line }; - $$ = t; - } - | STRUCT LEFT_BRACE struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($3, TString("")); - TPublicType t = { EbtStruct, EvqTemporary, 1, false, false, structure, $1.line }; - $$ = t; - } - ; - -struct_declaration_list - : struct_declaration { - $$ = $1; - } - | struct_declaration_list struct_declaration { - $$ = $1; - for (unsigned int i = 0; i < $2->size(); ++i) { - for (unsigned int j = 0; j < $$->size(); ++j) { - if ((*$$)[j].type->getFieldName() == (*$2)[i].type->getFieldName()) { - parseContext.error((*$2)[i].line, "duplicate field name in structure:", "struct", (*$2)[i].type->getFieldName().c_str()); - parseContext.recover(); - } - } - $$->push_back((*$2)[i]); - } - } - ; - -struct_declaration - : type_specifier struct_declarator_list SEMICOLON { - $$ = $2; - - if (parseContext.voidErrorCheck($1.line, (*$2)[0].type->getFieldName(), $1)) { - parseContext.recover(); - } - for (unsigned int i = 0; i < $$->size(); ++i) { - // - // Careful not to replace already know aspects of type, like array-ness - // - (*$$)[i].type->setType($1.type, $1.size, $1.matrix, $1.userDef); - if ($1.userDef) - (*$$)[i].type->setTypeName($1.userDef->getTypeName()); - } - } - ; - -struct_declarator_list - : struct_declarator { - $$ = NewPoolTTypeList(); - $$->push_back($1); - } - | struct_declarator_list COMMA struct_declarator { - $$->push_back($3); - } - ; - -struct_declarator - : IDENTIFIER { - $$.type = new TType(EbtVoid); - $$.line = $1.line; - $$.type->setFieldName(*$1.string); - } - | IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET { - $$.type = new TType(EbtVoid); - $$.line = $1.line; - $$.type->setFieldName(*$1.string); - - if ($3->getAsConstantUnion() == 0 || $3->getAsConstantUnion()->getBasicType() != EbtInt || - $3->getAsConstantUnion()->getUnionArrayPointer()->iConst <= 0) { - parseContext.error($2.line, "structure field array size must be a positive integer", $1.string->c_str(), ""); - parseContext.recover(); - } else { - $$.type->setArraySize($3->getAsConstantUnion()->getUnionArrayPointer()->iConst); - } - } - ; - -initializer - : assignment_expression { $$ = $1; } - ; - -declaration_statement - : declaration { $$ = $1; } - ; - -statement - : compound_statement { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -// Grammar Note: No labeled statements; 'goto' is not supported. - -simple_statement - : declaration_statement { $$ = $1; } - | expression_statement { $$ = $1; } - | selection_statement { $$ = $1; } - | iteration_statement { $$ = $1; } - | jump_statement { $$ = $1; } - ; - -compound_statement - : LEFT_BRACE RIGHT_BRACE { $$ = 0; } - | LEFT_BRACE { parseContext.symbolTable.push(); } statement_list { parseContext.symbolTable.pop(); } RIGHT_BRACE { - if ($3 != 0) - $3->setOperator(EOpSequence); - $$ = $3; - } - ; - -statement_no_new_scope - : compound_statement_no_new_scope { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -compound_statement_no_new_scope - // Statement that doesn't create a new scope, for selection_statement, iteration_statement - : LEFT_BRACE RIGHT_BRACE { - $$ = 0; - } - | LEFT_BRACE statement_list RIGHT_BRACE { - if ($2) - $2->setOperator(EOpSequence); - $$ = $2; - } - ; - -statement_list - : statement { - $$ = parseContext.intermediate.makeAggregate($1, 0); - } - | statement_list statement { - $$ = parseContext.intermediate.growAggregate($1, $2, 0); - } - ; - -expression_statement - : SEMICOLON { $$ = 0; } - | expression SEMICOLON { $$ = static_cast($1); } - ; - -selection_statement - : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { - if (parseContext.boolErrorCheck($1.line, $3)) - parseContext.recover(); - $$ = parseContext.intermediate.addSelection($3, $5, $1.line); - } - ; - -selection_rest_statement - : statement ELSE statement { - $$.node1 = $1; - $$.node2 = $3; - } - | statement { - $$.node1 = $1; - $$.node2 = 0; - } - ; - -// Grammar Note: No 'switch'. Switch statements not supported. - -condition - // In 1996 c++ draft, conditions can include single declarations - : expression { - $$ = $1; - if (parseContext.boolErrorCheck($1->getLine(), $1)) - parseContext.recover(); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - TIntermNode* intermNode; - if (parseContext.structQualifierErrorCheck($2.line, $1)) - parseContext.recover(); - if (parseContext.boolErrorCheck($2.line, $1)) - parseContext.recover(); - - if (!parseContext.executeInitializer($2.line, *$2.string, $1, $4, intermNode)) - $$ = $4; - else { - parseContext.recover(); - $$ = 0; - } - } - ; - -iteration_statement - : WHILE LEFT_PAREN { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; } condition RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(); - $$ = parseContext.intermediate.addLoop($6, $4, 0, true, $1.line); - --parseContext.loopNestingLevel; - } - | DO { ++parseContext.loopNestingLevel; } statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON { - if (parseContext.boolErrorCheck($8.line, $6)) - parseContext.recover(); - - $$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.line); - --parseContext.loopNestingLevel; - } - | FOR LEFT_PAREN { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; } for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(); - $$ = parseContext.intermediate.makeAggregate($4, $2.line); - $$ = parseContext.intermediate.growAggregate( - $$, - parseContext.intermediate.addLoop($7, reinterpret_cast($5.node1), reinterpret_cast($5.node2), true, $1.line), - $1.line); - $$->getAsAggregate()->setOperator(EOpSequence); - --parseContext.loopNestingLevel; - } - ; - -for_init_statement - : expression_statement { - $$ = $1; - } - | declaration_statement { - $$ = $1; - } - ; - -conditionopt - : condition { - $$ = $1; - } - | /* May be null */ { - $$ = 0; - } - ; - -for_rest_statement - : conditionopt SEMICOLON { - $$.node1 = $1; - $$.node2 = 0; - } - | conditionopt SEMICOLON expression { - $$.node1 = $1; - $$.node2 = $3; - } - ; - -jump_statement - : CONTINUE SEMICOLON { - if (parseContext.loopNestingLevel <= 0) { - parseContext.error($1.line, "continue statement only allowed in loops", "", ""); - parseContext.recover(); - } - $$ = parseContext.intermediate.addBranch(EOpContinue, $1.line); - } - | BREAK SEMICOLON { - if (parseContext.loopNestingLevel <= 0) { - parseContext.error($1.line, "break statement only allowed in loops", "", ""); - parseContext.recover(); - } - $$ = parseContext.intermediate.addBranch(EOpBreak, $1.line); - } - | RETURN SEMICOLON { - $$ = parseContext.intermediate.addBranch(EOpReturn, $1.line); - if (parseContext.currentFunctionType->getBasicType() != EbtVoid) { - parseContext.error($1.line, "non-void function must return a value", "return", ""); - parseContext.recover(); - } - } - | RETURN expression SEMICOLON { - $$ = parseContext.intermediate.addBranch(EOpReturn, $2, $1.line); - parseContext.functionReturnsValue = true; - if (parseContext.currentFunctionType->getBasicType() == EbtVoid) { - parseContext.error($1.line, "void function cannot return a value", "return", ""); - parseContext.recover(); - } else if (*(parseContext.currentFunctionType) != $2->getType()) { - parseContext.error($1.line, "function return is not matching type:", "return", ""); - parseContext.recover(); - } - } - | DISCARD SEMICOLON { - FRAG_ONLY("discard", $1.line); - $$ = parseContext.intermediate.addBranch(EOpKill, $1.line); - } - ; - -// Grammar Note: No 'goto'. Gotos are not supported. - -translation_unit - : external_declaration { - $$ = $1; - parseContext.treeRoot = $$; - } - | translation_unit external_declaration { - $$ = parseContext.intermediate.growAggregate($1, $2, 0); - parseContext.treeRoot = $$; - } - ; - -external_declaration - : function_definition { - $$ = $1; - } - | declaration { - $$ = $1; - } - ; - -function_definition - : function_prototype { - TFunction& function = *($1.function); - TFunction* prevDec = static_cast(parseContext.symbolTable.find(function.getMangledName())); - // - // Note: 'prevDec' could be 'function' if this is the first time we've seen function - // as it would have just been put in the symbol table. Otherwise, we're looking up - // an earlier occurance. - // - if (prevDec->isDefined()) { - // - // Then this function already has a body. - // - parseContext.error($1.line, "function already has a body", function.getName().c_str(), ""); - parseContext.recover(); - } - prevDec->setDefined(); - - // - // Raise error message if main function takes any parameters or return anything other than void - // - if (function.getName() == "main") { - if (function.getParamCount() > 0) { - parseContext.error($1.line, "function cannot take any parameter(s)", function.getName().c_str(), ""); - parseContext.recover(); - } - if (function.getReturnType().getBasicType() != EbtVoid) { - parseContext.error($1.line, "", function.getReturnType().getBasicString(), "main function cannot return a value" ); - parseContext.recover(); - } - } - - // - // New symbol table scope for body of function plus its arguments - // - parseContext.symbolTable.push(); - - // - // Remember the return type for later checking for RETURN statements. - // - parseContext.currentFunctionType = &(prevDec->getReturnType()); - parseContext.functionReturnsValue = false; - - // - // Insert parameters into the symbol table. - // If the parameter has no name, it's not an error, just don't insert it - // (could be used for unused args). - // - // Also, accumulate the list of parameters into the HIL, so lower level code - // knows where to find parameters. - // - TIntermAggregate* paramNodes = new TIntermAggregate; - for (int i = 0; i < function.getParamCount(); i++) { - TParameter& param = function[i]; - if (param.name != 0) { - TVariable *variable = new TVariable(param.name, *param.type); - // - // Insert the parameters with name in the symbol table. - // - if (! parseContext.symbolTable.insert(*variable)) { - parseContext.error($1.line, "redefinition", variable->getName().c_str(), ""); - parseContext.recover(); - delete variable; - } - // - // Transfer ownership of name pointer to symbol table. - // - param.name = 0; - - // - // Add the parameter to the HIL - // - paramNodes = parseContext.intermediate.growAggregate( - paramNodes, - parseContext.intermediate.addSymbol(variable->getUniqueId(), - variable->getName(), - variable->getType(), $1.line), - $1.line); - } else { - paramNodes = parseContext.intermediate.growAggregate(paramNodes, parseContext.intermediate.addSymbol(0, "", *param.type, $1.line), $1.line); - } - } - parseContext.intermediate.setAggregateOperator(paramNodes, EOpParameters, $1.line); - $1.intermAggregate = paramNodes; - parseContext.loopNestingLevel = 0; - } - compound_statement_no_new_scope { - //?? Check that all paths return a value if return type != void ? - // May be best done as post process phase on intermediate code - if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) { - parseContext.error($1.line, "function does not return a value:", "", $1.function->getName().c_str()); - parseContext.recover(); - } - parseContext.symbolTable.pop(); - $$ = parseContext.intermediate.growAggregate($1.intermAggregate, $3, 0); - parseContext.intermediate.setAggregateOperator($$, EOpFunction, $1.line); - $$->getAsAggregate()->setName($1.function->getMangledName().c_str()); - $$->getAsAggregate()->setType($1.function->getReturnType()); - - // store the pragma information for debug and optimize and other vendor specific - // information. This information can be queried from the parse tree - $$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); - $$->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - $$->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); - } - ; - -%% diff --git a/src/mesa/shader/slang/MachineIndependent/glslang_tab.h b/src/mesa/shader/slang/MachineIndependent/glslang_tab.h deleted file mode 100755 index 97d827fe90..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/glslang_tab.h +++ /dev/null @@ -1,260 +0,0 @@ -/* A Bison parser, made by GNU Bison 1.875. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - CONST_QUAL = 259, - BOOL_TYPE = 260, - FLOAT_TYPE = 261, - INT_TYPE = 262, - BREAK = 263, - CONTINUE = 264, - DO = 265, - ELSE = 266, - FOR = 267, - IF = 268, - DISCARD = 269, - RETURN = 270, - BVEC2 = 271, - BVEC3 = 272, - BVEC4 = 273, - IVEC2 = 274, - IVEC3 = 275, - IVEC4 = 276, - VEC2 = 277, - VEC3 = 278, - VEC4 = 279, - MATRIX2 = 280, - MATRIX3 = 281, - MATRIX4 = 282, - IN_QUAL = 283, - OUT_QUAL = 284, - INOUT_QUAL = 285, - UNIFORM = 286, - VARYING = 287, - STRUCT = 288, - VOID_TYPE = 289, - WHILE = 290, - SAMPLER1D = 291, - SAMPLER2D = 292, - SAMPLER3D = 293, - SAMPLERCUBE = 294, - SAMPLER1DSHADOW = 295, - SAMPLER2DSHADOW = 296, - IDENTIFIER = 297, - TYPE_NAME = 298, - FLOATCONSTANT = 299, - INTCONSTANT = 300, - BOOLCONSTANT = 301, - FIELD_SELECTION = 302, - LEFT_OP = 303, - RIGHT_OP = 304, - INC_OP = 305, - DEC_OP = 306, - LE_OP = 307, - GE_OP = 308, - EQ_OP = 309, - NE_OP = 310, - AND_OP = 311, - OR_OP = 312, - XOR_OP = 313, - MUL_ASSIGN = 314, - DIV_ASSIGN = 315, - ADD_ASSIGN = 316, - MOD_ASSIGN = 317, - LEFT_ASSIGN = 318, - RIGHT_ASSIGN = 319, - AND_ASSIGN = 320, - XOR_ASSIGN = 321, - OR_ASSIGN = 322, - SUB_ASSIGN = 323, - LEFT_PAREN = 324, - RIGHT_PAREN = 325, - LEFT_BRACKET = 326, - RIGHT_BRACKET = 327, - LEFT_BRACE = 328, - RIGHT_BRACE = 329, - DOT = 330, - COMMA = 331, - COLON = 332, - EQUAL = 333, - SEMICOLON = 334, - BANG = 335, - DASH = 336, - TILDE = 337, - PLUS = 338, - STAR = 339, - SLASH = 340, - PERCENT = 341, - LEFT_ANGLE = 342, - RIGHT_ANGLE = 343, - VERTICAL_BAR = 344, - CARET = 345, - AMPERSAND = 346, - QUESTION = 347 - }; -#endif -#define ATTRIBUTE 258 -#define CONST_QUAL 259 -#define BOOL_TYPE 260 -#define FLOAT_TYPE 261 -#define INT_TYPE 262 -#define BREAK 263 -#define CONTINUE 264 -#define DO 265 -#define ELSE 266 -#define FOR 267 -#define IF 268 -#define DISCARD 269 -#define RETURN 270 -#define BVEC2 271 -#define BVEC3 272 -#define BVEC4 273 -#define IVEC2 274 -#define IVEC3 275 -#define IVEC4 276 -#define VEC2 277 -#define VEC3 278 -#define VEC4 279 -#define MATRIX2 280 -#define MATRIX3 281 -#define MATRIX4 282 -#define IN_QUAL 283 -#define OUT_QUAL 284 -#define INOUT_QUAL 285 -#define UNIFORM 286 -#define VARYING 287 -#define STRUCT 288 -#define VOID_TYPE 289 -#define WHILE 290 -#define SAMPLER1D 291 -#define SAMPLER2D 292 -#define SAMPLER3D 293 -#define SAMPLERCUBE 294 -#define SAMPLER1DSHADOW 295 -#define SAMPLER2DSHADOW 296 -#define IDENTIFIER 297 -#define TYPE_NAME 298 -#define FLOATCONSTANT 299 -#define INTCONSTANT 300 -#define BOOLCONSTANT 301 -#define FIELD_SELECTION 302 -#define LEFT_OP 303 -#define RIGHT_OP 304 -#define INC_OP 305 -#define DEC_OP 306 -#define LE_OP 307 -#define GE_OP 308 -#define EQ_OP 309 -#define NE_OP 310 -#define AND_OP 311 -#define OR_OP 312 -#define XOR_OP 313 -#define MUL_ASSIGN 314 -#define DIV_ASSIGN 315 -#define ADD_ASSIGN 316 -#define MOD_ASSIGN 317 -#define LEFT_ASSIGN 318 -#define RIGHT_ASSIGN 319 -#define AND_ASSIGN 320 -#define XOR_ASSIGN 321 -#define OR_ASSIGN 322 -#define SUB_ASSIGN 323 -#define LEFT_PAREN 324 -#define RIGHT_PAREN 325 -#define LEFT_BRACKET 326 -#define RIGHT_BRACKET 327 -#define LEFT_BRACE 328 -#define RIGHT_BRACE 329 -#define DOT 330 -#define COMMA 331 -#define COLON 332 -#define EQUAL 333 -#define SEMICOLON 334 -#define BANG 335 -#define DASH 336 -#define TILDE 337 -#define PLUS 338 -#define STAR 339 -#define SLASH 340 -#define PERCENT 341 -#define LEFT_ANGLE 342 -#define RIGHT_ANGLE 343 -#define VERTICAL_BAR 344 -#define CARET 345 -#define AMPERSAND 346 -#define QUESTION 347 - - - - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 117 "glslang.y" -typedef union YYSTYPE { - struct { - TSourceLoc line; - union { - TString *string; - float f; - int i; - bool b; - }; - TSymbol* symbol; - } lex; - struct { - TSourceLoc line; - TOperator op; - union { - TIntermNode* intermNode; - TIntermNodePair nodePair; - TIntermTyped* intermTypedNode; - TIntermAggregate* intermAggregate; - }; - union { - TPublicType type; - TQualifier qualifier; - TFunction* function; - TParameter param; - TTypeLine typeLine; - TTypeList* typeList; - }; - } interm; -} YYSTYPE; -/* Line 1240 of yacc.c. */ -#line 251 "glslang.tab.h" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - - - diff --git a/src/mesa/shader/slang/MachineIndependent/intermOut.cpp b/src/mesa/shader/slang/MachineIndependent/intermOut.cpp deleted file mode 100755 index e75608c45a..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/intermOut.cpp +++ /dev/null @@ -1,496 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "localintermediate.h" -#include "../Include/ShHandle.h" - -// -// Two purposes: -// 1. Show an example of how to iterate tree. Functions can -// also directly call Traverse() on children themselves to -// have finer grained control over the process than shown here. -// See the last function for how to get started. -// 2. Print out a text based description of the tree. -// - -// -// Use this class to carry along data from node to node in -// the traversal -// -class TOutputTraverser : public TIntermTraverser { -public: - TOutputTraverser(TInfoSink& i) : infoSink(i) { } - TInfoSink& infoSink; -}; - -TString TType::getCompleteString() const -{ - char buf[100]; - char *p = &buf[0]; - - if (qualifier != EvqTemporary && qualifier != EvqGlobal) - p += sprintf(p, "%s ", getQualifierString()); - if (array) - p += sprintf(p, "array of "); - if (matrix) - p += sprintf(p, "%dX%d matrix of ", size, size); - else if (size > 1) - p += sprintf(p, "%d-component vector of ", size); - - sprintf(p, "%s", getBasicString()); - - return TString(buf); -} - -// -// Helper functions for printing, not part of traversing. -// - -void OutputTreeText(TInfoSink& infoSink, TIntermNode* node, const int depth) -{ - int i; - - infoSink.debug << FormatSourceLoc(node->getLine()); - - for (i = 0; i < depth; ++i) - infoSink.debug << " "; -} - -// -// The rest of the file are the traversal functions. The last one -// is the one that starts the traversal. -// -// Return true from interior nodes to have the external traversal -// continue on to children. If you process children yourself, -// return false. -// - -void OutputSymbol(TIntermSymbol* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - - OutputTreeText(oit->infoSink, node, oit->depth); - - char buf[100]; - sprintf(buf, "'%s' (%s)\n", - node->getSymbol().c_str(), - node->getCompleteString().c_str()); - - oit->infoSink.debug << buf; -} - -bool OutputBinary(bool /* preVisit */, TIntermBinary* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - - OutputTreeText(out, node, oit->depth); - - switch (node->getOp()) { - case EOpAssign: out.debug << "move second child to first child"; break; - case EOpAddAssign: out.debug << "add second child into first child"; break; - case EOpSubAssign: out.debug << "subtract second child into first child"; break; - case EOpMulAssign: out.debug << "multiply second child into first child"; break; - case EOpVectorTimesMatrixAssign: out.debug << "matrix mult second child into first child"; break; - case EOpVectorTimesScalarAssign: out.debug << "vector scale second child into first child"; break; - case EOpMatrixTimesScalarAssign: out.debug << "matrix scale second child into first child"; break; - case EOpMatrixTimesMatrixAssign: out.debug << "matrix mult second child into first child"; break; - case EOpDivAssign: out.debug << "divide second child into first child"; break; - case EOpModAssign: out.debug << "mod second child into first child"; break; - case EOpAndAssign: out.debug << "and second child into first child"; break; - case EOpInclusiveOrAssign: out.debug << "or second child into first child"; break; - case EOpExclusiveOrAssign: out.debug << "exclusive or second child into first child"; break; - case EOpLeftShiftAssign: out.debug << "left shift second child into first child"; break; - case EOpRightShiftAssign: out.debug << "right shift second child into first child"; break; - - case EOpIndexDirect: out.debug << "direct index"; break; - case EOpIndexIndirect: out.debug << "indirect index"; break; - case EOpIndexDirectStruct: out.debug << "direct index for structure"; break; - case EOpVectorSwizzle: out.debug << "vector swizzle"; break; - - case EOpAdd: out.debug << "add"; break; - case EOpSub: out.debug << "subtract"; break; - case EOpMul: out.debug << "component-wise multiply"; break; - case EOpDiv: out.debug << "divide"; break; - case EOpMod: out.debug << "mod"; break; - case EOpRightShift: out.debug << "right-shift"; break; - case EOpLeftShift: out.debug << "left-shift"; break; - case EOpAnd: out.debug << "bitwise and"; break; - case EOpInclusiveOr: out.debug << "inclusive-or"; break; - case EOpExclusiveOr: out.debug << "exclusive-or"; break; - case EOpEqual: out.debug << "Compare Equal"; break; - case EOpNotEqual: out.debug << "Compare Not Equal"; break; - case EOpLessThan: out.debug << "Compare Less Than"; break; - case EOpGreaterThan: out.debug << "Compare Greater Than"; break; - case EOpLessThanEqual: out.debug << "Compare Less Than or Equal"; break; - case EOpGreaterThanEqual: out.debug << "Compare Greater Than or Equal"; break; - - case EOpVectorTimesScalar: out.debug << "vector-scale"; break; - case EOpVectorTimesMatrix: out.debug << "vector-times-matrix"; break; - case EOpMatrixTimesVector: out.debug << "matrix-times-vector"; break; - case EOpMatrixTimesScalar: out.debug << "matrix-scale"; break; - case EOpMatrixTimesMatrix: out.debug << "matrix-multiply"; break; - - case EOpLogicalOr: out.debug << "logical-or"; break; - case EOpLogicalXor: out.debug << "logical-xor"; break; - case EOpLogicalAnd: out.debug << "logical-and"; break; - default: out.debug << ""; - } - - out.debug << " (" << node->getCompleteString() << ")"; - - out.debug << "\n"; - - return true; -} - -bool OutputUnary(bool /* preVisit */, TIntermUnary* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - - OutputTreeText(out, node, oit->depth); - - switch (node->getOp()) { - case EOpNegative: out.debug << "Negate value"; break; - case EOpVectorLogicalNot: - case EOpLogicalNot: out.debug << "Negate conditional"; break; - case EOpBitwiseNot: out.debug << "Bitwise not"; break; - - case EOpPostIncrement: out.debug << "Post-Increment"; break; - case EOpPostDecrement: out.debug << "Post-Decrement"; break; - case EOpPreIncrement: out.debug << "Pre-Increment"; break; - case EOpPreDecrement: out.debug << "Pre-Decrement"; break; - - case EOpConvIntToBool: out.debug << "Convert int to bool"; break; - case EOpConvFloatToBool:out.debug << "Convert float to bool";break; - case EOpConvBoolToFloat:out.debug << "Convert bool to float";break; - case EOpConvIntToFloat: out.debug << "Convert int to float"; break; - case EOpConvFloatToInt: out.debug << "Convert float to int"; break; - case EOpConvBoolToInt: out.debug << "Convert bool to int"; break; - - case EOpRadians: out.debug << "radians"; break; - case EOpDegrees: out.debug << "degrees"; break; - case EOpSin: out.debug << "sine"; break; - case EOpCos: out.debug << "cosine"; break; - case EOpTan: out.debug << "tangent"; break; - case EOpAsin: out.debug << "arc sine"; break; - case EOpAcos: out.debug << "arc cosine"; break; - case EOpAtan: out.debug << "arc tangent"; break; - - case EOpExp: out.debug << "exp"; break; - case EOpLog: out.debug << "log"; break; - case EOpExp2: out.debug << "exp2"; break; - case EOpLog2: out.debug << "log2"; break; - case EOpSqrt: out.debug << "sqrt"; break; - case EOpInverseSqrt: out.debug << "inverse sqrt"; break; - - case EOpAbs: out.debug << "Absolute value"; break; - case EOpSign: out.debug << "Sign"; break; - case EOpFloor: out.debug << "Floor"; break; - case EOpCeil: out.debug << "Ceiling"; break; - case EOpFract: out.debug << "Fraction"; break; - - case EOpLength: out.debug << "length"; break; - case EOpNormalize: out.debug << "normalize"; break; - case EOpDPdx: out.debug << "dPdx"; break; - case EOpDPdy: out.debug << "dPdy"; break; - case EOpFwidth: out.debug << "fwidth"; break; - - case EOpAny: out.debug << "any"; break; - case EOpAll: out.debug << "all"; break; - - default: out.debug.message(EPrefixError, "Bad unary op"); - } - - out.debug << " (" << node->getCompleteString() << ")"; - - out.debug << "\n"; - - return true; -} - -bool OutputAggregate(bool /* preVisit */, TIntermAggregate* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - - if (node->getOp() == EOpNull) { - out.debug.message(EPrefixError, "node is still EOpNull!"); - return true; - } - - OutputTreeText(out, node, oit->depth); - - switch (node->getOp()) { - case EOpSequence: out.debug << "Sequence\n"; return true; - case EOpComma: out.debug << "Comma\n"; return true; - case EOpFunction: out.debug << "Function Definition: " << node->getName(); break; - case EOpFunctionCall: out.debug << "Function Call: " << node->getName(); break; - case EOpParameters: out.debug << "Function Parameters: "; break; - - case EOpConstructFloat: out.debug << "Construct float"; break; - case EOpConstructVec2: out.debug << "Construct vec2"; break; - case EOpConstructVec3: out.debug << "Construct vec3"; break; - case EOpConstructVec4: out.debug << "Construct vec4"; break; - case EOpConstructBool: out.debug << "Construct bool"; break; - case EOpConstructBVec2: out.debug << "Construct bvec2"; break; - case EOpConstructBVec3: out.debug << "Construct bvec3"; break; - case EOpConstructBVec4: out.debug << "Construct bvec4"; break; - case EOpConstructInt: out.debug << "Construct int"; break; - case EOpConstructIVec2: out.debug << "Construct ivec2"; break; - case EOpConstructIVec3: out.debug << "Construct ivec3"; break; - case EOpConstructIVec4: out.debug << "Construct ivec4"; break; - case EOpConstructMat2: out.debug << "Construct mat2"; break; - case EOpConstructMat3: out.debug << "Construct mat3"; break; - case EOpConstructMat4: out.debug << "Construct mat4"; break; - case EOpConstructStruct: out.debug << "Construct structure"; break; - - case EOpLessThan: out.debug << "Compare Less Than"; break; - case EOpGreaterThan: out.debug << "Compare Greater Than"; break; - case EOpLessThanEqual: out.debug << "Compare Less Than or Equal"; break; - case EOpGreaterThanEqual: out.debug << "Compare Greater Than or Equal"; break; - case EOpVectorEqual: out.debug << "Equal"; break; - case EOpVectorNotEqual: out.debug << "NotEqual"; break; - - case EOpMod: out.debug << "mod"; break; - case EOpPow: out.debug << "pow"; break; - - case EOpAtan: out.debug << "arc tangent"; break; - - case EOpMin: out.debug << "min"; break; - case EOpMax: out.debug << "max"; break; - case EOpClamp: out.debug << "clamp"; break; - case EOpMix: out.debug << "mix"; break; - case EOpStep: out.debug << "step"; break; - case EOpSmoothStep: out.debug << "smoothstep"; break; - - case EOpDistance: out.debug << "distance"; break; - case EOpDot: out.debug << "dot-product"; break; - case EOpCross: out.debug << "cross-product"; break; - case EOpFaceForward: out.debug << "face-forward"; break; - case EOpReflect: out.debug << "reflect"; break; - case EOpRefract: out.debug << "refract"; break; - case EOpMul: out.debug << "component-wise multiply"; break; - - case EOpItof: out.debug << "itof"; break; - case EOpFtoi: out.debug << "ftoi"; break; - case EOpSkipPixels: out.debug << "skipPixels"; break; - case EOpReadInput: out.debug << "readInput"; break; - case EOpWritePixel: out.debug << "writePixel"; break; - case EOpBitmapLsb: out.debug << "bitmapLSB"; break; - case EOpBitmapMsb: out.debug << "bitmapMSB"; break; - case EOpWriteOutput: out.debug << "writeOutput"; break; - case EOpReadPixel: out.debug << "readPixel"; break; - - default: out.debug.message(EPrefixError, "Bad aggregation op"); - } - - if (node->getOp() != EOpSequence && node->getOp() != EOpParameters) - out.debug << " (" << node->getCompleteString() << ")"; - - out.debug << "\n"; - - return true; -} - -bool OutputSelection(bool /* preVisit */, TIntermSelection* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - - OutputTreeText(out, node, oit->depth); - - out.debug << "Test condition and select"; - out.debug << " (" << node->getCompleteString() << ")\n"; - - ++oit->depth; - - OutputTreeText(oit->infoSink, node, oit->depth); - out.debug << "Condition\n"; - node->getCondition()->traverse(it); - - OutputTreeText(oit->infoSink, node, oit->depth); - if (node->getTrueBlock()) { - out.debug << "true case\n"; - node->getTrueBlock()->traverse(it); - } else - out.debug << "true case is null\n"; - - if (node->getFalseBlock()) { - OutputTreeText(oit->infoSink, node, oit->depth); - out.debug << "false case\n"; - node->getFalseBlock()->traverse(it); - } - - --oit->depth; - - return false; -} - -void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - - int size = 0; - if (node->getType().getBasicType() == EbtStruct) - size = node->getType().getStructSize(); - else - size = node->getType().getInstanceSize(); - - for (int i = 0; i < size; i++) { - OutputTreeText(out, node, oit->depth); - switch (node->getType().getBasicType()) { - case EbtBool: - if (node->getUnionArrayPointer()[i].bConst) - out.debug << "true"; - else - out.debug << "false"; - - out.debug << " (" << "const bool" << ")"; - - out.debug << "\n"; - break; - case EbtFloat: - { - char buf[300]; - sprintf(buf, "%f (%s)", node->getUnionArrayPointer()[i].fConst, "const float"); - - out.debug << buf << "\n"; - } - break; - case EbtInt: - { - char buf[300]; - sprintf(buf, "%d (%s)", node->getUnionArrayPointer()[i].iConst, "const int"); - - out.debug << buf << "\n"; - break; - } - default: - out.info.message(EPrefixInternalError, "Unknown constant", node->getLine()); - break; - } - } -} - -bool OutputLoop(bool /* preVisit */, TIntermLoop* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - - OutputTreeText(out, node, oit->depth); - - out.debug << "Loop with condition "; - if (! node->testFirst()) - out.debug << "not "; - out.debug << "tested first\n"; - - ++oit->depth; - - OutputTreeText(oit->infoSink, node, oit->depth); - if (node->getTest()) { - out.debug << "Loop Condition\n"; - node->getTest()->traverse(it); - } else - out.debug << "No loop condition\n"; - - OutputTreeText(oit->infoSink, node, oit->depth); - if (node->getBody()) { - out.debug << "Loop Body\n"; - node->getBody()->traverse(it); - } else - out.debug << "No loop body\n"; - - if (node->getTerminal()) { - OutputTreeText(oit->infoSink, node, oit->depth); - out.debug << "Loop Terminal Expression\n"; - node->getTerminal()->traverse(it); - } - - --oit->depth; - - return false; -} - -bool OutputBranch(bool /* previsit*/, TIntermBranch* node, TIntermTraverser* it) -{ - TOutputTraverser* oit = static_cast(it); - TInfoSink& out = oit->infoSink; - - OutputTreeText(out, node, oit->depth); - - switch (node->getFlowOp()) { - case EOpKill: out.debug << "Branch: Kill"; break; - case EOpBreak: out.debug << "Branch: Break"; break; - case EOpContinue: out.debug << "Branch: Continue"; break; - case EOpReturn: out.debug << "Branch: Return"; break; - default: out.debug << "Branch: Unknown Branch"; break; - } - - if (node->getExpression()) { - out.debug << " with expression\n"; - ++oit->depth; - node->getExpression()->traverse(it); - --oit->depth; - } else - out.debug << "\n"; - - return false; -} - -// -// This function is the one to call externally to start the traversal. -// Individual functions can be initialized to 0 to skip processing of that -// type of node. It's children will still be processed. -// -void TIntermediate::outputTree(TIntermNode* root) -{ - if (root == 0) - return; - - TOutputTraverser it(infoSink); - - it.visitAggregate = OutputAggregate; - it.visitBinary = OutputBinary; - it.visitConstantUnion = OutputConstantUnion; - it.visitSelection = OutputSelection; - it.visitSymbol = OutputSymbol; - it.visitUnary = OutputUnary; - it.visitLoop = OutputLoop; - it.visitBranch = OutputBranch; - - root->traverse(&it); -} diff --git a/src/mesa/shader/slang/MachineIndependent/localintermediate.h b/src/mesa/shader/slang/MachineIndependent/localintermediate.h deleted file mode 100755 index 5b4e5ea118..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/localintermediate.h +++ /dev/null @@ -1,91 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef _LOCAL_INTERMEDIATE_INCLUDED_ -#define _LOCAL_INTERMEDIATE_INCLUDED_ - -#include "../Include/intermediate.h" -#include "../Public/ShaderLang.h" -#include "SymbolTable.h" - -struct TVectorFields { - int offsets[4]; - int num; -}; - -// -// Set of helper functions to help parse and build the tree. -// -class TInfoSink; -class TIntermediate { -public: - POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) - - TIntermediate(TInfoSink& i) : infoSink(i) { } - TIntermSymbol* addSymbol(int Id, const TString&, const TType&, TSourceLoc); - TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*); - TIntermTyped* addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc, TSymbolTable&); - TIntermTyped* addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc); - TIntermTyped* addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc); - TIntermTyped* addUnaryMath(TOperator op, TIntermNode* child, TSourceLoc, TSymbolTable&); - TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, TSourceLoc); - TIntermAggregate* makeAggregate(TIntermNode* node, TSourceLoc); - TIntermAggregate* setAggregateOperator(TIntermNode*, TOperator, TSourceLoc); - TIntermNode* addSelection(TIntermTyped* cond, TIntermNodePair code, TSourceLoc); - TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc); - TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc); - TIntermConstantUnion* addConstantUnion(constUnion*, const TType&, TSourceLoc); - TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) ; - TIntermTyped* copyConstUnion(TIntermConstantUnion*) ; - TIntermConstantUnion* changeAggrToTempConst(TIntermAggregate*, TSymbolTable&, TSourceLoc ); - bool parseConstTree(TSourceLoc, TIntermNode*, constUnion*, TOperator, TSymbolTable&, TType, bool singleConstantParam = false); - TIntermNode* addLoop(TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, TSourceLoc); - TIntermBranch* addBranch(TOperator, TSourceLoc); - TIntermBranch* addBranch(TOperator, TIntermTyped*, TSourceLoc); - TIntermTyped* addSwizzle(TVectorFields&, TSourceLoc); - bool postProcess(TIntermNode*, EShLanguage); - void remove(TIntermNode*); - void outputTree(TIntermNode*); - void removeChildNode(TIntermSequence&, TType&, int&, TIntermSequence::iterator&, TIntermAggregate*); - TIntermTyped* removeChildNode(TIntermTyped*, TType*, TIntermAggregate*); - bool removeMatrixConstNode(TIntermSequence&, TType&, TIntermAggregate*, int); - -protected: - TInfoSink& infoSink; - -private: - void operator=(TIntermediate&); // prevent assignments -}; - -#endif // _LOCAL_INTERMEDIATE_INCLUDED_ diff --git a/src/mesa/shader/slang/MachineIndependent/parseConst.cpp b/src/mesa/shader/slang/MachineIndependent/parseConst.cpp deleted file mode 100755 index 1ea91b3c52..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/parseConst.cpp +++ /dev/null @@ -1,344 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#include "ParseHelper.h" - -// -// Use this class to carry along data from node to node in -// the traversal -// -class TConstTraverser : public TIntermTraverser { -public: - TConstTraverser(constUnion* cUnion, bool singleConstParam, TOperator constructType, TInfoSink& sink, TSymbolTable& symTable, TType& t) : unionArray(cUnion), type(t), - constructorType(constructType), singleConstantParam(singleConstParam), infoSink(sink), symbolTable(symTable), error(false), isMatrix(false), matrixSize(0) { index = 0; tOp = EOpNull;} - int index ; - constUnion *unionArray; - TOperator tOp; - TType type; - TOperator constructorType; - bool singleConstantParam; - TInfoSink& infoSink; - TSymbolTable& symbolTable; - bool error; - int size; // size of the constructor ( 4 for vec4) - bool isMatrix; - int matrixSize; // dimension of the matrix (nominal size and not the instance size) -}; - -// -// The rest of the file are the traversal functions. The last one -// is the one that starts the traversal. -// -// Return true from interior nodes to have the external traversal -// continue on to children. If you process children yourself, -// return false. -// - -void ParseSymbol(TIntermSymbol* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - TQualifier qualifier = node->getType().getQualifier(); - constUnion* unionArray = oit->unionArray; - int instanceSize; - if (oit->type.getBasicType() == EbtStruct) - instanceSize = oit->type.getStructSize(); - else - instanceSize = oit->type.getInstanceSize(); - - if (oit->index >= instanceSize) - return; - - if (qualifier != EvqConst) { - char buf[200]; - sprintf(buf, "'constructor' : assigning non-constant to %s", oit->type.getCompleteString().c_str()); - oit->infoSink.info.message(EPrefixError, buf, node->getLine()); - oit->error = true; - return ; - } - TSymbol* symbol = oit->symbolTable.find(node->getSymbol()); - TVariable* tVar = static_cast(symbol); - - constUnion* constArray = tVar->getConstPointer(); - if (!constArray) { - char buf[200]; - sprintf(buf, "'constructor' : constant '%s' has not been initialized correctly", node->getSymbol().c_str()); - oit->infoSink.info.message(EPrefixError, buf, node->getLine()); - oit->error = true; - return; - } - int symbolSize; - - if (tVar->getType().getBasicType() == EbtStruct) - symbolSize = tVar->getType().getStructSize(); - else - symbolSize = tVar->getType().getInstanceSize(); - - // for constructors such as ivec4(vec4), if vec4 is a symbol node, then the appropriate conversion is required as the - // types do not match - for (int i = 0; i < symbolSize; i++) { - if (oit->index >= instanceSize) - return; - if (tVar->getType().getBasicType() == oit->type.getBasicType() || oit->type.getBasicType() == EbtStruct) - (unionArray[oit->index]) = constArray[i]; - else { - switch (tVar->getType().getBasicType()) { - case EbtFloat: - switch (oit->type.getBasicType()) { - case EbtInt: unionArray[oit->index].iConst = static_cast (constArray[i].fConst); break; - case EbtBool: unionArray[oit->index].bConst = constArray[i].fConst != 0.0; break; - default: oit->infoSink.info.message(EPrefixInternalError, "Incorrect type, cannot parse symbol", node->getLine()); break; - } - break; - case EbtInt: - switch (oit->type.getBasicType()) { - case EbtFloat: unionArray[oit->index].fConst = static_cast(constArray[i].iConst); break; - case EbtBool: unionArray[oit->index].bConst = constArray[i].iConst != 0 ; break; - default: oit->infoSink.info.message(EPrefixInternalError, "Incorrect type, cannot parse symbol", node->getLine()); break; - } - break; - case EbtBool: - switch (oit->type.getBasicType()) { - case EbtFloat: unionArray[oit->index].fConst = static_cast(constArray[i].bConst); break; - case EbtInt: unionArray[oit->index].iConst = static_cast (constArray[i].bConst); break; - default: oit->infoSink.info.message(EPrefixInternalError, "Incorrect type, cannot parse symbol", node->getLine()); break; - } - break; - default: oit->infoSink.info.message(EPrefixInternalError, "Incorrect type, cannot parse symbol", node->getLine()); break; - } - } - (oit->index)++; - } -} - -bool ParseBinary(bool /* preVisit */, TIntermBinary* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - - TQualifier qualifier = node->getType().getQualifier(); - - if (qualifier != EvqConst) { - char buf[200]; - sprintf(buf, "'constructor' : assigning non-constant to %s", oit->type.getCompleteString().c_str()); - oit->infoSink.info.message(EPrefixError, buf, node->getLine()); - oit->error = true; - return false; - } - - oit->infoSink.info.message(EPrefixInternalError, "Binary Node found in constant constructor", node->getLine()); - - return false; -} - -bool ParseUnary(bool /* preVisit */, TIntermUnary* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - - char buf[200]; - sprintf(buf, "'constructor' : assigning non-constant to '%s'", oit->type.getCompleteString().c_str()); - oit->infoSink.info.message(EPrefixError, buf, node->getLine()); - oit->error = true; - return false; -} - -bool ParseAggregate(bool /* preVisit */, TIntermAggregate* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - - if (!node->isConstructor() && node->getOp() != EOpComma) { - char buf[200]; - sprintf(buf, "'constructor' : assigning non-constant to '%s'", oit->type.getCompleteString().c_str()); - oit->infoSink.info.message(EPrefixError, buf, node->getLine()); - oit->error = true; - return false; - } - - if (node->getSequence().size() == 0) { - oit->error = true; - return false; - } - - bool flag = node->getSequence().size() == 1 && node->getSequence()[0]->getAsTyped()->getAsConstantUnion(); - if (flag) - { - oit->singleConstantParam = true; - oit->constructorType = node->getOp(); - if (node->getType().getBasicType() == EbtStruct) - oit->size = node->getType().getStructSize(); - else - oit->size = node->getType().getInstanceSize(); - if (node->getType().isMatrix()) { - oit->isMatrix = true; - oit->matrixSize = node->getType().getNominalSize(); - } - } - - for (TIntermSequence::iterator p = node->getSequence().begin(); - p != node->getSequence().end(); p++) { - - if (node->getOp() == EOpComma) - oit->index = 0; - - (*p)->traverse(oit); - } - if (flag) - { - oit->singleConstantParam = false; - oit->constructorType = EOpNull; - oit->size = 0; - oit->isMatrix = false; - oit->matrixSize = 0; - } - return false; -} - -bool ParseSelection(bool /* preVisit */, TIntermSelection* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - oit->infoSink.info.message(EPrefixInternalError, "Selection Node found in constant constructor", node->getLine()); - oit->error = true; - return false; -} - -void ParseConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - constUnion* leftUnionArray = oit->unionArray; - int instanceSize; - if (oit->type.getBasicType() == EbtStruct) - instanceSize = oit->type.getStructSize(); - else - instanceSize = oit->type.getInstanceSize(); - - if (oit->index >= instanceSize) - return; - - if (!oit->singleConstantParam) { - int size; - if (node->getType().getBasicType() == EbtStruct) - size = node->getType().getStructSize(); - else - size = node->getType().getInstanceSize(); - - constUnion *rightUnionArray = node->getUnionArrayPointer(); - for (int i=0; i < size; i++) { - if (oit->index >= instanceSize) - return; - leftUnionArray[oit->index] = rightUnionArray[i]; - - (oit->index)++; - } - } else { - int size, totalSize, matrixSize; - bool isMatrix = false; - size = oit->size; - matrixSize = oit->matrixSize; - isMatrix = oit->isMatrix; - totalSize = oit->index + size ; - constUnion *rightUnionArray = node->getUnionArrayPointer(); - if (!isMatrix) { - int count = 0; - for (int i = oit->index; i < totalSize; i++) { - if (i >= instanceSize) - return; - - leftUnionArray[i] = rightUnionArray[count]; - - (oit->index)++; - if (node->getType().getBasicType() == EbtStruct && node->getType().getStructSize() > 1 || - node->getType().getBasicType() != EbtStruct && node->getType().getInstanceSize() > 1) - count++; - } - } else { // for matrix constructors - int count = 0; - int index = oit->index; - for (int i = index; i < totalSize; i++) { - if (i >= instanceSize) - return; - if (index - i == 0 || (i - index) % (matrixSize + 1) == 0 ) - leftUnionArray[i] = rightUnionArray[count]; - else - leftUnionArray[i].fConst = 0.0; - - (oit->index)++; - if (node->getType().getBasicType() == EbtStruct && node->getType().getStructSize() > 1 || - node->getType().getBasicType() != EbtStruct && node->getType().getInstanceSize() > 1) - count++; - } - } - } -} - -bool ParseLoop(bool /* preVisit */, TIntermLoop* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - oit->infoSink.info.message(EPrefixInternalError, "Loop Node found in constant constructor", node->getLine()); - oit->error = true; - return false; -} - -bool ParseBranch(bool /* previsit*/, TIntermBranch* node, TIntermTraverser* it) -{ - TConstTraverser* oit = static_cast(it); - oit->infoSink.info.message(EPrefixInternalError, "Branch Node found in constant constructor", node->getLine()); - oit->error = true; - return false; -} - -// -// This function is the one to call externally to start the traversal. -// Individual functions can be initialized to 0 to skip processing of that -// type of node. It's children will still be processed. -// -bool TIntermediate::parseConstTree(TSourceLoc line, TIntermNode* root, constUnion* unionArray, TOperator constructorType, TSymbolTable& symbolTable, TType t, bool singleConstantParam) -{ - if (root == 0) - return false; - - TConstTraverser it(unionArray, singleConstantParam, constructorType, infoSink, symbolTable, t); - - it.visitAggregate = ParseAggregate; - it.visitBinary = ParseBinary; - it.visitConstantUnion = ParseConstantUnion; - it.visitSelection = ParseSelection; - it.visitSymbol = ParseSymbol; - it.visitUnary = ParseUnary; - it.visitLoop = ParseLoop; - it.visitBranch = ParseBranch; - - root->traverse(&it); - if (it.error) - return true; - else - return false; -} diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/atom.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/atom.c deleted file mode 100755 index b409c99bb7..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/atom.c +++ /dev/null @@ -1,768 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ - -/* */ -/* atom.c */ -/* */ - -#include -#include -#include -#include - -#include "slglobals.h" - -#undef malloc -#undef realloc -#undef free - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*//////////////////////////////////////// String table: ////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -static const struct { - int val; - const char *str; -} tokens[] = { - { CPP_AND_OP, "&&" }, - { CPP_AND_ASSIGN, "&=" }, - { CPP_SUB_ASSIGN, "-=" }, - { CPP_MOD_ASSIGN, "%=" }, - { CPP_ADD_ASSIGN, "+=" }, - { CPP_DIV_ASSIGN, "/=" }, - { CPP_MUL_ASSIGN, "*=" }, - { CPP_RIGHT_BRACKET, ":>" }, - { CPP_EQ_OP, "==" }, - { CPP_XOR_OP, "^^" }, - { CPP_XOR_ASSIGN, "^=" }, - { CPP_FLOATCONSTANT, "" }, - { CPP_GE_OP, ">=" }, - { CPP_RIGHT_OP, ">>" }, - { CPP_RIGHT_ASSIGN, ">>=" }, - { CPP_IDENTIFIER, "" }, - { CPP_INTCONSTANT, "" }, - { CPP_LE_OP, "<=" }, - { CPP_LEFT_OP, "<<" }, - { CPP_LEFT_ASSIGN, "<<=" }, - { CPP_LEFT_BRACKET, "<:" }, - { CPP_LEFT_BRACE, "<%" }, - { CPP_DEC_OP, "--" }, - { CPP_RIGHT_BRACE, "%>" }, - { CPP_NE_OP, "!=" }, - { CPP_OR_OP, "||" }, - { CPP_OR_ASSIGN, "|=" }, - { CPP_INC_OP, "++" }, - { CPP_STRCONSTANT, "" }, - { CPP_TYPEIDENTIFIER, "" }, -}; - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*//////////////////////////////////////// String table: ////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -#define INIT_STRING_TABLE_SIZE 16384 - -typedef struct StringTable_Rec { - char *strings; - int nextFree; - int size; -} StringTable; - -/* - * InitStringTable() - Initialize the string table. - * - */ - -static int InitStringTable(StringTable *stable) -{ - stable->strings = (char *) malloc(INIT_STRING_TABLE_SIZE); - if (!stable->strings) - return 0; - /* Zero-th offset means "empty" so don't use it. */ - stable->nextFree = 1; - stable->size = INIT_STRING_TABLE_SIZE; - return 1; -} /* InitStringTable */ - -/* - * FreeStringTable() - Free the string table. - * - */ - -static void FreeStringTable(StringTable *stable) -{ - if (stable->strings) - free(stable->strings); - stable->strings = NULL; - stable->nextFree = 0; - stable->size = 0; -} /* FreeStringTable */ - -/* - * HashString() - Hash a string with the base hash function. - * - */ - -static int HashString(const char *s) -{ - int hval = 0; - - while (*s) { - hval = (hval*13507 + *s*197) ^ (hval >> 2); - s++; - } - return hval & 0x7fffffff; -} /* HashString */ - -/* - * HashString2() - Hash a string with the incrimenting hash function. - * - */ - -static int HashString2(const char *s) -{ - int hval = 0; - - while (*s) { - hval = (hval*729 + *s*37) ^ (hval >> 1); - s++; - } - return hval; -} /* HashString2 */ - -/* - * AddString() - Add a string to a string table. Return it's offset. - * - */ - -static int AddString(StringTable *stable, const char *s) -{ - int len, loc; - char *str; - - len = (int) strlen(s); - if (stable->nextFree + len + 1 >= stable->size) { - assert(stable->size < 1000000); - str = (char *) malloc(stable->size*2); - memcpy(str, stable->strings, stable->size); - free(stable->strings); - stable->strings = str; - } - loc = stable->nextFree; - strcpy(&stable->strings[loc], s); - stable->nextFree += len + 1; - return loc; -} /* AddString */ - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*///////////////////////////////////////// Hash table: /////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -#define INIT_HASH_TABLE_SIZE 2047 -#define HASH_TABLE_MAX_COLLISIONS 3 - -typedef struct HashEntry_Rec { - int index; /* String table offset of string representation */ - int value; /* Atom (symbol) value */ -} HashEntry; - -typedef struct HashTable_Rec { - HashEntry *entry; - int size; - int entries; - int counts[HASH_TABLE_MAX_COLLISIONS + 1]; -} HashTable; - -/* - * InitHashTable() - Initialize the hash table. - * - */ - -static int InitHashTable(HashTable *htable, int fsize) -{ - int ii; - - htable->entry = (HashEntry *) malloc(sizeof(HashEntry)*fsize); - if (!htable->entry) - return 0; - htable->size = fsize; - for (ii = 0; ii < fsize; ii++) { - htable->entry[ii].index = 0; - htable->entry[ii].value = 0; - } - htable->entries = 0; - for (ii = 0; ii <= HASH_TABLE_MAX_COLLISIONS; ii++) - htable->counts[ii] = 0; - return 1; -} /* InitHashTable */ - -/* - * FreeHashTable() - Free the hash table. - * - */ - -static void FreeHashTable(HashTable *htable) -{ - if (htable->entry) - free(htable->entry); - htable->entry = NULL; - htable->size = 0; - htable->entries = 0; -} /* FreeHashTable */ - -/* - * Empty() - See if a hash table entry is empty. - * - */ - -static int Empty(HashTable *htable, int hashloc) -{ - assert(hashloc >= 0 && hashloc < htable->size); - if (htable->entry[hashloc].index == 0) { - return 1; - } else { - return 0; - } -} /* Empty */ - -/* - * Match() - See if a hash table entry is matches a string. - * - */ - -static int Match(HashTable *htable, StringTable *stable, const char *s, int hashloc) -{ - int strloc; - - strloc = htable->entry[hashloc].index; - if (!strcmp(s, &stable->strings[strloc])) { - return 1; - } else { - return 0; - } -} /* Match */ - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*///////////////////////////////////////// Atom table: /////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -#define INIT_ATOM_TABLE_SIZE 1024 - - -struct AtomTable_Rec { - StringTable stable; /* String table. */ - HashTable htable; /* Hashes string to atom number and token value. Multiple strings can */ - /* have the same token value but each unique string is a unique atom. */ - int *amap; /* Maps atom value to offset in string table. Atoms all map to unique */ - /* strings except for some undefined values in the lower, fixed part */ - /* of the atom table that map to "". The lowest 256 atoms */ - /* correspond to single character ASCII values except for alphanumeric */ - /* characters and '_', which can be other tokens. Next come the */ - /* language tokens with their atom values equal to the token value. */ - /* Then come predefined atoms, followed by user specified identifiers. */ - int *arev; /* Reversed atom for symbol table use. */ - int nextFree; - int size; -}; - -static AtomTable latable = { { 0 } }; -AtomTable *atable = &latable; - -static int AddAtomFixed(AtomTable *atable, const char *s, int atom); - -/* - * GrowAtomTable() - Grow the atom table to at least "size" if it's smaller. - * - */ - -static int GrowAtomTable(AtomTable *atable, int size) -{ - int *newmap, *newrev; - - if (atable->size < size) { - if (atable->amap) { - newmap = realloc(atable->amap, sizeof(int)*size); - newrev = realloc(atable->arev, sizeof(int)*size); - } else { - newmap = malloc(sizeof(int)*size); - newrev = malloc(sizeof(int)*size); - atable->size = 0; - } - if (!newmap || !newrev) { - /* failed to grow -- error */ - if (newmap) - atable->amap = newmap; - if (newrev) - atable->amap = newrev; - return -1; - } - memset(&newmap[atable->size], 0, (size - atable->size) * sizeof(int)); - memset(&newrev[atable->size], 0, (size - atable->size) * sizeof(int)); - atable->amap = newmap; - atable->arev = newrev; - atable->size = size; - } - return 0; -} /* GrowAtomTable */ - -/* - * lReverse() - Reverse the bottom 20 bits of a 32 bit int. - * - */ - -static int lReverse(int fval) -{ - unsigned int in = fval; - int result = 0, cnt = 0; - - while(in) { - result <<= 1; - result |= in&1; - in >>= 1; - cnt++; - } - - /* Don't use all 31 bits. One million atoms is plenty and sometimes the */ - /* upper bits are used for other things. */ - - if (cnt < 20) - result <<= 20 - cnt; - return result; -} /* lReverse */ - -/* - * AllocateAtom() - Allocate a new atom. Associated with the "undefined" value of -1. - * - */ - -static int AllocateAtom(AtomTable *atable) -{ - if (atable->nextFree >= atable->size) - GrowAtomTable(atable, atable->nextFree*2); - atable->amap[atable->nextFree] = -1; - atable->arev[atable->nextFree] = lReverse(atable->nextFree); - atable->nextFree++; - return atable->nextFree - 1; -} /* AllocateAtom */ - -/* - * SetAtomValue() - Allocate a new atom associated with "hashindex". - * - */ - -static void SetAtomValue(AtomTable *atable, int atomnumber, int hashindex) -{ - atable->amap[atomnumber] = atable->htable.entry[hashindex].index; - atable->htable.entry[hashindex].value = atomnumber; -} /* SetAtomValue */ - -/* - * FindHashLoc() - Find the hash location for this string. Return -1 it hash table is full. - * - */ - -static int FindHashLoc(AtomTable *atable, const char *s) -{ - int hashloc, hashdelta, count; - int FoundEmptySlot = 0; - int collision[HASH_TABLE_MAX_COLLISIONS + 1]; - - hashloc = HashString(s) % atable->htable.size; - if (!Empty(&atable->htable, hashloc)) { - if (Match(&atable->htable, &atable->stable, s, hashloc)) - return hashloc; - collision[0] = hashloc; - hashdelta = HashString2(s); - count = 0; - while (count < HASH_TABLE_MAX_COLLISIONS) { - hashloc = ((hashloc + hashdelta) & 0x7fffffff) % atable->htable.size; - if (!Empty(&atable->htable, hashloc)) { - if (Match(&atable->htable, &atable->stable, s, hashloc)) { - return hashloc; - } - } else { - FoundEmptySlot = 1; - break; - } - count++; - collision[count] = hashloc; - } - - if (!FoundEmptySlot) { - if (cpp->options.DumpAtomTable) { - int ii; - char str[200]; - sprintf(str, "*** Hash failed with more than %d collisions. Must increase hash table size. ***", - HASH_TABLE_MAX_COLLISIONS); - CPPShInfoLogMsg(str); - - sprintf(str, "*** New string \"%s\", hash=%04x, delta=%04x", s, collision[0], hashdelta); - CPPShInfoLogMsg(str); - for (ii = 0; ii <= HASH_TABLE_MAX_COLLISIONS; ii++) { - sprintf(str, "*** Collides on try %d at hash entry %04x with \"%s\"", - ii + 1, collision[ii], GetAtomString(atable, atable->htable.entry[collision[ii]].value)); - CPPShInfoLogMsg(str); - } - } - return -1; - } else { - atable->htable.counts[count]++; - } - } - return hashloc; -} /* FindHashLoc */ - -/* - * IncreaseHashTableSize() - * - */ - -static int IncreaseHashTableSize(AtomTable *atable) -{ - int ii, strloc, oldhashloc, value, size; - AtomTable oldtable; - char *s; - - /* Save the old atom table and create a new one: */ - - oldtable = *atable; - size = oldtable.htable.size*2 + 1; - if (!InitAtomTable(atable, size)) - return 0; - - /* Add all the existing values to the new atom table preserving their atom values: */ - - for (ii = atable->nextFree; ii < oldtable.nextFree; ii++) { - strloc = oldtable.amap[ii]; - s = &oldtable.stable.strings[strloc]; - oldhashloc = FindHashLoc(&oldtable, s); - assert(oldhashloc >= 0); - value = oldtable.htable.entry[oldhashloc].value; - AddAtomFixed(atable, s, value); - } - FreeAtomTable(&oldtable); - return 1; -} /* IncreaseHashTableSize */ - -/* - * LookUpAddStringHash() - Lookup a string in the hash table. If it's not there, add it and - * initialize the atom value in the hash table to 0. Return the hash table index. - */ - -static int LookUpAddStringHash(AtomTable *atable, const char *s) -{ - int hashloc, strloc; - - while(1) { - hashloc = FindHashLoc(atable, s); - if (hashloc >= 0) - break; - IncreaseHashTableSize(atable); - } - - if (Empty(&atable->htable, hashloc)) { - atable->htable.entries++; - strloc = AddString(&atable->stable, s); - atable->htable.entry[hashloc].index = strloc; - atable->htable.entry[hashloc].value = 0; - } - return hashloc; -} /* LookUpAddStringHash */ - -/* - * LookUpAddString() - Lookup a string in the hash table. If it's not there, add it and - * initialize the atom value in the hash table to the next atom number. - * Return the atom value of string. - */ - -int LookUpAddString(AtomTable *atable, const char *s) -{ - int hashindex, atom; - - hashindex = LookUpAddStringHash(atable, s); - atom = atable->htable.entry[hashindex].value; - if (atom == 0) { - atom = AllocateAtom(atable); - SetAtomValue(atable, atom, hashindex); - } - return atom; -} /* LookUpAddString */ - -/* - * GetAtomString() - * - */ - -const char *GetAtomString(AtomTable *atable, int atom) -{ - int soffset; - - if (atom > 0 && atom < atable->nextFree) { - soffset = atable->amap[atom]; - if (soffset > 0 && soffset < atable->stable.nextFree) { - return &atable->stable.strings[soffset]; - } else { - return ""; - } - } else { - if (atom == 0) { - return ""; - } else { - if (atom == EOF) { - return ""; - } else { - return ""; - } - } - } -} /* GetAtomString */ - -/* - * GetReversedAtom() - * - */ - -int GetReversedAtom(AtomTable *atable, int atom) -{ - if (atom > 0 && atom < atable->nextFree) { - return atable->arev[atom]; - } else { - return 0; - } -} /* GetReversedAtom */ - -/* - * AddAtom() - Add a string to the atom, hash and string tables if it isn't already there. - * Return it's atom index. - */ - -int AddAtom(AtomTable *atable, const char *s) -{ - int atom; - - atom = LookUpAddString(atable, s); - return atom; -} /* AddAtom */ - -/* - * AddAtomFixed() - Add an atom to the hash and string tables if it isn't already there. - * Assign it the atom value of "atom". - */ - -static int AddAtomFixed(AtomTable *atable, const char *s, int atom) -{ - int hashindex, lsize; - - hashindex = LookUpAddStringHash(atable, s); - if (atable->nextFree >= atable->size || atom >= atable->size) { - lsize = atable->size*2; - if (lsize <= atom) - lsize = atom + 1; - GrowAtomTable(atable, lsize); - } - atable->amap[atom] = atable->htable.entry[hashindex].index; - atable->htable.entry[hashindex].value = atom; - /*if (atom >= atable->nextFree) */ - /* atable->nextFree = atom + 1; */ - while (atom >= atable->nextFree) { - atable->arev[atable->nextFree] = lReverse(atable->nextFree); - atable->nextFree++; - } - return atom; -} /* AddAtomFixed */ - -/* - * InitAtomTable() - Initialize the atom table. - * - */ - -int InitAtomTable(AtomTable *atable, int htsize) -{ - int ii; - - htsize = htsize <= 0 ? INIT_HASH_TABLE_SIZE : htsize; - if (!InitStringTable(&atable->stable)) - return 0; - if (!InitHashTable(&atable->htable, htsize)) - return 0; - - atable->nextFree = 0; - atable->amap = NULL; - atable->size = 0; - GrowAtomTable(atable, INIT_ATOM_TABLE_SIZE); - if (!atable->amap) - return 0; - - /* Initialize lower part of atom table to "" atom: */ - - AddAtomFixed(atable, "", 0); - for (ii = 0; ii < FIRST_USER_TOKEN_SY; ii++) - atable->amap[ii] = atable->amap[0]; - - /* Add single character tokens to the atom table: */ - - { - const char *s = "~!%^&*()-+=|,.<>/?;:[]{}#"; - char t[2]; - - t[1] = '\0'; - while (*s) { - t[0] = *s; - AddAtomFixed(atable, t, s[0]); - s++; - } - } - - /* Add multiple character scanner tokens : */ - - for (ii = 0; ii < sizeof(tokens)/sizeof(tokens[0]); ii++) - AddAtomFixed(atable, tokens[ii].str, tokens[ii].val); - - /* Add error symbol if running in error mode: */ - - if (cpp->options.ErrorMode) - AddAtomFixed(atable, "error", ERROR_SY); - - AddAtom(atable, "<*** end fixed atoms ***>"); - - return 1; -} /* InitAtomTable */ - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*//////////////////////////////// Debug Printing Functions: ////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -/* - * PrintAtomTable() - * - */ - -void PrintAtomTable(AtomTable *atable) -{ - int ii; - char str[200]; - - for (ii = 0; ii < atable->nextFree; ii++) { - sprintf(str, "%d: \"%s\"", ii, &atable->stable.strings[atable->amap[ii]]); - CPPDebugLogMsg(str); - } - sprintf(str, "Hash table: size=%d, entries=%d, collisions=", - atable->htable.size, atable->htable.entries); - CPPDebugLogMsg(str); - for (ii = 0; ii < HASH_TABLE_MAX_COLLISIONS; ii++) { - sprintf(str, " %d", atable->htable.counts[ii]); - CPPDebugLogMsg(str); - } - -} /* PrintAtomTable */ - - -/* - * GetStringOfAtom() - * - */ - -char* GetStringOfAtom(AtomTable *atable, int atom) -{ - char* chr_str; - chr_str=&atable->stable.strings[atable->amap[atom]]; - return chr_str; -} /* GetStringOfAtom */ - -/* - * FreeAtomTable() - Free the atom table and associated memory - * - */ - -void FreeAtomTable(AtomTable *atable) -{ - FreeStringTable(&atable->stable); - FreeHashTable(&atable->htable); - if (atable->amap) - free(atable->amap); - if (atable->arev) - free(atable->arev); - atable->amap = NULL; - atable->arev = NULL; - atable->nextFree = 0; - atable->size = 0; -} /* FreeAtomTable */ - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*/////////////////////////////////////// End of atom.c /////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/atom.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/atom.h deleted file mode 100755 index 4e509d6ba4..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/atom.h +++ /dev/null @@ -1,96 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* atom.h */ -/* */ - -#if !defined(__ATOM_H) -#define __ATOM_H 1 - -typedef struct AtomTable_Rec AtomTable; - -extern AtomTable *atable; - -int InitAtomTable(AtomTable *atable, int htsize); -void FreeAtomTable(AtomTable *atable); -int AddAtom(AtomTable *atable, const char *s); -void PrintAtomTable(AtomTable *atable); -int LookUpAddString(AtomTable *atable, const char *s); -const char *GetAtomString(AtomTable *atable, int atom); -int GetReversedAtom(AtomTable *atable, int atom); -char* GetStringOfAtom(AtomTable *atable, int atom); -#endif /* !defined(__ATOM_H) */ diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/compile.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/compile.h deleted file mode 100755 index 24673461e6..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/compile.h +++ /dev/null @@ -1,132 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* compile.h */ -/* */ - -#if !defined(__COMPILE_H) -#define __COMPILE_H 1 - -int InitCPPStruct(void); - -typedef struct Options_Rec{ - const char *profileString; - int ErrorMode; - int Quiet; - - /* Debug The Compiler options: */ - int DumpAtomTable; -} Options; - -struct CPPStruct_Rec { - /* Public members */ - SourceLoc *pLastSourceLoc; /* Set at the start of each statement by the tree walkers */ - Options options; /* Compile options and parameters */ - - /* Private members */ - SourceLoc lastSourceLoc; - - /* Scanner data: */ - - SourceLoc *tokenLoc; /* Source location of most recent token seen by the scanner */ - int mostRecentToken; /* Most recent token seen by the scanner */ - InputSrc *currentInput; - int previous_token; - int notAVersionToken; /* used to make sure that #version is the first token seen in the file, if present */ - - void *pC; /* storing the parseContext of the compile object in cpp. */ - - /* Private members: */ - SourceLoc ltokenLoc; - int ifdepth; /*current #if-#else-#endif nesting in the cpp.c file (pre-processor) */ - int elsedepth[64]; /*Keep a track of #if depth..Max allowed is 64. */ - int elsetracker; /*#if-#else and #endif constructs...Counter. */ - const char *ErrMsg; - int CompileError; /*Indicate compile error when #error, #else,#elif mismatch. */ - - /* */ - /* Globals used to communicate between PaParseStrings() and yy_input()and */ - /* also across the files.(gen_glslang.cpp and scanner.c) */ - /* */ - int PaWhichStr; /* which string we're parsing */ - int* PaStrLen; /* array of lengths of the PaArgv strings */ - int PaArgc; /* count of strings in the array */ - char** PaArgv; /* our array of strings to parse */ - unsigned int tokensBeforeEOF : 1; -}; - -#endif /* !defined(__COMPILE_H) */ diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.c deleted file mode 100755 index f8da59b382..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.c +++ /dev/null @@ -1,1037 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* cpp.c */ -/* */ - -#include -#include -#include -#include -#include - -#include "slglobals.h" - -static int CPPif(yystypepp * yylvalpp); - -/* Don't use memory.c's replacements, as we clean up properly here */ -#undef malloc -#undef free - -static int bindAtom = 0; -static int constAtom = 0; -static int defaultAtom = 0; -static int defineAtom = 0; -static int definedAtom = 0; -static int elseAtom = 0; -static int elifAtom = 0; -static int endifAtom = 0; -static int ifAtom = 0; -static int ifdefAtom = 0; -static int ifndefAtom = 0; -static int includeAtom = 0; -static int lineAtom = 0; -static int pragmaAtom = 0; -static int texunitAtom = 0; -static int undefAtom = 0; -static int errorAtom = 0; -static int __LINE__Atom = 0; -static int __FILE__Atom = 0; -static int __VERSION__Atom = 0; -static int versionAtom = 0; -static int extensionAtom = 0; - -static Scope *macros = 0; -#define MAX_MACRO_ARGS 64 -#define MAX_IF_NESTING 64 - -static SourceLoc ifloc; /* outermost #if */ - -int InitCPP(void) -{ - char buffer[64], *t; - const char *f; - /* Add various atoms needed by the CPP line scanner: */ - bindAtom = LookUpAddString(atable, "bind"); - constAtom = LookUpAddString(atable, "const"); - defaultAtom = LookUpAddString(atable, "default"); - defineAtom = LookUpAddString(atable, "define"); - definedAtom = LookUpAddString(atable, "defined"); - elifAtom = LookUpAddString(atable, "elif"); - elseAtom = LookUpAddString(atable, "else"); - endifAtom = LookUpAddString(atable, "endif"); - ifAtom = LookUpAddString(atable, "if"); - ifdefAtom = LookUpAddString(atable, "ifdef"); - ifndefAtom = LookUpAddString(atable, "ifndef"); - includeAtom = LookUpAddString(atable, "include"); - lineAtom = LookUpAddString(atable, "line"); - pragmaAtom = LookUpAddString(atable, "pragma"); - texunitAtom = LookUpAddString(atable, "texunit"); - undefAtom = LookUpAddString(atable, "undef"); - errorAtom = LookUpAddString(atable, "error"); - __LINE__Atom = LookUpAddString(atable, "__LINE__"); - __FILE__Atom = LookUpAddString(atable, "__FILE__"); - __VERSION__Atom = LookUpAddString(atable, "__VERSION__"); - versionAtom = LookUpAddString(atable, "version"); - extensionAtom = LookUpAddString(atable, "extension"); - macros = NewScopeInPool(mem_CreatePool(0, 0)); - strcpy(buffer, "PROFILE_"); - t = buffer + strlen(buffer); - f = cpp->options.profileString; - while ((isalnum(*f) || *f == '_') && t < buffer + sizeof(buffer) - 1) - *t++ = toupper(*f++); - *t = 0; - return 1; -} /* InitCPP */ - -int FreeCPP(void) -{ - if (macros) - { - mem_FreePool(macros->pool); - macros = 0; - } - - return 1; -} - -int FinalCPP(void) -{ - if (cpp->ifdepth) - CPPErrorToInfoLog("#if mismatch"); - return 1; -} - -static int CPPdefine(yystypepp * yylvalpp) -{ - int token, name, args[MAX_MACRO_ARGS], argc; - const char *message; - MacroSymbol mac; - Symbol *symb; - SourceLoc dummyLoc; - memset(&mac, 0, sizeof(mac)); - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != CPP_IDENTIFIER) { - CPPErrorToInfoLog("#define"); - return token; - } - name = yylvalpp->sc_ident; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token == '(' && !yylvalpp->sc_int) { - /* gather arguments */ - argc = 0; - do { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (argc == 0 && token == ')') break; - if (token != CPP_IDENTIFIER) { - CPPErrorToInfoLog("#define"); - return token; - } - if (argc < MAX_MACRO_ARGS) - args[argc++] = yylvalpp->sc_ident; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } while (token == ','); - if (token != ')') { - CPPErrorToInfoLog("#define"); - return token; - } - mac.argc = argc; - mac.args = mem_Alloc(macros->pool, argc * sizeof(int)); - memcpy(mac.args, args, argc * sizeof(int)); - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - mac.body = NewTokenStream(GetAtomString(atable, name)); - while (token != '\n') { - while (token == '\\') { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token == '\n') - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - else - RecordToken(mac.body, '\\', yylvalpp); - } - RecordToken(mac.body, token, yylvalpp); - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - }; - - symb = LookUpSymbol(macros, name); - if (symb) { - if (!symb->details.mac.undef) { - /* already defined -- need to make sure they are identical */ - if (symb->details.mac.argc != mac.argc) goto error; - for (argc=0; argc < mac.argc; argc++) - if (symb->details.mac.args[argc] != mac.args[argc]) - goto error; - RewindTokenStream(symb->details.mac.body); - RewindTokenStream(mac.body); - do { - int old_lval, old_token; - old_token = ReadToken(symb->details.mac.body, yylvalpp); - old_lval = yylvalpp->sc_int; - token = ReadToken(mac.body, yylvalpp); - if (token != old_token || yylvalpp->sc_int != old_lval) { - error: - StoreStr("Macro Redefined"); - StoreStr(GetStringOfAtom(atable,name)); - message=GetStrfromTStr(); - DecLineNumber(); - CPPShInfoLogMsg(message); - IncLineNumber(); - ResetTString(); - break; } - } while (token > 0); - } - FreeMacro(&symb->details.mac); - } else { - dummyLoc.file = 0; - dummyLoc.line = 0; - symb = AddSymbol(&dummyLoc, macros, name, MACRO_S); - } - symb->details.mac = mac; - return '\n'; -} /* CPPdefine */ - -static int CPPundef(yystypepp * yylvalpp) -{ - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - Symbol *symb; - if(token == '\n'){ - CPPErrorToInfoLog("#undef"); - return token; - } - if (token != CPP_IDENTIFIER) - goto error; - symb = LookUpSymbol(macros, yylvalpp->sc_ident); - if (symb) { - symb->details.mac.undef = 1; - } - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != '\n') { - error: - CPPErrorToInfoLog("#undef"); - } - return token; -} /* CPPundef */ - -/* CPPelse -- skip forward to appropriate spot. This is actually used -** to skip to and #endif after seeing an #else, AND to skip to a #else, -** #elif, or #endif after a #if/#ifdef/#ifndef/#elif test was false -*/ - -static int CPPelse(int matchelse, yystypepp * yylvalpp) -{ - int atom,depth=0; - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - - while (token > 0) { - if (token != '#') { - while (token != '\n') - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - continue; - } - if ((token = cpp->currentInput->scan(cpp->currentInput, yylvalpp)) != CPP_IDENTIFIER) - continue; - atom = yylvalpp->sc_ident; - if (atom == ifAtom || atom == ifdefAtom || atom == ifndefAtom){ - depth++; cpp->ifdepth++; cpp->elsetracker++; - } - else if (atom == endifAtom) { - if(--depth<=0){ - cpp->elsedepth[cpp->elsetracker]=0; - --cpp->elsetracker; - if (cpp->ifdepth) - --cpp->ifdepth; - break; - } - --cpp->elsetracker; - --cpp->ifdepth; - } - else if (((int)(matchelse) != 0)&& depth==0) { - if (atom == elseAtom ) { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != '\n') { - CPPWarningToInfoLog("unexpected tokens following #else preprocessor directive - expected a newline"); - while (token != '\n') - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - break; - } - else if (atom == elifAtom) { - /* we decrement cpp->ifdepth here, because CPPif will increment - * it and we really want to leave it alone */ - if (cpp->ifdepth){ - --cpp->ifdepth; - --cpp->elsetracker; - } - return CPPif(yylvalpp); - } - } - else if((atom==elseAtom) && (!ChkCorrectElseNesting())){ - CPPErrorToInfoLog("#else after a #else"); - cpp->CompileError=1; - } - }; - return token; -} - -enum eval_prec { - MIN_PREC, - COND, LOGOR, LOGAND, OR, XOR, AND, EQUAL, RELATION, SHIFT, ADD, MUL, UNARY, - MAX_PREC -}; - -static int op_logor(int a, int b) { return a || b; } -static int op_logand(int a, int b) { return a && b; } -static int op_or(int a, int b) { return a | b; } -static int op_xor(int a, int b) { return a ^ b; } -static int op_and(int a, int b) { return a & b; } -static int op_eq(int a, int b) { return a == b; } -static int op_ne(int a, int b) { return a != b; } -static int op_ge(int a, int b) { return a >= b; } -static int op_le(int a, int b) { return a <= b; } -static int op_gt(int a, int b) { return a > b; } -static int op_lt(int a, int b) { return a < b; } -static int op_shl(int a, int b) { return a << b; } -static int op_shr(int a, int b) { return a >> b; } -static int op_add(int a, int b) { return a + b; } -static int op_sub(int a, int b) { return a - b; } -static int op_mul(int a, int b) { return a * b; } -static int op_div(int a, int b) { return a / b; } -static int op_mod(int a, int b) { return a % b; } -static int op_pos(int a) { return a; } -static int op_neg(int a) { return -a; } -static int op_cmpl(int a) { return ~a; } -static int op_not(int a) { return !a; } - -struct { - int token, prec, (*op)(int, int); -} binop[] = { - { CPP_OR_OP, LOGOR, op_logor }, - { CPP_AND_OP, LOGAND, op_logand }, - { '|', OR, op_or }, - { '^', XOR, op_xor }, - { '&', AND, op_and }, - { CPP_EQ_OP, EQUAL, op_eq }, - { CPP_NE_OP, EQUAL, op_ne }, - { '>', RELATION, op_gt }, - { CPP_GE_OP, RELATION, op_ge }, - { '<', RELATION, op_lt }, - { CPP_LE_OP, RELATION, op_le }, - { CPP_LEFT_OP, SHIFT, op_shl }, - { CPP_RIGHT_OP, SHIFT, op_shr }, - { '+', ADD, op_add }, - { '-', ADD, op_sub }, - { '*', MUL, op_mul }, - { '/', MUL, op_div }, - { '%', MUL, op_mod }, -}; - -struct { - int token, (*op)(int); -} unop[] = { - { '+', op_pos }, - { '-', op_neg }, - { '~', op_cmpl }, - { '!', op_not }, -}; - -#define ALEN(A) (sizeof(A)/sizeof(A[0])) - -static int eval(int token, int prec, int *res, int *err, yystypepp * yylvalpp) -{ - int i, val; - Symbol *s; - if (token == CPP_IDENTIFIER) { - if (yylvalpp->sc_ident == definedAtom) { - int needclose = 0; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token == '(') { - needclose = 1; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - if (token != CPP_IDENTIFIER) - goto error; - *res = (s = LookUpSymbol(macros, yylvalpp->sc_ident)) - ? !s->details.mac.undef : 0; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (needclose) { - if (token != ')') - goto error; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - } else if (MacroExpand(yylvalpp->sc_ident, yylvalpp)) { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - return eval(token, prec, res, err, yylvalpp); - } else { - goto error; - } - } else if (token == CPP_INTCONSTANT) { - *res = yylvalpp->sc_int; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } else if (token == '(') { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - token = eval(token, MIN_PREC, res, err, yylvalpp); - if (!*err) { - if (token != ')') - goto error; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - } else { - for (i = ALEN(unop) - 1; i >= 0; i--) { - if (unop[i].token == token) - break; - } - if (i >= 0) { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - token = eval(token, UNARY, res, err, yylvalpp); - *res = unop[i].op(*res); - } else { - goto error; - } - } - while (!*err) { - if (token == ')' || token == '\n') break; - for (i = ALEN(binop) - 1; i >= 0; i--) { - if (binop[i].token == token) - break; - } - if (i < 0 || binop[i].prec <= prec) - break; - val = *res; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - token = eval(token, binop[i].prec, res, err, yylvalpp); - *res = binop[i].op(val, *res); - } - return token; -error: - CPPErrorToInfoLog("incorrect preprocessor directive"); - *err = 1; - *res = 0; - return token; -} /* eval */ - -static int CPPif(yystypepp * yylvalpp) { - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - int res = 0, err = 0; - cpp->elsetracker++; - if (!cpp->ifdepth++) - ifloc = *cpp->tokenLoc; - if(cpp->ifdepth >MAX_IF_NESTING){ - CPPErrorToInfoLog("max #if nesting depth exceeded"); - return 0; - } - token = eval(token, MIN_PREC, &res, &err, yylvalpp); - if (token != '\n') { - CPPWarningToInfoLog("unexpected tokens following the preprocessor directive - expected a newline"); - while (token != '\n') - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - if (!res && !err) { - token = CPPelse(1, yylvalpp); - } - - return token; -} /* CPPif */ - -static int CPPifdef(int defined, yystypepp * yylvalpp) -{ - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - int name = yylvalpp->sc_ident; - if(++cpp->ifdepth >MAX_IF_NESTING){ - CPPErrorToInfoLog("max #if nesting depth exceeded"); - return 0; - } - cpp->elsetracker++; - if (token != CPP_IDENTIFIER) { - defined ? CPPErrorToInfoLog("ifdef"):CPPErrorToInfoLog("ifndef"); - } else { - Symbol *s = LookUpSymbol(macros, name); - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != '\n') { - CPPWarningToInfoLog("unexpected tokens following #ifdef preprocessor directive - expected a newline"); - while (token != '\n') - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - if (((s && !s->details.mac.undef) ? 1 : 0) != defined) - token = CPPelse(1, yylvalpp); - } - return token; -} /* CPPifdef */ - -static int CPPline(yystypepp * yylvalpp) -{ - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if(token=='\n'){ - DecLineNumber(); - CPPErrorToInfoLog("#line"); - IncLineNumber(); - return token; - } - else if (token == CPP_INTCONSTANT) { - yylvalpp->sc_int=atoi(yylvalpp->symbol_name); - SetLineNumber(yylvalpp->sc_int); - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - - if (token == CPP_INTCONSTANT) { - yylvalpp->sc_int=atoi(yylvalpp->symbol_name); - SetStringNumber(yylvalpp->sc_int); - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if(token!='\n') - CPPErrorToInfoLog("#line"); - } - else if (token == '\n'){ - return token; - } - else{ - CPPErrorToInfoLog("#line"); - } - } - else{ - CPPErrorToInfoLog("#line"); - } - return token; -} - -static int CPPerror(yystypepp * yylvalpp) { - - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - const char *message; - - while (token != '\n') { - if (token == CPP_FLOATCONSTANT || token == CPP_INTCONSTANT){ - StoreStr(yylvalpp->symbol_name); - }else if(token == CPP_IDENTIFIER || token == CPP_STRCONSTANT){ - StoreStr(GetStringOfAtom(atable,yylvalpp->sc_ident)); - }else { - StoreStr(GetStringOfAtom(atable,token)); - } - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - DecLineNumber(); - /*store this msg into the shader's information log..set the Compile Error flag!!!! */ - message=GetStrfromTStr(); - CPPShInfoLogMsg(message); - ResetTString(); - cpp->CompileError=1; - IncLineNumber(); - return '\n'; -}/*CPPerror */ - -static int CPPpragma(yystypepp * yylvalpp) -{ - char SrcStrName[2]; - char** allTokens; - int tokenCount = 0; - int maxTokenCount = 10; - const char* SrcStr; - int i; - - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - - if (token=='\n') { - DecLineNumber(); - CPPErrorToInfoLog("#pragma"); - IncLineNumber(); - return token; - } - - allTokens = (char**)malloc(sizeof(char*) * maxTokenCount); - - while (token != '\n') { - if (tokenCount >= maxTokenCount) { - maxTokenCount *= 2; - allTokens = (char**)realloc((char**)allTokens, sizeof(char*) * maxTokenCount); - } - switch (token) { - case CPP_IDENTIFIER: - SrcStr = GetAtomString(atable, yylvalpp->sc_ident); - allTokens[tokenCount] = (char*)malloc(strlen(SrcStr) + 1); - strcpy(allTokens[tokenCount++], SrcStr); - break; - case CPP_INTCONSTANT: - SrcStr = yylvalpp->symbol_name; - allTokens[tokenCount] = (char*)malloc(strlen(SrcStr) + 1); - strcpy(allTokens[tokenCount++], SrcStr); - break; - case CPP_FLOATCONSTANT: - SrcStr = yylvalpp->symbol_name; - allTokens[tokenCount] = (char*)malloc(strlen(SrcStr) + 1); - strcpy(allTokens[tokenCount++], SrcStr); - break; - case -1: - /* EOF */ - CPPShInfoLogMsg("#pragma directive must end with a newline"); - return token; - default: - SrcStrName[0] = token; - SrcStrName[1] = '\0'; - allTokens[tokenCount] = (char*)malloc(2); - strcpy(allTokens[tokenCount++], SrcStrName); - } - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - - cpp->currentInput->ungetch(cpp->currentInput, token, yylvalpp); - HandlePragma(allTokens, tokenCount); - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - - for (i = 0; i < tokenCount; ++i) { - free (allTokens[i]); - } - free (allTokens); - - return token; -} /* CPPpragma */ - -#define GL2_VERSION_NUMBER 110 - -static int CPPversion(yystypepp * yylvalpp) -{ - - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - - if (cpp->notAVersionToken == 1) - CPPShInfoLogMsg("#version must occur before any other statement in the program"); - - if(token=='\n'){ - DecLineNumber(); - CPPErrorToInfoLog("#version"); - IncLineNumber(); - return token; - } - if (token != CPP_INTCONSTANT) - CPPErrorToInfoLog("#version"); - - yylvalpp->sc_int=atoi(yylvalpp->symbol_name); - /*SetVersionNumber(yylvalpp->sc_int); */ - - if (yylvalpp->sc_int != GL2_VERSION_NUMBER) - CPPShInfoLogMsg("Version number not supported by GL2"); - - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - - if (token == '\n'){ - return token; - } - else{ - CPPErrorToInfoLog("#version"); - } - return token; -} /* CPPversion */ - -static int CPPextension(yystypepp * yylvalpp) -{ - - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - char extensionName[80]; - - if(token=='\n'){ - DecLineNumber(); - CPPShInfoLogMsg("extension name not specified"); - IncLineNumber(); - return token; - } - - if (token != CPP_IDENTIFIER) - CPPErrorToInfoLog("#extension"); - - strcpy(extensionName, GetAtomString(atable, yylvalpp->sc_ident)); - - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != ':') { - CPPShInfoLogMsg("':' missing after extension name"); - return token; - } - - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != CPP_IDENTIFIER) { - CPPShInfoLogMsg("behavior for extension not specified"); - return token; - } - - updateExtensionBehavior(extensionName, GetAtomString(atable, yylvalpp->sc_ident)); - - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token == '\n'){ - return token; - } - else{ - CPPErrorToInfoLog("#extension"); - } - return token; -} /* CPPextension */ - -int readCPPline(yystypepp * yylvalpp) -{ - int token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - const char *message; - int isVersion = 0; - - if (token == CPP_IDENTIFIER) { - if (yylvalpp->sc_ident == defineAtom) { - token = CPPdefine(yylvalpp); - } else if (yylvalpp->sc_ident == elseAtom) { - if(ChkCorrectElseNesting()){ - if (!cpp->ifdepth ){ - CPPErrorToInfoLog("#else mismatch"); - cpp->CompileError=1; - } - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != '\n') { - CPPWarningToInfoLog("unexpected tokens following #else preprocessor directive - expected a newline"); - while (token != '\n') - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - token = CPPelse(0, yylvalpp); - }else{ - CPPErrorToInfoLog("#else after a #else"); - cpp->ifdepth=0; - cpp->notAVersionToken = 1; - return 0; - } - } else if (yylvalpp->sc_ident == elifAtom) { - if (!cpp->ifdepth){ - CPPErrorToInfoLog("#elif mismatch"); - cpp->CompileError=1; - } - /* this token is really a dont care, but we still need to eat the tokens */ - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - while (token != '\n') - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - token = CPPelse(0, yylvalpp); - } else if (yylvalpp->sc_ident == endifAtom) { - cpp->elsedepth[cpp->elsetracker]=0; - --cpp->elsetracker; - if (!cpp->ifdepth){ - CPPErrorToInfoLog("#endif mismatch"); - cpp->CompileError=1; - } - else - --cpp->ifdepth; - } else if (yylvalpp->sc_ident == ifAtom) { - token = CPPif(yylvalpp); - } else if (yylvalpp->sc_ident == ifdefAtom) { - token = CPPifdef(1, yylvalpp); - } else if (yylvalpp->sc_ident == ifndefAtom) { - token = CPPifdef(0, yylvalpp); - } else if (yylvalpp->sc_ident == lineAtom) { - token = CPPline(yylvalpp); - } else if (yylvalpp->sc_ident == pragmaAtom) { - token = CPPpragma(yylvalpp); - } else if (yylvalpp->sc_ident == undefAtom) { - token = CPPundef(yylvalpp); - } else if (yylvalpp->sc_ident == errorAtom) { - token = CPPerror(yylvalpp); - } else if (yylvalpp->sc_ident == versionAtom) { - token = CPPversion(yylvalpp); - isVersion = 1; - } else if (yylvalpp->sc_ident == extensionAtom) { - token = CPPextension(yylvalpp); - } else { - StoreStr("Invalid Directive"); - StoreStr(GetStringOfAtom(atable,yylvalpp->sc_ident)); - message=GetStrfromTStr(); - CPPShInfoLogMsg(message); - ResetTString(); - } - } - while (token != '\n' && token != 0 && token != EOF) { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - - cpp->notAVersionToken = !isVersion; - - return token; -} /* readCPPline */ - -void FreeMacro(MacroSymbol *s) { - DeleteTokenStream(s->body); -} - -static int eof_scan(InputSrc *in, yystypepp * yylvalpp) { return -1; } -static void noop(InputSrc *in, int ch, yystypepp * yylvalpp) { } - -static void PushEofSrc() { - InputSrc *in = malloc(sizeof(InputSrc)); - memset(in, 0, sizeof(InputSrc)); - in->scan = eof_scan; - in->getch = eof_scan; - in->ungetch = noop; - in->prev = cpp->currentInput; - cpp->currentInput = in; -} - -static void PopEofSrc() { - if (cpp->currentInput->scan == eof_scan) { - InputSrc *in = cpp->currentInput; - cpp->currentInput = in->prev; - free(in); - } -} - -static TokenStream *PrescanMacroArg(TokenStream *a, yystypepp * yylvalpp) { - int token; - TokenStream *n; - RewindTokenStream(a); - do { - token = ReadToken(a, yylvalpp); - if (token == CPP_IDENTIFIER && LookUpSymbol(macros, yylvalpp->sc_ident)) - break; - } while (token > 0); - if (token <= 0) return a; - n = NewTokenStream("macro arg"); - PushEofSrc(); - ReadFromTokenStream(a, 0, 0); - while ((token = cpp->currentInput->scan(cpp->currentInput, yylvalpp)) > 0) { - if (token == CPP_IDENTIFIER && MacroExpand(yylvalpp->sc_ident, yylvalpp)) - continue; - RecordToken(n, token, yylvalpp); - } - PopEofSrc(); - DeleteTokenStream(a); - return n; -} /* PrescanMacroArg */ - -typedef struct MacroInputSrc { - InputSrc base; - MacroSymbol *mac; - TokenStream **args; -} MacroInputSrc; - -/* macro_scan --- -** return the next token for a macro expanion, handling macro args -*/ -static int macro_scan(MacroInputSrc *in, yystypepp * yylvalpp) { - int i; - int token = ReadToken(in->mac->body, yylvalpp); - if (token == CPP_IDENTIFIER) { - for (i = in->mac->argc-1; i>=0; i--) - if (in->mac->args[i] == yylvalpp->sc_ident) break; - if (i >= 0) { - ReadFromTokenStream(in->args[i], yylvalpp->sc_ident, 0); - return cpp->currentInput->scan(cpp->currentInput, yylvalpp); - } - } - if (token > 0) return token; - in->mac->busy = 0; - cpp->currentInput = in->base.prev; - if (in->args) { - for (i=in->mac->argc-1; i>=0; i--) - DeleteTokenStream(in->args[i]); - free(in->args); - } - free(in); - return cpp->currentInput->scan(cpp->currentInput, yylvalpp); -} /* macro_scan */ - -/* MacroExpand -** check an identifier (atom) to see if it a macro that should be expanded. -** If it is, push an InputSrc that will produce the appropriate expansion -** and return TRUE. If not, return FALSE. -*/ - -int MacroExpand(int atom, yystypepp * yylvalpp) -{ - Symbol *sym = LookUpSymbol(macros, atom); - MacroInputSrc *in; - int i,j, token, depth=0; - const char *message; - if (atom == __LINE__Atom) { - yylvalpp->sc_int = GetLineNumber(); - sprintf(yylvalpp->symbol_name,"%d",yylvalpp->sc_int); - UngetToken(CPP_INTCONSTANT, yylvalpp); - return 1; - } - if (atom == __FILE__Atom) { - yylvalpp->sc_int = GetStringNumber(); - sprintf(yylvalpp->symbol_name,"%d",yylvalpp->sc_int); - UngetToken(CPP_INTCONSTANT, yylvalpp); - return 1; - } - if (atom == __VERSION__Atom) { - strcpy(yylvalpp->symbol_name,"100"); - yylvalpp->sc_int = atoi(yylvalpp->symbol_name); - UngetToken(CPP_INTCONSTANT, yylvalpp); - return 1; - } - if (!sym || sym->details.mac.undef) return 0; - if (sym->details.mac.busy) return 0; /* no recursive expansions */ - in = malloc(sizeof(*in)); - memset(in, 0, sizeof(*in)); - in->base.scan = (void *)macro_scan; - in->base.line = cpp->currentInput->line; - in->base.name = cpp->currentInput->name; - in->mac = &sym->details.mac; - if (sym->details.mac.args) { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token != '(') { - UngetToken(token, yylvalpp); - yylvalpp->sc_ident = atom; - return 0; - } - in->args = malloc(in->mac->argc * sizeof(TokenStream *)); - for (i=0; imac->argc; i++) - in->args[i] = NewTokenStream("macro arg"); - i=0;j=0; - do{ - depth = 0; - while(1) { - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token <= 0) { - StoreStr("EOF in Macro "); - StoreStr(GetStringOfAtom(atable,atom)); - message=GetStrfromTStr(); - CPPShInfoLogMsg(message); - ResetTString(); - return 1; - } - if((in->mac->argc==0) && (token!=')')) break; - if (depth == 0 && (token == ',' || token == ')')) break; - if (token == '(') depth++; - if (token == ')') depth--; - RecordToken(in->args[i], token, yylvalpp); - j=1; - } - if (token == ')') { - if((in->mac->argc==1) &&j==0) - break; - i++; - break; - } - i++; - }while(i < in->mac->argc); - - if (i < in->mac->argc) { - StoreStr("Too few args in Macro "); - StoreStr(GetStringOfAtom(atable,atom)); - message=GetStrfromTStr(); - CPPShInfoLogMsg(message); - ResetTString(); - } else if (token != ')') { - depth=0; - while (token >= 0 && (depth > 0 || token != ')')) { - if (token == ')') depth--; - token = cpp->currentInput->scan(cpp->currentInput, yylvalpp); - if (token == '(') depth++; - } - - if (token <= 0) { - StoreStr("EOF in Macro "); - StoreStr(GetStringOfAtom(atable,atom)); - message=GetStrfromTStr(); - CPPShInfoLogMsg(message); - ResetTString(); - return 1; - } - StoreStr("Too many args in Macro "); - StoreStr(GetStringOfAtom(atable,atom)); - message=GetStrfromTStr(); - CPPShInfoLogMsg(message); - ResetTString(); - } - for (i=0; imac->argc; i++) { - in->args[i] = PrescanMacroArg(in->args[i], yylvalpp); - } - } -#if 0 - printf(" <%s:%d>found macro %s\n", GetAtomString(atable, loc.file), - loc.line, GetAtomString(atable, atom)); - for (i=0; imac->argc; i++) { - printf("\targ %s = '", GetAtomString(atable, in->mac->args[i])); - DumpTokenStream(stdout, in->args[i]); - printf("'\n"); - } -#endif - /*retain the input source*/ - in->base.prev = cpp->currentInput; - sym->details.mac.busy = 1; - RewindTokenStream(sym->details.mac.body); - cpp->currentInput = &in->base; - return 1; -} /* MacroExpand */ - -int ChkCorrectElseNesting(void) -{ - if(cpp->elsedepth[cpp->elsetracker]==0){ - cpp->elsedepth[cpp->elsetracker]=1; - return 1; - } - return 0; -} - - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.h deleted file mode 100755 index 03449a17a9..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp.h +++ /dev/null @@ -1,119 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* cpp.h */ -/* */ - -#if !defined(__CPP_H) -#define __CPP_H 1 - -#include "parser.h" -#include "tokens.h" - -int InitCPP(void); -int FinalCPP(void); -int readCPPline(yystypepp * yylvalpp); -int MacroExpand(int atom, yystypepp * yylvalpp); -int ChkCorrectElseNesting(void); - -typedef struct MacroSymbol { - int argc; - int *args; - TokenStream *body; - unsigned busy:1; - unsigned undef:1; -} MacroSymbol; - -void FreeMacro(MacroSymbol *); -int PredefineMacro(char *); - -void CPPDebugLogMsg(const char *msg); /* Prints information into debug log */ -void CPPShInfoLogMsg(const char*); /* Store cpp Err Msg into Sh.Info.Log */ -void CPPWarningToInfoLog(const char *msg); /* Prints warning messages into info log */ -void HandlePragma(const char**, int numTokens); /* #pragma directive container. */ -void ResetTString(void); /* #error Message as TString. */ -void CPPErrorToInfoLog(char*); /* Stick all cpp errors into Sh.Info.log . */ -void StoreStr(char*); /* Store the TString in Parse Context. */ -void SetLineNumber(int); /* Set line number. */ -void SetStringNumber(int); /* Set string number. */ -int GetLineNumber(void); /* Get the current String Number. */ -int GetStringNumber(void); /* Get the current String Number. */ -const char* GetStrfromTStr(void); /* Convert TString to String. */ -void updateExtensionBehavior(const char* extName, const char* behavior); -int FreeCPP(void); - -#endif /* !(defined(__CPP_H) */ diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp_comment_fix.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp_comment_fix.c deleted file mode 100644 index 0c3073590d..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/cpp_comment_fix.c +++ /dev/null @@ -1,76 +0,0 @@ -/* converts c++ to c comments */ -/* usage: ./cpp_comment_fix source */ - -#include - -int main (int argc, char *argv[]) -{ - FILE *f; - int c; - char *buf = NULL; - int size = 0, i = 0; - - f = fopen (argv[1], "r"); - while ((c = fgetc (f)) != EOF) - { - buf = (void *) realloc (buf, size + 1); - buf[size] = c; - size++; - } - fclose (f); - - f = fopen (argv[1], "w"); - - while (i < size) - { - if (buf[i] == '/') - { - if (buf[i+1] == '/') - { - fprintf (f, "/*"); - i+=2; - while (buf[i] != '\n' && buf[i] != '\r' && i < size) - fprintf (f, "%c", buf[i++]); - fprintf (f, " */\n"); - if (i < size && buf[i] == '\n') - i++; - else if (i < size && buf[i] == '\r') - i+=2; - } - else - { - fprintf (f, "/"); - i++; - - if (buf[i] == '*') - { - fprintf (f, "*"); - i++; - - for (;;) - { - if (buf[i] == '*' && buf[i+1] == '/') - { - fprintf (f, "*/"); - i+=2; - break; - } - else - { - fprintf (f, "%c", buf[i]); - i++; - } - } - } - } - } - else - { - fprintf (f, "%c", buf[i]); - i++; - } - } - fclose (f); - return 0; -} - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/cppstruct.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/cppstruct.c deleted file mode 100755 index c55b3f7c70..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/cppstruct.c +++ /dev/null @@ -1,185 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* cppstruct.c */ -/* */ - -#include -#include - -#include "slglobals.h" - -CPPStruct *cpp = NULL; -static int refCount = 0; - -int InitPreprocessor(void); -int ResetPreprocessor(void); -int FreeCPPStruct(void); -int FinalizePreprocessor(void); - -/* - * InitCPPStruct() - Initilaize the CPP structure. - * - */ - -int InitCPPStruct(void) -{ - int len; - char *p; - - cpp = (CPPStruct *) malloc(sizeof(CPPStruct)); - if (cpp == NULL) - return 0; - - refCount++; - - /* Initialize public members: */ - cpp->pLastSourceLoc = &cpp->lastSourceLoc; - - p = (char *) &cpp->options; - len = sizeof(cpp->options); - while (--len >= 0) - p[len] = 0; - - ResetPreprocessor(); - return 1; -} /* InitCPPStruct */ - -int ResetPreprocessor(void) -{ - /* Initialize private members: */ - - cpp->lastSourceLoc.file = 0; - cpp->lastSourceLoc.line = 0; - cpp->pC=0; - cpp->CompileError=0; - cpp->ifdepth=0; - for(cpp->elsetracker=0; cpp->elsetracker<64; cpp->elsetracker++) - cpp->elsedepth[cpp->elsetracker]=0; - cpp->elsetracker=0; - cpp->tokensBeforeEOF = 0; - return 1; -} - -/*Intializing the Preprocessor. */ - -int InitPreprocessor(void) -{ - # define CPP_STUFF true - # ifdef CPP_STUFF - FreeCPPStruct(); - InitCPPStruct(); - cpp->options.Quiet = 1; - cpp->options.profileString = "generic"; - if (!InitAtomTable(atable, 0)) - return 1; - if (!InitScanner(cpp)) - return 1; - # endif - return 0; -} - -/*FreeCPPStruct() - Free the CPP structure. */ - -int FreeCPPStruct(void) -{ - if (refCount) - { - free(cpp); - refCount--; - } - - return 1; -} - -/*Finalizing the Preprocessor. */ - -int FinalizePreprocessor(void) -{ - # define CPP_STUFF true - # ifdef CPP_STUFF - FreeAtomTable(atable); - FreeCPPStruct(); - FreeScanner(); - # endif - return 0; -} - - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*//////////////////////////////////// End of cppstruct.c ////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/memory.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/memory.c deleted file mode 100755 index ed0f4fb4b9..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/memory.c +++ /dev/null @@ -1,191 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -#include -#include -#include - -#ifdef __STDC99__ -#include -#elif defined (_WIN64) -typedef unsigned __int64 uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif - -#include "memory.h" - -/* default alignment and chunksize, if called with 0 arguments */ -#define CHUNKSIZE (64*1024) -#define ALIGN 8 - -/* we need to call the `real' malloc and free, not our replacements */ -#undef malloc -#undef free - -struct chunk { - struct chunk *next; -}; - -struct cleanup { - struct cleanup *next; - void (*fn)(void *); - void *arg; -}; - -struct MemoryPool_rec { - struct chunk *next; - uintptr_t free, end; - size_t chunksize; - uintptr_t alignmask; - struct cleanup *cleanup; -}; - -MemoryPool *mem_CreatePool(size_t chunksize, unsigned int align) -{ - MemoryPool *pool; - - if (align == 0) align = ALIGN; - if (chunksize == 0) chunksize = CHUNKSIZE; - if (align & (align-1)) return 0; - if (chunksize < sizeof(MemoryPool)) return 0; - if (chunksize & (align-1)) return 0; - if (!(pool = malloc(chunksize))) return 0; - pool->next = 0; - pool->chunksize = chunksize; - pool->alignmask = (uintptr_t)(align)-1; - pool->free = ((uintptr_t)(pool + 1) + pool->alignmask) & ~pool->alignmask; - pool->end = (uintptr_t)pool + chunksize; - pool->cleanup = 0; - return pool; -} - -void mem_FreePool(MemoryPool *pool) -{ - struct cleanup *cleanup; - struct chunk *p, *next; - - for (cleanup = pool->cleanup; cleanup; cleanup = cleanup->next) { - cleanup->fn(cleanup->arg); - } - for (p = (struct chunk *)pool; p; p = next) { - next = p->next; - free(p); - } -} - -void *mem_Alloc(MemoryPool *pool, size_t size) -{ - struct chunk *ch; - void *rv = (void *)pool->free; - size = (size + pool->alignmask) & ~pool->alignmask; - if (size <= 0) size = pool->alignmask; - pool->free += size; - if (pool->free > pool->end || pool->free < (uintptr_t)rv) { - size_t minreq = (size + sizeof(struct chunk) + pool->alignmask) - & ~pool->alignmask; - pool->free = (uintptr_t)rv; - if (minreq >= pool->chunksize) { - /* request size is too big for the chunksize, so allocate it as */ - /* a single chunk of the right size */ - ch = malloc(minreq); - if (!ch) return 0; - } else { - ch = malloc(pool->chunksize); - if (!ch) return 0; - pool->free = (uintptr_t)ch + minreq; - pool->end = (uintptr_t)ch + pool->chunksize; - } - ch->next = pool->next; - pool->next = ch; - rv = (void *)(((uintptr_t)(ch+1) + pool->alignmask) & ~pool->alignmask); - } - return rv; -} - -int mem_AddCleanup(MemoryPool *pool, void (*fn)(void *), void *arg) { - struct cleanup *cleanup; - - pool->free = (pool->free + sizeof(void *) - 1) & ~(sizeof(void *)-1); - cleanup = mem_Alloc(pool, sizeof(struct cleanup)); - if (!cleanup) return -1; - cleanup->next = pool->cleanup; - cleanup->fn = fn; - cleanup->arg = arg; - pool->cleanup = cleanup; - return 0; -} diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/memory.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/memory.h deleted file mode 100755 index 89a57e24c9..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/memory.h +++ /dev/null @@ -1,89 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -#ifndef __MEMORY_H -#define __MEMORY_H - -typedef struct MemoryPool_rec MemoryPool; - -extern MemoryPool *mem_CreatePool(size_t chunksize, unsigned align); -extern void mem_FreePool(MemoryPool *); -extern void *mem_Alloc(MemoryPool *p, size_t size); -extern void *mem_Realloc(MemoryPool *p, void *old, size_t oldsize, size_t newsize); -extern int mem_AddCleanup(MemoryPool *p, void (*fn)(void *), void *arg); - -#endif /* __MEMORY_H */ diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/parser.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/parser.h deleted file mode 100755 index 5f70bdd1ac..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/parser.h +++ /dev/null @@ -1,126 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ - -#ifndef BISON_PARSER_H -# define BISON_PARSER_H - -#ifndef yystypepp -typedef struct { - int sc_int; - float sc_fval; - int sc_ident; - char symbol_name[MAX_SYMBOL_NAME_LEN+1]; -} yystypepp; - -# define YYSTYPE_IS_TRIVIAL 1 -#endif -# define CPP_AND_OP 257 -# define CPP_SUB_ASSIGN 259 -# define CPP_MOD_ASSIGN 260 -# define CPP_ADD_ASSIGN 261 -# define CPP_DIV_ASSIGN 262 -# define CPP_MUL_ASSIGN 263 -# define CPP_EQ_OP 264 -# define CPP_XOR_OP 265 -# define ERROR_SY 266 -# define CPP_FLOATCONSTANT 267 -# define CPP_GE_OP 268 -# define CPP_RIGHT_OP 269 -# define CPP_IDENTIFIER 270 -# define CPP_INTCONSTANT 271 -# define CPP_LE_OP 272 -# define CPP_LEFT_OP 273 -# define CPP_DEC_OP 274 -# define CPP_NE_OP 275 -# define CPP_OR_OP 276 -# define CPP_INC_OP 277 -# define CPP_STRCONSTANT 278 -# define CPP_TYPEIDENTIFIER 279 - -# define FIRST_USER_TOKEN_SY 289 - -# define CPP_RIGHT_ASSIGN 280 -# define CPP_LEFT_ASSIGN 281 -# define CPP_AND_ASSIGN 282 -# define CPP_OR_ASSIGN 283 -# define CPP_XOR_ASSIGN 284 -# define CPP_LEFT_BRACKET 285 -# define CPP_RIGHT_BRACKET 286 -# define CPP_LEFT_BRACE 287 -# define CPP_RIGHT_BRACE 288 - -#endif /* not BISON_PARSER_H */ diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/preprocess.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/preprocess.h deleted file mode 100755 index 63996d6695..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/preprocess.h +++ /dev/null @@ -1,84 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ - -# include "slglobals.h" -extern CPPStruct *cpp; -int InitCPPStruct(void); -int InitScanner(CPPStruct *cpp); -int InitAtomTable(AtomTable *atable, int htsize); -int ScanFromString(char *s); -char* GetStringOfAtom(AtomTable *atable, int atom); diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.c deleted file mode 100755 index d80e37b8e9..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.c +++ /dev/null @@ -1,789 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* scanner.c */ -/* */ - -#include -#include -#include -#include - -#if 0 - #include - #else - #define isinff(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \ - ((*(long *)&(x) & 0x007fffffL)==0000000000L)) -#endif - -#include "slglobals.h" - - -typedef struct StringInputSrc { - InputSrc base; - char *p; -} StringInputSrc; - -static int eof_scan(InputSrc *is, yystypepp * yylvalpp) -{ - return EOF; -} /* eof_scan */ - -static void noop(InputSrc *in, int ch, yystypepp * yylvalpp) {} - -static InputSrc eof_inputsrc = { 0, &eof_scan, &eof_scan, &noop }; - -static int byte_scan(InputSrc *, yystypepp * yylvalpp); - -#define EOL_SY '\n' - -#if defined(_WIN32) - #define DBG_BREAKPOINT() __asm int 3 - #elif defined(_M_AMD64) - #define DBG_BREAKPOINT() assert(!"Dbg_Breakpoint"); - #else - #define DBG_BREAKPOINT() - #endif - - #if defined(_WIN32) && !defined(_M_AMD64) - __int64 RDTSC ( void ) { - - __int64 v; - - __asm __emit 0x0f - __asm __emit 0x31 - __asm mov dword ptr v, eax - __asm mov dword ptr v+4, edx - - return v; - } -#endif - - -int InitScanner(CPPStruct *cpp) -{ - /* Add various atoms needed by the CPP line scanner: */ - if (!InitCPP()) - return 0; - - cpp->mostRecentToken = 0; - cpp->tokenLoc = &cpp->ltokenLoc; - - cpp->ltokenLoc.file = 0; - cpp->ltokenLoc.line = 0; - - cpp->currentInput = &eof_inputsrc; - cpp->previous_token = '\n'; - cpp->notAVersionToken = 0; - - return 1; -} /* InitScanner */ - -int FreeScanner(void) -{ - return (FreeCPP()); -} - -/* - * str_getch() - * takes care of reading from multiple strings. - * returns the next-char from the input stream. - * returns EOF when the complete shader is parsed. - */ -static int str_getch(StringInputSrc *in) -{ - for(;;){ - if (*in->p){ - if (*in->p == '\n') { - in->base.line++; - IncLineNumber(); - } - return *in->p++; - } - if(++(cpp->PaWhichStr) < cpp->PaArgc){ - free(in); - SetStringNumber(cpp->PaWhichStr); - SetLineNumber(1); - ScanFromString(cpp->PaArgv[cpp->PaWhichStr]); - in=(StringInputSrc*)cpp->currentInput; - continue; - } - else{ - cpp->currentInput = in->base.prev; - cpp->PaWhichStr=0; - free(in); - return EOF; - } - } -} /* str_getch */ - -static void str_ungetch(StringInputSrc *in, int ch, yystypepp *type) { - if (in->p[-1] == ch)in->p--; - else { - *(in->p)='\0'; /*this would take care of shifting to the previous string. */ - cpp->PaWhichStr--; - } - if (ch == '\n') { - in->base.line--; - DecLineNumber(); - } -} /* str_ungetch */ - -int ScanFromString(char *s) -{ - - StringInputSrc *in = malloc(sizeof(StringInputSrc)); - memset(in, 0, sizeof(StringInputSrc)); - in->p = s; - in->base.line = 1; - in->base.scan = byte_scan; - in->base.getch = (int (*)(InputSrc *, yystypepp *))str_getch; - in->base.ungetch = (void (*)(InputSrc *, int, yystypepp *))str_ungetch; - in->base.prev = cpp->currentInput; - cpp->currentInput = &in->base; - - return 1; -} /* ScanFromString; */ - - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*///////////////////////////////// Floating point constants: ///////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/* - * lBuildFloatValue() - Quick and dirty conversion to floating point. Since all - * we need is single precision this should be quite precise. - */ - -static float lBuildFloatValue(const char *str, int len, int exp) -{ - double val, expval, ten; - int ii, llen, absexp; - float rv; - - val = 0.0; - llen = len; - for (ii = 0; ii < len; ii++) - val = val*10.0 + (str[ii] - '0'); - if (exp != 0) { - absexp = exp > 0 ? exp : -exp; - expval = 1.0f; - ten = 10.0; - while (absexp) { - if (absexp & 1) - expval *= ten; - ten *= ten; - absexp >>= 1; - } - if (exp >= 0) { - val *= expval; - } else { - val /= expval; - } - } - rv = (float)val; - if (isinff(rv)) { - CPPErrorToInfoLog(" ERROR___FP_CONST_OVERFLOW"); - } - return rv; -} /* lBuildFloatValue */ - - -/* - * lFloatConst() - Scan a floating point constant. Assumes that the scanner - * has seen at least one digit, followed by either a decimal '.' or the - * letter 'e'. - */ - -static int lFloatConst(char *str, int len, int ch, yystypepp * yylvalpp) -{ - int HasDecimal, declen, exp, ExpSign; - int str_len; - float lval; - - HasDecimal = 0; - declen = 0; - exp = 0; - - str_len=len; - if (ch == '.') { - str[len++]=ch; - HasDecimal = 1; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - while (ch >= '0' && ch <= '9') { - if (len < MAX_SYMBOL_NAME_LEN) { - declen++; - if (len > 0 || ch != '0') { - str[len] = ch; - len++;str_len++; - } - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } else { - CPPErrorToInfoLog("ERROR___FP_CONST_TOO_LONG"); - len = 1,str_len=1; - } - } - } - - /* Exponent: */ - - if (ch == 'e' || ch == 'E') { - ExpSign = 1; - str[len++]=ch; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '+') { - str[len++]=ch; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } else if (ch == '-') { - ExpSign = -1; - str[len++]=ch; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } - if (ch >= '0' && ch <= '9') { - while (ch >= '0' && ch <= '9') { - exp = exp*10 + ch - '0'; - str[len++]=ch; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } - } else { - CPPErrorToInfoLog("ERROR___ERROR_IN_EXPONENT"); - } - exp *= ExpSign; - } - - if (len == 0) { - lval = 0.0f; - strcpy(str,"0.0"); - } else { - str[len]='\0'; - lval = lBuildFloatValue(str, str_len, exp - declen); - } - /* Suffix: */ - - yylvalpp->sc_fval = lval; - strcpy(yylvalpp->symbol_name,str); - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return CPP_FLOATCONSTANT; -} /* lFloatConst */ - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*/////////////////////////////////////// Normal Scanner ////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -static int byte_scan(InputSrc *in, yystypepp * yylvalpp) -{ - char symbol_name[MAX_SYMBOL_NAME_LEN + 1]; - char string_val[MAX_STRING_LEN + 1]; - int AlreadyComplained; - int len, ch, ii, ival = 0; - - for (;;) { - yylvalpp->sc_int = 0; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - - while (ch == ' ' || ch == '\t' || ch == '\r') { - yylvalpp->sc_int = 1; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } - - cpp->ltokenLoc.file = cpp->currentInput->name; - cpp->ltokenLoc.line = cpp->currentInput->line; - len = 0; - switch (ch) { - default: - return ch; /* Single character token */ - case EOF: - return -1; - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': case 'G': case 'H': case 'I': case 'J': - case 'K': case 'L': case 'M': case 'N': case 'O': - case 'P': case 'Q': case 'R': case 'S': case 'T': - case 'U': case 'V': case 'W': case 'X': case 'Y': - case 'Z': case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': case 'g': case 'h': case 'i': case 'j': - case 'k': case 'l': case 'm': case 'n': case 'o': - case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': - case 'z': - do { - if (len < MAX_SYMBOL_NAME_LEN) { - symbol_name[len] = ch; - len++; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } else { - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } - } while ((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '_'); - if (len >= MAX_SYMBOL_NAME_LEN) - len = MAX_SYMBOL_NAME_LEN - 1; - symbol_name[len] = '\0'; - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - yylvalpp->sc_ident = LookUpAddString(atable, symbol_name); - return CPP_IDENTIFIER; - break; - case '0': - yylvalpp->symbol_name[len++] = ch; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == 'x' || ch == 'X') { - yylvalpp->symbol_name[len++] = ch; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if ((ch >= '0' && ch <= '9') || - (ch >= 'A' && ch <= 'F') || - (ch >= 'a' && ch <= 'f')) - { - AlreadyComplained = 0; - ival = 0; - do { - yylvalpp->symbol_name[len++] = ch; - if (ival <= 0x0fffffff) { - if (ch >= '0' && ch <= '9') { - ii = ch - '0'; - } else if (ch >= 'A' && ch <= 'F') { - ii = ch - 'A' + 10; - } else { - ii = ch - 'a' + 10; - } - ival = (ival << 4) | ii; - } else { - if (!AlreadyComplained) - CPPErrorToInfoLog("ERROR___HEX_CONST_OVERFLOW"); - AlreadyComplained = 1; - } - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } while ((ch >= '0' && ch <= '9') || - (ch >= 'A' && ch <= 'F') || - (ch >= 'a' && ch <= 'f')); - } else { - CPPErrorToInfoLog("ERROR___ERROR_IN_HEX_CONSTANT"); - } - yylvalpp->symbol_name[len] = '\0'; - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - yylvalpp->sc_int = ival; - return CPP_INTCONSTANT; - } else if (ch >= '0' && ch <= '7') { /* octal integer constants */ - AlreadyComplained = 0; - ival = 0; - do { - yylvalpp->symbol_name[len++] = ch; - if (ival <= 0x1fffffff) { - ii = ch - '0'; - ival = (ival << 3) | ii; - } else { - if (!AlreadyComplained) - CPPErrorToInfoLog("ERROR___OCT_CONST_OVERFLOW"); - AlreadyComplained = 1; - } - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } while (ch >= '0' && ch <= '7'); - if (ch == '.' || ch == 'e' || ch == 'f' || ch == 'h' || ch == 'x'|| ch == 'E') - return lFloatConst(yylvalpp->symbol_name, len, ch, yylvalpp); - yylvalpp->symbol_name[len] = '\0'; - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - yylvalpp->sc_int = ival; - return CPP_INTCONSTANT; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - ch = '0'; - } - /* Fall through... */ - case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - do { - if (len < MAX_SYMBOL_NAME_LEN) { - if (len > 0 || ch != '0') { - yylvalpp->symbol_name[len] = ch; - len++; - } - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } - } while (ch >= '0' && ch <= '9'); - if (ch == '.' || ch == 'e' || ch == 'f' || ch == 'h' || ch == 'x'|| ch == 'E') { - return lFloatConst(yylvalpp->symbol_name, len, ch, yylvalpp); - } else { - yylvalpp->symbol_name[len] = '\0'; - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - ival = 0; - AlreadyComplained = 0; - for (ii = 0; ii < len; ii++) { - ch = yylvalpp->symbol_name[ii] - '0'; - if ((ival > 214748364) || (ival == 214748364 && ch >= 8)) { - if (!AlreadyComplained) - CPPErrorToInfoLog("ERROR___INTEGER_CONST_OVERFLOW"); - AlreadyComplained = 1; - } - ival = ival*10 + ch; - } - yylvalpp->sc_int = ival; - if(ival==0) - strcpy(yylvalpp->symbol_name,"0"); - return CPP_INTCONSTANT; - } - break; - case '-': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '-') { - return CPP_DEC_OP; - } else if (ch == '=') { - return CPP_SUB_ASSIGN; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '-'; - } - case '+': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '+') { - return CPP_INC_OP; - } else if (ch == '=') { - return CPP_ADD_ASSIGN; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '+'; - } - case '*': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '=') { - return CPP_MUL_ASSIGN; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '*'; - } - case '%': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '=') { - return CPP_MOD_ASSIGN; - } else if (ch == '>'){ - return CPP_RIGHT_BRACE; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '%'; - } - case ':': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '>') { - return CPP_RIGHT_BRACKET; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return ':'; - } - case '^': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '^') { - return CPP_XOR_OP; - } else { - if (ch == '=') - return CPP_XOR_ASSIGN; - else{ - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '^'; - } - } - - case '=': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '=') { - return CPP_EQ_OP; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '='; - } - case '!': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '=') { - return CPP_NE_OP; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '!'; - } - case '|': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '|') { - return CPP_OR_OP; - } else { - if (ch == '=') - return CPP_OR_ASSIGN; - else{ - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '|'; - } - } - case '&': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '&') { - return CPP_AND_OP; - } else { - if (ch == '=') - return CPP_AND_ASSIGN; - else{ - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '&'; - } - } - case '<': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '<') { - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if(ch == '=') - return CPP_LEFT_ASSIGN; - else{ - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return CPP_LEFT_OP; - } - } else { - if (ch == '=') { - return CPP_LE_OP; - } else { - if (ch == '%') - return CPP_LEFT_BRACE; - else if (ch == ':') - return CPP_LEFT_BRACKET; - else{ - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '<'; - } - } - } - case '>': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '>') { - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if(ch == '=') - return CPP_RIGHT_ASSIGN; - else{ - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return CPP_RIGHT_OP; - } - } else { - if (ch == '=') { - return CPP_GE_OP; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '>'; - } - } - case '.': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch >= '0' && ch <= '9') { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return lFloatConst(yylvalpp->symbol_name, 0, '.', yylvalpp); - } else { - if (ch == '.') { - return -1; /* Special EOF hack */ - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '.'; - } - } - case '/': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '/') { - do { - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } while (ch != '\n' && ch != EOF); - if (ch == EOF) - return -1; - return '\n'; - } else if (ch == '*') { - int nlcount = 0; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - do { - while (ch != '*') { - if (ch == '\n') nlcount++; - if (ch == EOF) { - CPPErrorToInfoLog("ERROR___EOF_IN_COMMENT"); - return -1; - } - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == EOF) { - CPPErrorToInfoLog("ERROR___EOF_IN_COMMENT"); - return -1; - } - } while (ch != '/'); - if (nlcount) { - return '\n'; - } - /* Go try it again... */ - } else if (ch == '=') { - return CPP_DIV_ASSIGN; - } else { - cpp->currentInput->ungetch(cpp->currentInput, ch, yylvalpp); - return '/'; - } - break; - case '"': - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - while (ch != '"' && ch != '\n' && ch != EOF) { - if (ch == '\\') { - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - if (ch == '\n' || ch == EOF) { - break; - } - } - if (len < MAX_STRING_LEN) { - string_val[len] = ch; - len++; - ch = cpp->currentInput->getch(cpp->currentInput, yylvalpp); - } - }; - string_val[len] = '\0'; - if (ch == '"') { - yylvalpp->sc_ident = LookUpAddString(atable, string_val); - return CPP_STRCONSTANT; - } else { - CPPErrorToInfoLog("ERROR___CPP_EOL_IN_STRING"); - return ERROR_SY; - } - } - } -} /* byte_scan */ - -int yylex_CPP(char* buf, int maxSize) -{ - yystypepp yylvalpp; - int token = '\n'; - - for(;;) { - - char* tokenString = 0; - token = cpp->currentInput->scan(cpp->currentInput, &yylvalpp); - if(check_EOF(token)) - return 0; - if (token == '#' && (cpp->previous_token == '\n'||cpp->previous_token==0)) { - token = readCPPline(&yylvalpp); - if(check_EOF(token)) - return 0; - continue; - } - cpp->previous_token = token; - /* expand macros */ - if (token == CPP_IDENTIFIER && MacroExpand(yylvalpp.sc_ident, &yylvalpp)) { - cpp->notAVersionToken = 1; - continue; - } - - if (token == '\n') - continue; - - if (token == CPP_IDENTIFIER) { - cpp->notAVersionToken = 1; - tokenString = GetStringOfAtom(atable,yylvalpp.sc_ident); - } else if (token == CPP_FLOATCONSTANT||token == CPP_INTCONSTANT){ - cpp->notAVersionToken = 1; - tokenString = yylvalpp.symbol_name; - } else { - cpp->notAVersionToken = 1; - tokenString = GetStringOfAtom(atable,token); - } - - if (tokenString) { - if ((signed)strlen(tokenString) >= maxSize) { - cpp->tokensBeforeEOF = 1; - return maxSize; - } else if (strlen(tokenString) > 0) { - strcpy(buf, tokenString); - cpp->tokensBeforeEOF = 1; - return (int)strlen(tokenString); - } - - return 0; - } - } - - return 0; -} /* yylex */ - -/*Checks if the token just read is EOF or not. */ -int check_EOF(int token) -{ - if(token==-1){ - if(cpp->ifdepth >0){ - CPPErrorToInfoLog("#endif missing!! Compilation stopped"); - cpp->CompileError=1; - } - return 1; - } - return 0; -} - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*///////////////////////////////////// End of scanner.c ////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.h deleted file mode 100755 index 15472b5bf1..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/scanner.h +++ /dev/null @@ -1,118 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* scanner.h */ -/* */ - -#if !defined(__SCANNER_H) -#define __SCANNER_H 1 - -#define MAX_SYMBOL_NAME_LEN 128 -#define MAX_STRING_LEN 512 - -#include "parser.h" - -/* Not really atom table stuff but needed first... */ - -typedef struct SourceLoc_Rec { - unsigned short file, line; -} SourceLoc; - -int yyparse (void); - -int yylex_CPP(char* buf, int maxSize); - -typedef struct InputSrc { - struct InputSrc *prev; - int (*scan)(struct InputSrc *, yystypepp *); - int (*getch)(struct InputSrc *, yystypepp *); - void (*ungetch)(struct InputSrc *, int, yystypepp *); - int name; /* atom */ - int line; -} InputSrc; - -int InitScanner(CPPStruct *cpp); /* Intialise the cpp scanner. */ -int ScanFromString(char *); /* Start scanning the input from the string mentioned. */ -int check_EOF(int); /* check if we hit a EOF abruptly */ -void CPPErrorToInfoLog(char *); /* sticking the msg,line into the Shader's.Info.log */ -void SetLineNumber(int); -void SetStringNumber(int); -void IncLineNumber(void); -void DecLineNumber(void); -int FreeScanner(void); /* Free the cpp scanner */ -#endif /* !(defined(__SCANNER_H) */ - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/slglobals.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/slglobals.h deleted file mode 100755 index 667ada6a29..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/slglobals.h +++ /dev/null @@ -1,115 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* slglobals.h */ -/* */ - -#if !defined(__SLGLOBALS_H) -#define __SLGLOBALS_H 1 - -typedef struct CPPStruct_Rec CPPStruct; - -extern CPPStruct *cpp; - -#undef CPPC_DEBUG_THE_COMPILER -#if defined(_DEBUG) -#define CPPC_DEBUG_THE_COMPILER 1 -#endif - -#undef CPPC_ENABLE_TOOLS -#define CPPC_ENABLE_TOOLS 1 - -#include "memory.h" -#include "atom.h" -#include "scanner.h" -#include "cpp.h" -#include "tokens.h" -#include "symbols.h" -#include "compile.h" -#if !defined(NO_PARSER) -#include "parser.h" -#endif - -#if !defined(NULL) -#define NULL 0 -#endif - -#endif /* !(defined(__SLGLOBALS_H) */ - - - - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.c deleted file mode 100755 index e807fe3434..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.c +++ /dev/null @@ -1,318 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* symbols.c */ -/* */ - -#include -#include -#include -#include - -#include "slglobals.h" - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*///////////////////////////////// Symbol Table Variables: /////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -Scope *ScopeList = NULL; -Scope *CurrentScope = NULL; -Scope *GlobalScope = NULL; - -static void unlinkScope(void *_scope) { - Scope *scope = _scope; - - if (scope->next) - scope->next->prev = scope->prev; - if (scope->prev) - scope->prev->next = scope->next; - else - ScopeList = scope->next; -} - -/* - * NewScope() - * - */ -Scope *NewScopeInPool(MemoryPool *pool) -{ - Scope *lScope; - - lScope = mem_Alloc(pool, sizeof(Scope)); - lScope->pool = pool; - lScope->parent = NULL; - lScope->funScope = NULL; - lScope->symbols = NULL; - - lScope->level = 0; - - lScope->programs = NULL; - if ((lScope->next = ScopeList)) - ScopeList->prev = lScope; - lScope->prev = 0; - ScopeList = lScope; - mem_AddCleanup(pool, unlinkScope, lScope); - return lScope; -} /* NewScope */ - -/* - * PushScope() - * - */ - -void PushScope(Scope *fScope) -{ - Scope *lScope; - - if (CurrentScope) { - fScope->level = CurrentScope->level + 1; - if (fScope->level == 1) { - if (!GlobalScope) { - /* HACK - CTD -- if GlobalScope==NULL and level==1, we're - * defining a function in the superglobal scope. Things - * will break if we leave the level as 1, so we arbitrarily - * set it to 2 */ - fScope->level = 2; - } - } - if (fScope->level >= 2) { - lScope = fScope; - while (lScope->level > 2) - lScope = lScope->next; - fScope->funScope = lScope; - } - } else { - fScope->level = 0; - } - fScope->parent = CurrentScope; - CurrentScope = fScope; -} /* PushScope */ - -/* - * PopScope() - * - */ - -Scope *PopScope(void) -{ - Scope *lScope; - - lScope = CurrentScope; - if (CurrentScope) - CurrentScope = CurrentScope->parent; - return lScope; -} /* PopScope */ - -/* - * NewSymbol() - Allocate a new symbol node; - * - */ - -Symbol *NewSymbol(SourceLoc *loc, Scope *fScope, int name, symbolkind kind) -{ - Symbol *lSymb; - char *pch; - int ii; - - lSymb = (Symbol *) mem_Alloc(fScope->pool, sizeof(Symbol)); - lSymb->left = NULL; - lSymb->right = NULL; - lSymb->next = NULL; - lSymb->name = name; - lSymb->loc = *loc; - lSymb->kind = kind; - - /* Clear union area: */ - - pch = (char *) &lSymb->details; - for (ii = 0; ii < sizeof(lSymb->details); ii++) - *pch++ = 0; - return lSymb; -} /* NewSymbol */ - -/* - * lAddToTree() - Using a binary tree is not a good idea for basic atom values because they - * are generated in order. We'll fix this later (by reversing the bit pattern). - */ - -static void lAddToTree(Symbol **fSymbols, Symbol *fSymb) -{ - Symbol *lSymb; - int lrev, frev; - - lSymb = *fSymbols; - if (lSymb) { - frev = GetReversedAtom(atable, fSymb->name); - while (lSymb) { - lrev = GetReversedAtom(atable, lSymb->name); - if (lrev == frev) { - CPPErrorToInfoLog("GetAtomString(atable, fSymb->name)"); - break; - } else { - if (lrev > frev) { - if (lSymb->left) { - lSymb = lSymb->left; - } else { - lSymb->left = fSymb; - break; - } - } else { - if (lSymb->right) { - lSymb = lSymb->right; - } else { - lSymb->right = fSymb; - break; - } - } - } - } - } else { - *fSymbols = fSymb; - } -} /* lAddToTree */ - - -/* - * AddSymbol() - Add a variable, type, or function name to a scope. - * - */ - -Symbol *AddSymbol(SourceLoc *loc, Scope *fScope, int atom, symbolkind kind) -{ - Symbol *lSymb; - - if (!fScope) - fScope = CurrentScope; - lSymb = NewSymbol(loc, fScope, atom, kind); - lAddToTree(&fScope->symbols, lSymb); - return lSymb; -} /* AddSymbol */ - - -/*********************************************************************************************/ -/************************************ Symbol Semantic Functions ******************************/ -/*********************************************************************************************/ - -/* - * LookUpLocalSymbol() - * - */ - -Symbol *LookUpLocalSymbol(Scope *fScope, int atom) -{ - Symbol *lSymb; - int rname, ratom; - - ratom = GetReversedAtom(atable, atom); - if (!fScope) - fScope = CurrentScope; - lSymb = fScope->symbols; - while (lSymb) { - rname = GetReversedAtom(atable, lSymb->name); - if (rname == ratom) { - return lSymb; - } else { - if (rname > ratom) { - lSymb = lSymb->left; - } else { - lSymb = lSymb->right; - } - } - } - return NULL; -} /* LookUpLocalSymbol */ - -/* - * LookUpSymbol() - * - */ - -Symbol *LookUpSymbol(Scope *fScope, int atom) -{ - Symbol *lSymb; - - if (!fScope) - fScope = CurrentScope; - while (fScope) { - lSymb = LookUpLocalSymbol(fScope, atom); - if (lSymb) - return lSymb; - fScope = fScope->parent; - } - return NULL; -} /* LookUpSymbol */ - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.h deleted file mode 100755 index 65cba9d6c9..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/symbols.h +++ /dev/null @@ -1,145 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* symbols.h */ -/* */ - -#if !defined(__SYMBOLS_H) -#define __SYMBOLS_H 1 - -#include "memory.h" - -typedef enum symbolkind { - MACRO_S -} symbolkind; - -/* Typedefs for things defined here in "symbols.h": */ - -typedef struct Scope_Rec Scope; -typedef struct Symbol_Rec Symbol; - -typedef struct SymbolList_Rec { - struct SymbolList_Rec *next; - Symbol *symb; -} SymbolList; - -struct Scope_Rec { - Scope *next, *prev; /* doubly-linked list of all scopes */ - Scope *parent; - Scope *funScope; /* Points to base scope of enclosing function */ - MemoryPool *pool; /* pool used for allocation in this scope */ - Symbol *symbols; - - int level; /* 0 = super globals, 1 = globals, etc. */ - - /* Only used at global scope (level 1): */ - SymbolList *programs; /* List of programs for this compilation. */ -}; - - -/* Symbol table is a simple binary tree. */ - -#include "cpp.h" /* to get MacroSymbol def */ - -struct Symbol_Rec { - Symbol *left, *right; - Symbol *next; - int name; /* Name atom */ - SourceLoc loc; - symbolkind kind; - union { - MacroSymbol mac; - } details; -}; - -extern Scope *CurrentScope; -extern Scope *GlobalScope; -extern Scope *ScopeList; - -Scope *NewScopeInPool(MemoryPool *); -#define NewScope() NewScopeInPool(CurrentScope->pool) -void PushScope(Scope *fScope); -Scope *PopScope(void); -Symbol *NewSymbol(SourceLoc *loc, Scope *fScope, int name, symbolkind kind); -Symbol *AddSymbol(SourceLoc *loc, Scope *fScope, int atom, symbolkind kind); -Symbol *LookUpLocalSymbol(Scope *fScope, int atom); -Symbol *LookUpSymbol(Scope *fScope, int atom); -void CPPErrorToInfoLog(char *); - - -#endif /* !defined(__SYMBOLS_H) */ - diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.c b/src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.c deleted file mode 100755 index 815277db55..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.c +++ /dev/null @@ -1,462 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* tokens.c */ -/* */ - -#include -#include -#include -#include -#include - -#include "slglobals.h" - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*////////////////////// Preprocessor and Token Recorder and Playback: //////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ - -/* - * idstr() - * Copy a string to a malloc'ed block and convert it into something suitable - * for an ID - * - */ - -static char *idstr(const char *fstr) -{ - size_t len; - char *str, *t; - const char *f; - - len = strlen(fstr); - str = (char *) malloc(len + 1); - for (f=fstr, t=str; *f; f++) { - if (isalnum(*f)) *t++ = *f; - else if (*f == '.' || *f == '/') *t++ = '_'; - } - *t = 0; - return str; -} /* idstr */ - - -/* - * lNewBlock() - * - */ - -static TokenBlock *lNewBlock(TokenStream *fTok) -{ - TokenBlock *lBlock; - - lBlock = (TokenBlock *) malloc(sizeof(TokenBlock) + 256); - lBlock->count = 0; - lBlock->current = 0; - lBlock->data = (unsigned char *) lBlock + sizeof(TokenBlock); - lBlock->max = 256; - lBlock->next = NULL; - if (fTok->head) { - fTok->current->next = lBlock; - } else { - fTok->head = lBlock; - } - fTok->current = lBlock; - return lBlock; -} /* lNewBlock */ - -/* - * lAddByte() - * - */ - -static void lAddByte(TokenStream *fTok, unsigned char fVal) -{ - TokenBlock *lBlock; - lBlock = fTok->current; - if (lBlock->count >= lBlock->max) - lBlock = lNewBlock(fTok); - lBlock->data[lBlock->count++] = fVal; -} /* lAddByte */ - - - -/* - * lReadByte() - Get the next byte from a stream. - * - */ - -static int lReadByte(TokenStream *pTok) -{ - TokenBlock *lBlock; - int lval = -1; - - lBlock = pTok->current; - if (lBlock) { - if (lBlock->current >= lBlock->count) { - lBlock = lBlock->next; - if (lBlock) - lBlock->current = 0; - pTok->current = lBlock; - } - if (lBlock) - lval = lBlock->data[lBlock->current++]; - } - return lval; -} /* lReadByte */ - -/*///////////////////////////////////// Global Functions:////////////////////////////////////// */ - -/* - * NewTokenStream() - * - */ - -TokenStream *NewTokenStream(const char *name) -{ - TokenStream *pTok; - - pTok = (TokenStream *) malloc(sizeof(TokenStream)); - pTok->next = NULL; - pTok->name = idstr(name); - pTok->head = NULL; - pTok->current = NULL; - lNewBlock(pTok); - return pTok; -} /* NewTokenStream */ - -/* - * DeleteTokenStream() - * - */ - -void DeleteTokenStream(TokenStream *pTok) -{ - TokenBlock *pBlock, *nBlock; - - if (pTok) { - pBlock = pTok->head; - while (pBlock) { - nBlock = pBlock->next; - free(pBlock); - pBlock = nBlock; - } - if (pTok->name) - free(pTok->name); - free(pTok); - } -} /* DeleteTokenStream */ - -/* - * RecordToken() - Add a token to the end of a list for later playback or printout. - * - */ - -void RecordToken(TokenStream *pTok, int token, yystypepp * yylvalpp) -{ - const char *s; - unsigned char *str=NULL; - - if (token > 256) - lAddByte(pTok, (unsigned char)((token & 0x7f) + 0x80)); - else - lAddByte(pTok, (unsigned char)(token & 0x7f)); - switch (token) { - case CPP_IDENTIFIER: - case CPP_TYPEIDENTIFIER: - case CPP_STRCONSTANT: - s = GetAtomString(atable, yylvalpp->sc_ident); - while (*s) - lAddByte(pTok, (unsigned char) *s++); - lAddByte(pTok, 0); - break; - case CPP_FLOATCONSTANT: - case CPP_INTCONSTANT: - str=yylvalpp->symbol_name; - while (*str){ - lAddByte(pTok,(unsigned char) *str); - *str++; - } - lAddByte(pTok, 0); - break; - case '(': - lAddByte(pTok, (unsigned char)(yylvalpp->sc_int ? 1 : 0)); - default: - break; - } -} /* RecordToken */ - -/* - * RewindTokenStream() - Reset a token stream in preperation for reading. - * - */ - -void RewindTokenStream(TokenStream *pTok) -{ - if (pTok->head) { - pTok->current = pTok->head; - pTok->current->current = 0; - } -} /* RewindTokenStream */ - -/* - * ReadToken() - Read the next token from a stream. - * - */ - -int ReadToken(TokenStream *pTok, yystypepp * yylvalpp) -{ - char symbol_name[MAX_SYMBOL_NAME_LEN + 1]; - char string_val[MAX_STRING_LEN + 1]; - int ltoken, len; - char ch; - - ltoken = lReadByte(pTok); - if (ltoken >= 0) { - if (ltoken > 127) - ltoken += 128; - switch (ltoken) { - case CPP_IDENTIFIER: - case CPP_TYPEIDENTIFIER: - len = 0; - ch = lReadByte(pTok); - while ((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '_') - { - if (len < MAX_SYMBOL_NAME_LEN) { - symbol_name[len] = ch; - len++; - ch = lReadByte(pTok); - } - } - symbol_name[len] = '\0'; - assert(ch == '\0'); - yylvalpp->sc_ident = LookUpAddString(atable, symbol_name); - return CPP_IDENTIFIER; - break; - case CPP_STRCONSTANT: - len = 0; - while ((ch = lReadByte(pTok)) != 0) - if (len < MAX_STRING_LEN) - string_val[len++] = ch; - string_val[len] = 0; - yylvalpp->sc_ident = LookUpAddString(atable, string_val); - break; - case CPP_FLOATCONSTANT: - len = 0; - ch = lReadByte(pTok); - while ((ch >= '0' && ch <= '9')||(ch=='e'||ch=='E'||ch=='.')||(ch=='+'||ch=='-')) - { - if (len < MAX_SYMBOL_NAME_LEN) { - symbol_name[len] = ch; - len++; - ch = lReadByte(pTok); - } - } - symbol_name[len] = '\0'; - assert(ch == '\0'); - strcpy(yylvalpp->symbol_name,symbol_name); - yylvalpp->sc_fval=(float)atof(yylvalpp->symbol_name); - break; - case CPP_INTCONSTANT: - len = 0; - ch = lReadByte(pTok); - while ((ch >= '0' && ch <= '9')) - { - if (len < MAX_SYMBOL_NAME_LEN) { - symbol_name[len] = ch; - len++; - ch = lReadByte(pTok); - } - } - symbol_name[len] = '\0'; - assert(ch == '\0'); - strcpy(yylvalpp->symbol_name,symbol_name); - yylvalpp->sc_int=atoi(yylvalpp->symbol_name); - break; - case '(': - yylvalpp->sc_int = lReadByte(pTok); - break; - } - return ltoken; - } - return EOF_SY; -} /* ReadToken */ - -typedef struct TokenInputSrc { - InputSrc base; - TokenStream *tokens; - int (*final)(CPPStruct *); -} TokenInputSrc; - -static int scan_token(TokenInputSrc *in, yystypepp * yylvalpp) -{ - int token = ReadToken(in->tokens, yylvalpp); - int (*final)(CPPStruct *); - cpp->tokenLoc->file = cpp->currentInput->name; - cpp->tokenLoc->line = cpp->currentInput->line; - if (token == '\n') { - in->base.line++; - return token; - } - if (token > 0) return token; - cpp->currentInput = in->base.prev; - final = in->final; - free(in); - if (final && !final(cpp)) return -1; - return cpp->currentInput->scan(cpp->currentInput, yylvalpp); -} - -int ReadFromTokenStream(TokenStream *ts, int name, int (*final)(CPPStruct *)) -{ - TokenInputSrc *in = malloc(sizeof(TokenInputSrc)); - memset(in, 0, sizeof(TokenInputSrc)); - in->base.name = name; - in->base.prev = cpp->currentInput; - in->base.scan = (int (*)(InputSrc *, yystypepp *))scan_token; - in->base.line = 1; - in->tokens = ts; - in->final = final; - RewindTokenStream(ts); - cpp->currentInput = &in->base; - return 1; -} - -typedef struct UngotToken { - InputSrc base; - int token; - yystypepp lval; -} UngotToken; - -static int reget_token(UngotToken *t, yystypepp * yylvalpp) -{ - int token = t->token; - *yylvalpp = t->lval; - cpp->currentInput = t->base.prev; - free(t); - return token; -} - -void UngetToken(int token, yystypepp * yylvalpp) { - UngotToken *t = malloc(sizeof(UngotToken)); - memset(t, 0, sizeof(UngotToken)); - t->token = token; - t->lval = *yylvalpp; - t->base.scan = (void *)reget_token; - t->base.prev = cpp->currentInput; - t->base.name = cpp->currentInput->name; - t->base.line = cpp->currentInput->line; - cpp->currentInput = &t->base; -} - - -void DumpTokenStream(FILE *fp, TokenStream *s, yystypepp * yylvalpp) { - int token; - char str[100]; - - if (fp == 0) fp = stdout; - RewindTokenStream(s); - while ((token = ReadToken(s, yylvalpp)) > 0) { - switch (token) { - case CPP_IDENTIFIER: - case CPP_TYPEIDENTIFIER: - sprintf(str, "%s ", GetAtomString(atable, yylvalpp->sc_ident)); - break; - case CPP_STRCONSTANT: - sprintf(str, "\"%s\"", GetAtomString(atable, yylvalpp->sc_ident)); - break; - case CPP_FLOATCONSTANT: - /*printf("%g9.6 ", yylvalpp->sc_fval); */ - break; - case CPP_INTCONSTANT: - /*printf("%d ", yylvalpp->sc_int); */ - break; - default: - if (token >= 127) - sprintf(str, "%s ", GetAtomString(atable, token)); - else - sprintf(str, "%c", token); - break; - } - CPPDebugLogMsg(str); - } -} - -/*///////////////////////////////////////////////////////////////////////////////////////////// */ -/*///////////////////////////////////// End of tokens.c /////////////////////////////////////// */ -/*///////////////////////////////////////////////////////////////////////////////////////////// */ diff --git a/src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.h b/src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.h deleted file mode 100755 index 0a25bf7c88..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/preprocessor/tokens.h +++ /dev/null @@ -1,122 +0,0 @@ -/* */ -/*Copyright (C) 2002-2005 3Dlabs Inc. Ltd. */ -/*All rights reserved. */ -/* */ -/*Redistribution and use in source and binary forms, with or without */ -/*modification, are permitted provided that the following conditions */ -/*are met: */ -/* */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials provided */ -/* with the distribution. */ -/* */ -/* Neither the name of 3Dlabs Inc. Ltd. nor the names of its */ -/* contributors may be used to endorse or promote products derived */ -/* from this software without specific prior written permission. */ -/* */ -/*THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ -/*"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ -/*LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ -/*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */ -/*COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ -/*INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */ -/*BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */ -/*LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */ -/*CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */ -/*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */ -/*ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ -/*POSSIBILITY OF SUCH DAMAGE. */ -/* */ -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ -/* */ -/* tokens.h */ -/* */ - -#if !defined(__TOKENS_H) -#define __TOKENS_H 1 - -#include "parser.h" - -#define EOF_SY (-1) - -typedef struct TokenBlock_Rec TokenBlock; - -typedef struct TokenStream_Rec { - struct TokenStream_Rec *next; - char *name; - TokenBlock *head; - TokenBlock *current; -} TokenStream; - -struct TokenBlock_Rec { - TokenBlock *next; - int current; - int count; - int max; - unsigned char *data; -}; - -extern TokenStream stdlib_cpp_stream; - - -TokenStream *NewTokenStream(const char *name); -void DeleteTokenStream(TokenStream *pTok); -void RecordToken(TokenStream *pTok, int token, yystypepp * yylvalpp); -void RewindTokenStream(TokenStream *pTok); -int ReadToken(TokenStream *pTok, yystypepp * yylvalpp); -int ReadFromTokenStream(TokenStream *pTok, int name, int (*final)(CPPStruct *)); -void UngetToken(int, yystypepp * yylvalpp); - -#if defined(CPPC_ENABLE_TOOLS) - -void DumpTokenStream(FILE *, TokenStream *, yystypepp * yylvalpp); - -#endif /* defined(CPPC_ENABLE_TOOLS) */ - -#endif /* !defined(__TOKENS_H) */ diff --git a/src/mesa/shader/slang/MachineIndependent/unistd.h b/src/mesa/shader/slang/MachineIndependent/unistd.h deleted file mode 100755 index efadd63fd9..0000000000 --- a/src/mesa/shader/slang/MachineIndependent/unistd.h +++ /dev/null @@ -1 +0,0 @@ -// This is a NULL file and is meant to be empty diff --git a/src/mesa/shader/slang/OGLCompilersDLL/Initialisation.cpp b/src/mesa/shader/slang/OGLCompilersDLL/Initialisation.cpp deleted file mode 100755 index 2e6f8c69ba..0000000000 --- a/src/mesa/shader/slang/OGLCompilersDLL/Initialisation.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// - -#define SH_EXPORTING -#include "Initialisation.h" -#include "Include/InitializeGlobals.h" -#include "Include/InitializeParseContext.h" -#include "Public/ShaderLang.h" - -OS_TLSIndex GlobalProcessFlag = OS_INVALID_TLS_INDEX; - -bool InitProcess() -{ - if (GlobalProcessFlag != OS_INVALID_TLS_INDEX) { - // - // Function is re-entrant. - // - return true; - } - - GlobalProcessFlag = OS_AllocTLSIndex(); - - if (GlobalProcessFlag == OS_INVALID_TLS_INDEX) { - assert (0 && "InitProcess(): Failed to allocate TLS area for init flag"); - return false; - } - - if (!InitializePoolIndex()) { - assert (0 && "InitProcess(): Failed to initalize global pool"); - return false; - } - - if (!InitializeParseContextIndex()) { - assert (0 && "InitProcess(): Failed to initalize parse context"); - return false; - } - - InitThread(); - return true; -} - - -bool InitThread() -{ - // - // This function is re-entrant - // - if (GlobalProcessFlag == OS_INVALID_TLS_INDEX) { - assert(0 && "InitThread(): Process hasn't been initalised."); - return false; - } - - if (OS_GetTLSValue(GlobalProcessFlag) != 0) { - return true; - } - - InitializeGlobalPools(); - - if(!InitializeGlobalParseContext()) - return false; - - if(!OS_SetTLSValue(GlobalProcessFlag, (void *)1)) { - assert(0 && "InitThread(): Unable to set init flag."); - return false; - } - - return true; -} - - -bool DetachThread() -{ - bool retFlag = true; - - if (GlobalProcessFlag == OS_INVALID_TLS_INDEX) { - assert(0 && "DetachThread(): Process hasn't been initalised."); - return false; - } - - // - // Function is re-entrant and this thread may not have been initalised. - // - if (OS_GetTLSValue(GlobalProcessFlag) != 0) - { - if(!OS_SetTLSValue(GlobalProcessFlag, (void *)0)) { - assert(0 && "DetachThread(): Unable to clear init flag."); - retFlag = false; - } - - FreeGlobalPools(); - - if (!FreeParseContext()) - retFlag = false; - } - - return retFlag; -} - -bool DetachProcess() -{ - bool retFlag = true; - - if (GlobalProcessFlag == OS_INVALID_TLS_INDEX) - return true; - - ShFinalize(); - - retFlag = DetachThread(); - - FreePoolIndex(); - - if(!FreeParseContextIndex()) - retFlag = false; - - OS_FreeTLSIndex(GlobalProcessFlag); - GlobalProcessFlag = OS_INVALID_TLS_INDEX; - - return retFlag; -} - diff --git a/src/mesa/shader/slang/OGLCompilersDLL/Initialisation.h b/src/mesa/shader/slang/OGLCompilersDLL/Initialisation.h deleted file mode 100755 index 1cfd97eeb3..0000000000 --- a/src/mesa/shader/slang/OGLCompilersDLL/Initialisation.h +++ /dev/null @@ -1,47 +0,0 @@ -// -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// -#ifndef __INITIALISATION_H -#define __INITIALISATION_H - - -#include "osinclude.h" - - -bool InitProcess(); -bool InitThread(); -bool DetachThread(); -bool DetachProcess(); - -#endif // __INITIALISATION_H - diff --git a/src/mesa/shader/slang/Public/ShaderLang.h b/src/mesa/shader/slang/Public/ShaderLang.h deleted file mode 100755 index 34b1688e87..0000000000 --- a/src/mesa/shader/slang/Public/ShaderLang.h +++ /dev/null @@ -1,212 +0,0 @@ -/* -//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef _COMPILER_INTERFACE_INCLUDED_ -#define _COMPILER_INTERFACE_INCLUDED_ - -#include "../Include/ResourceLimits.h" - -#ifdef _WIN32 -#define C_DECL __cdecl -/*#ifdef SH_EXPORTING - #define SH_IMPORT_EXPORT __declspec(dllexport) -#else - #define SH_IMPORT_EXPORT __declspec(dllimport) -#endif*/ -/* disable DLL linking */ -#define SH_IMPORT_EXPORT -#else -#define SH_IMPORT_EXPORT -#define __fastcall -#define C_DECL -#endif - -/* -// This is the platform independent interface between an OGL driver -// and the shading language compiler/linker. -*/ - -#ifdef __cplusplus - extern "C" { -#endif - -/* -// Driver must call this first, once, before doing any other -// compiler/linker operations. -*/ -SH_IMPORT_EXPORT int ShInitialize(); -/* -// Driver should call this at shutdown. -*/ -SH_IMPORT_EXPORT int __fastcall ShFinalize(); - -/* -// Types of languages the compiler can consume. -*/ -typedef enum { - EShLangVertex, - EShLangFragment, - EShLangPack, - EShLangUnpack, - EShLangCount -} EShLanguage; - -/* -// Types of output the linker will create. -*/ -typedef enum { - EShExVertexFragment, - EShExPackFragment, - EShExUnpackFragment, - EShExFragment -} EShExecutable; - -/* -// Optimization level for the compiler. -*/ -typedef enum { - EShOptNoGeneration, - EShOptNone, - EShOptSimple, /* Optimizations that can be done quickly */ - EShOptFull /* Optimizations that will take more time */ -} EShOptimizationLevel; - -/* -// Build a table for bindings. This can be used for locating -// attributes, uniforms, globals, etc., as needed. -*/ -typedef struct { - char* name; - int binding; -} ShBinding; - -typedef struct { - int numBindings; - ShBinding* bindings; /* array of bindings */ -} ShBindingTable; - -/* -// ShHandle held by but opaque to the driver. It is allocated, -// managed, and de-allocated by the compiler/linker. It's contents -// are defined by and used by the compiler and linker. For example, -// symbol table information and object code passed from the compiler -// to the linker can be stored where ShHandle points. -// -// If handle creation fails, 0 will be returned. -*/ -typedef void* ShHandle; - -/* -// Driver calls these to create and destroy compiler/linker -// objects. -*/ -SH_IMPORT_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int debugOptions); /* one per shader */ -SH_IMPORT_EXPORT ShHandle ShConstructLinker(const EShExecutable, int debugOptions); /* one per shader pair */ -SH_IMPORT_EXPORT ShHandle ShConstructUniformMap(); /* one per uniform namespace (currently entire program object) */ -SH_IMPORT_EXPORT void ShDestruct(ShHandle); - -/* -// The return value of ShCompile is boolean, indicating -// success or failure. -// -// The info-log should be written by ShCompile into -// ShHandle, so it can answer future queries. -*/ -SH_IMPORT_EXPORT int ShCompile( - const ShHandle, - const char* const shaderStrings[], - const int numStrings, - const EShOptimizationLevel, - const TBuiltInResource *resources, - int debugOptions - ); - - -/* -// Similar to ShCompile, but accepts an opaque handle to an -// intermediate language structure. -*/ -SH_IMPORT_EXPORT int ShCompileIntermediate( - ShHandle compiler, - ShHandle intermediate, - const EShOptimizationLevel, - int debuggable /* boolean */ - ); - -SH_IMPORT_EXPORT int ShLink( - const ShHandle, /* linker object */ - const ShHandle h[], /* compiler objects to link together */ - const int numHandles, - ShHandle uniformMap, /* updated with new uniforms */ - short int** uniformsAccessed, /* returned with indexes of uniforms accessed */ - int* numUniformsAccessed); - -/* -// ShSetEncrpytionMethod is a place-holder for specifying -// how source code is encrypted. -*/ -SH_IMPORT_EXPORT void ShSetEncryptionMethod(ShHandle); - -/* -// All the following return 0 if the information is not -// available in the object passed down, or the object is bad. -*/ -SH_IMPORT_EXPORT const char* ShGetInfoLog(const ShHandle); -SH_IMPORT_EXPORT const void* ShGetExecutable(const ShHandle); -SH_IMPORT_EXPORT int ShSetVirtualAttributeBindings(const ShHandle, const ShBindingTable*); /* to detect user aliasing */ -SH_IMPORT_EXPORT int ShSetFixedAttributeBindings(const ShHandle, const ShBindingTable*); /* to force any physical mappings */ -SH_IMPORT_EXPORT int ShGetPhysicalAttributeBindings(const ShHandle, const ShBindingTable**); /* for all attributes */ -/* -// Tell the linker to never assign a vertex attribute to this list of physical attributes -*/ -SH_IMPORT_EXPORT int ShExcludeAttributes(const ShHandle, int *attributes, int count); - -/* -// Returns the location ID of the named uniform. -// Returns -1 if error. -*/ -SH_IMPORT_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* name); - -enum TDebugOptions { - EDebugOpNone = 0x000, - EDebugOpIntermediate = 0x001, - EDebugOpAssembly = 0x002, - EDebugOpObjectCode = 0x004, - EDebugOpLinkMaps = 0x008 -}; - -#ifdef __cplusplus - } -#endif - -#endif /* _COMPILER_INTERFACE_INCLUDED_ */ diff --git a/src/mesa/shader/slang/Public/ShaderLangExt.h b/src/mesa/shader/slang/Public/ShaderLangExt.h deleted file mode 100755 index e44b5f99af..0000000000 --- a/src/mesa/shader/slang/Public/ShaderLangExt.h +++ /dev/null @@ -1,57 +0,0 @@ -// -//Copyright (C) 2002-2004 3Dlabs Inc. Ltd. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -//POSSIBILITY OF SUCH DAMAGE. -// -#ifndef _SHADERLANG_EXTENSION_INCLUDED_ -#define _SHADERLANG_EXTENSION_INCLUDED_ - -#include "ShaderLang.h" - -// -// This is the platform independent interface between an OGL driver -// and the shading language compiler/linker. -// - -#ifdef __cplusplus - extern "C" { -#endif - -SH_IMPORT_EXPORT int ShLinkExt( - const ShHandle, // linker object - const ShHandle h[], // compiler objects to link together - const int numHandles); - -#ifdef __cplusplus - } -#endif - -#endif // _SHADERLANG_EXTENSION_INCLUDED_ -- cgit v1.2.3 From 2cbfbcd972677b1afd1f8e479215179b7cab8b96 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 15:38:07 -0700 Subject: Obsolete. --- src/mesa/shader/slang/slang_mesa.cpp | 144 ----------------------------------- src/mesa/shader/slang/slang_mesa.h | 36 --------- 2 files changed, 180 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_mesa.cpp delete mode 100644 src/mesa/shader/slang/slang_mesa.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_mesa.cpp b/src/mesa/shader/slang/slang_mesa.cpp deleted file mode 100644 index 3f437ee7df..0000000000 --- a/src/mesa/shader/slang/slang_mesa.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "slang_mesa.h" -#include "Initialisation.h" -#include "Include/Common.h" -#include "Include/ShHandle.h" -#include "Public/ShaderLang.h" - - -class TGenericCompiler: public TCompiler -{ -public: - TGenericCompiler (EShLanguage l, int dOptions): TCompiler(l, infoSink), debugOptions(dOptions) - { - } -public: - virtual bool compile (TIntermNode *root) - { - haveValidObjectCode = true; - return haveValidObjectCode; - } - TInfoSink infoSink; - int debugOptions; -}; - -TCompiler *ConstructCompiler (EShLanguage language, int debugOptions) -{ - return new TGenericCompiler (language, debugOptions); -} - -void DeleteCompiler (TCompiler *compiler) -{ - delete compiler; -} - -class TGenericLinker: public TLinker -{ -public: - TGenericLinker (EShExecutable e, int dOptions): TLinker(e, infoSink), debugOptions(dOptions) - { - } -public: - bool link (TCompilerList &, TUniformMap *) - { - return true; - } - void getAttributeBindings (ShBindingTable const **t) const - { - } - TInfoSink infoSink; - int debugOptions; -}; - -TShHandleBase *ConstructLinker (EShExecutable executable, int debugOptions) -{ - return new TGenericLinker (executable, debugOptions); -} - -void DeleteLinker (TShHandleBase *linker) -{ - delete linker; -} - -class TUniformLinkedMap: public TUniformMap -{ -public: - TUniformLinkedMap() - { - } -public: - virtual int getLocation (const char *name) - { - return 0; - } -}; - -TUniformMap *ConstructUniformMap () -{ - return new TUniformLinkedMap; -} - -void DeleteUniformMap (TUniformMap *map) -{ - delete map; -} - - -namespace std -{ - -void _Xran () -{ - /* XXX fix this under Linux */ - /*_THROW(out_of_range, "invalid string position");*/ -} - -void _Xlen () -{ - /* XXX fix this under Linux */ - /*_THROW(length_error, "string too long");*/ -} - -} - - -/* these functions link with extern "C" */ - -int _mesa_isalnum (char c) -{ - return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'); -} - -int _glslang_3dlabs_InitProcess () -{ - return InitProcess () ? 1 : 0; -} - -int _glslang_3dlabs_ShInitialize () -{ - return ShInitialize () ? 1 : 0; -} - diff --git a/src/mesa/shader/slang/slang_mesa.h b/src/mesa/shader/slang/slang_mesa.h deleted file mode 100644 index ca7af22d2a..0000000000 --- a/src/mesa/shader/slang/slang_mesa.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#if defined __cplusplus -extern "C" { -#endif - -int _mesa_isalnum (char); -int _glslang_3dlabs_InitProcess (); -int _glslang_3dlabs_ShInitialize (); - -#if defined __cplusplus -} -#endif - -- cgit v1.2.3 From 2a9950dcb37849a64a59c3a88a858a6f8c33d8b5 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 19:20:45 -0700 Subject: Remove unneeded -I directories (3Dlabs headers). --- src/mesa/sources | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index 6e6f1c0bfd..cdae7b4d31 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -336,7 +336,5 @@ INCLUDE_DIRS = \ -I$(TOP)/src/mesa/shader \ -I$(TOP)/src/mesa/shader/grammar \ -I$(TOP)/src/mesa/shader/slang \ - -I$(TOP)/src/mesa/shader/slang/OSDependent/Linux \ - -I$(TOP)/src/mesa/shader/slang/OGLCompilersDLL \ -I$(TOP)/src/mesa/swrast \ -I$(TOP)/src/mesa/swrast_setup -- cgit v1.2.3 From e7e4181361cf2820761c654555f4751e49978a13 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 09:51:54 -0700 Subject: Remove include of s_arbshader.h --- src/mesa/swrast/s_span.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 69ecfa9558..e4904e1dd2 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -39,7 +39,6 @@ #include "s_atifragshader.h" #include "s_alpha.h" -#include "s_arbshader.h" #include "s_blend.h" #include "s_context.h" #include "s_depth.h" -- cgit v1.2.3 From b2a3a8554a114d93691d5350c234d2022c2c2916 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 13:56:58 -0700 Subject: New functions for cloning programs and parameter lists. --- src/mesa/shader/program.c | 128 ++++++++++++++++++++++++++++++++++++++++++---- src/mesa/shader/program.h | 14 ++++- 2 files changed, 131 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 1cf3547969..6245870722 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -365,6 +365,7 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) } + /** * Add a new parameter to a parameter list. * \param paramList the list to add the parameter to @@ -374,10 +375,10 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) * \param type type of parameter, such as * \return index of new parameter in the list, or -1 if error (out of mem) */ -static GLint -add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], GLuint size, - enum register_file type) +GLint +_mesa_add_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], GLuint size, + enum register_file type) { const GLuint n = paramList->NumParameters; @@ -416,6 +417,7 @@ add_parameter(struct gl_program_parameter_list *paramList, paramList->Parameters[n].Name = name ? _mesa_strdup(name) : NULL; paramList->Parameters[n].Type = type; + paramList->Parameters[n].Size = size; if (values) COPY_4V(paramList->ParameterValues[n], values); return (GLint) n; @@ -431,7 +433,7 @@ GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, const char *name, const GLfloat values[4]) { - return add_parameter(paramList, name, values, 4, PROGRAM_NAMED_PARAM); + return _mesa_add_parameter(paramList, name, values, 4, PROGRAM_NAMED_PARAM); } @@ -460,7 +462,7 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, } #endif size = 4; /** XXX fix */ - return add_parameter(paramList, name, values, size, PROGRAM_CONSTANT); + return _mesa_add_parameter(paramList, name, values, size, PROGRAM_CONSTANT); } @@ -489,7 +491,7 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, size, &pos, &swizzle)) { return pos; } - return add_parameter(paramList, NULL, values, size, PROGRAM_CONSTANT); + return _mesa_add_parameter(paramList, NULL, values, size, PROGRAM_CONSTANT); } @@ -504,7 +506,7 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList, } else { assert(size == 4); - i = add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); return i; } } @@ -521,7 +523,7 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, } else { assert(size == 4); - i = add_parameter(paramList, name, NULL, size, PROGRAM_VARYING); + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_VARYING); return i; } } @@ -587,7 +589,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, } name = make_state_string(stateTokens); - index = add_parameter(paramList, name, NULL, size, PROGRAM_STATE_VAR); + index = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_STATE_VAR); if (index >= 0) { GLuint i; for (i = 0; i < 6; i++) { @@ -716,6 +718,36 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramLis } +struct gl_program_parameter_list * +_mesa_clone_parameter_list(const struct gl_program_parameter_list *list) +{ + struct gl_program_parameter_list *clone; + GLuint i; + + clone = _mesa_new_parameter_list(); + if (!clone) + return NULL; + + /** Not too efficient, but correct */ + for (i = 0; i < list->NumParameters; i++) { + struct gl_program_parameter *p = list->Parameters + i; + GLint j = _mesa_add_parameter(clone, p->Name, list->ParameterValues[i], + p->Size, p->Type); + ASSERT(j >= 0); + /* copy state indexes */ + if (p->Type == PROGRAM_STATE_VAR) { + GLint k; + struct gl_program_parameter *q = clone->Parameters + j; + for (k = 0; k < 6; k++) { + q->StateIndexes[k] = p->StateIndexes[k]; + } + } + } + + return clone; +} + + /** * Use the list of tokens in the state[] array to find global GL state * and return it in . Usually, four values are returned in @@ -1525,6 +1557,82 @@ _mesa_realloc_instructions(struct prog_instruction *oldInst, } +/** + * Return a copy of a program. + * XXX Problem here if the program object is actually OO-derivation + * made by a device driver. + */ +struct gl_program * +_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) +{ + struct gl_program *clone; + + clone = _mesa_new_program(ctx, prog->Target, prog->Id); + if (!clone) + return NULL; + + assert(clone->Target == prog->Target); + clone->String = (GLubyte *) _mesa_strdup((char *) prog->String); + clone->RefCount = 1; + clone->Format = prog->Format; + clone->Instructions = _mesa_alloc_instructions(prog->NumInstructions); + if (!clone->Instructions) { + _mesa_delete_program(ctx, clone); + return NULL; + } + memcpy(clone->Instructions, prog->Instructions, + prog->NumInstructions * sizeof(struct prog_instruction)); + clone->InputsRead = prog->InputsRead; + clone->OutputsWritten = prog->OutputsWritten; + clone->Parameters = _mesa_clone_parameter_list(prog->Parameters); + memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); + clone->Varying = _mesa_clone_parameter_list(prog->Varying); + memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); + clone->NumInstructions = prog->NumInstructions; + clone->NumTemporaries = prog->NumTemporaries; + clone->NumParameters = prog->NumParameters; + clone->NumAttributes = prog->NumAttributes; + clone->NumAddressRegs = prog->NumAddressRegs; + clone->NumNativeInstructions = prog->NumNativeInstructions; + clone->NumNativeTemporaries = prog->NumNativeTemporaries; + clone->NumNativeParameters = prog->NumNativeParameters; + clone->NumNativeAttributes = prog->NumNativeAttributes; + clone->NumNativeAddressRegs = prog->NumNativeAddressRegs; + + switch (prog->Target) { + case GL_VERTEX_PROGRAM_ARB: + { + const struct gl_vertex_program *vp + = (const struct gl_vertex_program *) prog; + struct gl_vertex_program *vpc = (struct gl_vertex_program *) clone; + vpc->IsPositionInvariant = vp->IsPositionInvariant; + } + break; + case GL_FRAGMENT_PROGRAM_ARB: + { + const struct gl_fragment_program *fp + = (const struct gl_fragment_program *) prog; + struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone; + memcpy(fpc->TexturesUsed, fp->TexturesUsed, sizeof(fp->TexturesUsed)); + fpc->NumAluInstructions = fp->NumAluInstructions; + fpc->NumTexInstructions = fp->NumTexInstructions; + fpc->NumTexIndirections = fp->NumTexIndirections; + fpc->NumNativeAluInstructions = fp->NumNativeAluInstructions; + fpc->NumNativeTexInstructions = fp->NumNativeTexInstructions; + fpc->NumNativeTexIndirections = fp->NumNativeTexIndirections; + fpc->FogOption = fp->FogOption; + fpc->UsesKill = fp->UsesKill; + } + break; + default: + _mesa_problem(NULL, "Unexpected target in _mesa_clone_program"); + } + + return clone; +} + + + /** * Basic info about each instruction */ diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index a3f50b9310..98e2b53602 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -121,6 +121,9 @@ extern struct prog_instruction * _mesa_realloc_instructions(struct prog_instruction *oldInst, GLuint numOldInst, GLuint numNewInst); +extern struct gl_program * +_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog); + /** * Used for describing GL state referenced from inside ARB vertex and @@ -203,8 +206,9 @@ typedef enum gl_state_index_ { */ struct gl_program_parameter { - const char *Name; /**< Null-terminated string */ + const char *Name; /**< Null-terminated string */ enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ + GLuint Size; /**< Number of components (1..4) */ /** * A sequence of STATE_* tokens and integers to identify GL state. */ @@ -236,6 +240,14 @@ _mesa_new_parameter_list(void); extern void _mesa_free_parameter_list(struct gl_program_parameter_list *paramList); +extern struct gl_program_parameter_list * +_mesa_clone_parameter_list(const struct gl_program_parameter_list *list); + +extern GLint +_mesa_add_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], GLuint size, + enum register_file type); + extern GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, const char *name, const GLfloat values[4]); -- cgit v1.2.3 From d4f7e4cc01a99811565dc8f488cdad972e926b6c Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 13:58:32 -0700 Subject: The new linker actually does a few things right now: The varying vars used by the vertex and fragment shader are merged so they agree. Similarly, uniforms are merged (along with constants, etc). The vertex/fragment program instructions are then cloned and rewritten with the newly resolved uniform/varying locations. --- src/mesa/shader/slang/slang_link2.c | 401 +++++++++++++++++++++++------------- 1 file changed, 261 insertions(+), 140 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index e62cc01b3e..76954e17a6 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -33,127 +33,248 @@ #include "hash.h" #include "macros.h" #include "program.h" +#include "program_instruction.h" #include "shaderobjects.h" #include "slang_link.h" -#define RELEASE_GENERIC(x)\ - (**x)._unknown.Release ((struct gl2_unknown_intf **) (x)) - -#define RELEASE_CONTAINER(x)\ - (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) - -#define RELEASE_PROGRAM(x)\ - (**x)._container._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) +static GLboolean +link_varying_vars(struct gl_linked_program *linked, struct gl_program *prog) +{ + GLuint *map, i, firstVarying, newFile; + GLbitfield varsWritten, varsRead; + + map = (GLuint *) malloc(prog->Varying->NumParameters * sizeof(GLuint)); + if (!map) + return GL_FALSE; + + for (i = 0; i < prog->Varying->NumParameters; i++) { + /* see if this varying is in the linked varying list */ + const struct gl_program_parameter *var + = prog->Varying->Parameters + i; + + GLint j = _mesa_lookup_parameter_index(linked->Varying, -1, var->Name); + if (j >= 0) { + /* already in list, check size */ + if (var->Size != linked->Varying->Parameters[j].Size) { + /* error */ + return GL_FALSE; + } + } + else { + /* not already in linked list */ + j = _mesa_add_varying(linked->Varying, var->Name, var->Size); + } + ASSERT(j >= 0); -#define RELEASE_SHADER(x)\ - (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) + map[i] = j; + } + /* Varying variables are treated like other vertex program outputs + * (and like other fragment program inputs). The position of the + * first varying differs for vertex/fragment programs... + * Also, replace File=PROGRAM_VARYING with File=PROGRAM_INPUT/OUTPUT. + */ + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + firstVarying = VERT_RESULT_VAR0; + newFile = PROGRAM_OUTPUT; + } + else { + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + firstVarying = FRAG_ATTRIB_VAR0; + newFile = PROGRAM_INPUT; + } -static struct gl2_unknown_intf ** -lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, - const char *function) -{ - struct gl2_unknown_intf **unk; + /* keep track of which varying vars we read and write */ + varsWritten = varsRead = 0x0; - /* - * Note: _mesa_HashLookup() requires non-zero input values, so the - * passed-in handle value must be checked beforehand. + /* OK, now scan the program/shader instructions looking for varying vars, + * replacing the old index with the new index. */ - if (handle == 0) { - _mesa_error(ctx, GL_INVALID_VALUE, function); - return NULL; + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + GLuint j; + + if (inst->DstReg.File == PROGRAM_VARYING) { + inst->DstReg.File = newFile; + inst->DstReg.Index = map[ inst->DstReg.Index ] + firstVarying; + varsWritten |= (1 << inst->DstReg.Index); + } + + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_VARYING) { + inst->SrcReg[j].File = newFile; + inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ] + firstVarying; + varsRead |= (1 << inst->DstReg.Index); + } + } + /* XXX update program OutputsWritten, InputsRead */ } - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - unk = (struct gl2_unknown_intf **) _mesa_HashLookup(ctx->Shared->GL2Objects, - handle); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - if (unk == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, function); + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + prog->OutputsWritten |= varsWritten; } else { - unk = (**unk).QueryInterface(unk, uiid); - if (unk == NULL) - _mesa_error(ctx, GL_INVALID_OPERATION, function); + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + prog->InputsRead |= varsRead; } - return unk; -} -#define GET_GENERIC(x, handle, function)\ - struct gl2_generic_intf **x = (struct gl2_generic_intf **)\ - lookup_handle (ctx, handle, UIID_GENERIC, function); -#define GET_CONTAINER(x, handle, function)\ - struct gl2_container_intf **x = (struct gl2_container_intf **)\ - lookup_handle (ctx, handle, UIID_CONTAINER, function); + free(map); + + return GL_TRUE; +} -#define GET_PROGRAM(x, handle, function)\ - struct gl2_program_intf **x = (struct gl2_program_intf **)\ - lookup_handle (ctx, handle, UIID_PROGRAM, function); -#define GET_SHADER(x, handle, function)\ - struct gl2_shader_intf **x = (struct gl2_shader_intf **)\ - lookup_handle (ctx, handle, UIID_SHADER, function); +static GLboolean +is_uniform(enum register_file file) +{ + return (file == PROGRAM_ENV_PARAM || + file == PROGRAM_STATE_VAR || + file == PROGRAM_NAMED_PARAM || + file == PROGRAM_CONSTANT || + file == PROGRAM_UNIFORM); +} -static void -prelink(GLhandleARB programObj, struct gl_linked_program *linked) +static GLboolean +link_uniform_vars(struct gl_linked_program *linked, struct gl_program *prog) { - GET_CURRENT_CONTEXT(ctx); - - linked->VertexProgram = NULL; - linked->FragmentProgram = NULL; - - if (programObj != 0) { - GET_PROGRAM(program, programObj, "glUseProgramObjectARB(program)"); - - if (program == NULL) - return; - - /* XXX terrible hack to find the real vertex/fragment programs */ - { - GLuint handle; - GLsizei cnt, i; - cnt = (**program)._container.GetAttachedCount((struct gl2_container_intf **) (program)); - - for (i = 0; i < cnt; i++) { - struct gl2_generic_intf **x - = (**program)._container.GetAttached((struct gl2_container_intf **) program, i); - handle = (**x).GetName(x); - { - struct gl_program *prog; - GET_SHADER(sha, handle, "foo"); - if (sha && (*sha)->Program) { - prog = (*sha)->Program; - if (prog->Target == GL_VERTEX_PROGRAM_ARB) - linked->VertexProgram = (struct gl_vertex_program *) prog; - else if (prog->Target == GL_FRAGMENT_PROGRAM_ARB) - linked->FragmentProgram = (struct gl_fragment_program *) prog; - } - } -#if 0 - if (linked->VertexProgram) - printf("Found vert prog %p %d\n", - linked->VertexProgram, - linked->VertexProgram->Base.NumInstructions); - if (linked->FragmentProgram) - printf("Found frag prog %p %d\n", - linked->FragmentProgram, - linked->FragmentProgram->Base.NumInstructions); -#endif - RELEASE_GENERIC(x); + GLuint *map, i; + + map = (GLuint *) malloc(prog->Parameters->NumParameters * sizeof(GLuint)); + if (!map) + return GL_FALSE; + + for (i = 0; i < prog->Parameters->NumParameters; i++) { + /* see if this uniform is in the linked uniform list */ + const struct gl_program_parameter *p = prog->Parameters->Parameters + i; + const GLfloat *pVals = prog->Parameters->ParameterValues[i]; + GLint j; + + /* sanity check */ + assert(is_uniform(p->Type)); + + if (p->Name) { + j = _mesa_lookup_parameter_index(linked->Uniforms, -1, p->Name); + } + else { + GLuint swizzle; + ASSERT(p->Type == PROGRAM_CONSTANT); + if (_mesa_lookup_parameter_constant(linked->Uniforms, pVals, + p->Size, &j, &swizzle)) { + assert(j >= 0); + } + else { + j = -1; } } + if (j >= 0) { + /* already in list, check size XXX check this */ + assert(p->Size == linked->Uniforms->Parameters[j].Size); + } + else { + /* not already in linked list */ + switch (p->Type) { + case PROGRAM_ENV_PARAM: + j = _mesa_add_named_parameter(linked->Uniforms, p->Name, pVals); + case PROGRAM_CONSTANT: + j = _mesa_add_named_constant(linked->Uniforms, p->Name, pVals, p->Size); + break; + case PROGRAM_STATE_VAR: + j = _mesa_add_state_reference(linked->Uniforms, (const GLint *) p->StateIndexes); + break; + case PROGRAM_UNIFORM: + j = _mesa_add_uniform(linked->Uniforms, p->Name, p->Size); + break; + default: + abort(); + } + + } + ASSERT(j >= 0); + + map[i] = j; + } + + + /* OK, now scan the program/shader instructions looking for varying vars, + * replacing the old index with the new index. + */ + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + GLuint j; + + if (is_uniform(inst->DstReg.File)) { + inst->DstReg.Index = map[ inst->DstReg.Index ]; + } + + for (j = 0; j < 3; j++) { + if (is_uniform(inst->SrcReg[j].File)) { + inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ]; + } + } + /* XXX update program OutputsWritten, InputsRead */ } + + free(map); + + return GL_TRUE; } +static void +free_linked_program_data(GLcontext *ctx, struct gl_linked_program *linked) +{ + if (linked->VertexProgram) { + if (linked->VertexProgram->Base.Parameters == linked->Uniforms) { + /* to prevent a double-free in the next call */ + linked->VertexProgram->Base.Parameters = NULL; + } + _mesa_delete_program(ctx, &linked->VertexProgram->Base); + linked->VertexProgram = NULL; + } + + if (linked->FragmentProgram) { + if (linked->FragmentProgram->Base.Parameters == linked->Uniforms) { + /* to prevent a double-free in the next call */ + linked->FragmentProgram->Base.Parameters = NULL; + } + _mesa_delete_program(ctx, &linked->FragmentProgram->Base); + linked->FragmentProgram = NULL; + } + + + if (linked->Uniforms) { + _mesa_free_parameter_list(linked->Uniforms); + linked->Uniforms = NULL; + } + + if (linked->Varying) { + _mesa_free_parameter_list(linked->Varying); + linked->Varying = NULL; + } +} + +/** + * Shader linker. Currently: + * + * 1. The last attached vertex shader and fragment shader are linked. + * 2. Varying vars in the two shaders are combined so their locations + * agree between the vertex and fragment stages. They're treated as + * vertex program output attribs and as fragment program input attribs. + * 3. Uniform vars (including state references, constants, etc) from the + * vertex and fragment shaders are merged into one group. Recall that + * GLSL uniforms are shared by all linked shaders. + * 4. The vertex and fragment programs are cloned and modified to update + * src/dst register references so they use the new, linked uniform/ + * varying storage locations. + */ void _slang_link2(GLcontext *ctx, GLhandleARB programObj, @@ -161,66 +282,66 @@ _slang_link2(GLcontext *ctx, { struct gl_vertex_program *vertProg; struct gl_fragment_program *fragProg; + GLuint i; - prelink(programObj, linked); + free_linked_program_data(ctx, linked); - vertProg = linked->VertexProgram; - fragProg = linked->FragmentProgram; - - /* free old linked data, if any */ - if (linked->NumUniforms > 0) { - GLuint i; - for (i = 0; i < linked->NumUniforms; i++) { - _mesa_free((char *) linked->Uniforms[i].Name); - linked->Uniforms[i].Name = NULL; - linked->Uniforms[i].Value = NULL; - } - linked->NumUniforms = 0; - } + linked->Uniforms = _mesa_new_parameter_list(); + linked->Varying = _mesa_new_parameter_list(); - /* - * Find uniforms. - * XXX what about dups? + /** + * Find attached vertex shader, fragment shader */ - if (vertProg) { - GLuint i; - for (i = 0; i < vertProg->Base.Parameters->NumParameters; i++) { - struct gl_program_parameter *p - = vertProg->Base.Parameters->Parameters + i; - if (p->Name) { - struct gl_uniform *u = linked->Uniforms + linked->NumUniforms; - u->Name = _mesa_strdup(p->Name); - u->Value = &vertProg->Base.Parameters->ParameterValues[i][0]; - linked->NumUniforms++; - assert(linked->NumUniforms < MAX_UNIFORMS); - } - } + vertProg = NULL; + fragProg = NULL; + for (i = 0; i < linked->NumShaders; i++) { + if (linked->Shaders[i]->Target == GL_VERTEX_PROGRAM_ARB) + vertProg = (struct gl_vertex_program *) linked->Shaders[i]; + else if (linked->Shaders[i]->Target == GL_FRAGMENT_PROGRAM_ARB) + fragProg = (struct gl_fragment_program *) linked->Shaders[i]; + else + _mesa_problem(ctx, "unexpected shader target in slang_link2()"); } - if (fragProg) { - GLuint i; - for (i = 0; i < fragProg->Base.Parameters->NumParameters; i++) { - struct gl_program_parameter *p - = fragProg->Base.Parameters->Parameters + i; - if (p->Name) { - struct gl_uniform *u = linked->Uniforms + linked->NumUniforms; - u->Name = _mesa_strdup(p->Name); - u->Value = &fragProg->Base.Parameters->ParameterValues[i][0]; - linked->NumUniforms++; - assert(linked->NumUniforms < MAX_UNIFORMS); - } - } + if (!vertProg || !fragProg) { + /* XXX is it legal to have one but not the other?? */ + /* XXX record error */ + linked->LinkStatus = GL_FALSE; + return; } - /* For varying: - * scan both programs for varyings, rewrite programs so they agree - * on locations of varyings. + /* + * Make copies of the vertex/fragment programs now since we'll be + * changing src/dst registers after merging the uniforms and varying vars. */ + linked->VertexProgram = (struct gl_vertex_program *) + _mesa_clone_program(ctx, &vertProg->Base); + linked->FragmentProgram = (struct gl_fragment_program *) + _mesa_clone_program(ctx, &fragProg->Base); + +#if 1 + printf("************** orig program\n"); + _mesa_print_program(&fragProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); +#endif - /** - * Linking should _copy_ the vertex and fragment shader code, - * rewriting varying references as we go along... - */ + link_varying_vars(linked, &linked->VertexProgram->Base); + link_varying_vars(linked, &linked->FragmentProgram->Base); + + link_uniform_vars(linked, &linked->VertexProgram->Base); + link_uniform_vars(linked, &linked->FragmentProgram->Base); + + /* The vertex and fragment programs share a common set of uniforms now */ + _mesa_free_parameter_list(linked->VertexProgram->Base.Parameters); + _mesa_free_parameter_list(linked->FragmentProgram->Base.Parameters); + linked->VertexProgram->Base.Parameters = linked->Uniforms; + linked->FragmentProgram->Base.Parameters = linked->Uniforms; + +#if 1 + printf("************** linked/cloned\n"); + _mesa_print_program(&linked->FragmentProgram->Base); + _mesa_print_program_parameters(ctx, &linked->FragmentProgram->Base); +#endif - linked->LinkStatus = (vertProg && fragProg); + linked->LinkStatus = (linked->VertexProgram && linked->FragmentProgram); } -- cgit v1.2.3 From ef264c2971b43717c8f565f1d39f4149be3aaa85 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 13:58:57 -0700 Subject: Assorted fix-ups for the new linker. Disable some of the excessive debug output. --- src/mesa/shader/slang/slang_codegen.c | 9 ++++++--- src/mesa/shader/slang/slang_emit.c | 12 ++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index e428209ec4..40a27bc351 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -405,7 +405,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, /* OK, replace this slang_oper_identifier with a new expr */ assert(substNew[i]->type == slang_oper_identifier || substNew[i]->type == slang_oper_literal_float); -#if 1 /* DEBUG only */ +#if 0 /* DEBUG only */ if (substNew[i]->type == slang_oper_identifier) { assert(substNew[i]->var); assert(substNew[i]->var->a_name); @@ -730,7 +730,7 @@ slang_assemble_function_call(slang_assemble_ctx *A, slang_function *fun, #endif -#if 1 +#if 0 assert(inlined->locals); printf("*** Inlined code for call to %s:\n", (char*) fun->header.a_name); @@ -1231,8 +1231,9 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) return 0; printf("\n*********** Assemble function2(%s)\n", (char*)fun->header.a_name); - +#if 0 slang_print_function(fun, 1); +#endif A->program->Parameters = _mesa_new_parameter_list(); A->program->Varying = _mesa_new_parameter_list(); @@ -1254,11 +1255,13 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) CurFunction = NULL; +#if 0 printf("************* New body for %s *****\n", (char*)fun->header.a_name); slang_print_function(fun, 1); printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); +#endif if (_mesa_strcmp((char*) fun->header.a_name, "main") == 0) { _slang_emit_code(n, A->program); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 0b4ef6dba1..29d9544ebe 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -555,12 +555,20 @@ slang_alloc_varying(struct gl_program *prog, const char *name) { GLint i = _mesa_add_varying(prog->Varying, name, 4); /* XXX fix size */ if (prog->Target == GL_VERTEX_PROGRAM_ARB) { +#ifdef OLD_LINK i += VERT_RESULT_VAR0; prog->OutputsWritten |= (1 << i); +#else + prog->OutputsWritten |= (1 << (i + VERT_RESULT_VAR0)); +#endif } else { +#ifdef OLD_LINK i += FRAG_ATTRIB_VAR0; prog->InputsRead |= (1 << i); +#else + prog->InputsRead |= (1 << (i + FRAG_ATTRIB_VAR0)); +#endif } return i; } @@ -697,10 +705,14 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, else if (n->Var->type.qualifier == slang_qual_varying) { i = slang_alloc_varying(prog, (char *) n->Var->a_name); if (i >= 0) { +#ifdef OLD_LINK if (prog->Target == GL_VERTEX_PROGRAM_ARB) n->Store->File = PROGRAM_OUTPUT; else n->Store->File = PROGRAM_INPUT; +#else + n->Store->File = PROGRAM_VARYING; +#endif n->Store->Size = sizeof_type(&n->Var->type); n->Store->Index = i; return; -- cgit v1.2.3 From cc0c8b224880c6d6d5bf09f1d37b4275da476afd Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 13:59:25 -0700 Subject: Updates for new linker (merged varying/uniform vars). --- src/mesa/shader/shaderobjects.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index f805e2cebd..976fa0aa31 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -33,10 +33,12 @@ #include "context.h" #include "hash.h" #include "macros.h" +#include "program.h" #include "shaderobjects.h" #include "shaderobjects_3dlabs.h" #include "slang_link.h" +#define NEW_SLANG 1 #if FEATURE_ARB_shader_objects @@ -380,8 +382,8 @@ uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, #if NEW_SLANG if (ctx->ShaderObjects.Linked) { struct gl_linked_program *linked = ctx->ShaderObjects.Linked; - if (location >= 0 && location < linked->NumUniforms) { - GLfloat *v = linked->Uniforms[location].Value; + if (location >= 0 && location < linked->Uniforms->NumParameters) { + GLfloat *v = linked->Uniforms->ParameterValues[location]; const GLfloat *fValues = (const GLfloat *) values; /* XXX */ GLint i; if (type == GL_FLOAT_VEC4) @@ -396,10 +398,10 @@ uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, return; } } -#endif - +#else if (!(**pro).WriteUniform(pro, location, count, values, type)) _mesa_error(ctx, GL_INVALID_OPERATION, caller); +#endif } @@ -850,10 +852,12 @@ _mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) GET_CURRENT_CONTEXT(ctx); if (ctx->ShaderObjects.Linked) { - struct gl_linked_program *linked = ctx->ShaderObjects.Linked; + const struct gl_linked_program *linked = ctx->ShaderObjects.Linked; GLuint loc; - for (loc = 0; loc < linked->NumUniforms; loc++) { - if (!strcmp(linked->Uniforms[loc].Name, name)) { + for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { + const struct gl_program_parameter *u + = linked->Uniforms->Parameters + loc; + if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { return loc; } } -- cgit v1.2.3 From 200736ebd8c82b03b781a6c6481d05deb1f0c8bf Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 13:59:53 -0700 Subject: Modify _mesa_strdup() so it handles NULL correctly. --- src/mesa/main/imports.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index a09c497795..9c7ebf9287 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -920,15 +920,23 @@ _mesa_strncmp( const char *s1, const char *s2, size_t n ) #endif } -/** Implemented using _mesa_malloc() and _mesa_strcpy */ +/** + * Implemented using _mesa_malloc() and _mesa_strcpy. + * Note that NULL is handled accordingly. + */ char * _mesa_strdup( const char *s ) { - size_t l = _mesa_strlen(s); - char *s2 = (char *) _mesa_malloc(l + 1); - if (s2) - _mesa_strcpy(s2, s); - return s2; + if (s) { + size_t l = _mesa_strlen(s); + char *s2 = (char *) _mesa_malloc(l + 1); + if (s2) + _mesa_strcpy(s2, s); + return s2; + } + else { + return NULL; + } } /** Wrapper around either atoi() or xf86atoi() */ -- cgit v1.2.3 From 00cdc0a472c55330cbc58317f01b07f8f90be5a5 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:01:06 -0700 Subject: Split the program.[ch] files into several new files. --- src/mesa/shader/prog_instruction.c | 99 +++++ src/mesa/shader/prog_instruction.h | 403 +++++++++++++++++++ src/mesa/shader/prog_parameter.c | 448 +++++++++++++++++++++ src/mesa/shader/prog_parameter.h | 123 ++++++ src/mesa/shader/prog_print.c | 464 ++++++++++++++++++++++ src/mesa/shader/prog_print.h | 45 +++ src/mesa/shader/prog_statevars.c | 783 +++++++++++++++++++++++++++++++++++++ src/mesa/shader/prog_statevars.h | 117 ++++++ 8 files changed, 2482 insertions(+) create mode 100644 src/mesa/shader/prog_instruction.c create mode 100644 src/mesa/shader/prog_instruction.h create mode 100644 src/mesa/shader/prog_parameter.c create mode 100644 src/mesa/shader/prog_parameter.h create mode 100644 src/mesa/shader/prog_print.c create mode 100644 src/mesa/shader/prog_print.h create mode 100644 src/mesa/shader/prog_statevars.c create mode 100644 src/mesa/shader/prog_statevars.h (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c new file mode 100644 index 0000000000..f4dae76de0 --- /dev/null +++ b/src/mesa/shader/prog_instruction.c @@ -0,0 +1,99 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "glheader.h" +#include "imports.h" +#include "mtypes.h" +#include "prog_instruction.h" + + +/** + * Initialize program instruction fields to defaults. + * \param inst first instruction to initialize + * \param count number of instructions to initialize + */ +void +_mesa_init_instructions(struct prog_instruction *inst, GLuint count) +{ + GLuint i; + + _mesa_bzero(inst, count * sizeof(struct prog_instruction)); + + for (i = 0; i < count; i++) { + inst[i].SrcReg[0].File = PROGRAM_UNDEFINED; + inst[i].SrcReg[0].Swizzle = SWIZZLE_NOOP; + inst[i].SrcReg[1].File = PROGRAM_UNDEFINED; + inst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP; + inst[i].SrcReg[2].File = PROGRAM_UNDEFINED; + inst[i].SrcReg[2].Swizzle = SWIZZLE_NOOP; + + inst[i].DstReg.File = PROGRAM_UNDEFINED; + inst[i].DstReg.WriteMask = WRITEMASK_XYZW; + inst[i].DstReg.CondMask = COND_TR; + inst[i].DstReg.CondSwizzle = SWIZZLE_NOOP; + + inst[i].SaturateMode = SATURATE_OFF; + inst[i].Precision = FLOAT32; + } +} + + +/** + * Allocate an array of program instructions. + * \param numInst number of instructions + * \return pointer to instruction memory + */ +struct prog_instruction * +_mesa_alloc_instructions(GLuint numInst) +{ + return (struct prog_instruction *) + _mesa_calloc(numInst * sizeof(struct prog_instruction)); +} + + +/** + * Reallocate memory storing an array of program instructions. + * This is used when we need to append additional instructions onto an + * program. + * \param oldInst pointer to first of old/src instructions + * \param numOldInst number of instructions at + * \param numNewInst desired size of new instruction array. + * \return pointer to start of new instruction array. + */ +struct prog_instruction * +_mesa_realloc_instructions(struct prog_instruction *oldInst, + GLuint numOldInst, GLuint numNewInst) +{ + struct prog_instruction *newInst; + + newInst = (struct prog_instruction *) + _mesa_realloc(oldInst, + numOldInst * sizeof(struct prog_instruction), + numNewInst * sizeof(struct prog_instruction)); + + return newInst; +} + + diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h new file mode 100644 index 0000000000..bda6a2c322 --- /dev/null +++ b/src/mesa/shader/prog_instruction.h @@ -0,0 +1,403 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file prog_instruction.h + * + * Private vertex program types and constants only used by files + * related to vertex programs. + * + * \author Brian Paul + * \author Keith Whitwell + * \author Ian Romanick + */ + + +#ifndef PROG_INSTRUCTION_H +#define PROG_INSTRUCTION_H + + +/* for GL_ARB_v_p and GL_ARB_f_p SWZ instruction */ +#define SWIZZLE_X 0 +#define SWIZZLE_Y 1 +#define SWIZZLE_Z 2 +#define SWIZZLE_W 3 +#define SWIZZLE_ZERO 4 /* keep these values together: KW */ +#define SWIZZLE_ONE 5 /* keep these values together: KW */ + +#define MAKE_SWIZZLE4(a,b,c,d) (((a)<<0) | ((b)<<3) | ((c)<<6) | ((d)<<9)) +#define SWIZZLE_NOOP MAKE_SWIZZLE4(0,1,2,3) +#define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7) +#define GET_BIT(msk, idx) (((msk) >> (idx)) & 0x1) + + +#define WRITEMASK_X 0x1 +#define WRITEMASK_Y 0x2 +#define WRITEMASK_XY 0x3 +#define WRITEMASK_Z 0x4 +#define WRITEMASK_XZ 0x5 +#define WRITEMASK_YZ 0x6 +#define WRITEMASK_XYZ 0x7 +#define WRITEMASK_W 0x8 +#define WRITEMASK_XW 0x9 +#define WRITEMASK_YW 0xa +#define WRITEMASK_XYW 0xb +#define WRITEMASK_ZW 0xc +#define WRITEMASK_XZW 0xd +#define WRITEMASK_YZW 0xe +#define WRITEMASK_XYZW 0xf + + +/** + * Condition codes for GL_NV_fragment_program + */ +/*@{*/ +#define COND_GT 1 /* greater than zero */ +#define COND_EQ 2 /* equal to zero */ +#define COND_LT 3 /* less than zero */ +#define COND_UN 4 /* unordered (NaN) */ +#define COND_GE 5 /* greater then or equal to zero */ +#define COND_LE 6 /* less then or equal to zero */ +#define COND_NE 7 /* not equal to zero */ +#define COND_TR 8 /* always true */ +#define COND_FL 9 /* always false */ +/*@}*/ + + +/** + * Instruction precision for GL_NV_fragment_program + */ +/*@{*/ +#define FLOAT32 0x1 +#define FLOAT16 0x2 +#define FIXED12 0x4 +/*@}*/ + + +/** + * Saturation modes when storing values. + */ +/*@{*/ +#define SATURATE_OFF 0 +#define SATURATE_ZERO_ONE 1 +#define SATURATE_PLUS_MINUS_ONE 2 +/*@}*/ + + +/** + * Per-component negation masks + */ +/*@{*/ +#define NEGATE_X 0x1 +#define NEGATE_Y 0x2 +#define NEGATE_Z 0x4 +#define NEGATE_W 0x8 +#define NEGATE_XYZW 0xf +#define NEGATE_NONE 0x0 +/*@}*/ + + +/** + * Program instruction opcodes, for both vertex and fragment programs. + * \note changes to this opcode list must be reflected in t_vb_arbprogram.c + */ +typedef enum prog_opcode { + /* ARB_vp ARB_fp NV_vp NV_fp */ + /*---------------------------------*/ + OPCODE_NOP = 0, + OPCODE_ABS, /* X X 1.1 */ + OPCODE_ADD, /* X X X X */ + OPCODE_ARA, /* 2 */ + OPCODE_ARL, /* X X */ + OPCODE_ARL_NV, /* 2 */ + OPCODE_ARR, /* 2 */ + OPCODE_BRA, /* 2 */ + OPCODE_CAL, /* 2 2 */ + OPCODE_CMP, /* X */ + OPCODE_COS, /* X 2 X */ + OPCODE_DDX, /* X */ + OPCODE_DDY, /* X */ + OPCODE_DP3, /* X X X X */ + OPCODE_DP4, /* X X X X */ + OPCODE_DPH, /* X X 1.1 */ + OPCODE_DST, /* X X X X */ + OPCODE_END, /* X X X X */ + OPCODE_EX2, /* X X 2 X */ + OPCODE_EXP, /* X X */ + OPCODE_FLR, /* X X 2 X */ + OPCODE_FRC, /* X X 2 X */ + OPCODE_KIL, /* X */ + OPCODE_KIL_NV, /* X */ + OPCODE_LG2, /* X X 2 X */ + OPCODE_LIT, /* X X X X */ + OPCODE_LOG, /* X X */ + OPCODE_LRP, /* X X */ + OPCODE_MAD, /* X X X X */ + OPCODE_MAX, /* X X X X */ + OPCODE_MIN, /* X X X X */ + OPCODE_MOV, /* X X X X */ + OPCODE_MUL, /* X X X X */ + OPCODE_PK2H, /* X */ + OPCODE_PK2US, /* X */ + OPCODE_PK4B, /* X */ + OPCODE_PK4UB, /* X */ + OPCODE_POW, /* X X X */ + OPCODE_POPA, /* 3 */ + OPCODE_PRINT, /* X X */ + OPCODE_PUSHA, /* 3 */ + OPCODE_RCC, /* 1.1 */ + OPCODE_RCP, /* X X X X */ + OPCODE_RET, /* 2 2 */ + OPCODE_RFL, /* X X */ + OPCODE_RSQ, /* X X X X */ + OPCODE_SCS, /* X */ + OPCODE_SEQ, /* 2 X */ + OPCODE_SFL, /* 2 X */ + OPCODE_SGE, /* X X X X */ + OPCODE_SGT, /* 2 X */ + OPCODE_SIN, /* X 2 X */ + OPCODE_SLE, /* 2 X */ + OPCODE_SLT, /* X X X X */ + OPCODE_SNE, /* 2 X */ + OPCODE_SSG, /* 2 */ + OPCODE_STR, /* 2 X */ + OPCODE_SUB, /* X X 1.1 X */ + OPCODE_SWZ, /* X X */ + OPCODE_TEX, /* X 3 X */ + OPCODE_TXB, /* X 3 */ + OPCODE_TXD, /* X */ + OPCODE_TXL, /* 3 2 */ + OPCODE_TXP, /* X */ + OPCODE_TXP_NV, /* 3 X */ + OPCODE_UP2H, /* X */ + OPCODE_UP2US, /* X */ + OPCODE_UP4B, /* X */ + OPCODE_UP4UB, /* X */ + OPCODE_X2D, /* X */ + OPCODE_XPD, /* X X */ + MAX_OPCODE +} gl_inst_opcode; + + +/** + * Instruction source register. + */ +struct prog_src_register +{ + GLuint File:4; /**< One of the PROGRAM_* register file values. */ + GLint Index:9; /**< May be negative for relative addressing. */ + GLuint Swizzle:12; + GLuint RelAddr:1; + + /** + * \name Source register "sign" control. + * + * The ARB and NV extensions allow varrying degrees of control over the + * sign of the source vector components. These values allow enough control + * for all flavors of the extensions. + */ + /*@{*/ + /** + * Per-component negation for the SWZ instruction. For non-SWZ + * instructions the only possible values are NEGATE_XYZW and NEGATE_NONE. + * + * \since + * ARB_vertex_program, ARB_fragment_program + */ + GLuint NegateBase:4; + + /** + * Take the component-wise absolute value. + * + * \since + * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, + * NV_vertex_program2_option. + */ + GLuint Abs:1; + + /** + * Post-absolute value negation (all components). + */ + GLuint NegateAbs:1; + /*@}*/ +}; + + +/** + * Instruction destination register. + */ +struct prog_dst_register +{ + /** + * One of the PROGRAM_* register file values. + */ + GLuint File:4; + + GLuint Index:8; + GLuint WriteMask:4; + + /** + * \name Conditional destination update control. + * + * \since + * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, + * NV_vertex_program2_option. + */ + /*@{*/ + /** + * Takes one of the 9 possible condition values (EQ, FL, GT, GE, LE, LT, + * NE, TR, or UN). Destination update is enabled if the matching + * (swizzled) condition code value passes. When a conditional update mask + * is not specified, this will be \c COND_TR. + */ + GLuint CondMask:4; + + /** + * Condition code swizzle value. + */ + GLuint CondSwizzle:12; + + /** + * Selects the condition code register to use for conditional destination + * update masking. In NV_fragmnet_program or NV_vertex_program2 mode, only + * condition code register 0 is available. In NV_vertex_program3 mode, + * condition code registers 0 and 1 are available. + */ + GLuint CondSrc:1; + /*@}*/ + + GLuint pad:31; +}; + + +/** + * Vertex/fragment program instruction. + */ +struct prog_instruction +{ + gl_inst_opcode Opcode; +#if FEATURE_MESA_program_debug + GLshort StringPos; +#endif + /** + * Arbitrary data. Used for the PRINT, CAL, and BRA instructions. + */ + void *Data; + + struct prog_src_register SrcReg[3]; + struct prog_dst_register DstReg; + + /** + * Indicates that the instruction should update the condition code + * register. + * + * \since + * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, + * NV_vertex_program2_option. + */ + GLuint CondUpdate:1; + + /** + * If prog_instruction::CondUpdate is \c GL_TRUE, this value selects the + * condition code register that is to be updated. + * + * In GL_NV_fragment_program or GL_NV_vertex_program2 mode, only condition + * code register 0 is available. In GL_NV_vertex_program3 mode, condition + * code registers 0 and 1 are available. + * + * \since + * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, + * NV_vertex_program2_option. + */ + GLuint CondDst:1; + + /** + * Saturate each value of the vectored result to the range [0,1] or the + * range [-1,1]. \c SSAT mode (i.e., saturation to the range [-1,1]) is + * only available in NV_fragment_program2 mode. + * Value is one of the SATURATE_* tokens. + * + * \since + * NV_fragment_program, NV_fragment_program_option, NV_vertex_program3. + */ + GLuint SaturateMode:2; + + /** + * Per-instruction selectable precision. + * + * \since + * NV_fragment_program, NV_fragment_program_option. + */ + GLuint Precision:3; + + /** + * \name Texture source controls. + * + * The texture source controls are only used with the \c TEX, \c TXD, + * \c TXL, and \c TXP instructions. + * + * \since + * ARB_fragment_program, NV_fragment_program, NV_vertex_program3. + */ + /*@{*/ + /** + * Source texture unit. OpenGL supports a maximum of 32 texture + * units. + */ + GLuint TexSrcUnit:5; + + /** + * Source texture target, one of TEXTURE_{1D,2D,3D,CUBE,RECT}_INDEX. + */ + GLuint TexSrcTarget:3; + /*@}*/ + + /** + * For BRA and CAL instructions, the location to jump to. + */ + GLuint BranchTarget; + + const char *Comment; +}; + + +extern void +_mesa_init_instructions(struct prog_instruction *inst, GLuint count); + +extern struct prog_instruction * +_mesa_alloc_instructions(GLuint numInst); + +extern struct prog_instruction * +_mesa_realloc_instructions(struct prog_instruction *oldInst, + GLuint numOldInst, GLuint numNewInst); + +extern GLuint +_mesa_num_inst_src_regs(gl_inst_opcode opcode); + +extern const char * +_mesa_opcode_string(gl_inst_opcode opcode); + + +#endif /* PROG_INSTRUCTION_H */ diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c new file mode 100644 index 0000000000..f634e38800 --- /dev/null +++ b/src/mesa/shader/prog_parameter.c @@ -0,0 +1,448 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file prog_parameter.c + * Program parameter lists and functions. + * \author Brian Paul + */ + + +#include "glheader.h" +#include "imports.h" +#include "macros.h" +#include "mtypes.h" +#include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_statevars.h" + + +struct gl_program_parameter_list * +_mesa_new_parameter_list(void) +{ + return (struct gl_program_parameter_list *) + _mesa_calloc(sizeof(struct gl_program_parameter_list)); +} + + +/** + * Free a parameter list and all its parameters + */ +void +_mesa_free_parameter_list(struct gl_program_parameter_list *paramList) +{ + GLuint i; + for (i = 0; i < paramList->NumParameters; i++) { + if (paramList->Parameters[i].Name) + _mesa_free((void *) paramList->Parameters[i].Name); + } + _mesa_free(paramList->Parameters); + if (paramList->ParameterValues) + _mesa_align_free(paramList->ParameterValues); + _mesa_free(paramList); +} + + + +/** + * Add a new parameter to a parameter list. + * \param paramList the list to add the parameter to + * \param name the parameter name, will be duplicated/copied! + * \param values initial parameter value, up to 4 GLfloats + * \param size number of elements in 'values' vector (1..4) + * \param type type of parameter, such as + * \return index of new parameter in the list, or -1 if error (out of mem) + */ +GLint +_mesa_add_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], GLuint size, + enum register_file type) +{ + const GLuint n = paramList->NumParameters; + + if (n == paramList->Size) { + /* Need to grow the parameter list array */ + if (paramList->Size == 0) + paramList->Size = 8; + else + paramList->Size *= 2; + + /* realloc arrays */ + paramList->Parameters = (struct gl_program_parameter *) + _mesa_realloc(paramList->Parameters, + n * sizeof(struct gl_program_parameter), + paramList->Size * sizeof(struct gl_program_parameter)); + + paramList->ParameterValues = (GLfloat (*)[4]) + _mesa_align_realloc(paramList->ParameterValues, /* old buf */ + n * 4 * sizeof(GLfloat), /* old size */ + paramList->Size * 4 *sizeof(GLfloat), /* new sz */ + 16); + } + + if (!paramList->Parameters || + !paramList->ParameterValues) { + /* out of memory */ + paramList->NumParameters = 0; + paramList->Size = 0; + return -1; + } + else { + paramList->NumParameters = n + 1; + + _mesa_memset(¶mList->Parameters[n], 0, + sizeof(struct gl_program_parameter)); + + paramList->Parameters[n].Name = name ? _mesa_strdup(name) : NULL; + paramList->Parameters[n].Type = type; + paramList->Parameters[n].Size = size; + if (values) + COPY_4V(paramList->ParameterValues[n], values); + return (GLint) n; + } +} + + +/** + * Add a new named program parameter (Ex: NV_fragment_program DEFINE statement) + * \return index of the new entry in the parameter list + */ +GLint +_mesa_add_named_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4]) +{ + return _mesa_add_parameter(paramList, name, values, 4, PROGRAM_NAMED_PARAM); +} + + +/** + * Add a new named constant to the parameter list. + * This will be used when the program contains something like this: + * PARAM myVals = { 0, 1, 2, 3 }; + * + * \param paramList the parameter list + * \param name the name for the constant + * \param values four float values + * \return index/position of the new parameter in the parameter list + */ +GLint +_mesa_add_named_constant(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], + GLuint size) +{ +#if 0 /* disable this for now -- we need to save the name! */ + GLint pos; + GLuint swizzle; + ASSERT(size == 4); /* XXX future feature */ + /* check if we already have this constant */ + if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { + return pos; + } +#endif + size = 4; /** XXX fix */ + return _mesa_add_parameter(paramList, name, values, size, PROGRAM_CONSTANT); +} + + +/** + * Add a new unnamed constant to the parameter list. + * This will be used when the program contains something like this: + * MOV r, { 0, 1, 2, 3 }; + * + * \param paramList the parameter list + * \param values four float values + * \param swizzleOut returns swizzle mask for accessing the constant + * \return index/position of the new parameter in the parameter list. + */ +GLint +_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, + const GLfloat values[4], GLuint size, + GLuint *swizzleOut) +{ + GLint pos; + GLuint swizzle; + ASSERT(size >= 1); + ASSERT(size <= 4); + size = 4; /* XXX temporary */ + /* check if we already have this constant */ + if (_mesa_lookup_parameter_constant(paramList, values, + size, &pos, &swizzle)) { + return pos; + } + return _mesa_add_parameter(paramList, NULL, values, size, PROGRAM_CONSTANT); +} + + +GLint +_mesa_add_uniform(struct gl_program_parameter_list *paramList, + const char *name, GLuint size) +{ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_UNIFORM) { + /* already in list */ + return i; + } + else { + assert(size == 4); + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); + return i; + } +} + + +GLint +_mesa_add_varying(struct gl_program_parameter_list *paramList, + const char *name, GLuint size) +{ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_VARYING) { + /* already in list */ + return i; + } + else { + assert(size == 4); + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_VARYING); + return i; + } +} + + + + +#if 0 /* not used yet */ +/** + * Returns the number of 4-component registers needed to store a piece + * of GL state. For matrices this may be as many as 4 registers, + * everything else needs + * just 1 register. + */ +static GLuint +sizeof_state_reference(const GLint *stateTokens) +{ + if (stateTokens[0] == STATE_MATRIX) { + GLuint rows = stateTokens[4] - stateTokens[3] + 1; + assert(rows >= 1); + assert(rows <= 4); + return rows; + } + else { + return 1; + } +} +#endif + + +/** + * Add a new state reference to the parameter list. + * This will be used when the program contains something like this: + * PARAM ambient = state.material.front.ambient; + * + * \param paramList the parameter list + * \param state an array of 6 state tokens + * \return index of the new parameter. + */ +GLint +_mesa_add_state_reference(struct gl_program_parameter_list *paramList, + const GLint *stateTokens) +{ + const GLuint size = 4; /* XXX fix */ + const char *name; + GLint index; + + /* Check if the state reference is already in the list */ + for (index = 0; index < paramList->NumParameters; index++) { + GLuint i, match = 0; + for (i = 0; i < 6; i++) { + if (paramList->Parameters[index].StateIndexes[i] == stateTokens[i]) { + match++; + } + else { + break; + } + } + if (match == 6) { + /* this state reference is already in the parameter list */ + return index; + } + } + + name = _mesa_program_state_string(stateTokens); + index = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_STATE_VAR); + if (index >= 0) { + GLuint i; + for (i = 0; i < 6; i++) { + paramList->Parameters[index].StateIndexes[i] + = (gl_state_index) stateTokens[i]; + } + paramList->StateFlags |= _mesa_program_state_flags(stateTokens); + } + + /* free name string here since we duplicated it in add_parameter() */ + _mesa_free((void *) name); + + return index; +} + + +/** + * Lookup a parameter value by name in the given parameter list. + * \return pointer to the float[4] values. + */ +GLfloat * +_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, + GLsizei nameLen, const char *name) +{ + GLuint i = _mesa_lookup_parameter_index(paramList, nameLen, name); + if (i < 0) + return NULL; + else + return paramList->ParameterValues[i]; +} + + +/** + * Given a program parameter name, find its position in the list of parameters. + * \param paramList the parameter list to search + * \param nameLen length of name (in chars). + * If length is negative, assume that name is null-terminated. + * \param name the name to search for + * \return index of parameter in the list. + */ +GLint +_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, + GLsizei nameLen, const char *name) +{ + GLint i; + + if (!paramList) + return -1; + + if (nameLen == -1) { + /* name is null-terminated */ + for (i = 0; i < (GLint) paramList->NumParameters; i++) { + if (paramList->Parameters[i].Name && + _mesa_strcmp(paramList->Parameters[i].Name, name) == 0) + return i; + } + } + else { + /* name is not null-terminated, use nameLen */ + for (i = 0; i < (GLint) paramList->NumParameters; i++) { + if (paramList->Parameters[i].Name && + _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 + && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen) + return i; + } + } + return -1; +} + + +/** + * Look for a float vector in the given parameter list. The float vector + * may be of length 1, 2, 3 or 4. + * \param paramList the parameter list to search + * \param v the float vector to search for + * \param size number of element in v + * \param posOut returns the position of the constant, if found + * \param swizzleOut returns a swizzle mask describing location of the + * vector elements if found + * \return GL_TRUE if found, GL_FALSE if not found + */ +GLboolean +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, + const GLfloat v[], GLsizei vSize, + GLint *posOut, GLuint *swizzleOut) +{ + GLuint i; + + assert(vSize >= 1); + assert(vSize <= 4); + + if (!paramList) + return -1; + + for (i = 0; i < paramList->NumParameters; i++) { + if (paramList->Parameters[i].Type == PROGRAM_CONSTANT) { + const GLint maxShift = 4 - vSize; + GLint shift, j; + for (shift = 0; shift <= maxShift; shift++) { + GLint matched = 0; + GLuint swizzle[4]; + swizzle[0] = swizzle[1] = swizzle[2] = swizzle[3] = 0; + /* XXX we could do out-of-order swizzle matches too, someday */ + for (j = 0; j < vSize; j++) { + assert(shift + j < 4); + if (paramList->ParameterValues[i][shift + j] == v[j]) { + matched++; + swizzle[j] = shift + j; + ASSERT(swizzle[j] >= SWIZZLE_X); + ASSERT(swizzle[j] <= SWIZZLE_W); + } + } + if (matched == vSize) { + /* found! */ + *posOut = i; + *swizzleOut = MAKE_SWIZZLE4(swizzle[0], swizzle[1], + swizzle[2], swizzle[3]); + return GL_TRUE; + } + } + } + } + + *posOut = -1; + return GL_FALSE; +} + + +struct gl_program_parameter_list * +_mesa_clone_parameter_list(const struct gl_program_parameter_list *list) +{ + struct gl_program_parameter_list *clone; + GLuint i; + + clone = _mesa_new_parameter_list(); + if (!clone) + return NULL; + + /** Not too efficient, but correct */ + for (i = 0; i < list->NumParameters; i++) { + struct gl_program_parameter *p = list->Parameters + i; + GLint j = _mesa_add_parameter(clone, p->Name, list->ParameterValues[i], + p->Size, p->Type); + ASSERT(j >= 0); + /* copy state indexes */ + if (p->Type == PROGRAM_STATE_VAR) { + GLint k; + struct gl_program_parameter *q = clone->Parameters + j; + for (k = 0; k < 6; k++) { + q->StateIndexes[k] = p->StateIndexes[k]; + } + } + } + + return clone; +} diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h new file mode 100644 index 0000000000..c60ef543b7 --- /dev/null +++ b/src/mesa/shader/prog_parameter.h @@ -0,0 +1,123 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file prog_parameter.c + * Program parameter lists and functions. + * \author Brian Paul + */ + +#ifndef PROG_PARAMETER_H +#define PROG_PARAMETER_H + +#include "mtypes.h" + + +/** + * Named program parameters + * Used for NV_fragment_program "DEFINE"d constants and "DECLARE"d parameters, + * and ARB_fragment_program global state references. For the later, Name + * might be "state.light[0].diffuse", for example. + */ +struct gl_program_parameter +{ + const char *Name; /**< Null-terminated string */ + enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ + GLuint Size; /**< Number of components (1..4) */ + /** + * A sequence of STATE_* tokens and integers to identify GL state. + */ + GLuint StateIndexes[6]; +}; + + +/** + * A list of the above program_parameter instances. + */ +struct gl_program_parameter_list +{ + GLuint Size; /**< allocated size of Parameters, ParameterValues */ + GLuint NumParameters; /**< number of parameters in arrays */ + struct gl_program_parameter *Parameters; /**< Array [Size] */ + GLfloat (*ParameterValues)[4]; /**< Array [Size] of GLfloat[4] */ + GLbitfield StateFlags; /**< _NEW_* flags indicating which state changes + might invalidate ParameterValues[] */ +}; + + +extern struct gl_program_parameter_list * +_mesa_new_parameter_list(void); + +extern void +_mesa_free_parameter_list(struct gl_program_parameter_list *paramList); + +extern struct gl_program_parameter_list * +_mesa_clone_parameter_list(const struct gl_program_parameter_list *list); + +extern GLint +_mesa_add_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], GLuint size, + enum register_file type); + +extern GLint +_mesa_add_named_parameter(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4]); + +extern GLint +_mesa_add_named_constant(struct gl_program_parameter_list *paramList, + const char *name, const GLfloat values[4], + GLuint size); + +extern GLint +_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, + const GLfloat values[4], GLuint size, + GLuint *swizzleOut); + +extern GLint +_mesa_add_uniform(struct gl_program_parameter_list *paramList, + const char *name, GLuint size); + +extern GLint +_mesa_add_varying(struct gl_program_parameter_list *paramList, + const char *name, GLuint size); + +extern GLint +_mesa_add_state_reference(struct gl_program_parameter_list *paramList, + const GLint *stateTokens); + +extern GLfloat * +_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, + GLsizei nameLen, const char *name); + +extern GLint +_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, + GLsizei nameLen, const char *name); + +extern GLboolean +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, + const GLfloat v[], GLsizei vSize, + GLint *posOut, GLuint *swizzleOut); + + +#endif /* PROG_PARAMETER_H */ diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c new file mode 100644 index 0000000000..eded71bbae --- /dev/null +++ b/src/mesa/shader/prog_print.c @@ -0,0 +1,464 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file prog_print.c + * Print vertex/fragment programs - for debugging. + * \author Brian Paul + */ + +#include "glheader.h" +#include "context.h" +#include "imports.h" +#include "macros.h" +#include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_print.h" +#include "prog_statevars.h" + + + +/** + * Basic info about each instruction + */ +struct instruction_info +{ + gl_inst_opcode Opcode; + const char *Name; + GLuint NumSrcRegs; +}; + +/** + * Instruction info + * \note Opcode should equal array index! + */ +static const struct instruction_info InstInfo[MAX_OPCODE] = { + { OPCODE_NOP, "NOP", 0 }, + { OPCODE_ABS, "ABS", 1 }, + { OPCODE_ADD, "ADD", 2 }, + { OPCODE_ARA, "ARA", 1 }, + { OPCODE_ARL, "ARL", 1 }, + { OPCODE_ARL_NV, "ARL", 1 }, + { OPCODE_ARR, "ARL", 1 }, + { OPCODE_BRA, "BRA", 0 }, + { OPCODE_CAL, "CAL", 0 }, + { OPCODE_CMP, "CMP", 3 }, + { OPCODE_COS, "COS", 1 }, + { OPCODE_DDX, "DDX", 1 }, + { OPCODE_DDY, "DDY", 1 }, + { OPCODE_DP3, "DP3", 2 }, + { OPCODE_DP4, "DP4", 2 }, + { OPCODE_DPH, "DPH", 2 }, + { OPCODE_DST, "DST", 2 }, + { OPCODE_END, "END", 0 }, + { OPCODE_EX2, "EX2", 1 }, + { OPCODE_EXP, "EXP", 1 }, + { OPCODE_FLR, "FLR", 1 }, + { OPCODE_FRC, "FRC", 1 }, + { OPCODE_KIL, "KIL", 1 }, + { OPCODE_KIL_NV, "KIL", 0 }, + { OPCODE_LG2, "LG2", 1 }, + { OPCODE_LIT, "LIT", 1 }, + { OPCODE_LOG, "LOG", 1 }, + { OPCODE_LRP, "LRP", 3 }, + { OPCODE_MAD, "MAD", 3 }, + { OPCODE_MAX, "MAX", 2 }, + { OPCODE_MIN, "MIN", 2 }, + { OPCODE_MOV, "MOV", 1 }, + { OPCODE_MUL, "MUL", 2 }, + { OPCODE_PK2H, "PK2H", 1 }, + { OPCODE_PK2US, "PK2US", 1 }, + { OPCODE_PK4B, "PK4B", 1 }, + { OPCODE_PK4UB, "PK4UB", 1 }, + { OPCODE_POW, "POW", 2 }, + { OPCODE_POPA, "POPA", 0 }, + { OPCODE_PRINT, "PRINT", 1 }, + { OPCODE_PUSHA, "PUSHA", 0 }, + { OPCODE_RCC, "RCC", 1 }, + { OPCODE_RCP, "RCP", 1 }, + { OPCODE_RET, "RET", 0 }, + { OPCODE_RFL, "RFL", 1 }, + { OPCODE_RSQ, "RSQ", 1 }, + { OPCODE_SCS, "SCS", 1 }, + { OPCODE_SEQ, "SEQ", 2 }, + { OPCODE_SFL, "SFL", 0 }, + { OPCODE_SGE, "SGE", 2 }, + { OPCODE_SGT, "SGT", 2 }, + { OPCODE_SIN, "SIN", 1 }, + { OPCODE_SLE, "SLE", 2 }, + { OPCODE_SLT, "SLT", 2 }, + { OPCODE_SNE, "SNE", 2 }, + { OPCODE_SSG, "SSG", 1 }, + { OPCODE_STR, "STR", 0 }, + { OPCODE_SUB, "SUB", 2 }, + { OPCODE_SWZ, "SWZ", 1 }, + { OPCODE_TEX, "TEX", 1 }, + { OPCODE_TXB, "TXB", 1 }, + { OPCODE_TXD, "TXD", 3 }, + { OPCODE_TXL, "TXL", 1 }, + { OPCODE_TXP, "TXP", 1 }, + { OPCODE_TXP_NV, "TXP", 1 }, + { OPCODE_UP2H, "UP2H", 1 }, + { OPCODE_UP2US, "UP2US", 1 }, + { OPCODE_UP4B, "UP4B", 1 }, + { OPCODE_UP4UB, "UP4UB", 1 }, + { OPCODE_X2D, "X2D", 3 }, + { OPCODE_XPD, "XPD", 2 } +}; + + +/** + * Return the number of src registers for the given instruction/opcode. + */ +GLuint +_mesa_num_inst_src_regs(gl_inst_opcode opcode) +{ + ASSERT(opcode == InstInfo[opcode].Opcode); + ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); + return InstInfo[opcode].NumSrcRegs; +} + + +/** + * Return string name for given program opcode. + */ +const char * +_mesa_opcode_string(gl_inst_opcode opcode) +{ + ASSERT(opcode < MAX_OPCODE); + return InstInfo[opcode].Name; +} + +/** + * Return string name for given program/register file. + */ +static const char * +program_file_string(enum register_file f) +{ + switch (f) { + case PROGRAM_TEMPORARY: + return "TEMP"; + case PROGRAM_LOCAL_PARAM: + return "LOCAL"; + case PROGRAM_ENV_PARAM: + return "ENV"; + case PROGRAM_STATE_VAR: + return "STATE"; + case PROGRAM_INPUT: + return "INPUT"; + case PROGRAM_OUTPUT: + return "OUTPUT"; + case PROGRAM_NAMED_PARAM: + return "NAMED"; + case PROGRAM_CONSTANT: + return "CONST"; + case PROGRAM_UNIFORM: + return "UNIFORM"; + case PROGRAM_VARYING: + return "VARYING"; + case PROGRAM_WRITE_ONLY: + return "WRITE_ONLY"; + case PROGRAM_ADDRESS: + return "ADDR"; + default: + return "Unknown program file!"; + } +} + + +/** + * Return a string representation of the given swizzle word. + * If extended is true, use extended (comma-separated) format. + */ +static const char * +swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended) +{ + static const char swz[] = "xyzw01"; + static char s[20]; + GLuint i = 0; + + if (!extended && swizzle == SWIZZLE_NOOP && negateBase == 0) + return ""; /* no swizzle/negation */ + + if (!extended) + s[i++] = '.'; + + if (negateBase & 0x1) + s[i++] = '-'; + s[i++] = swz[GET_SWZ(swizzle, 0)]; + + if (extended) { + s[i++] = ','; + } + + if (negateBase & 0x2) + s[i++] = '-'; + s[i++] = swz[GET_SWZ(swizzle, 1)]; + + if (extended) { + s[i++] = ','; + } + + if (negateBase & 0x4) + s[i++] = '-'; + s[i++] = swz[GET_SWZ(swizzle, 2)]; + + if (extended) { + s[i++] = ','; + } + + if (negateBase & 0x8) + s[i++] = '-'; + s[i++] = swz[GET_SWZ(swizzle, 3)]; + + s[i] = 0; + return s; +} + + +static const char * +writemask_string(GLuint writeMask) +{ + static char s[10]; + GLuint i = 0; + + if (writeMask == WRITEMASK_XYZW) + return ""; + + s[i++] = '.'; + if (writeMask & WRITEMASK_X) + s[i++] = 'x'; + if (writeMask & WRITEMASK_Y) + s[i++] = 'y'; + if (writeMask & WRITEMASK_Z) + s[i++] = 'z'; + if (writeMask & WRITEMASK_W) + s[i++] = 'w'; + + s[i] = 0; + return s; +} + +static void +print_dst_reg(const struct prog_dst_register *dstReg) +{ + _mesa_printf(" %s[%d]%s", + program_file_string((enum register_file) dstReg->File), + dstReg->Index, + writemask_string(dstReg->WriteMask)); +} + +static void +print_src_reg(const struct prog_src_register *srcReg) +{ + _mesa_printf("%s[%d]%s", + program_file_string((enum register_file) srcReg->File), + srcReg->Index, + swizzle_string(srcReg->Swizzle, + srcReg->NegateBase, GL_FALSE)); +} + +static void +print_comment(const struct prog_instruction *inst) +{ + if (inst->Comment) + _mesa_printf("; # %s\n", inst->Comment); + else + _mesa_printf(";\n"); +} + + +void +_mesa_print_alu_instruction(const struct prog_instruction *inst, + const char *opcode_string, + GLuint numRegs) +{ + GLuint j; + + _mesa_printf("%s", opcode_string); + + /* frag prog only */ + if (inst->SaturateMode == SATURATE_ZERO_ONE) + _mesa_printf("_SAT"); + + if (inst->DstReg.File != PROGRAM_UNDEFINED) { + _mesa_printf(" %s[%d]%s", + program_file_string((enum register_file) inst->DstReg.File), + inst->DstReg.Index, + writemask_string(inst->DstReg.WriteMask)); + } + else { + _mesa_printf(" ???"); + } + + if (numRegs > 0) + _mesa_printf(", "); + + for (j = 0; j < numRegs; j++) { + print_src_reg(inst->SrcReg + j); + if (j + 1 < numRegs) + _mesa_printf(", "); + } + + if (inst->Comment) + _mesa_printf(" # %s", inst->Comment); + + print_comment(inst); +} + + +/** + * Print a single vertex/fragment program instruction. + */ +void +_mesa_print_instruction(const struct prog_instruction *inst) +{ + switch (inst->Opcode) { + case OPCODE_PRINT: + _mesa_printf("PRINT '%s'", inst->Data); + if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { + _mesa_printf(", "); + _mesa_printf("%s[%d]%s", + program_file_string((enum register_file) inst->SrcReg[0].File), + inst->SrcReg[0].Index, + swizzle_string(inst->SrcReg[0].Swizzle, + inst->SrcReg[0].NegateBase, GL_FALSE)); + } + if (inst->Comment) + _mesa_printf(" # %s", inst->Comment); + print_comment(inst); + break; + case OPCODE_SWZ: + _mesa_printf("SWZ"); + if (inst->SaturateMode == SATURATE_ZERO_ONE) + _mesa_printf("_SAT"); + print_dst_reg(&inst->DstReg); + _mesa_printf("%s[%d], %s", + program_file_string((enum register_file) inst->SrcReg[0].File), + inst->SrcReg[0].Index, + swizzle_string(inst->SrcReg[0].Swizzle, + inst->SrcReg[0].NegateBase, GL_TRUE)); + print_comment(inst); + break; + case OPCODE_TEX: + case OPCODE_TXP: + case OPCODE_TXB: + _mesa_printf("%s", _mesa_opcode_string(inst->Opcode)); + if (inst->SaturateMode == SATURATE_ZERO_ONE) + _mesa_printf("_SAT"); + _mesa_printf(" "); + print_dst_reg(&inst->DstReg); + _mesa_printf(", "); + print_src_reg(&inst->SrcReg[0]); + _mesa_printf(", texture[%d], ", inst->TexSrcUnit); + switch (inst->TexSrcTarget) { + case TEXTURE_1D_INDEX: _mesa_printf("1D"); break; + case TEXTURE_2D_INDEX: _mesa_printf("2D"); break; + case TEXTURE_3D_INDEX: _mesa_printf("3D"); break; + case TEXTURE_CUBE_INDEX: _mesa_printf("CUBE"); break; + case TEXTURE_RECT_INDEX: _mesa_printf("RECT"); break; + default: + ; + } + print_comment(inst); + break; + case OPCODE_ARL: + _mesa_printf("ARL addr.x, "); + print_src_reg(&inst->SrcReg[0]); + print_comment(inst); + break; + case OPCODE_BRA: + _mesa_printf("BRA %u", inst->BranchTarget); + print_comment(inst); + break; + case OPCODE_CAL: + _mesa_printf("CAL %u", inst->BranchTarget); + print_comment(inst); + break; + case OPCODE_END: + _mesa_printf("END"); + print_comment(inst); + break; + /* XXX may need other special-case instructions */ + default: + /* typical alu instruction */ + _mesa_print_alu_instruction(inst, + _mesa_opcode_string(inst->Opcode), + _mesa_num_inst_src_regs(inst->Opcode)); + break; + } +} + + +/** + * Print a vertx/fragment program to stdout. + * XXX this function could be greatly improved. + */ +void +_mesa_print_program(const struct gl_program *prog) +{ + GLuint i; + for (i = 0; i < prog->NumInstructions; i++) { + _mesa_printf("%3d: ", i); + _mesa_print_instruction(prog->Instructions + i); + } +} + + +/** + * Print all of a program's parameters. + */ +void +_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog) +{ + GLint i; + + _mesa_printf("InputsRead: 0x%x\n", prog->InputsRead); + _mesa_printf("OutputsWritten: 0x%x\n", prog->OutputsWritten); + _mesa_printf("NumInstructions=%d\n", prog->NumInstructions); + _mesa_printf("NumTemporaries=%d\n", prog->NumTemporaries); + _mesa_printf("NumParameters=%d\n", prog->NumParameters); + _mesa_printf("NumAttributes=%d\n", prog->NumAttributes); + _mesa_printf("NumAddressRegs=%d\n", prog->NumAddressRegs); + + _mesa_load_state_parameters(ctx, prog->Parameters); + +#if 0 + _mesa_printf("Local Params:\n"); + for (i = 0; i < MAX_PROGRAM_LOCAL_PARAMS; i++){ + const GLfloat *p = prog->LocalParams[i]; + _mesa_printf("%2d: %f, %f, %f, %f\n", i, p[0], p[1], p[2], p[3]); + } +#endif + + for (i = 0; i < prog->Parameters->NumParameters; i++){ + struct gl_program_parameter *param = prog->Parameters->Parameters + i; + const GLfloat *v = prog->Parameters->ParameterValues[i]; + _mesa_printf("param[%d] %s %s = {%.3f, %.3f, %.3f, %.3f};\n", + i, + program_file_string(prog->Parameters->Parameters[i].Type), + param->Name, v[0], v[1], v[2], v[3]); + } +} diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h new file mode 100644 index 0000000000..595a0dcf37 --- /dev/null +++ b/src/mesa/shader/prog_print.h @@ -0,0 +1,45 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef PROG_PRINT_H +#define PROG_PRINT_H + + +extern void +_mesa_print_instruction(const struct prog_instruction *inst); + +extern void +_mesa_print_alu_instruction(const struct prog_instruction *inst, + const char *opcode_string, + GLuint numRegs); + +extern void +_mesa_print_program(const struct gl_program *prog); + +extern void +_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog); + + +#endif /* PROG_PRINT_H */ diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c new file mode 100644 index 0000000000..7377c7d821 --- /dev/null +++ b/src/mesa/shader/prog_statevars.c @@ -0,0 +1,783 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file prog_statevars.c + * Program state variable management. + * \author Brian Paul + */ + + +#include "glheader.h" +#include "context.h" +#include "hash.h" +#include "imports.h" +#include "macros.h" +#include "mtypes.h" +#include "prog_statevars.h" +#include "prog_parameter.h" +#include "nvvertparse.h" + + +/** + * Use the list of tokens in the state[] array to find global GL state + * and return it in . Usually, four values are returned in + * but matrix queries may return as many as 16 values. + * This function is used for ARB vertex/fragment programs. + * The program parser will produce the state[] values. + */ +static void +_mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], + GLfloat *value) +{ + switch (state[0]) { + case STATE_MATERIAL: + { + /* state[1] is either 0=front or 1=back side */ + const GLuint face = (GLuint) state[1]; + const struct gl_material *mat = &ctx->Light.Material; + ASSERT(face == 0 || face == 1); + /* we rely on tokens numbered so that _BACK_ == _FRONT_+ 1 */ + ASSERT(MAT_ATTRIB_FRONT_AMBIENT + 1 == MAT_ATTRIB_BACK_AMBIENT); + /* XXX we could get rid of this switch entirely with a little + * work in arbprogparse.c's parse_state_single_item(). + */ + /* state[2] is the material attribute */ + switch (state[2]) { + case STATE_AMBIENT: + COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_AMBIENT + face]); + return; + case STATE_DIFFUSE: + COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_DIFFUSE + face]); + return; + case STATE_SPECULAR: + COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_SPECULAR + face]); + return; + case STATE_EMISSION: + COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_EMISSION + face]); + return; + case STATE_SHININESS: + value[0] = mat->Attrib[MAT_ATTRIB_FRONT_SHININESS + face][0]; + value[1] = 0.0F; + value[2] = 0.0F; + value[3] = 1.0F; + return; + default: + _mesa_problem(ctx, "Invalid material state in fetch_state"); + return; + } + } + case STATE_LIGHT: + { + /* state[1] is the light number */ + const GLuint ln = (GLuint) state[1]; + /* state[2] is the light attribute */ + switch (state[2]) { + case STATE_AMBIENT: + COPY_4V(value, ctx->Light.Light[ln].Ambient); + return; + case STATE_DIFFUSE: + COPY_4V(value, ctx->Light.Light[ln].Diffuse); + return; + case STATE_SPECULAR: + COPY_4V(value, ctx->Light.Light[ln].Specular); + return; + case STATE_POSITION: + COPY_4V(value, ctx->Light.Light[ln].EyePosition); + return; + case STATE_ATTENUATION: + value[0] = ctx->Light.Light[ln].ConstantAttenuation; + value[1] = ctx->Light.Light[ln].LinearAttenuation; + value[2] = ctx->Light.Light[ln].QuadraticAttenuation; + value[3] = ctx->Light.Light[ln].SpotExponent; + return; + case STATE_SPOT_DIRECTION: + COPY_3V(value, ctx->Light.Light[ln].EyeDirection); + value[3] = ctx->Light.Light[ln]._CosCutoff; + return; + case STATE_HALF: + { + GLfloat eye_z[] = {0, 0, 1}; + + /* Compute infinite half angle vector: + * half-vector = light_position + (0, 0, 1) + * and then normalize. w = 0 + * + * light.EyePosition.w should be 0 for infinite lights. + */ + ADD_3V(value, eye_z, ctx->Light.Light[ln].EyePosition); + NORMALIZE_3FV(value); + value[3] = 0; + } + return; + case STATE_POSITION_NORMALIZED: + COPY_4V(value, ctx->Light.Light[ln].EyePosition); + NORMALIZE_3FV( value ); + return; + default: + _mesa_problem(ctx, "Invalid light state in fetch_state"); + return; + } + } + case STATE_LIGHTMODEL_AMBIENT: + COPY_4V(value, ctx->Light.Model.Ambient); + return; + case STATE_LIGHTMODEL_SCENECOLOR: + if (state[1] == 0) { + /* front */ + GLint i; + for (i = 0; i < 3; i++) { + value[i] = ctx->Light.Model.Ambient[i] + * ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT][i] + + ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_EMISSION][i]; + } + value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3]; + } + else { + /* back */ + GLint i; + for (i = 0; i < 3; i++) { + value[i] = ctx->Light.Model.Ambient[i] + * ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_AMBIENT][i] + + ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_EMISSION][i]; + } + value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3]; + } + return; + case STATE_LIGHTPROD: + { + const GLuint ln = (GLuint) state[1]; + const GLuint face = (GLuint) state[2]; + GLint i; + ASSERT(face == 0 || face == 1); + switch (state[3]) { + case STATE_AMBIENT: + for (i = 0; i < 3; i++) { + value[i] = ctx->Light.Light[ln].Ambient[i] * + ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][i]; + } + /* [3] = material alpha */ + value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; + return; + case STATE_DIFFUSE: + for (i = 0; i < 3; i++) { + value[i] = ctx->Light.Light[ln].Diffuse[i] * + ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][i]; + } + /* [3] = material alpha */ + value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; + return; + case STATE_SPECULAR: + for (i = 0; i < 3; i++) { + value[i] = ctx->Light.Light[ln].Specular[i] * + ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][i]; + } + /* [3] = material alpha */ + value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; + return; + default: + _mesa_problem(ctx, "Invalid lightprod state in fetch_state"); + return; + } + } + case STATE_TEXGEN: + { + /* state[1] is the texture unit */ + const GLuint unit = (GLuint) state[1]; + /* state[2] is the texgen attribute */ + switch (state[2]) { + case STATE_TEXGEN_EYE_S: + COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneS); + return; + case STATE_TEXGEN_EYE_T: + COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneT); + return; + case STATE_TEXGEN_EYE_R: + COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneR); + return; + case STATE_TEXGEN_EYE_Q: + COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneQ); + return; + case STATE_TEXGEN_OBJECT_S: + COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneS); + return; + case STATE_TEXGEN_OBJECT_T: + COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneT); + return; + case STATE_TEXGEN_OBJECT_R: + COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneR); + return; + case STATE_TEXGEN_OBJECT_Q: + COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneQ); + return; + default: + _mesa_problem(ctx, "Invalid texgen state in fetch_state"); + return; + } + } + case STATE_TEXENV_COLOR: + { + /* state[1] is the texture unit */ + const GLuint unit = (GLuint) state[1]; + COPY_4V(value, ctx->Texture.Unit[unit].EnvColor); + } + return; + case STATE_FOG_COLOR: + COPY_4V(value, ctx->Fog.Color); + return; + case STATE_FOG_PARAMS: + value[0] = ctx->Fog.Density; + value[1] = ctx->Fog.Start; + value[2] = ctx->Fog.End; + value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start); + return; + case STATE_CLIPPLANE: + { + const GLuint plane = (GLuint) state[1]; + COPY_4V(value, ctx->Transform.EyeUserPlane[plane]); + } + return; + case STATE_POINT_SIZE: + value[0] = ctx->Point.Size; + value[1] = ctx->Point.MinSize; + value[2] = ctx->Point.MaxSize; + value[3] = ctx->Point.Threshold; + return; + case STATE_POINT_ATTENUATION: + value[0] = ctx->Point.Params[0]; + value[1] = ctx->Point.Params[1]; + value[2] = ctx->Point.Params[2]; + value[3] = 1.0F; + return; + case STATE_MATRIX: + { + /* state[1] = modelview, projection, texture, etc. */ + /* state[2] = which texture matrix or program matrix */ + /* state[3] = first row to fetch */ + /* state[4] = last row to fetch */ + /* state[5] = transpose, inverse or invtrans */ + + const GLmatrix *matrix; + const gl_state_index mat = state[1]; + const GLuint index = (GLuint) state[2]; + const GLuint firstRow = (GLuint) state[3]; + const GLuint lastRow = (GLuint) state[4]; + const gl_state_index modifier = state[5]; + const GLfloat *m; + GLuint row, i; + if (mat == STATE_MODELVIEW) { + matrix = ctx->ModelviewMatrixStack.Top; + } + else if (mat == STATE_PROJECTION) { + matrix = ctx->ProjectionMatrixStack.Top; + } + else if (mat == STATE_MVP) { + matrix = &ctx->_ModelProjectMatrix; + } + else if (mat == STATE_TEXTURE) { + matrix = ctx->TextureMatrixStack[index].Top; + } + else if (mat == STATE_PROGRAM) { + matrix = ctx->ProgramMatrixStack[index].Top; + } + else { + _mesa_problem(ctx, "Bad matrix name in _mesa_fetch_state()"); + return; + } + if (modifier == STATE_MATRIX_INVERSE || + modifier == STATE_MATRIX_INVTRANS) { + /* Be sure inverse is up to date: + */ + _math_matrix_alloc_inv( (GLmatrix *) matrix ); + _math_matrix_analyse( (GLmatrix*) matrix ); + m = matrix->inv; + } + else { + m = matrix->m; + } + if (modifier == STATE_MATRIX_TRANSPOSE || + modifier == STATE_MATRIX_INVTRANS) { + for (i = 0, row = firstRow; row <= lastRow; row++) { + value[i++] = m[row * 4 + 0]; + value[i++] = m[row * 4 + 1]; + value[i++] = m[row * 4 + 2]; + value[i++] = m[row * 4 + 3]; + } + } + else { + for (i = 0, row = firstRow; row <= lastRow; row++) { + value[i++] = m[row + 0]; + value[i++] = m[row + 4]; + value[i++] = m[row + 8]; + value[i++] = m[row + 12]; + } + } + } + return; + case STATE_DEPTH_RANGE: + value[0] = ctx->Viewport.Near; /* near */ + value[1] = ctx->Viewport.Far; /* far */ + value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */ + value[3] = 0; + return; + case STATE_FRAGMENT_PROGRAM: + { + /* state[1] = {STATE_ENV, STATE_LOCAL} */ + /* state[2] = parameter index */ + const int idx = (int) state[2]; + switch (state[1]) { + case STATE_ENV: + COPY_4V(value, ctx->FragmentProgram.Parameters[idx]); + break; + case STATE_LOCAL: + COPY_4V(value, ctx->FragmentProgram.Current->Base.LocalParams[idx]); + break; + default: + _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()"); + return; + } + } + return; + + case STATE_VERTEX_PROGRAM: + { + /* state[1] = {STATE_ENV, STATE_LOCAL} */ + /* state[2] = parameter index */ + const int idx = (int) state[2]; + switch (state[1]) { + case STATE_ENV: + COPY_4V(value, ctx->VertexProgram.Parameters[idx]); + break; + case STATE_LOCAL: + COPY_4V(value, ctx->VertexProgram.Current->Base.LocalParams[idx]); + break; + default: + _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()"); + return; + } + } + return; + + case STATE_INTERNAL: + { + switch (state[1]) { + case STATE_NORMAL_SCALE: + ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1); + break; + case STATE_TEXRECT_SCALE: { + const int unit = (int) state[2]; + const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; + if (texObj) { + struct gl_texture_image *texImage = texObj->Image[0][0]; + ASSIGN_4V(value, 1.0 / texImage->Width, 1.0 / texImage->Height, 0, 1); + } + break; + } + default: + /* unknown state indexes are silently ignored + * should be handled by the driver. + */ + return; + } + } + return; + + default: + _mesa_problem(ctx, "Invalid state in _mesa_fetch_state"); + return; + } +} + + +/** + * Return a bitmask of the Mesa state flags (_NEW_* values) which would + * indicate that the given context state may have changed. + * The bitmask is used during validation to determine if we need to update + * vertex/fragment program parameters (like "state.material.color") when + * some GL state has changed. + */ +GLbitfield +_mesa_program_state_flags(const GLint state[]) +{ + switch (state[0]) { + case STATE_MATERIAL: + case STATE_LIGHT: + case STATE_LIGHTMODEL_AMBIENT: + case STATE_LIGHTMODEL_SCENECOLOR: + case STATE_LIGHTPROD: + return _NEW_LIGHT; + + case STATE_TEXGEN: + case STATE_TEXENV_COLOR: + return _NEW_TEXTURE; + + case STATE_FOG_COLOR: + case STATE_FOG_PARAMS: + return _NEW_FOG; + + case STATE_CLIPPLANE: + return _NEW_TRANSFORM; + + case STATE_POINT_SIZE: + case STATE_POINT_ATTENUATION: + return _NEW_POINT; + + case STATE_MATRIX: + switch (state[1]) { + case STATE_MODELVIEW: + return _NEW_MODELVIEW; + case STATE_PROJECTION: + return _NEW_PROJECTION; + case STATE_MVP: + return _NEW_MODELVIEW | _NEW_PROJECTION; + case STATE_TEXTURE: + return _NEW_TEXTURE_MATRIX; + case STATE_PROGRAM: + return _NEW_TRACK_MATRIX; + default: + _mesa_problem(NULL, + "unexpected matrix in _mesa_program_state_flags()"); + return 0; + } + + case STATE_DEPTH_RANGE: + return _NEW_VIEWPORT; + + case STATE_FRAGMENT_PROGRAM: + case STATE_VERTEX_PROGRAM: + return _NEW_PROGRAM; + + case STATE_INTERNAL: + switch (state[1]) { + case STATE_NORMAL_SCALE: + return _NEW_MODELVIEW; + case STATE_TEXRECT_SCALE: + return _NEW_TEXTURE; + default: + /* unknown state indexes are silently ignored and + * no flag set, since it is handled by the driver. + */ + return 0; + } + + default: + _mesa_problem(NULL, "unexpected state[0] in make_state_flags()"); + return 0; + } +} + + +static void +append(char *dst, const char *src) +{ + while (*dst) + dst++; + while (*src) + *dst++ = *src++; + *dst = 0; +} + + +static void +append_token(char *dst, gl_state_index k) +{ + switch (k) { + case STATE_MATERIAL: + append(dst, "material."); + break; + case STATE_LIGHT: + append(dst, "light"); + break; + case STATE_LIGHTMODEL_AMBIENT: + append(dst, "lightmodel.ambient"); + break; + case STATE_LIGHTMODEL_SCENECOLOR: + break; + case STATE_LIGHTPROD: + append(dst, "lightprod"); + break; + case STATE_TEXGEN: + append(dst, "texgen"); + break; + case STATE_FOG_COLOR: + append(dst, "fog.color"); + break; + case STATE_FOG_PARAMS: + append(dst, "fog.params"); + break; + case STATE_CLIPPLANE: + append(dst, "clip"); + break; + case STATE_POINT_SIZE: + append(dst, "point.size"); + break; + case STATE_POINT_ATTENUATION: + append(dst, "point.attenuation"); + break; + case STATE_MATRIX: + append(dst, "matrix."); + break; + case STATE_MODELVIEW: + append(dst, "modelview"); + break; + case STATE_PROJECTION: + append(dst, "projection"); + break; + case STATE_MVP: + append(dst, "mvp"); + break; + case STATE_TEXTURE: + append(dst, "texture"); + break; + case STATE_PROGRAM: + append(dst, "program"); + break; + case STATE_MATRIX_INVERSE: + append(dst, ".inverse"); + break; + case STATE_MATRIX_TRANSPOSE: + append(dst, ".transpose"); + break; + case STATE_MATRIX_INVTRANS: + append(dst, ".invtrans"); + break; + case STATE_AMBIENT: + append(dst, "ambient"); + break; + case STATE_DIFFUSE: + append(dst, "diffuse"); + break; + case STATE_SPECULAR: + append(dst, "specular"); + break; + case STATE_EMISSION: + append(dst, "emission"); + break; + case STATE_SHININESS: + append(dst, "shininess"); + break; + case STATE_HALF: + append(dst, "half"); + break; + case STATE_POSITION: + append(dst, ".position"); + break; + case STATE_ATTENUATION: + append(dst, ".attenuation"); + break; + case STATE_SPOT_DIRECTION: + append(dst, ".spot.direction"); + break; + case STATE_TEXGEN_EYE_S: + append(dst, "eye.s"); + break; + case STATE_TEXGEN_EYE_T: + append(dst, "eye.t"); + break; + case STATE_TEXGEN_EYE_R: + append(dst, "eye.r"); + break; + case STATE_TEXGEN_EYE_Q: + append(dst, "eye.q"); + break; + case STATE_TEXGEN_OBJECT_S: + append(dst, "object.s"); + break; + case STATE_TEXGEN_OBJECT_T: + append(dst, "object.t"); + break; + case STATE_TEXGEN_OBJECT_R: + append(dst, "object.r"); + break; + case STATE_TEXGEN_OBJECT_Q: + append(dst, "object.q"); + break; + case STATE_TEXENV_COLOR: + append(dst, "texenv"); + break; + case STATE_DEPTH_RANGE: + append(dst, "depth.range"); + break; + case STATE_VERTEX_PROGRAM: + case STATE_FRAGMENT_PROGRAM: + break; + case STATE_ENV: + append(dst, "env"); + break; + case STATE_LOCAL: + append(dst, "local"); + break; + case STATE_INTERNAL: + case STATE_NORMAL_SCALE: + case STATE_POSITION_NORMALIZED: + append(dst, "(internal)"); + break; + default: + ; + } +} + +static void +append_face(char *dst, GLint face) +{ + if (face == 0) + append(dst, "front."); + else + append(dst, "back."); +} + +static void +append_index(char *dst, GLint index) +{ + char s[20]; + _mesa_sprintf(s, "[%d].", index); + append(dst, s); +} + +/** + * Make a string from the given state vector. + * For example, return "state.matrix.texture[2].inverse". + * Use _mesa_free() to deallocate the string. + */ +const char * +_mesa_program_state_string(const GLint state[6]) +{ + char str[1000] = ""; + char tmp[30]; + + append(str, "state."); + append_token(str, (gl_state_index) state[0]); + + switch (state[0]) { + case STATE_MATERIAL: + append_face(str, state[1]); + append_token(str, (gl_state_index) state[2]); + break; + case STATE_LIGHT: + append(str, "light"); + append_index(str, state[1]); /* light number [i]. */ + append_token(str, (gl_state_index) state[2]); /* coefficients */ + break; + case STATE_LIGHTMODEL_AMBIENT: + append(str, "lightmodel.ambient"); + break; + case STATE_LIGHTMODEL_SCENECOLOR: + if (state[1] == 0) { + append(str, "lightmodel.front.scenecolor"); + } + else { + append(str, "lightmodel.back.scenecolor"); + } + break; + case STATE_LIGHTPROD: + append_index(str, state[1]); /* light number [i]. */ + append_face(str, state[2]); + append_token(str, (gl_state_index) state[3]); + break; + case STATE_TEXGEN: + append_index(str, state[1]); /* tex unit [i] */ + append_token(str, (gl_state_index) state[2]); /* plane coef */ + break; + case STATE_TEXENV_COLOR: + append_index(str, state[1]); /* tex unit [i] */ + append(str, "color"); + break; + case STATE_FOG_COLOR: + case STATE_FOG_PARAMS: + break; + case STATE_CLIPPLANE: + append_index(str, state[1]); /* plane [i] */ + append(str, "plane"); + break; + case STATE_POINT_SIZE: + case STATE_POINT_ATTENUATION: + break; + case STATE_MATRIX: + { + /* state[1] = modelview, projection, texture, etc. */ + /* state[2] = which texture matrix or program matrix */ + /* state[3] = first row to fetch */ + /* state[4] = last row to fetch */ + /* state[5] = transpose, inverse or invtrans */ + const gl_state_index mat = (gl_state_index) state[1]; + const GLuint index = (GLuint) state[2]; + const GLuint firstRow = (GLuint) state[3]; + const GLuint lastRow = (GLuint) state[4]; + const gl_state_index modifier = (gl_state_index) state[5]; + append_token(str, mat); + if (index) + append_index(str, index); + if (modifier) + append_token(str, modifier); + if (firstRow == lastRow) + _mesa_sprintf(tmp, ".row[%d]", firstRow); + else + _mesa_sprintf(tmp, ".row[%d..%d]", firstRow, lastRow); + append(str, tmp); + } + break; + case STATE_DEPTH_RANGE: + break; + case STATE_FRAGMENT_PROGRAM: + case STATE_VERTEX_PROGRAM: + /* state[1] = {STATE_ENV, STATE_LOCAL} */ + /* state[2] = parameter index */ + append_token(str, (gl_state_index) state[1]); + append_index(str, state[2]); + break; + case STATE_INTERNAL: + break; + default: + _mesa_problem(NULL, "Invalid state in _mesa_program_state_string"); + break; + } + + return _mesa_strdup(str); +} + + +/** + * Loop over all the parameters in a parameter list. If the parameter + * is a GL state reference, look up the current value of that state + * variable and put it into the parameter's Value[4] array. + * This would be called at glBegin time when using a fragment program. + */ +void +_mesa_load_state_parameters(GLcontext *ctx, + struct gl_program_parameter_list *paramList) +{ + GLuint i; + + if (!paramList) + return; + + for (i = 0; i < paramList->NumParameters; i++) { + if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) { + _mesa_fetch_state(ctx, + paramList->Parameters[i].StateIndexes, + paramList->ParameterValues[i]); + } + } +} + diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h new file mode 100644 index 0000000000..17e38054bb --- /dev/null +++ b/src/mesa/shader/prog_statevars.h @@ -0,0 +1,117 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef PROG_STATEVARS_H +#define PROG_STATEVARS_H + +#include "mtypes.h" + + +/** + * Used for describing GL state referenced from inside ARB vertex and + * fragment programs. + * A string such as "state.light[0].ambient" gets translated into a + * sequence of tokens such as [ STATE_LIGHT, 0, STATE_AMBIENT ]. + */ +typedef enum gl_state_index_ { + STATE_MATERIAL = 100, /* start at 100 so small ints are seen as ints */ + + STATE_LIGHT, + STATE_LIGHTMODEL_AMBIENT, + STATE_LIGHTMODEL_SCENECOLOR, + STATE_LIGHTPROD, + + STATE_TEXGEN, + + STATE_FOG_COLOR, + STATE_FOG_PARAMS, + + STATE_CLIPPLANE, + + STATE_POINT_SIZE, + STATE_POINT_ATTENUATION, + + STATE_MATRIX, + STATE_MODELVIEW, + STATE_PROJECTION, + STATE_MVP, + STATE_TEXTURE, + STATE_PROGRAM, + STATE_MATRIX_INVERSE, + STATE_MATRIX_TRANSPOSE, + STATE_MATRIX_INVTRANS, + + STATE_AMBIENT, + STATE_DIFFUSE, + STATE_SPECULAR, + STATE_EMISSION, + STATE_SHININESS, + STATE_HALF, + + STATE_POSITION, + STATE_ATTENUATION, + STATE_SPOT_DIRECTION, + + STATE_TEXGEN_EYE_S, + STATE_TEXGEN_EYE_T, + STATE_TEXGEN_EYE_R, + STATE_TEXGEN_EYE_Q, + STATE_TEXGEN_OBJECT_S, + STATE_TEXGEN_OBJECT_T, + STATE_TEXGEN_OBJECT_R, + STATE_TEXGEN_OBJECT_Q, + + STATE_TEXENV_COLOR, + + STATE_DEPTH_RANGE, + + STATE_VERTEX_PROGRAM, + STATE_FRAGMENT_PROGRAM, + + STATE_ENV, + STATE_LOCAL, + + STATE_INTERNAL, /* Mesa additions */ + STATE_NORMAL_SCALE, + STATE_TEXRECT_SCALE, + STATE_POSITION_NORMALIZED, /* normalized light position */ + STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ +} gl_state_index; + + + +extern void +_mesa_load_state_parameters(GLcontext *ctx, + struct gl_program_parameter_list *paramList); + + +extern GLbitfield +_mesa_program_state_flags(const GLint state[]); + + +extern const char * +_mesa_program_state_string(const GLint state[6]); + + +#endif /* PROG_STATEVARS_H */ -- cgit v1.2.3 From 0560d81ce94d27f2162d77d981468cea1b2bbd8a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:01:28 -0700 Subject: Move many functions into new files. --- src/mesa/shader/program.c | 1774 ++------------------------------------------- src/mesa/shader/program.h | 203 ------ 2 files changed, 63 insertions(+), 1914 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 6245870722..c504c7c5c5 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -35,19 +35,15 @@ #include "imports.h" #include "macros.h" #include "mtypes.h" -#include "program.h" #include "nvfragparse.h" -#include "program_instruction.h" +#include "program.h" +#include "prog_parameter.h" +#include "prog_instruction.h" +#include "prog_statevars.h" #include "nvvertparse.h" #include "atifragshader.h" -static const char * -make_state_string(const GLint stateTokens[6]); - -static GLbitfield -make_state_flags(const GLint state[]); - /**********************************************************************/ /* Utility functions */ @@ -335,1725 +331,81 @@ _mesa_lookup_program(GLcontext *ctx, GLuint id) } -/**********************************************************************/ -/* Program parameter functions */ -/**********************************************************************/ - -struct gl_program_parameter_list * -_mesa_new_parameter_list(void) -{ - return (struct gl_program_parameter_list *) - _mesa_calloc(sizeof(struct gl_program_parameter_list)); -} - - -/** - * Free a parameter list and all its parameters - */ -void -_mesa_free_parameter_list(struct gl_program_parameter_list *paramList) -{ - GLuint i; - for (i = 0; i < paramList->NumParameters; i++) { - if (paramList->Parameters[i].Name) - _mesa_free((void *) paramList->Parameters[i].Name); - } - _mesa_free(paramList->Parameters); - if (paramList->ParameterValues) - _mesa_align_free(paramList->ParameterValues); - _mesa_free(paramList); -} - - - -/** - * Add a new parameter to a parameter list. - * \param paramList the list to add the parameter to - * \param name the parameter name, will be duplicated/copied! - * \param values initial parameter value, up to 4 GLfloats - * \param size number of elements in 'values' vector (1..4) - * \param type type of parameter, such as - * \return index of new parameter in the list, or -1 if error (out of mem) - */ -GLint -_mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], GLuint size, - enum register_file type) -{ - const GLuint n = paramList->NumParameters; - - if (n == paramList->Size) { - /* Need to grow the parameter list array */ - if (paramList->Size == 0) - paramList->Size = 8; - else - paramList->Size *= 2; - - /* realloc arrays */ - paramList->Parameters = (struct gl_program_parameter *) - _mesa_realloc(paramList->Parameters, - n * sizeof(struct gl_program_parameter), - paramList->Size * sizeof(struct gl_program_parameter)); - - paramList->ParameterValues = (GLfloat (*)[4]) - _mesa_align_realloc(paramList->ParameterValues, /* old buf */ - n * 4 * sizeof(GLfloat), /* old size */ - paramList->Size * 4 *sizeof(GLfloat), /* new sz */ - 16); - } - - if (!paramList->Parameters || - !paramList->ParameterValues) { - /* out of memory */ - paramList->NumParameters = 0; - paramList->Size = 0; - return -1; - } - else { - paramList->NumParameters = n + 1; - - _mesa_memset(¶mList->Parameters[n], 0, - sizeof(struct gl_program_parameter)); - - paramList->Parameters[n].Name = name ? _mesa_strdup(name) : NULL; - paramList->Parameters[n].Type = type; - paramList->Parameters[n].Size = size; - if (values) - COPY_4V(paramList->ParameterValues[n], values); - return (GLint) n; - } -} - - -/** - * Add a new named program parameter (Ex: NV_fragment_program DEFINE statement) - * \return index of the new entry in the parameter list - */ -GLint -_mesa_add_named_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4]) -{ - return _mesa_add_parameter(paramList, name, values, 4, PROGRAM_NAMED_PARAM); -} - - -/** - * Add a new named constant to the parameter list. - * This will be used when the program contains something like this: - * PARAM myVals = { 0, 1, 2, 3 }; - * - * \param paramList the parameter list - * \param name the name for the constant - * \param values four float values - * \return index/position of the new parameter in the parameter list - */ -GLint -_mesa_add_named_constant(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], - GLuint size) -{ -#if 0 /* disable this for now -- we need to save the name! */ - GLint pos; - GLuint swizzle; - ASSERT(size == 4); /* XXX future feature */ - /* check if we already have this constant */ - if (_mesa_lookup_parameter_constant(paramList, values, 4, &pos, &swizzle)) { - return pos; - } -#endif - size = 4; /** XXX fix */ - return _mesa_add_parameter(paramList, name, values, size, PROGRAM_CONSTANT); -} - - -/** - * Add a new unnamed constant to the parameter list. - * This will be used when the program contains something like this: - * MOV r, { 0, 1, 2, 3 }; - * - * \param paramList the parameter list - * \param values four float values - * \param swizzleOut returns swizzle mask for accessing the constant - * \return index/position of the new parameter in the parameter list. - */ -GLint -_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4], GLuint size, - GLuint *swizzleOut) -{ - GLint pos; - GLuint swizzle; - ASSERT(size >= 1); - ASSERT(size <= 4); - size = 4; /* XXX temporary */ - /* check if we already have this constant */ - if (_mesa_lookup_parameter_constant(paramList, values, - size, &pos, &swizzle)) { - return pos; - } - return _mesa_add_parameter(paramList, NULL, values, size, PROGRAM_CONSTANT); -} - - -GLint -_mesa_add_uniform(struct gl_program_parameter_list *paramList, - const char *name, GLuint size) -{ - GLint i = _mesa_lookup_parameter_index(paramList, -1, name); - if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_UNIFORM) { - /* already in list */ - return i; - } - else { - assert(size == 4); - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); - return i; - } -} - - -GLint -_mesa_add_varying(struct gl_program_parameter_list *paramList, - const char *name, GLuint size) -{ - GLint i = _mesa_lookup_parameter_index(paramList, -1, name); - if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_VARYING) { - /* already in list */ - return i; - } - else { - assert(size == 4); - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_VARYING); - return i; - } -} - - - - -#if 0 /* not used yet */ -/** - * Returns the number of 4-component registers needed to store a piece - * of GL state. For matrices this may be as many as 4 registers, - * everything else needs - * just 1 register. - */ -static GLuint -sizeof_state_reference(const GLint *stateTokens) -{ - if (stateTokens[0] == STATE_MATRIX) { - GLuint rows = stateTokens[4] - stateTokens[3] + 1; - assert(rows >= 1); - assert(rows <= 4); - return rows; - } - else { - return 1; - } -} -#endif - - /** - * Add a new state reference to the parameter list. - * This will be used when the program contains something like this: - * PARAM ambient = state.material.front.ambient; - * - * \param paramList the parameter list - * \param state an array of 6 state tokens - * \return index of the new parameter. + * Return a copy of a program. + * XXX Problem here if the program object is actually OO-derivation + * made by a device driver. */ -GLint -_mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint *stateTokens) +struct gl_program * +_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) { - const GLuint size = 4; /* XXX fix */ - const char *name; - GLint index; - - /* Check if the state reference is already in the list */ - for (index = 0; index < paramList->NumParameters; index++) { - GLuint i, match = 0; - for (i = 0; i < 6; i++) { - if (paramList->Parameters[index].StateIndexes[i] == stateTokens[i]) { - match++; - } - else { - break; - } - } - if (match == 6) { - /* this state reference is already in the parameter list */ - return index; - } - } - - name = make_state_string(stateTokens); - index = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_STATE_VAR); - if (index >= 0) { - GLuint i; - for (i = 0; i < 6; i++) { - paramList->Parameters[index].StateIndexes[i] - = (gl_state_index) stateTokens[i]; - } - paramList->StateFlags |= make_state_flags(stateTokens); - } - - /* free name string here since we duplicated it in add_parameter() */ - _mesa_free((void *) name); - - return index; -} - + struct gl_program *clone; -/** - * Lookup a parameter value by name in the given parameter list. - * \return pointer to the float[4] values. - */ -GLfloat * -_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, - GLsizei nameLen, const char *name) -{ - GLuint i = _mesa_lookup_parameter_index(paramList, nameLen, name); - if (i < 0) + clone = _mesa_new_program(ctx, prog->Target, prog->Id); + if (!clone) return NULL; - else - return paramList->ParameterValues[i]; -} - - -/** - * Given a program parameter name, find its position in the list of parameters. - * \param paramList the parameter list to search - * \param nameLen length of name (in chars). - * If length is negative, assume that name is null-terminated. - * \param name the name to search for - * \return index of parameter in the list. - */ -GLint -_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, - GLsizei nameLen, const char *name) -{ - GLint i; - - if (!paramList) - return -1; - if (nameLen == -1) { - /* name is null-terminated */ - for (i = 0; i < (GLint) paramList->NumParameters; i++) { - if (paramList->Parameters[i].Name && - _mesa_strcmp(paramList->Parameters[i].Name, name) == 0) - return i; - } - } - else { - /* name is not null-terminated, use nameLen */ - for (i = 0; i < (GLint) paramList->NumParameters; i++) { - if (paramList->Parameters[i].Name && - _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 - && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen) - return i; - } + assert(clone->Target == prog->Target); + clone->String = (GLubyte *) _mesa_strdup((char *) prog->String); + clone->RefCount = 1; + clone->Format = prog->Format; + clone->Instructions = _mesa_alloc_instructions(prog->NumInstructions); + if (!clone->Instructions) { + _mesa_delete_program(ctx, clone); + return NULL; } - return -1; -} - - -/** - * Look for a float vector in the given parameter list. The float vector - * may be of length 1, 2, 3 or 4. - * \param paramList the parameter list to search - * \param v the float vector to search for - * \param size number of element in v - * \param posOut returns the position of the constant, if found - * \param swizzleOut returns a swizzle mask describing location of the - * vector elements if found - * \return GL_TRUE if found, GL_FALSE if not found - */ -GLboolean -_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, - const GLfloat v[], GLsizei vSize, - GLint *posOut, GLuint *swizzleOut) -{ - GLuint i; + memcpy(clone->Instructions, prog->Instructions, + prog->NumInstructions * sizeof(struct prog_instruction)); + clone->InputsRead = prog->InputsRead; + clone->OutputsWritten = prog->OutputsWritten; + clone->Parameters = _mesa_clone_parameter_list(prog->Parameters); + memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); + clone->Varying = _mesa_clone_parameter_list(prog->Varying); + memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); + clone->NumInstructions = prog->NumInstructions; + clone->NumTemporaries = prog->NumTemporaries; + clone->NumParameters = prog->NumParameters; + clone->NumAttributes = prog->NumAttributes; + clone->NumAddressRegs = prog->NumAddressRegs; + clone->NumNativeInstructions = prog->NumNativeInstructions; + clone->NumNativeTemporaries = prog->NumNativeTemporaries; + clone->NumNativeParameters = prog->NumNativeParameters; + clone->NumNativeAttributes = prog->NumNativeAttributes; + clone->NumNativeAddressRegs = prog->NumNativeAddressRegs; - assert(vSize >= 1); - assert(vSize <= 4); - - if (!paramList) - return -1; - - for (i = 0; i < paramList->NumParameters; i++) { - if (paramList->Parameters[i].Type == PROGRAM_CONSTANT) { - const GLint maxShift = 4 - vSize; - GLint shift, j; - for (shift = 0; shift <= maxShift; shift++) { - GLint matched = 0; - GLuint swizzle[4]; - swizzle[0] = swizzle[1] = swizzle[2] = swizzle[3] = 0; - /* XXX we could do out-of-order swizzle matches too, someday */ - for (j = 0; j < vSize; j++) { - assert(shift + j < 4); - if (paramList->ParameterValues[i][shift + j] == v[j]) { - matched++; - swizzle[j] = shift + j; - ASSERT(swizzle[j] >= SWIZZLE_X); - ASSERT(swizzle[j] <= SWIZZLE_W); - } - } - if (matched == vSize) { - /* found! */ - *posOut = i; - *swizzleOut = MAKE_SWIZZLE4(swizzle[0], swizzle[1], - swizzle[2], swizzle[3]); - return GL_TRUE; - } - } + switch (prog->Target) { + case GL_VERTEX_PROGRAM_ARB: + { + const struct gl_vertex_program *vp + = (const struct gl_vertex_program *) prog; + struct gl_vertex_program *vpc = (struct gl_vertex_program *) clone; + vpc->IsPositionInvariant = vp->IsPositionInvariant; } - } - - *posOut = -1; - return GL_FALSE; -} - - -struct gl_program_parameter_list * -_mesa_clone_parameter_list(const struct gl_program_parameter_list *list) -{ - struct gl_program_parameter_list *clone; - GLuint i; - - clone = _mesa_new_parameter_list(); - if (!clone) - return NULL; - - /** Not too efficient, but correct */ - for (i = 0; i < list->NumParameters; i++) { - struct gl_program_parameter *p = list->Parameters + i; - GLint j = _mesa_add_parameter(clone, p->Name, list->ParameterValues[i], - p->Size, p->Type); - ASSERT(j >= 0); - /* copy state indexes */ - if (p->Type == PROGRAM_STATE_VAR) { - GLint k; - struct gl_program_parameter *q = clone->Parameters + j; - for (k = 0; k < 6; k++) { - q->StateIndexes[k] = p->StateIndexes[k]; - } + break; + case GL_FRAGMENT_PROGRAM_ARB: + { + const struct gl_fragment_program *fp + = (const struct gl_fragment_program *) prog; + struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone; + memcpy(fpc->TexturesUsed, fp->TexturesUsed, sizeof(fp->TexturesUsed)); + fpc->NumAluInstructions = fp->NumAluInstructions; + fpc->NumTexInstructions = fp->NumTexInstructions; + fpc->NumTexIndirections = fp->NumTexIndirections; + fpc->NumNativeAluInstructions = fp->NumNativeAluInstructions; + fpc->NumNativeTexInstructions = fp->NumNativeTexInstructions; + fpc->NumNativeTexIndirections = fp->NumNativeTexIndirections; + fpc->FogOption = fp->FogOption; + fpc->UsesKill = fp->UsesKill; } + break; + default: + _mesa_problem(NULL, "Unexpected target in _mesa_clone_program"); } return clone; } -/** - * Use the list of tokens in the state[] array to find global GL state - * and return it in . Usually, four values are returned in - * but matrix queries may return as many as 16 values. - * This function is used for ARB vertex/fragment programs. - * The program parser will produce the state[] values. - */ -static void -_mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], - GLfloat *value) -{ - switch (state[0]) { - case STATE_MATERIAL: - { - /* state[1] is either 0=front or 1=back side */ - const GLuint face = (GLuint) state[1]; - const struct gl_material *mat = &ctx->Light.Material; - ASSERT(face == 0 || face == 1); - /* we rely on tokens numbered so that _BACK_ == _FRONT_+ 1 */ - ASSERT(MAT_ATTRIB_FRONT_AMBIENT + 1 == MAT_ATTRIB_BACK_AMBIENT); - /* XXX we could get rid of this switch entirely with a little - * work in arbprogparse.c's parse_state_single_item(). - */ - /* state[2] is the material attribute */ - switch (state[2]) { - case STATE_AMBIENT: - COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_AMBIENT + face]); - return; - case STATE_DIFFUSE: - COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_DIFFUSE + face]); - return; - case STATE_SPECULAR: - COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_SPECULAR + face]); - return; - case STATE_EMISSION: - COPY_4V(value, mat->Attrib[MAT_ATTRIB_FRONT_EMISSION + face]); - return; - case STATE_SHININESS: - value[0] = mat->Attrib[MAT_ATTRIB_FRONT_SHININESS + face][0]; - value[1] = 0.0F; - value[2] = 0.0F; - value[3] = 1.0F; - return; - default: - _mesa_problem(ctx, "Invalid material state in fetch_state"); - return; - } - } - case STATE_LIGHT: - { - /* state[1] is the light number */ - const GLuint ln = (GLuint) state[1]; - /* state[2] is the light attribute */ - switch (state[2]) { - case STATE_AMBIENT: - COPY_4V(value, ctx->Light.Light[ln].Ambient); - return; - case STATE_DIFFUSE: - COPY_4V(value, ctx->Light.Light[ln].Diffuse); - return; - case STATE_SPECULAR: - COPY_4V(value, ctx->Light.Light[ln].Specular); - return; - case STATE_POSITION: - COPY_4V(value, ctx->Light.Light[ln].EyePosition); - return; - case STATE_ATTENUATION: - value[0] = ctx->Light.Light[ln].ConstantAttenuation; - value[1] = ctx->Light.Light[ln].LinearAttenuation; - value[2] = ctx->Light.Light[ln].QuadraticAttenuation; - value[3] = ctx->Light.Light[ln].SpotExponent; - return; - case STATE_SPOT_DIRECTION: - COPY_3V(value, ctx->Light.Light[ln].EyeDirection); - value[3] = ctx->Light.Light[ln]._CosCutoff; - return; - case STATE_HALF: - { - GLfloat eye_z[] = {0, 0, 1}; - - /* Compute infinite half angle vector: - * half-vector = light_position + (0, 0, 1) - * and then normalize. w = 0 - * - * light.EyePosition.w should be 0 for infinite lights. - */ - ADD_3V(value, eye_z, ctx->Light.Light[ln].EyePosition); - NORMALIZE_3FV(value); - value[3] = 0; - } - return; - case STATE_POSITION_NORMALIZED: - COPY_4V(value, ctx->Light.Light[ln].EyePosition); - NORMALIZE_3FV( value ); - return; - default: - _mesa_problem(ctx, "Invalid light state in fetch_state"); - return; - } - } - case STATE_LIGHTMODEL_AMBIENT: - COPY_4V(value, ctx->Light.Model.Ambient); - return; - case STATE_LIGHTMODEL_SCENECOLOR: - if (state[1] == 0) { - /* front */ - GLint i; - for (i = 0; i < 3; i++) { - value[i] = ctx->Light.Model.Ambient[i] - * ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT][i] - + ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_EMISSION][i]; - } - value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3]; - } - else { - /* back */ - GLint i; - for (i = 0; i < 3; i++) { - value[i] = ctx->Light.Model.Ambient[i] - * ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_AMBIENT][i] - + ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_EMISSION][i]; - } - value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3]; - } - return; - case STATE_LIGHTPROD: - { - const GLuint ln = (GLuint) state[1]; - const GLuint face = (GLuint) state[2]; - GLint i; - ASSERT(face == 0 || face == 1); - switch (state[3]) { - case STATE_AMBIENT: - for (i = 0; i < 3; i++) { - value[i] = ctx->Light.Light[ln].Ambient[i] * - ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][i]; - } - /* [3] = material alpha */ - value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; - return; - case STATE_DIFFUSE: - for (i = 0; i < 3; i++) { - value[i] = ctx->Light.Light[ln].Diffuse[i] * - ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][i]; - } - /* [3] = material alpha */ - value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; - return; - case STATE_SPECULAR: - for (i = 0; i < 3; i++) { - value[i] = ctx->Light.Light[ln].Specular[i] * - ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][i]; - } - /* [3] = material alpha */ - value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3]; - return; - default: - _mesa_problem(ctx, "Invalid lightprod state in fetch_state"); - return; - } - } - case STATE_TEXGEN: - { - /* state[1] is the texture unit */ - const GLuint unit = (GLuint) state[1]; - /* state[2] is the texgen attribute */ - switch (state[2]) { - case STATE_TEXGEN_EYE_S: - COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneS); - return; - case STATE_TEXGEN_EYE_T: - COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneT); - return; - case STATE_TEXGEN_EYE_R: - COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneR); - return; - case STATE_TEXGEN_EYE_Q: - COPY_4V(value, ctx->Texture.Unit[unit].EyePlaneQ); - return; - case STATE_TEXGEN_OBJECT_S: - COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneS); - return; - case STATE_TEXGEN_OBJECT_T: - COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneT); - return; - case STATE_TEXGEN_OBJECT_R: - COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneR); - return; - case STATE_TEXGEN_OBJECT_Q: - COPY_4V(value, ctx->Texture.Unit[unit].ObjectPlaneQ); - return; - default: - _mesa_problem(ctx, "Invalid texgen state in fetch_state"); - return; - } - } - case STATE_TEXENV_COLOR: - { - /* state[1] is the texture unit */ - const GLuint unit = (GLuint) state[1]; - COPY_4V(value, ctx->Texture.Unit[unit].EnvColor); - } - return; - case STATE_FOG_COLOR: - COPY_4V(value, ctx->Fog.Color); - return; - case STATE_FOG_PARAMS: - value[0] = ctx->Fog.Density; - value[1] = ctx->Fog.Start; - value[2] = ctx->Fog.End; - value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start); - return; - case STATE_CLIPPLANE: - { - const GLuint plane = (GLuint) state[1]; - COPY_4V(value, ctx->Transform.EyeUserPlane[plane]); - } - return; - case STATE_POINT_SIZE: - value[0] = ctx->Point.Size; - value[1] = ctx->Point.MinSize; - value[2] = ctx->Point.MaxSize; - value[3] = ctx->Point.Threshold; - return; - case STATE_POINT_ATTENUATION: - value[0] = ctx->Point.Params[0]; - value[1] = ctx->Point.Params[1]; - value[2] = ctx->Point.Params[2]; - value[3] = 1.0F; - return; - case STATE_MATRIX: - { - /* state[1] = modelview, projection, texture, etc. */ - /* state[2] = which texture matrix or program matrix */ - /* state[3] = first row to fetch */ - /* state[4] = last row to fetch */ - /* state[5] = transpose, inverse or invtrans */ - - const GLmatrix *matrix; - const gl_state_index mat = state[1]; - const GLuint index = (GLuint) state[2]; - const GLuint firstRow = (GLuint) state[3]; - const GLuint lastRow = (GLuint) state[4]; - const gl_state_index modifier = state[5]; - const GLfloat *m; - GLuint row, i; - if (mat == STATE_MODELVIEW) { - matrix = ctx->ModelviewMatrixStack.Top; - } - else if (mat == STATE_PROJECTION) { - matrix = ctx->ProjectionMatrixStack.Top; - } - else if (mat == STATE_MVP) { - matrix = &ctx->_ModelProjectMatrix; - } - else if (mat == STATE_TEXTURE) { - matrix = ctx->TextureMatrixStack[index].Top; - } - else if (mat == STATE_PROGRAM) { - matrix = ctx->ProgramMatrixStack[index].Top; - } - else { - _mesa_problem(ctx, "Bad matrix name in _mesa_fetch_state()"); - return; - } - if (modifier == STATE_MATRIX_INVERSE || - modifier == STATE_MATRIX_INVTRANS) { - /* Be sure inverse is up to date: - */ - _math_matrix_alloc_inv( (GLmatrix *) matrix ); - _math_matrix_analyse( (GLmatrix*) matrix ); - m = matrix->inv; - } - else { - m = matrix->m; - } - if (modifier == STATE_MATRIX_TRANSPOSE || - modifier == STATE_MATRIX_INVTRANS) { - for (i = 0, row = firstRow; row <= lastRow; row++) { - value[i++] = m[row * 4 + 0]; - value[i++] = m[row * 4 + 1]; - value[i++] = m[row * 4 + 2]; - value[i++] = m[row * 4 + 3]; - } - } - else { - for (i = 0, row = firstRow; row <= lastRow; row++) { - value[i++] = m[row + 0]; - value[i++] = m[row + 4]; - value[i++] = m[row + 8]; - value[i++] = m[row + 12]; - } - } - } - return; - case STATE_DEPTH_RANGE: - value[0] = ctx->Viewport.Near; /* near */ - value[1] = ctx->Viewport.Far; /* far */ - value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */ - value[3] = 0; - return; - case STATE_FRAGMENT_PROGRAM: - { - /* state[1] = {STATE_ENV, STATE_LOCAL} */ - /* state[2] = parameter index */ - const int idx = (int) state[2]; - switch (state[1]) { - case STATE_ENV: - COPY_4V(value, ctx->FragmentProgram.Parameters[idx]); - break; - case STATE_LOCAL: - COPY_4V(value, ctx->FragmentProgram.Current->Base.LocalParams[idx]); - break; - default: - _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()"); - return; - } - } - return; - - case STATE_VERTEX_PROGRAM: - { - /* state[1] = {STATE_ENV, STATE_LOCAL} */ - /* state[2] = parameter index */ - const int idx = (int) state[2]; - switch (state[1]) { - case STATE_ENV: - COPY_4V(value, ctx->VertexProgram.Parameters[idx]); - break; - case STATE_LOCAL: - COPY_4V(value, ctx->VertexProgram.Current->Base.LocalParams[idx]); - break; - default: - _mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()"); - return; - } - } - return; - - case STATE_INTERNAL: - { - switch (state[1]) { - case STATE_NORMAL_SCALE: - ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1); - break; - case STATE_TEXRECT_SCALE: { - const int unit = (int) state[2]; - const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; - if (texObj) { - struct gl_texture_image *texImage = texObj->Image[0][0]; - ASSIGN_4V(value, 1.0 / texImage->Width, 1.0 / texImage->Height, 0, 1); - } - break; - } - default: - /* unknown state indexes are silently ignored - * should be handled by the driver. - */ - return; - } - } - return; - - default: - _mesa_problem(ctx, "Invalid state in _mesa_fetch_state"); - return; - } -} - - -/** - * Return a bitmask of the Mesa state flags (_NEW_* values) which would - * indicate that the given context state may have changed. - * The bitmask is used during validation to determine if we need to update - * vertex/fragment program parameters (like "state.material.color") when - * some GL state has changed. - */ -static GLbitfield -make_state_flags(const GLint state[]) -{ - switch (state[0]) { - case STATE_MATERIAL: - case STATE_LIGHT: - case STATE_LIGHTMODEL_AMBIENT: - case STATE_LIGHTMODEL_SCENECOLOR: - case STATE_LIGHTPROD: - return _NEW_LIGHT; - - case STATE_TEXGEN: - case STATE_TEXENV_COLOR: - return _NEW_TEXTURE; - - case STATE_FOG_COLOR: - case STATE_FOG_PARAMS: - return _NEW_FOG; - - case STATE_CLIPPLANE: - return _NEW_TRANSFORM; - - case STATE_POINT_SIZE: - case STATE_POINT_ATTENUATION: - return _NEW_POINT; - - case STATE_MATRIX: - switch (state[1]) { - case STATE_MODELVIEW: - return _NEW_MODELVIEW; - case STATE_PROJECTION: - return _NEW_PROJECTION; - case STATE_MVP: - return _NEW_MODELVIEW | _NEW_PROJECTION; - case STATE_TEXTURE: - return _NEW_TEXTURE_MATRIX; - case STATE_PROGRAM: - return _NEW_TRACK_MATRIX; - default: - _mesa_problem(NULL, "unexpected matrix in make_state_flags()"); - return 0; - } - - case STATE_DEPTH_RANGE: - return _NEW_VIEWPORT; - - case STATE_FRAGMENT_PROGRAM: - case STATE_VERTEX_PROGRAM: - return _NEW_PROGRAM; - - case STATE_INTERNAL: - switch (state[1]) { - case STATE_NORMAL_SCALE: - return _NEW_MODELVIEW; - case STATE_TEXRECT_SCALE: - return _NEW_TEXTURE; - default: - /* unknown state indexes are silently ignored and - * no flag set, since it is handled by the driver. - */ - return 0; - } - - default: - _mesa_problem(NULL, "unexpected state[0] in make_state_flags()"); - return 0; - } -} - - -static void -append(char *dst, const char *src) -{ - while (*dst) - dst++; - while (*src) - *dst++ = *src++; - *dst = 0; -} - - -static void -append_token(char *dst, gl_state_index k) -{ - switch (k) { - case STATE_MATERIAL: - append(dst, "material."); - break; - case STATE_LIGHT: - append(dst, "light"); - break; - case STATE_LIGHTMODEL_AMBIENT: - append(dst, "lightmodel.ambient"); - break; - case STATE_LIGHTMODEL_SCENECOLOR: - break; - case STATE_LIGHTPROD: - append(dst, "lightprod"); - break; - case STATE_TEXGEN: - append(dst, "texgen"); - break; - case STATE_FOG_COLOR: - append(dst, "fog.color"); - break; - case STATE_FOG_PARAMS: - append(dst, "fog.params"); - break; - case STATE_CLIPPLANE: - append(dst, "clip"); - break; - case STATE_POINT_SIZE: - append(dst, "point.size"); - break; - case STATE_POINT_ATTENUATION: - append(dst, "point.attenuation"); - break; - case STATE_MATRIX: - append(dst, "matrix."); - break; - case STATE_MODELVIEW: - append(dst, "modelview"); - break; - case STATE_PROJECTION: - append(dst, "projection"); - break; - case STATE_MVP: - append(dst, "mvp"); - break; - case STATE_TEXTURE: - append(dst, "texture"); - break; - case STATE_PROGRAM: - append(dst, "program"); - break; - case STATE_MATRIX_INVERSE: - append(dst, ".inverse"); - break; - case STATE_MATRIX_TRANSPOSE: - append(dst, ".transpose"); - break; - case STATE_MATRIX_INVTRANS: - append(dst, ".invtrans"); - break; - case STATE_AMBIENT: - append(dst, "ambient"); - break; - case STATE_DIFFUSE: - append(dst, "diffuse"); - break; - case STATE_SPECULAR: - append(dst, "specular"); - break; - case STATE_EMISSION: - append(dst, "emission"); - break; - case STATE_SHININESS: - append(dst, "shininess"); - break; - case STATE_HALF: - append(dst, "half"); - break; - case STATE_POSITION: - append(dst, ".position"); - break; - case STATE_ATTENUATION: - append(dst, ".attenuation"); - break; - case STATE_SPOT_DIRECTION: - append(dst, ".spot.direction"); - break; - case STATE_TEXGEN_EYE_S: - append(dst, "eye.s"); - break; - case STATE_TEXGEN_EYE_T: - append(dst, "eye.t"); - break; - case STATE_TEXGEN_EYE_R: - append(dst, "eye.r"); - break; - case STATE_TEXGEN_EYE_Q: - append(dst, "eye.q"); - break; - case STATE_TEXGEN_OBJECT_S: - append(dst, "object.s"); - break; - case STATE_TEXGEN_OBJECT_T: - append(dst, "object.t"); - break; - case STATE_TEXGEN_OBJECT_R: - append(dst, "object.r"); - break; - case STATE_TEXGEN_OBJECT_Q: - append(dst, "object.q"); - break; - case STATE_TEXENV_COLOR: - append(dst, "texenv"); - break; - case STATE_DEPTH_RANGE: - append(dst, "depth.range"); - break; - case STATE_VERTEX_PROGRAM: - case STATE_FRAGMENT_PROGRAM: - break; - case STATE_ENV: - append(dst, "env"); - break; - case STATE_LOCAL: - append(dst, "local"); - break; - case STATE_INTERNAL: - case STATE_NORMAL_SCALE: - case STATE_POSITION_NORMALIZED: - append(dst, "(internal)"); - break; - default: - ; - } -} - -static void -append_face(char *dst, GLint face) -{ - if (face == 0) - append(dst, "front."); - else - append(dst, "back."); -} - -static void -append_index(char *dst, GLint index) -{ - char s[20]; - _mesa_sprintf(s, "[%d].", index); - append(dst, s); -} - -/** - * Make a string from the given state vector. - * For example, return "state.matrix.texture[2].inverse". - * Use _mesa_free() to deallocate the string. - */ -static const char * -make_state_string(const GLint state[6]) -{ - char str[1000] = ""; - char tmp[30]; - - append(str, "state."); - append_token(str, (gl_state_index) state[0]); - - switch (state[0]) { - case STATE_MATERIAL: - append_face(str, state[1]); - append_token(str, (gl_state_index) state[2]); - break; - case STATE_LIGHT: - append(str, "light"); - append_index(str, state[1]); /* light number [i]. */ - append_token(str, (gl_state_index) state[2]); /* coefficients */ - break; - case STATE_LIGHTMODEL_AMBIENT: - append(str, "lightmodel.ambient"); - break; - case STATE_LIGHTMODEL_SCENECOLOR: - if (state[1] == 0) { - append(str, "lightmodel.front.scenecolor"); - } - else { - append(str, "lightmodel.back.scenecolor"); - } - break; - case STATE_LIGHTPROD: - append_index(str, state[1]); /* light number [i]. */ - append_face(str, state[2]); - append_token(str, (gl_state_index) state[3]); - break; - case STATE_TEXGEN: - append_index(str, state[1]); /* tex unit [i] */ - append_token(str, (gl_state_index) state[2]); /* plane coef */ - break; - case STATE_TEXENV_COLOR: - append_index(str, state[1]); /* tex unit [i] */ - append(str, "color"); - break; - case STATE_FOG_COLOR: - case STATE_FOG_PARAMS: - break; - case STATE_CLIPPLANE: - append_index(str, state[1]); /* plane [i] */ - append(str, "plane"); - break; - case STATE_POINT_SIZE: - case STATE_POINT_ATTENUATION: - break; - case STATE_MATRIX: - { - /* state[1] = modelview, projection, texture, etc. */ - /* state[2] = which texture matrix or program matrix */ - /* state[3] = first row to fetch */ - /* state[4] = last row to fetch */ - /* state[5] = transpose, inverse or invtrans */ - const gl_state_index mat = (gl_state_index) state[1]; - const GLuint index = (GLuint) state[2]; - const GLuint firstRow = (GLuint) state[3]; - const GLuint lastRow = (GLuint) state[4]; - const gl_state_index modifier = (gl_state_index) state[5]; - append_token(str, mat); - if (index) - append_index(str, index); - if (modifier) - append_token(str, modifier); - if (firstRow == lastRow) - _mesa_sprintf(tmp, ".row[%d]", firstRow); - else - _mesa_sprintf(tmp, ".row[%d..%d]", firstRow, lastRow); - append(str, tmp); - } - break; - case STATE_DEPTH_RANGE: - break; - case STATE_FRAGMENT_PROGRAM: - case STATE_VERTEX_PROGRAM: - /* state[1] = {STATE_ENV, STATE_LOCAL} */ - /* state[2] = parameter index */ - append_token(str, (gl_state_index) state[1]); - append_index(str, state[2]); - break; - case STATE_INTERNAL: - break; - default: - _mesa_problem(NULL, "Invalid state in make_state_string"); - break; - } - - return _mesa_strdup(str); -} - - -/** - * Loop over all the parameters in a parameter list. If the parameter - * is a GL state reference, look up the current value of that state - * variable and put it into the parameter's Value[4] array. - * This would be called at glBegin time when using a fragment program. - */ -void -_mesa_load_state_parameters(GLcontext *ctx, - struct gl_program_parameter_list *paramList) -{ - GLuint i; - - if (!paramList) - return; - - for (i = 0; i < paramList->NumParameters; i++) { - if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) { - _mesa_fetch_state(ctx, - paramList->Parameters[i].StateIndexes, - paramList->ParameterValues[i]); - } - } -} - - -/** - * Initialize program instruction fields to defaults. - * \param inst first instruction to initialize - * \param count number of instructions to initialize - */ -void -_mesa_init_instructions(struct prog_instruction *inst, GLuint count) -{ - GLuint i; - - _mesa_bzero(inst, count * sizeof(struct prog_instruction)); - - for (i = 0; i < count; i++) { - inst[i].SrcReg[0].File = PROGRAM_UNDEFINED; - inst[i].SrcReg[0].Swizzle = SWIZZLE_NOOP; - inst[i].SrcReg[1].File = PROGRAM_UNDEFINED; - inst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP; - inst[i].SrcReg[2].File = PROGRAM_UNDEFINED; - inst[i].SrcReg[2].Swizzle = SWIZZLE_NOOP; - - inst[i].DstReg.File = PROGRAM_UNDEFINED; - inst[i].DstReg.WriteMask = WRITEMASK_XYZW; - inst[i].DstReg.CondMask = COND_TR; - inst[i].DstReg.CondSwizzle = SWIZZLE_NOOP; - - inst[i].SaturateMode = SATURATE_OFF; - inst[i].Precision = FLOAT32; - } -} - - -/** - * Allocate an array of program instructions. - * \param numInst number of instructions - * \return pointer to instruction memory - */ -struct prog_instruction * -_mesa_alloc_instructions(GLuint numInst) -{ - return (struct prog_instruction *) - _mesa_calloc(numInst * sizeof(struct prog_instruction)); -} - - -/** - * Reallocate memory storing an array of program instructions. - * This is used when we need to append additional instructions onto an - * program. - * \param oldInst pointer to first of old/src instructions - * \param numOldInst number of instructions at - * \param numNewInst desired size of new instruction array. - * \return pointer to start of new instruction array. - */ -struct prog_instruction * -_mesa_realloc_instructions(struct prog_instruction *oldInst, - GLuint numOldInst, GLuint numNewInst) -{ - struct prog_instruction *newInst; - - newInst = (struct prog_instruction *) - _mesa_realloc(oldInst, - numOldInst * sizeof(struct prog_instruction), - numNewInst * sizeof(struct prog_instruction)); - - return newInst; -} - - -/** - * Return a copy of a program. - * XXX Problem here if the program object is actually OO-derivation - * made by a device driver. - */ -struct gl_program * -_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) -{ - struct gl_program *clone; - - clone = _mesa_new_program(ctx, prog->Target, prog->Id); - if (!clone) - return NULL; - - assert(clone->Target == prog->Target); - clone->String = (GLubyte *) _mesa_strdup((char *) prog->String); - clone->RefCount = 1; - clone->Format = prog->Format; - clone->Instructions = _mesa_alloc_instructions(prog->NumInstructions); - if (!clone->Instructions) { - _mesa_delete_program(ctx, clone); - return NULL; - } - memcpy(clone->Instructions, prog->Instructions, - prog->NumInstructions * sizeof(struct prog_instruction)); - clone->InputsRead = prog->InputsRead; - clone->OutputsWritten = prog->OutputsWritten; - clone->Parameters = _mesa_clone_parameter_list(prog->Parameters); - memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); - clone->Varying = _mesa_clone_parameter_list(prog->Varying); - memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); - clone->NumInstructions = prog->NumInstructions; - clone->NumTemporaries = prog->NumTemporaries; - clone->NumParameters = prog->NumParameters; - clone->NumAttributes = prog->NumAttributes; - clone->NumAddressRegs = prog->NumAddressRegs; - clone->NumNativeInstructions = prog->NumNativeInstructions; - clone->NumNativeTemporaries = prog->NumNativeTemporaries; - clone->NumNativeParameters = prog->NumNativeParameters; - clone->NumNativeAttributes = prog->NumNativeAttributes; - clone->NumNativeAddressRegs = prog->NumNativeAddressRegs; - - switch (prog->Target) { - case GL_VERTEX_PROGRAM_ARB: - { - const struct gl_vertex_program *vp - = (const struct gl_vertex_program *) prog; - struct gl_vertex_program *vpc = (struct gl_vertex_program *) clone; - vpc->IsPositionInvariant = vp->IsPositionInvariant; - } - break; - case GL_FRAGMENT_PROGRAM_ARB: - { - const struct gl_fragment_program *fp - = (const struct gl_fragment_program *) prog; - struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone; - memcpy(fpc->TexturesUsed, fp->TexturesUsed, sizeof(fp->TexturesUsed)); - fpc->NumAluInstructions = fp->NumAluInstructions; - fpc->NumTexInstructions = fp->NumTexInstructions; - fpc->NumTexIndirections = fp->NumTexIndirections; - fpc->NumNativeAluInstructions = fp->NumNativeAluInstructions; - fpc->NumNativeTexInstructions = fp->NumNativeTexInstructions; - fpc->NumNativeTexIndirections = fp->NumNativeTexIndirections; - fpc->FogOption = fp->FogOption; - fpc->UsesKill = fp->UsesKill; - } - break; - default: - _mesa_problem(NULL, "Unexpected target in _mesa_clone_program"); - } - - return clone; -} - - - -/** - * Basic info about each instruction - */ -struct instruction_info -{ - gl_inst_opcode Opcode; - const char *Name; - GLuint NumSrcRegs; -}; - -/** - * Instruction info - * \note Opcode should equal array index! - */ -static const struct instruction_info InstInfo[MAX_OPCODE] = { - { OPCODE_NOP, "NOP", 0 }, - { OPCODE_ABS, "ABS", 1 }, - { OPCODE_ADD, "ADD", 2 }, - { OPCODE_ARA, "ARA", 1 }, - { OPCODE_ARL, "ARL", 1 }, - { OPCODE_ARL_NV, "ARL", 1 }, - { OPCODE_ARR, "ARL", 1 }, - { OPCODE_BRA, "BRA", 0 }, - { OPCODE_CAL, "CAL", 0 }, - { OPCODE_CMP, "CMP", 3 }, - { OPCODE_COS, "COS", 1 }, - { OPCODE_DDX, "DDX", 1 }, - { OPCODE_DDY, "DDY", 1 }, - { OPCODE_DP3, "DP3", 2 }, - { OPCODE_DP4, "DP4", 2 }, - { OPCODE_DPH, "DPH", 2 }, - { OPCODE_DST, "DST", 2 }, - { OPCODE_END, "END", 0 }, - { OPCODE_EX2, "EX2", 1 }, - { OPCODE_EXP, "EXP", 1 }, - { OPCODE_FLR, "FLR", 1 }, - { OPCODE_FRC, "FRC", 1 }, - { OPCODE_KIL, "KIL", 1 }, - { OPCODE_KIL_NV, "KIL", 0 }, - { OPCODE_LG2, "LG2", 1 }, - { OPCODE_LIT, "LIT", 1 }, - { OPCODE_LOG, "LOG", 1 }, - { OPCODE_LRP, "LRP", 3 }, - { OPCODE_MAD, "MAD", 3 }, - { OPCODE_MAX, "MAX", 2 }, - { OPCODE_MIN, "MIN", 2 }, - { OPCODE_MOV, "MOV", 1 }, - { OPCODE_MUL, "MUL", 2 }, - { OPCODE_PK2H, "PK2H", 1 }, - { OPCODE_PK2US, "PK2US", 1 }, - { OPCODE_PK4B, "PK4B", 1 }, - { OPCODE_PK4UB, "PK4UB", 1 }, - { OPCODE_POW, "POW", 2 }, - { OPCODE_POPA, "POPA", 0 }, - { OPCODE_PRINT, "PRINT", 1 }, - { OPCODE_PUSHA, "PUSHA", 0 }, - { OPCODE_RCC, "RCC", 1 }, - { OPCODE_RCP, "RCP", 1 }, - { OPCODE_RET, "RET", 0 }, - { OPCODE_RFL, "RFL", 1 }, - { OPCODE_RSQ, "RSQ", 1 }, - { OPCODE_SCS, "SCS", 1 }, - { OPCODE_SEQ, "SEQ", 2 }, - { OPCODE_SFL, "SFL", 0 }, - { OPCODE_SGE, "SGE", 2 }, - { OPCODE_SGT, "SGT", 2 }, - { OPCODE_SIN, "SIN", 1 }, - { OPCODE_SLE, "SLE", 2 }, - { OPCODE_SLT, "SLT", 2 }, - { OPCODE_SNE, "SNE", 2 }, - { OPCODE_SSG, "SSG", 1 }, - { OPCODE_STR, "STR", 0 }, - { OPCODE_SUB, "SUB", 2 }, - { OPCODE_SWZ, "SWZ", 1 }, - { OPCODE_TEX, "TEX", 1 }, - { OPCODE_TXB, "TXB", 1 }, - { OPCODE_TXD, "TXD", 3 }, - { OPCODE_TXL, "TXL", 1 }, - { OPCODE_TXP, "TXP", 1 }, - { OPCODE_TXP_NV, "TXP", 1 }, - { OPCODE_UP2H, "UP2H", 1 }, - { OPCODE_UP2US, "UP2US", 1 }, - { OPCODE_UP4B, "UP4B", 1 }, - { OPCODE_UP4UB, "UP4UB", 1 }, - { OPCODE_X2D, "X2D", 3 }, - { OPCODE_XPD, "XPD", 2 } -}; - - -/** - * Return the number of src registers for the given instruction/opcode. - */ -GLuint -_mesa_num_inst_src_regs(gl_inst_opcode opcode) -{ - ASSERT(opcode == InstInfo[opcode].Opcode); - ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); - return InstInfo[opcode].NumSrcRegs; -} - - -/** - * Return string name for given program opcode. - */ -const char * -_mesa_opcode_string(gl_inst_opcode opcode) -{ - ASSERT(opcode < MAX_OPCODE); - return InstInfo[opcode].Name; -} - -/** - * Return string name for given program/register file. - */ -static const char * -program_file_string(enum register_file f) -{ - switch (f) { - case PROGRAM_TEMPORARY: - return "TEMP"; - case PROGRAM_LOCAL_PARAM: - return "LOCAL"; - case PROGRAM_ENV_PARAM: - return "ENV"; - case PROGRAM_STATE_VAR: - return "STATE"; - case PROGRAM_INPUT: - return "INPUT"; - case PROGRAM_OUTPUT: - return "OUTPUT"; - case PROGRAM_NAMED_PARAM: - return "NAMED"; - case PROGRAM_CONSTANT: - return "CONST"; - case PROGRAM_UNIFORM: - return "UNIFORM"; - case PROGRAM_VARYING: - return "VARYING"; - case PROGRAM_WRITE_ONLY: - return "WRITE_ONLY"; - case PROGRAM_ADDRESS: - return "ADDR"; - default: - return "Unknown program file!"; - } -} - - -/** - * Return a string representation of the given swizzle word. - * If extended is true, use extended (comma-separated) format. - */ -static const char * -swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended) -{ - static const char swz[] = "xyzw01"; - static char s[20]; - GLuint i = 0; - - if (!extended && swizzle == SWIZZLE_NOOP && negateBase == 0) - return ""; /* no swizzle/negation */ - - if (!extended) - s[i++] = '.'; - - if (negateBase & 0x1) - s[i++] = '-'; - s[i++] = swz[GET_SWZ(swizzle, 0)]; - - if (extended) { - s[i++] = ','; - } - - if (negateBase & 0x2) - s[i++] = '-'; - s[i++] = swz[GET_SWZ(swizzle, 1)]; - - if (extended) { - s[i++] = ','; - } - - if (negateBase & 0x4) - s[i++] = '-'; - s[i++] = swz[GET_SWZ(swizzle, 2)]; - - if (extended) { - s[i++] = ','; - } - - if (negateBase & 0x8) - s[i++] = '-'; - s[i++] = swz[GET_SWZ(swizzle, 3)]; - - s[i] = 0; - return s; -} - - -static const char * -writemask_string(GLuint writeMask) -{ - static char s[10]; - GLuint i = 0; - - if (writeMask == WRITEMASK_XYZW) - return ""; - - s[i++] = '.'; - if (writeMask & WRITEMASK_X) - s[i++] = 'x'; - if (writeMask & WRITEMASK_Y) - s[i++] = 'y'; - if (writeMask & WRITEMASK_Z) - s[i++] = 'z'; - if (writeMask & WRITEMASK_W) - s[i++] = 'w'; - - s[i] = 0; - return s; -} - -static void -print_dst_reg(const struct prog_dst_register *dstReg) -{ - _mesa_printf(" %s[%d]%s", - program_file_string((enum register_file) dstReg->File), - dstReg->Index, - writemask_string(dstReg->WriteMask)); -} - -static void -print_src_reg(const struct prog_src_register *srcReg) -{ - _mesa_printf("%s[%d]%s", - program_file_string((enum register_file) srcReg->File), - srcReg->Index, - swizzle_string(srcReg->Swizzle, - srcReg->NegateBase, GL_FALSE)); -} - -static void -print_comment(const struct prog_instruction *inst) -{ - if (inst->Comment) - _mesa_printf("; # %s\n", inst->Comment); - else - _mesa_printf(";\n"); -} - - -void -_mesa_print_alu_instruction(const struct prog_instruction *inst, - const char *opcode_string, - GLuint numRegs) -{ - GLuint j; - - _mesa_printf("%s", opcode_string); - - /* frag prog only */ - if (inst->SaturateMode == SATURATE_ZERO_ONE) - _mesa_printf("_SAT"); - - if (inst->DstReg.File != PROGRAM_UNDEFINED) { - _mesa_printf(" %s[%d]%s", - program_file_string((enum register_file) inst->DstReg.File), - inst->DstReg.Index, - writemask_string(inst->DstReg.WriteMask)); - } - else { - _mesa_printf(" ???"); - } - - if (numRegs > 0) - _mesa_printf(", "); - - for (j = 0; j < numRegs; j++) { - print_src_reg(inst->SrcReg + j); - if (j + 1 < numRegs) - _mesa_printf(", "); - } - - if (inst->Comment) - _mesa_printf(" # %s", inst->Comment); - - print_comment(inst); -} - - -/** - * Print a single vertex/fragment program instruction. - */ -void -_mesa_print_instruction(const struct prog_instruction *inst) -{ - switch (inst->Opcode) { - case OPCODE_PRINT: - _mesa_printf("PRINT '%s'", inst->Data); - if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { - _mesa_printf(", "); - _mesa_printf("%s[%d]%s", - program_file_string((enum register_file) inst->SrcReg[0].File), - inst->SrcReg[0].Index, - swizzle_string(inst->SrcReg[0].Swizzle, - inst->SrcReg[0].NegateBase, GL_FALSE)); - } - if (inst->Comment) - _mesa_printf(" # %s", inst->Comment); - print_comment(inst); - break; - case OPCODE_SWZ: - _mesa_printf("SWZ"); - if (inst->SaturateMode == SATURATE_ZERO_ONE) - _mesa_printf("_SAT"); - print_dst_reg(&inst->DstReg); - _mesa_printf("%s[%d], %s", - program_file_string((enum register_file) inst->SrcReg[0].File), - inst->SrcReg[0].Index, - swizzle_string(inst->SrcReg[0].Swizzle, - inst->SrcReg[0].NegateBase, GL_TRUE)); - print_comment(inst); - break; - case OPCODE_TEX: - case OPCODE_TXP: - case OPCODE_TXB: - _mesa_printf("%s", _mesa_opcode_string(inst->Opcode)); - if (inst->SaturateMode == SATURATE_ZERO_ONE) - _mesa_printf("_SAT"); - _mesa_printf(" "); - print_dst_reg(&inst->DstReg); - _mesa_printf(", "); - print_src_reg(&inst->SrcReg[0]); - _mesa_printf(", texture[%d], ", inst->TexSrcUnit); - switch (inst->TexSrcTarget) { - case TEXTURE_1D_INDEX: _mesa_printf("1D"); break; - case TEXTURE_2D_INDEX: _mesa_printf("2D"); break; - case TEXTURE_3D_INDEX: _mesa_printf("3D"); break; - case TEXTURE_CUBE_INDEX: _mesa_printf("CUBE"); break; - case TEXTURE_RECT_INDEX: _mesa_printf("RECT"); break; - default: - ; - } - print_comment(inst); - break; - case OPCODE_ARL: - _mesa_printf("ARL addr.x, "); - print_src_reg(&inst->SrcReg[0]); - print_comment(inst); - break; - case OPCODE_BRA: - _mesa_printf("BRA %u", inst->BranchTarget); - print_comment(inst); - break; - case OPCODE_CAL: - _mesa_printf("CAL %u", inst->BranchTarget); - print_comment(inst); - break; - case OPCODE_END: - _mesa_printf("END"); - print_comment(inst); - break; - /* XXX may need other special-case instructions */ - default: - /* typical alu instruction */ - _mesa_print_alu_instruction(inst, - _mesa_opcode_string(inst->Opcode), - _mesa_num_inst_src_regs(inst->Opcode)); - break; - } -} - - -/** - * Print a vertx/fragment program to stdout. - * XXX this function could be greatly improved. - */ -void -_mesa_print_program(const struct gl_program *prog) -{ - GLuint i; - for (i = 0; i < prog->NumInstructions; i++) { - _mesa_printf("%3d: ", i); - _mesa_print_instruction(prog->Instructions + i); - } -} - - -/** - * Print all of a program's parameters. - */ -void -_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog) -{ - GLint i; - - _mesa_printf("NumInstructions=%d\n", prog->NumInstructions); - _mesa_printf("NumTemporaries=%d\n", prog->NumTemporaries); - _mesa_printf("NumParameters=%d\n", prog->NumParameters); - _mesa_printf("NumAttributes=%d\n", prog->NumAttributes); - _mesa_printf("NumAddressRegs=%d\n", prog->NumAddressRegs); - - _mesa_load_state_parameters(ctx, prog->Parameters); - -#if 0 - _mesa_printf("Local Params:\n"); - for (i = 0; i < MAX_PROGRAM_LOCAL_PARAMS; i++){ - const GLfloat *p = prog->LocalParams[i]; - _mesa_printf("%2d: %f, %f, %f, %f\n", i, p[0], p[1], p[2], p[3]); - } -#endif - - for (i = 0; i < prog->Parameters->NumParameters; i++){ - struct gl_program_parameter *param = prog->Parameters->Parameters + i; - const GLfloat *v = prog->Parameters->ParameterValues[i]; - _mesa_printf("param[%d] %s %s = {%.3f, %.3f, %.3f, %.3f};\n", - i, - program_file_string(prog->Parameters->Parameters[i].Type), - param->Name, v[0], v[1], v[2], v[3]); - } -} - /** * Mixing ARB and NV vertex/fragment programs can be tricky. diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index 98e2b53602..34485776e9 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -43,37 +43,6 @@ #include "mtypes.h" -/* for GL_ARB_v_p and GL_ARB_f_p SWZ instruction */ -#define SWIZZLE_X 0 -#define SWIZZLE_Y 1 -#define SWIZZLE_Z 2 -#define SWIZZLE_W 3 -#define SWIZZLE_ZERO 4 /* keep these values together: KW */ -#define SWIZZLE_ONE 5 /* keep these values together: KW */ - -#define MAKE_SWIZZLE4(a,b,c,d) (((a)<<0) | ((b)<<3) | ((c)<<6) | ((d)<<9)) -#define SWIZZLE_NOOP MAKE_SWIZZLE4(0,1,2,3) -#define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7) -#define GET_BIT(msk, idx) (((msk) >> (idx)) & 0x1) - - -#define WRITEMASK_X 0x1 -#define WRITEMASK_Y 0x2 -#define WRITEMASK_XY 0x3 -#define WRITEMASK_Z 0x4 -#define WRITEMASK_XZ 0x5 -#define WRITEMASK_YZ 0x6 -#define WRITEMASK_XYZ 0x7 -#define WRITEMASK_W 0x8 -#define WRITEMASK_XW 0x9 -#define WRITEMASK_YW 0xa -#define WRITEMASK_XYW 0xb -#define WRITEMASK_ZW 0xc -#define WRITEMASK_XZW 0xd -#define WRITEMASK_YZW 0xe -#define WRITEMASK_XYZW 0xf - - extern struct gl_program _mesa_DummyProgram; @@ -125,179 +94,7 @@ extern struct gl_program * _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog); -/** - * Used for describing GL state referenced from inside ARB vertex and - * fragment programs. - * A string such as "state.light[0].ambient" gets translated into a - * sequence of tokens such as [ STATE_LIGHT, 0, STATE_AMBIENT ]. - */ -typedef enum gl_state_index_ { - STATE_MATERIAL = 100, /* start at 100 so small ints are seen as ints */ - - STATE_LIGHT, - STATE_LIGHTMODEL_AMBIENT, - STATE_LIGHTMODEL_SCENECOLOR, - STATE_LIGHTPROD, - - STATE_TEXGEN, - - STATE_FOG_COLOR, - STATE_FOG_PARAMS, - - STATE_CLIPPLANE, - - STATE_POINT_SIZE, - STATE_POINT_ATTENUATION, - - STATE_MATRIX, - STATE_MODELVIEW, - STATE_PROJECTION, - STATE_MVP, - STATE_TEXTURE, - STATE_PROGRAM, - STATE_MATRIX_INVERSE, - STATE_MATRIX_TRANSPOSE, - STATE_MATRIX_INVTRANS, - - STATE_AMBIENT, - STATE_DIFFUSE, - STATE_SPECULAR, - STATE_EMISSION, - STATE_SHININESS, - STATE_HALF, - - STATE_POSITION, - STATE_ATTENUATION, - STATE_SPOT_DIRECTION, - - STATE_TEXGEN_EYE_S, - STATE_TEXGEN_EYE_T, - STATE_TEXGEN_EYE_R, - STATE_TEXGEN_EYE_Q, - STATE_TEXGEN_OBJECT_S, - STATE_TEXGEN_OBJECT_T, - STATE_TEXGEN_OBJECT_R, - STATE_TEXGEN_OBJECT_Q, - - STATE_TEXENV_COLOR, - - STATE_DEPTH_RANGE, - - STATE_VERTEX_PROGRAM, - STATE_FRAGMENT_PROGRAM, - - STATE_ENV, - STATE_LOCAL, - - STATE_INTERNAL, /* Mesa additions */ - STATE_NORMAL_SCALE, - STATE_TEXRECT_SCALE, - STATE_POSITION_NORMALIZED, /* normalized light position */ - STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ -} gl_state_index; - - - -/** - * Named program parameters - * Used for NV_fragment_program "DEFINE"d constants and "DECLARE"d parameters, - * and ARB_fragment_program global state references. For the later, Name - * might be "state.light[0].diffuse", for example. - */ -struct gl_program_parameter -{ - const char *Name; /**< Null-terminated string */ - enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ - GLuint Size; /**< Number of components (1..4) */ - /** - * A sequence of STATE_* tokens and integers to identify GL state. - */ - gl_state_index StateIndexes[6]; -}; - - -/** - * A list of the above program_parameter instances. - */ -struct gl_program_parameter_list -{ - GLuint Size; /**< allocated size of Parameters, ParameterValues */ - GLuint NumParameters; /**< number of parameters in arrays */ - struct gl_program_parameter *Parameters; /**< Array [Size] */ - GLfloat (*ParameterValues)[4]; /**< Array [Size] of GLfloat[4] */ - GLbitfield StateFlags; /**< _NEW_* flags indicating which state changes - might invalidate ParameterValues[] */ -}; - - -/* - * Program parameter functions - */ - -extern struct gl_program_parameter_list * -_mesa_new_parameter_list(void); - -extern void -_mesa_free_parameter_list(struct gl_program_parameter_list *paramList); - -extern struct gl_program_parameter_list * -_mesa_clone_parameter_list(const struct gl_program_parameter_list *list); - -extern GLint -_mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], GLuint size, - enum register_file type); - -extern GLint -_mesa_add_named_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4]); - -extern GLint -_mesa_add_named_constant(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], - GLuint size); - -extern GLint -_mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, - const GLfloat values[4], GLuint size, - GLuint *swizzleOut); - -extern GLint -_mesa_add_uniform(struct gl_program_parameter_list *paramList, - const char *name, GLuint size); - -extern GLint -_mesa_add_varying(struct gl_program_parameter_list *paramList, - const char *name, GLuint size); - -extern GLint -_mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint *stateTokens); - -extern GLfloat * -_mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, - GLsizei nameLen, const char *name); - -extern GLint -_mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, - GLsizei nameLen, const char *name); - -extern GLboolean -_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, - const GLfloat v[], GLsizei vSize, - GLint *posOut, GLuint *swizzleOut); - -extern void -_mesa_load_state_parameters(GLcontext *ctx, - struct gl_program_parameter_list *paramList); - -extern void -_mesa_print_instruction(const struct prog_instruction *inst); -void -_mesa_print_alu_instruction(const struct prog_instruction *inst, - const char *opcode_string, - GLuint numRegs); extern void _mesa_print_program(const struct gl_program *prog); -- cgit v1.2.3 From a7a89e362b8d0dd1586675c23aac4e0e5486262a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:02:19 -0700 Subject: Updated #includes after splitting program.h --- src/mesa/shader/slang/slang_codegen.c | 2 ++ src/mesa/shader/slang/slang_compile.c | 1 + src/mesa/shader/slang/slang_emit.c | 6 +++++- src/mesa/shader/slang/slang_link2.c | 5 +++-- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 40a27bc351..af543adf63 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -40,6 +40,8 @@ #include "slang_ir.h" #include "mtypes.h" #include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" #include "slang_print.h" diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index a9c84abdce..463088fc5c 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -31,6 +31,7 @@ #include "imports.h" #include "context.h" #include "program.h" +#include "prog_parameter.h" #include "grammar_mesa.h" #include "slang_codegen.h" #include "slang_compile.h" diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 29d9544ebe..104064fd17 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -33,7 +33,9 @@ #include "get.h" #include "macros.h" #include "program.h" -#include "program_instruction.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_statevars.h" #include "slang_emit.h" @@ -554,6 +556,7 @@ static GLint slang_alloc_varying(struct gl_program *prog, const char *name) { GLint i = _mesa_add_varying(prog->Varying, name, 4); /* XXX fix size */ +#if 0 if (prog->Target == GL_VERTEX_PROGRAM_ARB) { #ifdef OLD_LINK i += VERT_RESULT_VAR0; @@ -570,6 +573,7 @@ slang_alloc_varying(struct gl_program *prog, const char *name) prog->InputsRead |= (1 << (i + FRAG_ATTRIB_VAR0)); #endif } +#endif return i; } diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 76954e17a6..4b3588454c 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -33,7 +33,8 @@ #include "hash.h" #include "macros.h" #include "program.h" -#include "program_instruction.h" +#include "prog_instruction.h" +#include "prog_parameter.h" #include "shaderobjects.h" #include "slang_link.h" @@ -108,7 +109,7 @@ link_varying_vars(struct gl_linked_program *linked, struct gl_program *prog) if (inst->SrcReg[j].File == PROGRAM_VARYING) { inst->SrcReg[j].File = newFile; inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ] + firstVarying; - varsRead |= (1 << inst->DstReg.Index); + varsRead |= (1 << inst->SrcReg[j].Index); } } /* XXX update program OutputsWritten, InputsRead */ -- cgit v1.2.3 From c0551f0a465b577a17698ede46370a17e29b3df7 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:02:37 -0700 Subject: Updated includes. --- src/mesa/shader/arbprogparse.c | 4 +++- src/mesa/shader/nvfragparse.c | 3 ++- src/mesa/shader/nvvertexec.c | 4 +++- src/mesa/shader/nvvertparse.c | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 5a61f30193..7a87bf015f 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -35,10 +35,12 @@ #include "arbprogparse.h" #include "grammar_mesa.h" #include "program.h" +#include "prog_parameter.h" +#include "prog_statevars.h" #include "context.h" #include "macros.h" #include "mtypes.h" -#include "program_instruction.h" +#include "prog_instruction.h" /* For ARB programs, use the NV instruction limits */ diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 8405623333..6690c9a851 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -43,7 +43,8 @@ #include "imports.h" #include "macros.h" #include "mtypes.h" -#include "program_instruction.h" +#include "prog_parameter.h" +#include "prog_instruction.h" #include "nvfragparse.h" #include "nvprogram.h" #include "program.h" diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 96bb16e873..986022dc03 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -34,7 +34,9 @@ #include "macros.h" #include "mtypes.h" #include "nvvertexec.h" -#include "program_instruction.h" +#include "prog_parameter.h" +#include "prog_statevars.h" +#include "prog_instruction.h" #include "program.h" #include "math/m_matrix.h" diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index ecfe8ec334..6491404441 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -45,7 +45,7 @@ #include "mtypes.h" #include "nvprogram.h" #include "nvvertparse.h" -#include "program_instruction.h" +#include "prog_instruction.h" #include "program.h" -- cgit v1.2.3 From 57d9531cd644226d15be4a09ad1492ab647165dc Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:03:04 -0700 Subject: Updated includes. --- src/mesa/shader/nvprogram.c | 3 ++- src/mesa/shader/programopt.c | 4 +++- src/mesa/shader/shaderobjects.c | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index 4f160b1431..b824ce242a 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -44,7 +44,8 @@ #include "macros.h" #include "mtypes.h" #include "nvfragparse.h" -#include "program_instruction.h" +#include "prog_parameter.h" +#include "prog_instruction.h" #include "nvvertexec.h" #include "nvvertparse.h" #include "nvprogram.h" diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index 51caa02f9f..c190071e9c 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -36,8 +36,10 @@ #include "imports.h" #include "mtypes.h" #include "program.h" +#include "prog_parameter.h" +#include "prog_statevars.h" #include "programopt.h" -#include "program_instruction.h" +#include "prog_instruction.h" /** diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c index 976fa0aa31..24fab9822b 100644 --- a/src/mesa/shader/shaderobjects.c +++ b/src/mesa/shader/shaderobjects.c @@ -34,6 +34,7 @@ #include "hash.h" #include "macros.h" #include "program.h" +#include "prog_parameter.h" #include "shaderobjects.h" #include "shaderobjects_3dlabs.h" #include "slang_link.h" -- cgit v1.2.3 From 60417b646de390a71a15b3e13d2e662712e38294 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:03:33 -0700 Subject: chmod a-x --- src/mesa/shader/shaderobjects_3dlabs.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/mesa/shader/shaderobjects_3dlabs.h (limited to 'src') diff --git a/src/mesa/shader/shaderobjects_3dlabs.h b/src/mesa/shader/shaderobjects_3dlabs.h old mode 100755 new mode 100644 -- cgit v1.2.3 From 49f82803cc6ceaf1ecc3928a5417ef300f73f37d Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:13:06 -0700 Subject: Updated includes. --- src/mesa/swrast/s_context.c | 2 +- src/mesa/swrast/s_nvfragprog.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index e304789154..46f99ef6e0 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -31,7 +31,7 @@ #include "context.h" #include "colormac.h" #include "mtypes.h" -#include "program.h" +#include "prog_statevars.h" #include "teximage.h" #include "swrast.h" #include "s_blend.h" diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c index df583bb29c..ac2f5d93b6 100644 --- a/src/mesa/swrast/s_nvfragprog.c +++ b/src/mesa/swrast/s_nvfragprog.c @@ -34,7 +34,9 @@ #include "glheader.h" #include "colormac.h" #include "context.h" -#include "program_instruction.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_print.h" #include "program.h" #include "s_nvfragprog.h" -- cgit v1.2.3 From 865f88afc0d59d886fb2ad50429e584ecf17fa81 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:14:14 -0700 Subject: Renamed from s_nvfragprog.[ch] --- src/mesa/swrast/s_fragprog.c | 1692 ++++++++++++++++++++++++++++++++++++++++++ src/mesa/swrast/s_fragprog.h | 37 + 2 files changed, 1729 insertions(+) create mode 100644 src/mesa/swrast/s_fragprog.c create mode 100644 src/mesa/swrast/s_fragprog.h (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c new file mode 100644 index 0000000000..ac2f5d93b6 --- /dev/null +++ b/src/mesa/swrast/s_fragprog.c @@ -0,0 +1,1692 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.2 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Regarding GL_NV_fragment_program: + * + * Portions of this software may use or implement intellectual + * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims + * any and all warranties with respect to such intellectual property, + * including any use thereof or modifications thereto. + */ + +#include "glheader.h" +#include "colormac.h" +#include "context.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_print.h" +#include "program.h" + +#include "s_nvfragprog.h" +#include "s_span.h" + + +/* See comments below for info about this */ +#define LAMBDA_ZERO 1 + +/* debug predicate */ +#define DEBUG_FRAG 0 + + +/** + * Virtual machine state used during execution of a fragment programs. + */ +struct fp_machine +{ + GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; + GLfloat Inputs[FRAG_ATTRIB_MAX][4]; + GLfloat Outputs[FRAG_RESULT_MAX][4]; + GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ + + GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ + GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ +}; + + +#if FEATURE_MESA_program_debug +static struct fp_machine *CurrentMachine = NULL; + +/** + * For GL_MESA_program_debug. + * Return current value (4*GLfloat) of a fragment program register. + * Called via ctx->Driver.GetFragmentProgramRegister(). + */ +void +_swrast_get_program_register(GLcontext *ctx, enum register_file file, + GLuint index, GLfloat val[4]) +{ + if (CurrentMachine) { + switch (file) { + case PROGRAM_INPUT: + COPY_4V(val, CurrentMachine->Inputs[index]); + break; + case PROGRAM_OUTPUT: + COPY_4V(val, CurrentMachine->Outputs[index]); + break; + case PROGRAM_TEMPORARY: + COPY_4V(val, CurrentMachine->Temporaries[index]); + break; + default: + _mesa_problem(NULL, + "bad register file in _swrast_get_program_register"); + } + } +} +#endif /* FEATURE_MESA_program_debug */ + + +/** + * Fetch a texel. + */ +static void +fetch_texel( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, + GLuint unit, GLfloat color[4] ) +{ + GLchan rgba[4]; + SWcontext *swrast = SWRAST_CONTEXT(ctx); + + /* XXX use a float-valued TextureSample routine here!!! */ + swrast->TextureSample[unit](ctx, ctx->Texture.Unit[unit]._Current, + 1, (const GLfloat (*)[4]) texcoord, + &lambda, &rgba); + color[0] = CHAN_TO_FLOAT(rgba[0]); + color[1] = CHAN_TO_FLOAT(rgba[1]); + color[2] = CHAN_TO_FLOAT(rgba[2]); + color[3] = CHAN_TO_FLOAT(rgba[3]); +} + + +/** + * Fetch a texel with the given partial derivatives to compute a level + * of detail in the mipmap. + */ +static void +fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], + const GLfloat texdx[4], const GLfloat texdy[4], + GLuint unit, GLfloat color[4] ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; + const struct gl_texture_image *texImg = texObj->Image[0][texObj->BaseLevel]; + const GLfloat texW = (GLfloat) texImg->WidthScale; + const GLfloat texH = (GLfloat) texImg->HeightScale; + GLchan rgba[4]; + + GLfloat lambda = _swrast_compute_lambda(texdx[0], texdy[0], /* ds/dx, ds/dy */ + texdx[1], texdy[1], /* dt/dx, dt/dy */ + texdx[3], texdy[2], /* dq/dx, dq/dy */ + texW, texH, + texcoord[0], texcoord[1], texcoord[3], + 1.0F / texcoord[3]); + + swrast->TextureSample[unit](ctx, ctx->Texture.Unit[unit]._Current, + 1, (const GLfloat (*)[4]) texcoord, + &lambda, &rgba); + color[0] = CHAN_TO_FLOAT(rgba[0]); + color[1] = CHAN_TO_FLOAT(rgba[1]); + color[2] = CHAN_TO_FLOAT(rgba[2]); + color[3] = CHAN_TO_FLOAT(rgba[3]); +} + + +/** + * Return a pointer to the 4-element float vector specified by the given + * source register. + */ +static INLINE const GLfloat * +get_register_pointer( GLcontext *ctx, + const struct prog_src_register *source, + const struct fp_machine *machine, + const struct gl_fragment_program *program ) +{ + switch (source->File) { + case PROGRAM_TEMPORARY: + ASSERT(source->Index < MAX_PROGRAM_TEMPS); + return machine->Temporaries[source->Index]; + case PROGRAM_INPUT: + ASSERT(source->Index < FRAG_ATTRIB_MAX); + return machine->Inputs[source->Index]; + case PROGRAM_OUTPUT: + /* This is only for PRINT */ + ASSERT(source->Index < FRAG_RESULT_MAX); + return machine->Outputs[source->Index]; + case PROGRAM_LOCAL_PARAM: + ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); + return program->Base.LocalParams[source->Index]; + case PROGRAM_ENV_PARAM: + ASSERT(source->Index < MAX_NV_FRAGMENT_PROGRAM_PARAMS); + return ctx->FragmentProgram.Parameters[source->Index]; + case PROGRAM_STATE_VAR: + /* Fallthrough */ + case PROGRAM_CONSTANT: + /* Fallthrough */ + case PROGRAM_UNIFORM: + /* Fallthrough */ + case PROGRAM_NAMED_PARAM: + ASSERT(source->Index < (GLint) program->Base.Parameters->NumParameters); + return program->Base.Parameters->ParameterValues[source->Index]; + default: + _mesa_problem(ctx, "Invalid input register file %d in fp " + "get_register_pointer", source->File); + return NULL; + } +} + + +/** + * Fetch a 4-element float vector from the given source register. + * Apply swizzling and negating as needed. + */ +static void +fetch_vector4( GLcontext *ctx, + const struct prog_src_register *source, + const struct fp_machine *machine, + const struct gl_fragment_program *program, + GLfloat result[4] ) +{ + const GLfloat *src = get_register_pointer(ctx, source, machine, program); + ASSERT(src); + + if (source->Swizzle == MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, + SWIZZLE_Z, SWIZZLE_W)) { + /* no swizzling */ + COPY_4V(result, src); + } + else { + result[0] = src[GET_SWZ(source->Swizzle, 0)]; + result[1] = src[GET_SWZ(source->Swizzle, 1)]; + result[2] = src[GET_SWZ(source->Swizzle, 2)]; + result[3] = src[GET_SWZ(source->Swizzle, 3)]; + } + + if (source->NegateBase) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } + if (source->Abs) { + result[0] = FABSF(result[0]); + result[1] = FABSF(result[1]); + result[2] = FABSF(result[2]); + result[3] = FABSF(result[3]); + } + if (source->NegateAbs) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } +} + + +/** + * Fetch the derivative with respect to X for the given register. + * \return GL_TRUE if it was easily computed or GL_FALSE if we + * need to execute another instance of the program (ugh)! + */ +static GLboolean +fetch_vector4_deriv( GLcontext *ctx, + const struct prog_src_register *source, + const SWspan *span, + char xOrY, GLint column, GLfloat result[4] ) +{ + GLfloat src[4]; + + ASSERT(xOrY == 'X' || xOrY == 'Y'); + + switch (source->Index) { + case FRAG_ATTRIB_WPOS: + if (xOrY == 'X') { + src[0] = 1.0; + src[1] = 0.0; + src[2] = span->dzdx / ctx->DrawBuffer->_DepthMaxF; + src[3] = span->dwdx; + } + else { + src[0] = 0.0; + src[1] = 1.0; + src[2] = span->dzdy / ctx->DrawBuffer->_DepthMaxF; + src[3] = span->dwdy; + } + break; + case FRAG_ATTRIB_COL0: + if (xOrY == 'X') { + src[0] = span->drdx * (1.0F / CHAN_MAXF); + src[1] = span->dgdx * (1.0F / CHAN_MAXF); + src[2] = span->dbdx * (1.0F / CHAN_MAXF); + src[3] = span->dadx * (1.0F / CHAN_MAXF); + } + else { + src[0] = span->drdy * (1.0F / CHAN_MAXF); + src[1] = span->dgdy * (1.0F / CHAN_MAXF); + src[2] = span->dbdy * (1.0F / CHAN_MAXF); + src[3] = span->dady * (1.0F / CHAN_MAXF); + } + break; + case FRAG_ATTRIB_COL1: + if (xOrY == 'X') { + src[0] = span->dsrdx * (1.0F / CHAN_MAXF); + src[1] = span->dsgdx * (1.0F / CHAN_MAXF); + src[2] = span->dsbdx * (1.0F / CHAN_MAXF); + src[3] = 0.0; /* XXX need this */ + } + else { + src[0] = span->dsrdy * (1.0F / CHAN_MAXF); + src[1] = span->dsgdy * (1.0F / CHAN_MAXF); + src[2] = span->dsbdy * (1.0F / CHAN_MAXF); + src[3] = 0.0; /* XXX need this */ + } + break; + case FRAG_ATTRIB_FOGC: + if (xOrY == 'X') { + src[0] = span->dfogdx; + src[1] = 0.0; + src[2] = 0.0; + src[3] = 0.0; + } + else { + src[0] = span->dfogdy; + src[1] = 0.0; + src[2] = 0.0; + src[3] = 0.0; + } + break; + case FRAG_ATTRIB_TEX0: + case FRAG_ATTRIB_TEX1: + case FRAG_ATTRIB_TEX2: + case FRAG_ATTRIB_TEX3: + case FRAG_ATTRIB_TEX4: + case FRAG_ATTRIB_TEX5: + case FRAG_ATTRIB_TEX6: + case FRAG_ATTRIB_TEX7: + if (xOrY == 'X') { + const GLuint u = source->Index - FRAG_ATTRIB_TEX0; + /* this is a little tricky - I think I've got it right */ + const GLfloat invQ = 1.0f / (span->tex[u][3] + + span->texStepX[u][3] * column); + src[0] = span->texStepX[u][0] * invQ; + src[1] = span->texStepX[u][1] * invQ; + src[2] = span->texStepX[u][2] * invQ; + src[3] = span->texStepX[u][3] * invQ; + } + else { + const GLuint u = source->Index - FRAG_ATTRIB_TEX0; + /* Tricky, as above, but in Y direction */ + const GLfloat invQ = 1.0f / (span->tex[u][3] + span->texStepY[u][3]); + src[0] = span->texStepY[u][0] * invQ; + src[1] = span->texStepY[u][1] * invQ; + src[2] = span->texStepY[u][2] * invQ; + src[3] = span->texStepY[u][3] * invQ; + } + break; + default: + return GL_FALSE; + } + + result[0] = src[GET_SWZ(source->Swizzle, 0)]; + result[1] = src[GET_SWZ(source->Swizzle, 1)]; + result[2] = src[GET_SWZ(source->Swizzle, 2)]; + result[3] = src[GET_SWZ(source->Swizzle, 3)]; + + if (source->NegateBase) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } + if (source->Abs) { + result[0] = FABSF(result[0]); + result[1] = FABSF(result[1]); + result[2] = FABSF(result[2]); + result[3] = FABSF(result[3]); + } + if (source->NegateAbs) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } + return GL_TRUE; +} + + +/** + * As above, but only return result[0] element. + */ +static void +fetch_vector1( GLcontext *ctx, + const struct prog_src_register *source, + const struct fp_machine *machine, + const struct gl_fragment_program *program, + GLfloat result[4] ) +{ + const GLfloat *src = get_register_pointer(ctx, source, machine, program); + ASSERT(src); + + result[0] = src[GET_SWZ(source->Swizzle, 0)]; + + if (source->NegateBase) { + result[0] = -result[0]; + } + if (source->Abs) { + result[0] = FABSF(result[0]); + } + if (source->NegateAbs) { + result[0] = -result[0]; + } +} + + +/** + * Test value against zero and return GT, LT, EQ or UN if NaN. + */ +static INLINE GLuint +generate_cc( float value ) +{ + if (value != value) + return COND_UN; /* NaN */ + if (value > 0.0F) + return COND_GT; + if (value < 0.0F) + return COND_LT; + return COND_EQ; +} + + +/** + * Test if the ccMaskRule is satisfied by the given condition code. + * Used to mask destination writes according to the current condition code. + */ +static INLINE GLboolean +test_cc(GLuint condCode, GLuint ccMaskRule) +{ + switch (ccMaskRule) { + case COND_EQ: return (condCode == COND_EQ); + case COND_NE: return (condCode != COND_EQ); + case COND_LT: return (condCode == COND_LT); + case COND_GE: return (condCode == COND_GT || condCode == COND_EQ); + case COND_LE: return (condCode == COND_LT || condCode == COND_EQ); + case COND_GT: return (condCode == COND_GT); + case COND_TR: return GL_TRUE; + case COND_FL: return GL_FALSE; + default: return GL_TRUE; + } +} + + +/** + * Store 4 floats into a register. Observe the instructions saturate and + * set-condition-code flags. + */ +static void +store_vector4( const struct prog_instruction *inst, + struct fp_machine *machine, + const GLfloat value[4] ) +{ + const struct prog_dst_register *dest = &(inst->DstReg); + const GLboolean clamp = inst->SaturateMode == SATURATE_ZERO_ONE; + GLfloat *dstReg; + GLfloat dummyReg[4]; + GLfloat clampedValue[4]; + GLuint writeMask = dest->WriteMask; + + switch (dest->File) { + case PROGRAM_OUTPUT: + dstReg = machine->Outputs[dest->Index]; + break; + case PROGRAM_TEMPORARY: + dstReg = machine->Temporaries[dest->Index]; + break; + case PROGRAM_WRITE_ONLY: + dstReg = dummyReg; + return; + default: + _mesa_problem(NULL, "bad register file in store_vector4(fp)"); + return; + } + +#if 0 + if (value[0] > 1.0e10 || + IS_INF_OR_NAN(value[0]) || + IS_INF_OR_NAN(value[1]) || + IS_INF_OR_NAN(value[2]) || + IS_INF_OR_NAN(value[3]) ) + printf("store %g %g %g %g\n", value[0], value[1], value[2], value[3]); +#endif + + if (clamp) { + clampedValue[0] = CLAMP(value[0], 0.0F, 1.0F); + clampedValue[1] = CLAMP(value[1], 0.0F, 1.0F); + clampedValue[2] = CLAMP(value[2], 0.0F, 1.0F); + clampedValue[3] = CLAMP(value[3], 0.0F, 1.0F); + value = clampedValue; + } + + if (dest->CondMask != COND_TR) { + /* condition codes may turn off some writes */ + if (writeMask & WRITEMASK_X) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 0)], + dest->CondMask)) + writeMask &= ~WRITEMASK_X; + } + if (writeMask & WRITEMASK_Y) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 1)], + dest->CondMask)) + writeMask &= ~WRITEMASK_Y; + } + if (writeMask & WRITEMASK_Z) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 2)], + dest->CondMask)) + writeMask &= ~WRITEMASK_Z; + } + if (writeMask & WRITEMASK_W) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 3)], + dest->CondMask)) + writeMask &= ~WRITEMASK_W; + } + } + + if (writeMask & WRITEMASK_X) + dstReg[0] = value[0]; + if (writeMask & WRITEMASK_Y) + dstReg[1] = value[1]; + if (writeMask & WRITEMASK_Z) + dstReg[2] = value[2]; + if (writeMask & WRITEMASK_W) + dstReg[3] = value[3]; + + if (inst->CondUpdate) { + if (writeMask & WRITEMASK_X) + machine->CondCodes[0] = generate_cc(value[0]); + if (writeMask & WRITEMASK_Y) + machine->CondCodes[1] = generate_cc(value[1]); + if (writeMask & WRITEMASK_Z) + machine->CondCodes[2] = generate_cc(value[2]); + if (writeMask & WRITEMASK_W) + machine->CondCodes[3] = generate_cc(value[3]); + } +} + + +/** + * Initialize a new machine state instance from an existing one, adding + * the partial derivatives onto the input registers. + * Used to implement DDX and DDY instructions in non-trivial cases. + */ +static void +init_machine_deriv( GLcontext *ctx, + const struct fp_machine *machine, + const struct gl_fragment_program *program, + const SWspan *span, char xOrY, + struct fp_machine *dMachine ) +{ + GLuint u, v; + + ASSERT(xOrY == 'X' || xOrY == 'Y'); + + /* copy existing machine */ + _mesa_memcpy(dMachine, machine, sizeof(struct fp_machine)); + + if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { + /* Clear temporary registers (undefined for ARB_f_p) */ + _mesa_bzero( (void*) machine->Temporaries, + MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + } + + /* Add derivatives */ + if (program->Base.InputsRead & (1 << FRAG_ATTRIB_WPOS)) { + GLfloat *wpos = (GLfloat*) machine->Inputs[FRAG_ATTRIB_WPOS]; + if (xOrY == 'X') { + wpos[0] += 1.0F; + wpos[1] += 0.0F; + wpos[2] += span->dzdx; + wpos[3] += span->dwdx; + } + else { + wpos[0] += 0.0F; + wpos[1] += 1.0F; + wpos[2] += span->dzdy; + wpos[3] += span->dwdy; + } + } + if (program->Base.InputsRead & (1 << FRAG_ATTRIB_COL0)) { + GLfloat *col0 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL0]; + if (xOrY == 'X') { + col0[0] += span->drdx * (1.0F / CHAN_MAXF); + col0[1] += span->dgdx * (1.0F / CHAN_MAXF); + col0[2] += span->dbdx * (1.0F / CHAN_MAXF); + col0[3] += span->dadx * (1.0F / CHAN_MAXF); + } + else { + col0[0] += span->drdy * (1.0F / CHAN_MAXF); + col0[1] += span->dgdy * (1.0F / CHAN_MAXF); + col0[2] += span->dbdy * (1.0F / CHAN_MAXF); + col0[3] += span->dady * (1.0F / CHAN_MAXF); + } + } + if (program->Base.InputsRead & (1 << FRAG_ATTRIB_COL1)) { + GLfloat *col1 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL1]; + if (xOrY == 'X') { + col1[0] += span->dsrdx * (1.0F / CHAN_MAXF); + col1[1] += span->dsgdx * (1.0F / CHAN_MAXF); + col1[2] += span->dsbdx * (1.0F / CHAN_MAXF); + col1[3] += 0.0; /*XXX fix */ + } + else { + col1[0] += span->dsrdy * (1.0F / CHAN_MAXF); + col1[1] += span->dsgdy * (1.0F / CHAN_MAXF); + col1[2] += span->dsbdy * (1.0F / CHAN_MAXF); + col1[3] += 0.0; /*XXX fix */ + } + } + if (program->Base.InputsRead & (1 << FRAG_ATTRIB_FOGC)) { + GLfloat *fogc = (GLfloat*) machine->Inputs[FRAG_ATTRIB_FOGC]; + if (xOrY == 'X') { + fogc[0] += span->dfogdx; + } + else { + fogc[0] += span->dfogdy; + } + } + for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { + if (program->Base.InputsRead & (1 << (FRAG_ATTRIB_TEX0 + u))) { + GLfloat *tex = (GLfloat*) machine->Inputs[FRAG_ATTRIB_TEX0 + u]; + /* XXX perspective-correct interpolation */ + if (xOrY == 'X') { + tex[0] += span->texStepX[u][0]; + tex[1] += span->texStepX[u][1]; + tex[2] += span->texStepX[u][2]; + tex[3] += span->texStepX[u][3]; + } + else { + tex[0] += span->texStepY[u][0]; + tex[1] += span->texStepY[u][1]; + tex[2] += span->texStepY[u][2]; + tex[3] += span->texStepY[u][3]; + } + } + } + + for (v = 0; v < ctx->Const.MaxVarying; v++) { + if (program->Base.InputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { + GLfloat *var = (GLfloat*) machine->Inputs[FRAG_ATTRIB_VAR0 + v]; + /* XXXX finish this */ + var[0] += span->varStepX[v][0]; + var[1] += span->varStepX[v][1]; + var[2] += span->varStepX[v][2]; + var[3] += span->varStepX[v][3]; + } + } + + /* init condition codes */ + dMachine->CondCodes[0] = COND_EQ; + dMachine->CondCodes[1] = COND_EQ; + dMachine->CondCodes[2] = COND_EQ; + dMachine->CondCodes[3] = COND_EQ; +} + + +/** + * Execute the given vertex program. + * NOTE: we do everything in single-precision floating point; we don't + * currently observe the single/half/fixed-precision qualifiers. + * \param ctx - rendering context + * \param program - the fragment program to execute + * \param machine - machine state (register file) + * \param maxInst - max number of instructions to execute + * \return GL_TRUE if program completed or GL_FALSE if program executed KIL. + */ +static GLboolean +execute_program( GLcontext *ctx, + const struct gl_fragment_program *program, GLuint maxInst, + struct fp_machine *machine, const SWspan *span, + GLuint column ) +{ + GLuint pc; + + if (DEBUG_FRAG) { + printf("execute fragment program --------------------\n"); + } + + for (pc = 0; pc < maxInst; pc++) { + const struct prog_instruction *inst = program->Base.Instructions + pc; + + if (ctx->FragmentProgram.CallbackEnabled && + ctx->FragmentProgram.Callback) { + ctx->FragmentProgram.CurrentPosition = inst->StringPos; + ctx->FragmentProgram.Callback(program->Base.Target, + ctx->FragmentProgram.CallbackData); + } + + if (DEBUG_FRAG) { + _mesa_print_instruction(inst); + } + + switch (inst->Opcode) { + case OPCODE_ABS: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = FABSF(a[0]); + result[1] = FABSF(a[1]); + result[2] = FABSF(a[2]); + result[3] = FABSF(a[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_ADD: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[0] + b[0]; + result[1] = a[1] + b[1]; + result[2] = a[2] + b[2]; + result[3] = a[3] + b[3]; + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("ADD (%g %g %g %g) = (%g %g %g %g) + (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_BRA: /* conditional branch */ + { + /* NOTE: The return is conditional! */ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + /* take branch */ + pc = inst->BranchTarget; + } + } + break; + case OPCODE_CAL: /* Call subroutine */ + { + /* NOTE: The call is conditional! */ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ + } + machine->CallStack[machine->StackDepth++] = pc + 1; + pc = inst->BranchTarget; + } + } + break; + case OPCODE_CMP: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] < 0.0F ? b[0] : c[0]; + result[1] = a[1] < 0.0F ? b[1] : c[1]; + result[2] = a[2] < 0.0F ? b[2] : c[2]; + result[3] = a[3] < 0.0F ? b[3] : c[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_COS: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_cos(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_DDX: /* Partial derivative with respect to X */ + { + GLfloat a[4], aNext[4], result[4]; + struct fp_machine dMachine; + if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'X', + column, result)) { + /* This is tricky. Make a copy of the current machine state, + * increment the input registers by the dx or dy partial + * derivatives, then re-execute the program up to the + * preceeding instruction, then fetch the source register. + * Finally, find the difference in the register values for + * the original and derivative runs. + */ + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); + init_machine_deriv(ctx, machine, program, span, + 'X', &dMachine); + execute_program(ctx, program, pc, &dMachine, span, column); + fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); + result[0] = aNext[0] - a[0]; + result[1] = aNext[1] - a[1]; + result[2] = aNext[2] - a[2]; + result[3] = aNext[3] - a[3]; + } + store_vector4( inst, machine, result ); + } + break; + case OPCODE_DDY: /* Partial derivative with respect to Y */ + { + GLfloat a[4], aNext[4], result[4]; + struct fp_machine dMachine; + if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'Y', + column, result)) { + init_machine_deriv(ctx, machine, program, span, + 'Y', &dMachine); + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); + execute_program(ctx, program, pc, &dMachine, span, column); + fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); + result[0] = aNext[0] - a[0]; + result[1] = aNext[1] - a[1]; + result[2] = aNext[2] - a[2]; + result[3] = aNext[3] - a[3]; + } + store_vector4( inst, machine, result ); + } + break; + case OPCODE_DP3: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] = DOT3(a, b); + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("DP3 %g = (%g %g %g) . (%g %g %g)\n", + result[0], a[0], a[1], a[2], b[0], b[1], b[2]); + } + } + break; + case OPCODE_DP4: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] = DOT4(a,b); + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("DP4 %g = (%g, %g %g %g) . (%g, %g %g %g)\n", + result[0], a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_DPH: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] = + a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_DST: /* Distance vector */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = 1.0F; + result[1] = a[1] * b[1]; + result[2] = a[2]; + result[3] = b[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_EX2: /* Exponential base 2 */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] = + (GLfloat) _mesa_pow(2.0, a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_FLR: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = FLOORF(a[0]); + result[1] = FLOORF(a[1]); + result[2] = FLOORF(a[2]); + result[3] = FLOORF(a[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_FRC: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = a[0] - FLOORF(a[0]); + result[1] = a[1] - FLOORF(a[1]); + result[2] = a[2] - FLOORF(a[2]); + result[3] = a[3] - FLOORF(a[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_KIL_NV: /* NV_f_p only */ + { + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + return GL_FALSE; + } + } + break; + case OPCODE_KIL: /* ARB_f_p only */ + { + GLfloat a[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { + return GL_FALSE; + } + } + break; + case OPCODE_LG2: /* log base 2 */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_LIT: + { + const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = MAX2(a[0], 0.0F); + a[1] = MAX2(a[1], 0.0F); + /* XXX ARB version clamps a[3], NV version doesn't */ + a[3] = CLAMP(a[3], -(128.0F - epsilon), (128.0F - epsilon)); + result[0] = 1.0F; + result[1] = a[0]; + /* XXX we could probably just use pow() here */ + if (a[0] > 0.0F) { + if (a[1] == 0.0 && a[3] == 0.0) + result[2] = 1.0; + else + result[2] = EXPF(a[3] * LOGF(a[1])); + } + else { + result[2] = 0.0; + } + result[3] = 1.0F; + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("LIT (%g %g %g %g) : (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3]); + } + } + break; + case OPCODE_LRP: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; + result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; + result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; + result[3] = a[3] * b[3] + (1.0F - a[3]) * c[3]; + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("LRP (%g %g %g %g) = (%g %g %g %g), " + "(%g %g %g %g), (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3], + c[0], c[1], c[2], c[3]); + } + } + break; + case OPCODE_MAD: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] * b[0] + c[0]; + result[1] = a[1] * b[1] + c[1]; + result[2] = a[2] * b[2] + c[2]; + result[3] = a[3] * b[3] + c[3]; + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("MAD (%g %g %g %g) = (%g %g %g %g) * " + "(%g %g %g %g) + (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3], + c[0], c[1], c[2], c[3]); + } + } + break; + case OPCODE_MAX: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = MAX2(a[0], b[0]); + result[1] = MAX2(a[1], b[1]); + result[2] = MAX2(a[2], b[2]); + result[3] = MAX2(a[3], b[3]); + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("MAX (%g %g %g %g) = (%g %g %g %g), (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_MIN: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = MIN2(a[0], b[0]); + result[1] = MIN2(a[1], b[1]); + result[2] = MIN2(a[2], b[2]); + result[3] = MIN2(a[3], b[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_MOV: + { + GLfloat result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, result ); + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("MOV (%g %g %g %g)\n", + result[0], result[1], result[2], result[3]); + } + } + break; + case OPCODE_MUL: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[0] * b[0]; + result[1] = a[1] * b[1]; + result[2] = a[2] * b[2]; + result[3] = a[3] * b[3]; + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("MUL (%g %g %g %g) = (%g %g %g %g) * (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ + { + GLfloat a[4], result[4]; + GLhalfNV hx, hy; + GLuint *rawResult = (GLuint *) result; + GLuint twoHalves; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + hx = _mesa_float_to_half(a[0]); + hy = _mesa_float_to_half(a[1]); + twoHalves = hx | (hy << 16); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = twoHalves; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PK2US: /* pack two GLushorts into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint usx, usy, *rawResult = (GLuint *) result; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = CLAMP(a[0], 0.0F, 1.0F); + a[1] = CLAMP(a[1], 0.0F, 1.0F); + usx = IROUND(a[0] * 65535.0F); + usy = IROUND(a[1] * 65535.0F); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = usx | (usy << 16); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PK4B: /* pack four GLbytes into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); + a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); + a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); + a[3] = CLAMP(a[3], -128.0F / 127.0F, 1.0F); + ubx = IROUND(127.0F * a[0] + 128.0F); + uby = IROUND(127.0F * a[1] + 128.0F); + ubz = IROUND(127.0F * a[2] + 128.0F); + ubw = IROUND(127.0F * a[3] + 128.0F); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PK4UB: /* pack four GLubytes into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = CLAMP(a[0], 0.0F, 1.0F); + a[1] = CLAMP(a[1], 0.0F, 1.0F); + a[2] = CLAMP(a[2], 0.0F, 1.0F); + a[3] = CLAMP(a[3], 0.0F, 1.0F); + ubx = IROUND(255.0F * a[0]); + uby = IROUND(255.0F * a[1]); + ubz = IROUND(255.0F * a[2]); + ubw = IROUND(255.0F * a[3]); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_POW: + { + GLfloat a[4], b[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] + = (GLfloat)_mesa_pow(a[0], b[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_RCP: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + if (DEBUG_FRAG) { + if (a[0] == 0) + printf("RCP(0)\n"); + else if (IS_INF_OR_NAN(a[0])) + printf("RCP(inf)\n"); + } + result[0] = result[1] = result[2] = result[3] = 1.0F / a[0]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_RET: /* return from subroutine */ + { + /* NOTE: The return is conditional! */ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + if (machine->StackDepth == 0) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ + } + pc = machine->CallStack[--machine->StackDepth]; + } + } + break; + case OPCODE_RFL: /* reflection vector */ + { + GLfloat axis[4], dir[4], result[4], tmpX, tmpW; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, axis ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dir ); + tmpW = DOT3(axis, axis); + tmpX = (2.0F * DOT3(axis, dir)) / tmpW; + result[0] = tmpX * axis[0] - dir[0]; + result[1] = tmpX * axis[1] - dir[1]; + result[2] = tmpX * axis[2] - dir[2]; + /* result[3] is never written! XXX enforce in parser! */ + store_vector4( inst, machine, result ); + } + break; + case OPCODE_RSQ: /* 1 / sqrt() */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = FABSF(a[0]); + result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("RSQ %g = 1/sqrt(|%g|)\n", result[0], a[0]); + } + } + break; + case OPCODE_SCS: /* sine and cos */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = (GLfloat)_mesa_cos(a[0]); + result[1] = (GLfloat)_mesa_sin(a[0]); + result[2] = 0.0; /* undefined! */ + result[3] = 0.0; /* undefined! */ + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SEQ: /* set on equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] == b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SFL: /* set false, operands ignored */ + { + static const GLfloat result[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SGE: /* set on greater or equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] >= b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SGT: /* set on greater */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SIN: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_sin(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SLE: /* set on less or equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] <= b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SLT: /* set on less */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] < b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SNE: /* set on not equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] != b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_STR: /* set true, operands ignored */ + { + static const GLfloat result[4] = { 1.0F, 1.0F, 1.0F, 1.0F }; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SUB: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[0] - b[0]; + result[1] = a[1] - b[1]; + result[2] = a[2] - b[2]; + result[3] = a[3] - b[3]; + store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("SUB (%g %g %g %g) = (%g %g %g %g) - (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_SWZ: /* extended swizzle */ + { + const struct prog_src_register *source = &inst->SrcReg[0]; + const GLfloat *src = get_register_pointer(ctx, source, + machine, program); + GLfloat result[4]; + GLuint i; + for (i = 0; i < 4; i++) { + const GLuint swz = GET_SWZ(source->Swizzle, i); + if (swz == SWIZZLE_ZERO) + result[i] = 0.0; + else if (swz == SWIZZLE_ONE) + result[i] = 1.0; + else { + ASSERT(swz >= 0); + ASSERT(swz <= 3); + result[i] = src[swz]; + } + if (source->NegateBase & (1 << i)) + result[i] = -result[i]; + } + store_vector4( inst, machine, result ); + } + break; + case OPCODE_TEX: /* Both ARB and NV frag prog */ + /* Texel lookup */ + { + /* Note: only use the precomputed lambda value when we're + * sampling texture unit [K] with texcoord[K]. + * Otherwise, the lambda value may have no relation to the + * instruction's texcoord or texture image. Using the wrong + * lambda is usually bad news. + * The rest of the time, just use zero (until we get a more + * sophisticated way of computing lambda). + */ + GLfloat coord[4], color[4], lambda; + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); + fetch_texel( ctx, coord, lambda, inst->TexSrcUnit, color ); + if (DEBUG_FRAG) { + printf("TEX (%g, %g, %g, %g) = texture[%d][%g, %g, %g, %g], " + "lod %f\n", + color[0], color[1], color[2], color[3], + inst->TexSrcUnit, + coord[0], coord[1], coord[2], coord[3], lambda); + } + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXB: /* GL_ARB_fragment_program only */ + /* Texel lookup with LOD bias */ + { + GLfloat coord[4], color[4], lambda, bias; + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); + /* coord[3] is the bias to add to lambda */ + bias = ctx->Texture.Unit[inst->TexSrcUnit].LodBias + + ctx->Texture.Unit[inst->TexSrcUnit]._Current->LodBias + + coord[3]; + fetch_texel(ctx, coord, lambda + bias, inst->TexSrcUnit, color); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXD: /* GL_NV_fragment_program only */ + /* Texture lookup w/ partial derivatives for LOD */ + { + GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, texcoord ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dtdx ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, dtdy ); + fetch_texel_deriv( ctx, texcoord, dtdx, dtdy, inst->TexSrcUnit, + color ); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXP: /* GL_ARB_fragment_program only */ + /* Texture lookup w/ projective divide */ + { + GLfloat texcoord[4], color[4], lambda; + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); + /* Not so sure about this test - if texcoord[3] is + * zero, we'd probably be fine except for an ASSERT in + * IROUND_POS() which gets triggered by the inf values created. + */ + if (texcoord[3] != 0.0) { + texcoord[0] /= texcoord[3]; + texcoord[1] /= texcoord[3]; + texcoord[2] /= texcoord[3]; + } + fetch_texel( ctx, texcoord, lambda, inst->TexSrcUnit, color ); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXP_NV: /* GL_NV_fragment_program only */ + /* Texture lookup w/ projective divide */ + { + GLfloat texcoord[4], color[4], lambda; + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); + if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && + texcoord[3] != 0.0) { + texcoord[0] /= texcoord[3]; + texcoord[1] /= texcoord[3]; + texcoord[2] /= texcoord[3]; + } + fetch_texel( ctx, texcoord, lambda, inst->TexSrcUnit, color ); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_UP2H: /* unpack two 16-bit floats */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + GLhalfNV hx, hy; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + hx = rawBits[0] & 0xffff; + hy = rawBits[0] >> 16; + result[0] = result[2] = _mesa_half_to_float(hx); + result[1] = result[3] = _mesa_half_to_float(hy); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_UP2US: /* unpack two GLushorts */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + GLushort usx, usy; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + usx = rawBits[0] & 0xffff; + usy = rawBits[0] >> 16; + result[0] = result[2] = usx * (1.0f / 65535.0f); + result[1] = result[3] = usy * (1.0f / 65535.0f); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_UP4B: /* unpack four GLbytes */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; + result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; + result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; + result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_UP4UB: /* unpack four GLubytes */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; + result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; + result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; + result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_XPD: /* cross product */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[1] * b[2] - a[2] * b[1]; + result[1] = a[2] * b[0] - a[0] * b[2]; + result[2] = a[0] * b[1] - a[1] * b[0]; + result[3] = 1.0; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_X2D: /* 2-D matrix transform */ + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; + result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; + result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; + result[3] = a[3] + b[0] * c[2] + b[1] * c[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PRINT: + { + if (inst->SrcReg[0].File != -1) { + GLfloat a[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); + _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, + a[0], a[1], a[2], a[3]); + } + else { + _mesa_printf("%s\n", (const char *) inst->Data); + } + } + break; + case OPCODE_END: + return GL_TRUE; + default: + _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program", + inst->Opcode); + return GL_TRUE; /* return value doesn't matter */ + } + } + return GL_TRUE; +} + + +/** + * Initialize the virtual fragment program machine state prior to running + * fragment program on a fragment. This involves initializing the input + * registers, condition codes, etc. + * \param machine the virtual machine state to init + * \param program the fragment program we're about to run + * \param span the span of pixels we'll operate on + * \param col which element (column) of the span we'll operate on + */ +static void +init_machine( GLcontext *ctx, struct fp_machine *machine, + const struct gl_fragment_program *program, + const SWspan *span, GLuint col ) +{ + GLuint inputsRead = program->Base.InputsRead; + GLuint u, v; + + if (ctx->FragmentProgram.CallbackEnabled) + inputsRead = ~0; + + if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { + /* Clear temporary registers (undefined for ARB_f_p) */ + _mesa_bzero(machine->Temporaries, + MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + } + + /* Load input registers */ + if (inputsRead & (1 << FRAG_ATTRIB_WPOS)) { + GLfloat *wpos = machine->Inputs[FRAG_ATTRIB_WPOS]; + ASSERT(span->arrayMask & SPAN_Z); + if (span->arrayMask & SPAN_XY) { + wpos[0] = (GLfloat) span->array->x[col]; + wpos[1] = (GLfloat) span->array->y[col]; + } + else { + wpos[0] = (GLfloat) span->x + col; + wpos[1] = (GLfloat) span->y; + } + wpos[2] = (GLfloat) span->array->z[col] / ctx->DrawBuffer->_DepthMaxF; + wpos[3] = span->w + col * span->dwdx; + } + if (inputsRead & (1 << FRAG_ATTRIB_COL0)) { + ASSERT(span->arrayMask & SPAN_RGBA); + COPY_4V(machine->Inputs[FRAG_ATTRIB_COL0], + span->array->color.sz4.rgba[col]); + } + if (inputsRead & (1 << FRAG_ATTRIB_COL1)) { + ASSERT(span->arrayMask & SPAN_SPEC); + COPY_4V(machine->Inputs[FRAG_ATTRIB_COL1], + span->array->color.sz4.spec[col]); + } + if (inputsRead & (1 << FRAG_ATTRIB_FOGC)) { + GLfloat *fogc = machine->Inputs[FRAG_ATTRIB_FOGC]; + ASSERT(span->arrayMask & SPAN_FOG); + fogc[0] = span->array->fog[col]; + fogc[1] = 0.0F; + fogc[2] = 0.0F; + fogc[3] = 0.0F; + } + for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { + if (inputsRead & (1 << (FRAG_ATTRIB_TEX0 + u))) { + GLfloat *tex = machine->Inputs[FRAG_ATTRIB_TEX0 + u]; + /*ASSERT(ctx->Texture._EnabledCoordUnits & (1 << u));*/ + COPY_4V(tex, span->array->texcoords[u][col]); + /*ASSERT(tex[0] != 0 || tex[1] != 0 || tex[2] != 0);*/ + } + } + for (v = 0; v < ctx->Const.MaxVarying; v++) { + if (inputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { +#if 0 + printf("Frag Var %d: %f %f %f\n", col, + span->array->varying[col][v][0], + span->array->varying[col][v][1], + span->array->varying[col][v][2]); +#endif + COPY_4V(machine->Inputs[FRAG_ATTRIB_VAR0 + v], + span->array->varying[col][v]); + } + } + + /* init condition codes */ + machine->CondCodes[0] = COND_EQ; + machine->CondCodes[1] = COND_EQ; + machine->CondCodes[2] = COND_EQ; + machine->CondCodes[3] = COND_EQ; + + /* init call stack */ + machine->StackDepth = 0; +} + + +/** + * Run fragment program on the pixels in span from 'start' to 'end' - 1. + */ +static void +run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) +{ + const struct gl_fragment_program *program = ctx->FragmentProgram._Current; + struct fp_machine machine; + GLuint i; + + CurrentMachine = &machine; + + for (i = start; i < end; i++) { + if (span->array->mask[i]) { + init_machine(ctx, &machine, program, span, i); + + if (execute_program(ctx, program, ~0, &machine, span, i)) { + /* Store result color */ + COPY_4V(span->array->color.sz4.rgba[i], + machine.Outputs[FRAG_RESULT_COLR]); + + /* Store result depth/z */ + if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { + const GLfloat depth = machine.Outputs[FRAG_RESULT_DEPR][2]; + if (depth <= 0.0) + span->array->z[i] = 0; + else if (depth >= 1.0) + span->array->z[i] = ctx->DrawBuffer->_DepthMax; + else + span->array->z[i] = IROUND(depth * ctx->DrawBuffer->_DepthMaxF); + } + } + else { + /* killed fragment */ + span->array->mask[i] = GL_FALSE; + span->writeAll = GL_FALSE; + } + } + } + + CurrentMachine = NULL; +} + + +/** + * Execute the current fragment program for all the fragments + * in the given span. + */ +void +_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span ) +{ + const struct gl_fragment_program *program = ctx->FragmentProgram._Current; + + /* incoming colors should be floats */ + ASSERT(span->array->ChanType == GL_FLOAT); + + ctx->_CurrentProgram = GL_FRAGMENT_PROGRAM_ARB; /* or NV, doesn't matter */ + + run_program(ctx, span, 0, span->end); + + if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { + span->interpMask &= ~SPAN_Z; + span->arrayMask |= SPAN_Z; + } + + ctx->_CurrentProgram = 0; +} + diff --git a/src/mesa/swrast/s_fragprog.h b/src/mesa/swrast/s_fragprog.h new file mode 100644 index 0000000000..188bacc3d8 --- /dev/null +++ b/src/mesa/swrast/s_fragprog.h @@ -0,0 +1,37 @@ +/* + * Mesa 3-D graphics library + * Version: 6.1 + * + * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef S_NVFRAGPROG_H +#define S_NVFRAGPROG_H + + +#include "s_context.h" + + +extern void +_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span ); + + +#endif -- cgit v1.2.3 From 464b82b1e690b5ab690bd1673251e5b4edf69a62 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:47:08 -0700 Subject: Move some code from prog_print.c to prog_instruction.c --- src/mesa/shader/prog_instruction.c | 112 +++++++++++++++++++++++++++++++++++++ src/mesa/shader/prog_print.c | 112 ------------------------------------- 2 files changed, 112 insertions(+), 112 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index f4dae76de0..bebc3ecb69 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -97,3 +97,115 @@ _mesa_realloc_instructions(struct prog_instruction *oldInst, } + +/** + * Basic info about each instruction + */ +struct instruction_info +{ + gl_inst_opcode Opcode; + const char *Name; + GLuint NumSrcRegs; +}; + +/** + * Instruction info + * \note Opcode should equal array index! + */ +static const struct instruction_info InstInfo[MAX_OPCODE] = { + { OPCODE_NOP, "NOP", 0 }, + { OPCODE_ABS, "ABS", 1 }, + { OPCODE_ADD, "ADD", 2 }, + { OPCODE_ARA, "ARA", 1 }, + { OPCODE_ARL, "ARL", 1 }, + { OPCODE_ARL_NV, "ARL", 1 }, + { OPCODE_ARR, "ARL", 1 }, + { OPCODE_BRA, "BRA", 0 }, + { OPCODE_CAL, "CAL", 0 }, + { OPCODE_CMP, "CMP", 3 }, + { OPCODE_COS, "COS", 1 }, + { OPCODE_DDX, "DDX", 1 }, + { OPCODE_DDY, "DDY", 1 }, + { OPCODE_DP3, "DP3", 2 }, + { OPCODE_DP4, "DP4", 2 }, + { OPCODE_DPH, "DPH", 2 }, + { OPCODE_DST, "DST", 2 }, + { OPCODE_END, "END", 0 }, + { OPCODE_EX2, "EX2", 1 }, + { OPCODE_EXP, "EXP", 1 }, + { OPCODE_FLR, "FLR", 1 }, + { OPCODE_FRC, "FRC", 1 }, + { OPCODE_KIL, "KIL", 1 }, + { OPCODE_KIL_NV, "KIL", 0 }, + { OPCODE_LG2, "LG2", 1 }, + { OPCODE_LIT, "LIT", 1 }, + { OPCODE_LOG, "LOG", 1 }, + { OPCODE_LRP, "LRP", 3 }, + { OPCODE_MAD, "MAD", 3 }, + { OPCODE_MAX, "MAX", 2 }, + { OPCODE_MIN, "MIN", 2 }, + { OPCODE_MOV, "MOV", 1 }, + { OPCODE_MUL, "MUL", 2 }, + { OPCODE_PK2H, "PK2H", 1 }, + { OPCODE_PK2US, "PK2US", 1 }, + { OPCODE_PK4B, "PK4B", 1 }, + { OPCODE_PK4UB, "PK4UB", 1 }, + { OPCODE_POW, "POW", 2 }, + { OPCODE_POPA, "POPA", 0 }, + { OPCODE_PRINT, "PRINT", 1 }, + { OPCODE_PUSHA, "PUSHA", 0 }, + { OPCODE_RCC, "RCC", 1 }, + { OPCODE_RCP, "RCP", 1 }, + { OPCODE_RET, "RET", 0 }, + { OPCODE_RFL, "RFL", 1 }, + { OPCODE_RSQ, "RSQ", 1 }, + { OPCODE_SCS, "SCS", 1 }, + { OPCODE_SEQ, "SEQ", 2 }, + { OPCODE_SFL, "SFL", 0 }, + { OPCODE_SGE, "SGE", 2 }, + { OPCODE_SGT, "SGT", 2 }, + { OPCODE_SIN, "SIN", 1 }, + { OPCODE_SLE, "SLE", 2 }, + { OPCODE_SLT, "SLT", 2 }, + { OPCODE_SNE, "SNE", 2 }, + { OPCODE_SSG, "SSG", 1 }, + { OPCODE_STR, "STR", 0 }, + { OPCODE_SUB, "SUB", 2 }, + { OPCODE_SWZ, "SWZ", 1 }, + { OPCODE_TEX, "TEX", 1 }, + { OPCODE_TXB, "TXB", 1 }, + { OPCODE_TXD, "TXD", 3 }, + { OPCODE_TXL, "TXL", 1 }, + { OPCODE_TXP, "TXP", 1 }, + { OPCODE_TXP_NV, "TXP", 1 }, + { OPCODE_UP2H, "UP2H", 1 }, + { OPCODE_UP2US, "UP2US", 1 }, + { OPCODE_UP4B, "UP4B", 1 }, + { OPCODE_UP4UB, "UP4UB", 1 }, + { OPCODE_X2D, "X2D", 3 }, + { OPCODE_XPD, "XPD", 2 } +}; + + +/** + * Return the number of src registers for the given instruction/opcode. + */ +GLuint +_mesa_num_inst_src_regs(gl_inst_opcode opcode) +{ + ASSERT(opcode == InstInfo[opcode].Opcode); + ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); + return InstInfo[opcode].NumSrcRegs; +} + + +/** + * Return string name for given program opcode. + */ +const char * +_mesa_opcode_string(gl_inst_opcode opcode) +{ + ASSERT(opcode < MAX_OPCODE); + return InstInfo[opcode].Name; +} + diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index eded71bbae..1453c3bb88 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -39,118 +39,6 @@ #include "prog_statevars.h" - -/** - * Basic info about each instruction - */ -struct instruction_info -{ - gl_inst_opcode Opcode; - const char *Name; - GLuint NumSrcRegs; -}; - -/** - * Instruction info - * \note Opcode should equal array index! - */ -static const struct instruction_info InstInfo[MAX_OPCODE] = { - { OPCODE_NOP, "NOP", 0 }, - { OPCODE_ABS, "ABS", 1 }, - { OPCODE_ADD, "ADD", 2 }, - { OPCODE_ARA, "ARA", 1 }, - { OPCODE_ARL, "ARL", 1 }, - { OPCODE_ARL_NV, "ARL", 1 }, - { OPCODE_ARR, "ARL", 1 }, - { OPCODE_BRA, "BRA", 0 }, - { OPCODE_CAL, "CAL", 0 }, - { OPCODE_CMP, "CMP", 3 }, - { OPCODE_COS, "COS", 1 }, - { OPCODE_DDX, "DDX", 1 }, - { OPCODE_DDY, "DDY", 1 }, - { OPCODE_DP3, "DP3", 2 }, - { OPCODE_DP4, "DP4", 2 }, - { OPCODE_DPH, "DPH", 2 }, - { OPCODE_DST, "DST", 2 }, - { OPCODE_END, "END", 0 }, - { OPCODE_EX2, "EX2", 1 }, - { OPCODE_EXP, "EXP", 1 }, - { OPCODE_FLR, "FLR", 1 }, - { OPCODE_FRC, "FRC", 1 }, - { OPCODE_KIL, "KIL", 1 }, - { OPCODE_KIL_NV, "KIL", 0 }, - { OPCODE_LG2, "LG2", 1 }, - { OPCODE_LIT, "LIT", 1 }, - { OPCODE_LOG, "LOG", 1 }, - { OPCODE_LRP, "LRP", 3 }, - { OPCODE_MAD, "MAD", 3 }, - { OPCODE_MAX, "MAX", 2 }, - { OPCODE_MIN, "MIN", 2 }, - { OPCODE_MOV, "MOV", 1 }, - { OPCODE_MUL, "MUL", 2 }, - { OPCODE_PK2H, "PK2H", 1 }, - { OPCODE_PK2US, "PK2US", 1 }, - { OPCODE_PK4B, "PK4B", 1 }, - { OPCODE_PK4UB, "PK4UB", 1 }, - { OPCODE_POW, "POW", 2 }, - { OPCODE_POPA, "POPA", 0 }, - { OPCODE_PRINT, "PRINT", 1 }, - { OPCODE_PUSHA, "PUSHA", 0 }, - { OPCODE_RCC, "RCC", 1 }, - { OPCODE_RCP, "RCP", 1 }, - { OPCODE_RET, "RET", 0 }, - { OPCODE_RFL, "RFL", 1 }, - { OPCODE_RSQ, "RSQ", 1 }, - { OPCODE_SCS, "SCS", 1 }, - { OPCODE_SEQ, "SEQ", 2 }, - { OPCODE_SFL, "SFL", 0 }, - { OPCODE_SGE, "SGE", 2 }, - { OPCODE_SGT, "SGT", 2 }, - { OPCODE_SIN, "SIN", 1 }, - { OPCODE_SLE, "SLE", 2 }, - { OPCODE_SLT, "SLT", 2 }, - { OPCODE_SNE, "SNE", 2 }, - { OPCODE_SSG, "SSG", 1 }, - { OPCODE_STR, "STR", 0 }, - { OPCODE_SUB, "SUB", 2 }, - { OPCODE_SWZ, "SWZ", 1 }, - { OPCODE_TEX, "TEX", 1 }, - { OPCODE_TXB, "TXB", 1 }, - { OPCODE_TXD, "TXD", 3 }, - { OPCODE_TXL, "TXL", 1 }, - { OPCODE_TXP, "TXP", 1 }, - { OPCODE_TXP_NV, "TXP", 1 }, - { OPCODE_UP2H, "UP2H", 1 }, - { OPCODE_UP2US, "UP2US", 1 }, - { OPCODE_UP4B, "UP4B", 1 }, - { OPCODE_UP4UB, "UP4UB", 1 }, - { OPCODE_X2D, "X2D", 3 }, - { OPCODE_XPD, "XPD", 2 } -}; - - -/** - * Return the number of src registers for the given instruction/opcode. - */ -GLuint -_mesa_num_inst_src_regs(gl_inst_opcode opcode) -{ - ASSERT(opcode == InstInfo[opcode].Opcode); - ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode); - return InstInfo[opcode].NumSrcRegs; -} - - -/** - * Return string name for given program opcode. - */ -const char * -_mesa_opcode_string(gl_inst_opcode opcode) -{ - ASSERT(opcode < MAX_OPCODE); - return InstInfo[opcode].Name; -} - /** * Return string name for given program/register file. */ -- cgit v1.2.3 From cc6a141dc16f9e56355c87e533c71965d7ea6f48 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:47:34 -0700 Subject: Remove some moved extern decls. --- src/mesa/shader/program.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index 34485776e9..73f5238928 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -83,26 +83,11 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog); extern struct gl_program * _mesa_lookup_program(GLcontext *ctx, GLuint id); -extern struct prog_instruction * -_mesa_alloc_instructions(GLuint numInst); - -extern struct prog_instruction * -_mesa_realloc_instructions(struct prog_instruction *oldInst, - GLuint numOldInst, GLuint numNewInst); extern struct gl_program * _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog); - - -extern void -_mesa_print_program(const struct gl_program *prog); - -extern void -_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog); - - /* * API functions common to ARB/NV_vertex/fragment_program */ -- cgit v1.2.3 From 0831ef5038f851a9eec705a558e03b366b745ecd Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:47:54 -0700 Subject: include prog_print.h --- src/mesa/shader/slang/slang_link2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 4b3588454c..4827c8c4cd 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -35,6 +35,7 @@ #include "program.h" #include "prog_instruction.h" #include "prog_parameter.h" +#include "prog_print.h" #include "shaderobjects.h" #include "slang_link.h" -- cgit v1.2.3 From 901c1bb402496427abcaa5d56c1f458329e2ec69 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:49:09 -0700 Subject: remove some unneeded includes --- src/mesa/shader/programopt.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index c190071e9c..bccb0a3ad7 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -33,9 +33,6 @@ #include "glheader.h" #include "context.h" -#include "imports.h" -#include "mtypes.h" -#include "program.h" #include "prog_parameter.h" #include "prog_statevars.h" #include "programopt.h" -- cgit v1.2.3 From 2c1f9758525431d870b32986b6144c2921760bc0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:50:34 -0700 Subject: remove unneded includes --- src/mesa/shader/prog_parameter.c | 2 -- src/mesa/shader/prog_print.c | 2 -- 2 files changed, 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index f634e38800..7094d6fc03 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -32,8 +32,6 @@ #include "glheader.h" #include "imports.h" #include "macros.h" -#include "mtypes.h" -#include "program.h" #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_statevars.h" diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 1453c3bb88..7bc5016987 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -31,8 +31,6 @@ #include "glheader.h" #include "context.h" #include "imports.h" -#include "macros.h" -#include "program.h" #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" -- cgit v1.2.3 From 885afd59ec358135ca6121cd65c397c9766afa7a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:53:49 -0700 Subject: remove unneeded includes --- src/mesa/shader/nvfragparse.c | 3 --- src/mesa/shader/nvvertexec.c | 2 -- src/mesa/shader/nvvertparse.c | 2 -- 3 files changed, 7 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 6690c9a851..0b48d408f9 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -39,14 +39,11 @@ #include "glheader.h" #include "context.h" -#include "hash.h" #include "imports.h" #include "macros.h" -#include "mtypes.h" #include "prog_parameter.h" #include "prog_instruction.h" #include "nvfragparse.h" -#include "nvprogram.h" #include "program.h" diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 986022dc03..305d028249 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -32,12 +32,10 @@ #include "context.h" #include "imports.h" #include "macros.h" -#include "mtypes.h" #include "nvvertexec.h" #include "prog_parameter.h" #include "prog_statevars.h" #include "prog_instruction.h" -#include "program.h" #include "math/m_matrix.h" diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index 6491404441..fb546a0217 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -39,10 +39,8 @@ #include "glheader.h" #include "context.h" -#include "hash.h" #include "imports.h" #include "macros.h" -#include "mtypes.h" #include "nvprogram.h" #include "nvvertparse.h" #include "prog_instruction.h" -- cgit v1.2.3 From 6232438acb205ea44dee2d5eb68fb618e40b47d6 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 14 Dec 2006 15:54:01 -0700 Subject: remove unneeded includes --- src/mesa/shader/nvprogram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index b824ce242a..531a41083c 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -42,10 +42,9 @@ #include "hash.h" #include "imports.h" #include "macros.h" -#include "mtypes.h" -#include "nvfragparse.h" #include "prog_parameter.h" #include "prog_instruction.h" +#include "nvfragparse.h" #include "nvvertexec.h" #include "nvvertparse.h" #include "nvprogram.h" -- cgit v1.2.3 From b78fb7abaff4e1b1e55d7f2c137ac9a1d40137f2 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 08:49:27 -0700 Subject: Renamed s_nvfragprog.[ch] to s_fragprog.[ch], program_instruction.h to prog_instruction.h --- src/mesa/shader/program_instruction.h | 364 ------- src/mesa/swrast/s_nvfragprog.c | 1692 --------------------------------- src/mesa/swrast/s_nvfragprog.h | 37 - 3 files changed, 2093 deletions(-) delete mode 100644 src/mesa/shader/program_instruction.h delete mode 100644 src/mesa/swrast/s_nvfragprog.c delete mode 100644 src/mesa/swrast/s_nvfragprog.h (limited to 'src') diff --git a/src/mesa/shader/program_instruction.h b/src/mesa/shader/program_instruction.h deleted file mode 100644 index 2fcdfaa2be..0000000000 --- a/src/mesa/shader/program_instruction.h +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file prog_instruction.h - * - * Private vertex program types and constants only used by files - * related to vertex programs. - * - * \author Brian Paul - * \author Keith Whitwell - * \author Ian Romanick - */ - - -#ifndef PROG_INSTRUCTION_H -#define PROG_INSTRUCTION_H - -/** - * Condition codes for GL_NV_fragment_program - */ -/*@{*/ -#define COND_GT 1 /* greater than zero */ -#define COND_EQ 2 /* equal to zero */ -#define COND_LT 3 /* less than zero */ -#define COND_UN 4 /* unordered (NaN) */ -#define COND_GE 5 /* greater then or equal to zero */ -#define COND_LE 6 /* less then or equal to zero */ -#define COND_NE 7 /* not equal to zero */ -#define COND_TR 8 /* always true */ -#define COND_FL 9 /* always false */ -/*@}*/ - - -/** - * Instruction precision for GL_NV_fragment_program - */ -/*@{*/ -#define FLOAT32 0x1 -#define FLOAT16 0x2 -#define FIXED12 0x4 -/*@}*/ - - -/** - * Saturation modes when storing values. - */ -/*@{*/ -#define SATURATE_OFF 0 -#define SATURATE_ZERO_ONE 1 -#define SATURATE_PLUS_MINUS_ONE 2 -/*@}*/ - - -/** - * Per-component negation masks - */ -/*@{*/ -#define NEGATE_X 0x1 -#define NEGATE_Y 0x2 -#define NEGATE_Z 0x4 -#define NEGATE_W 0x8 -#define NEGATE_XYZW 0xf -#define NEGATE_NONE 0x0 -/*@}*/ - - -/** - * Program instruction opcodes, for both vertex and fragment programs. - * \note changes to this opcode list must be reflected in t_vb_arbprogram.c - */ -typedef enum prog_opcode { - /* ARB_vp ARB_fp NV_vp NV_fp */ - /*---------------------------------*/ - OPCODE_NOP = 0, - OPCODE_ABS, /* X X 1.1 */ - OPCODE_ADD, /* X X X X */ - OPCODE_ARA, /* 2 */ - OPCODE_ARL, /* X X */ - OPCODE_ARL_NV, /* 2 */ - OPCODE_ARR, /* 2 */ - OPCODE_BRA, /* 2 */ - OPCODE_CAL, /* 2 2 */ - OPCODE_CMP, /* X */ - OPCODE_COS, /* X 2 X */ - OPCODE_DDX, /* X */ - OPCODE_DDY, /* X */ - OPCODE_DP3, /* X X X X */ - OPCODE_DP4, /* X X X X */ - OPCODE_DPH, /* X X 1.1 */ - OPCODE_DST, /* X X X X */ - OPCODE_END, /* X X X X */ - OPCODE_EX2, /* X X 2 X */ - OPCODE_EXP, /* X X */ - OPCODE_FLR, /* X X 2 X */ - OPCODE_FRC, /* X X 2 X */ - OPCODE_KIL, /* X */ - OPCODE_KIL_NV, /* X */ - OPCODE_LG2, /* X X 2 X */ - OPCODE_LIT, /* X X X X */ - OPCODE_LOG, /* X X */ - OPCODE_LRP, /* X X */ - OPCODE_MAD, /* X X X X */ - OPCODE_MAX, /* X X X X */ - OPCODE_MIN, /* X X X X */ - OPCODE_MOV, /* X X X X */ - OPCODE_MUL, /* X X X X */ - OPCODE_PK2H, /* X */ - OPCODE_PK2US, /* X */ - OPCODE_PK4B, /* X */ - OPCODE_PK4UB, /* X */ - OPCODE_POW, /* X X X */ - OPCODE_POPA, /* 3 */ - OPCODE_PRINT, /* X X */ - OPCODE_PUSHA, /* 3 */ - OPCODE_RCC, /* 1.1 */ - OPCODE_RCP, /* X X X X */ - OPCODE_RET, /* 2 2 */ - OPCODE_RFL, /* X X */ - OPCODE_RSQ, /* X X X X */ - OPCODE_SCS, /* X */ - OPCODE_SEQ, /* 2 X */ - OPCODE_SFL, /* 2 X */ - OPCODE_SGE, /* X X X X */ - OPCODE_SGT, /* 2 X */ - OPCODE_SIN, /* X 2 X */ - OPCODE_SLE, /* 2 X */ - OPCODE_SLT, /* X X X X */ - OPCODE_SNE, /* 2 X */ - OPCODE_SSG, /* 2 */ - OPCODE_STR, /* 2 X */ - OPCODE_SUB, /* X X 1.1 X */ - OPCODE_SWZ, /* X X */ - OPCODE_TEX, /* X 3 X */ - OPCODE_TXB, /* X 3 */ - OPCODE_TXD, /* X */ - OPCODE_TXL, /* 3 2 */ - OPCODE_TXP, /* X */ - OPCODE_TXP_NV, /* 3 X */ - OPCODE_UP2H, /* X */ - OPCODE_UP2US, /* X */ - OPCODE_UP4B, /* X */ - OPCODE_UP4UB, /* X */ - OPCODE_X2D, /* X */ - OPCODE_XPD, /* X X */ - MAX_OPCODE -} gl_inst_opcode; - - -/** - * Instruction source register. - */ -struct prog_src_register -{ - GLuint File:4; /**< One of the PROGRAM_* register file values. */ - GLint Index:9; /**< May be negative for relative addressing. */ - GLuint Swizzle:12; - GLuint RelAddr:1; - - /** - * \name Source register "sign" control. - * - * The ARB and NV extensions allow varrying degrees of control over the - * sign of the source vector components. These values allow enough control - * for all flavors of the extensions. - */ - /*@{*/ - /** - * Per-component negation for the SWZ instruction. For non-SWZ - * instructions the only possible values are NEGATE_XYZW and NEGATE_NONE. - * - * \since - * ARB_vertex_program, ARB_fragment_program - */ - GLuint NegateBase:4; - - /** - * Take the component-wise absolute value. - * - * \since - * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, - * NV_vertex_program2_option. - */ - GLuint Abs:1; - - /** - * Post-absolute value negation (all components). - */ - GLuint NegateAbs:1; - /*@}*/ -}; - - -/** - * Instruction destination register. - */ -struct prog_dst_register -{ - /** - * One of the PROGRAM_* register file values. - */ - GLuint File:4; - - GLuint Index:8; - GLuint WriteMask:4; - - /** - * \name Conditional destination update control. - * - * \since - * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, - * NV_vertex_program2_option. - */ - /*@{*/ - /** - * Takes one of the 9 possible condition values (EQ, FL, GT, GE, LE, LT, - * NE, TR, or UN). Destination update is enabled if the matching - * (swizzled) condition code value passes. When a conditional update mask - * is not specified, this will be \c COND_TR. - */ - GLuint CondMask:4; - - /** - * Condition code swizzle value. - */ - GLuint CondSwizzle:12; - - /** - * Selects the condition code register to use for conditional destination - * update masking. In NV_fragmnet_program or NV_vertex_program2 mode, only - * condition code register 0 is available. In NV_vertex_program3 mode, - * condition code registers 0 and 1 are available. - */ - GLuint CondSrc:1; - /*@}*/ - - GLuint pad:31; -}; - - -/** - * Vertex/fragment program instruction. - */ -struct prog_instruction -{ - gl_inst_opcode Opcode; -#if FEATURE_MESA_program_debug - GLshort StringPos; -#endif - /** - * Arbitrary data. Used for the PRINT, CAL, and BRA instructions. - */ - void *Data; - - struct prog_src_register SrcReg[3]; - struct prog_dst_register DstReg; - - /** - * Indicates that the instruction should update the condition code - * register. - * - * \since - * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, - * NV_vertex_program2_option. - */ - GLuint CondUpdate:1; - - /** - * If prog_instruction::CondUpdate is \c GL_TRUE, this value selects the - * condition code register that is to be updated. - * - * In GL_NV_fragment_program or GL_NV_vertex_program2 mode, only condition - * code register 0 is available. In GL_NV_vertex_program3 mode, condition - * code registers 0 and 1 are available. - * - * \since - * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, - * NV_vertex_program2_option. - */ - GLuint CondDst:1; - - /** - * Saturate each value of the vectored result to the range [0,1] or the - * range [-1,1]. \c SSAT mode (i.e., saturation to the range [-1,1]) is - * only available in NV_fragment_program2 mode. - * Value is one of the SATURATE_* tokens. - * - * \since - * NV_fragment_program, NV_fragment_program_option, NV_vertex_program3. - */ - GLuint SaturateMode:2; - - /** - * Per-instruction selectable precision. - * - * \since - * NV_fragment_program, NV_fragment_program_option. - */ - GLuint Precision:3; - - /** - * \name Texture source controls. - * - * The texture source controls are only used with the \c TEX, \c TXD, - * \c TXL, and \c TXP instructions. - * - * \since - * ARB_fragment_program, NV_fragment_program, NV_vertex_program3. - */ - /*@{*/ - /** - * Source texture unit. OpenGL supports a maximum of 32 texture - * units. - */ - GLuint TexSrcUnit:5; - - /** - * Source texture target, one of TEXTURE_{1D,2D,3D,CUBE,RECT}_INDEX. - */ - GLuint TexSrcTarget:3; - /*@}*/ - - /** - * For BRA and CAL instructions, the location to jump to. - */ - GLuint BranchTarget; - - const char *Comment; -}; - - -extern void -_mesa_init_instructions(struct prog_instruction *inst, GLuint count); - -extern GLuint -_mesa_num_inst_src_regs(gl_inst_opcode opcode); - -extern const char * -_mesa_opcode_string(gl_inst_opcode opcode); - - -#endif /* PROG_INSTRUCTION_H */ diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c deleted file mode 100644 index ac2f5d93b6..0000000000 --- a/src/mesa/swrast/s_nvfragprog.c +++ /dev/null @@ -1,1692 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Regarding GL_NV_fragment_program: - * - * Portions of this software may use or implement intellectual - * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims - * any and all warranties with respect to such intellectual property, - * including any use thereof or modifications thereto. - */ - -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "prog_instruction.h" -#include "prog_parameter.h" -#include "prog_print.h" -#include "program.h" - -#include "s_nvfragprog.h" -#include "s_span.h" - - -/* See comments below for info about this */ -#define LAMBDA_ZERO 1 - -/* debug predicate */ -#define DEBUG_FRAG 0 - - -/** - * Virtual machine state used during execution of a fragment programs. - */ -struct fp_machine -{ - GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; - GLfloat Inputs[FRAG_ATTRIB_MAX][4]; - GLfloat Outputs[FRAG_RESULT_MAX][4]; - GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ - - GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ - GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ -}; - - -#if FEATURE_MESA_program_debug -static struct fp_machine *CurrentMachine = NULL; - -/** - * For GL_MESA_program_debug. - * Return current value (4*GLfloat) of a fragment program register. - * Called via ctx->Driver.GetFragmentProgramRegister(). - */ -void -_swrast_get_program_register(GLcontext *ctx, enum register_file file, - GLuint index, GLfloat val[4]) -{ - if (CurrentMachine) { - switch (file) { - case PROGRAM_INPUT: - COPY_4V(val, CurrentMachine->Inputs[index]); - break; - case PROGRAM_OUTPUT: - COPY_4V(val, CurrentMachine->Outputs[index]); - break; - case PROGRAM_TEMPORARY: - COPY_4V(val, CurrentMachine->Temporaries[index]); - break; - default: - _mesa_problem(NULL, - "bad register file in _swrast_get_program_register"); - } - } -} -#endif /* FEATURE_MESA_program_debug */ - - -/** - * Fetch a texel. - */ -static void -fetch_texel( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, - GLuint unit, GLfloat color[4] ) -{ - GLchan rgba[4]; - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - /* XXX use a float-valued TextureSample routine here!!! */ - swrast->TextureSample[unit](ctx, ctx->Texture.Unit[unit]._Current, - 1, (const GLfloat (*)[4]) texcoord, - &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - - -/** - * Fetch a texel with the given partial derivatives to compute a level - * of detail in the mipmap. - */ -static void -fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], - const GLfloat texdx[4], const GLfloat texdy[4], - GLuint unit, GLfloat color[4] ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; - const struct gl_texture_image *texImg = texObj->Image[0][texObj->BaseLevel]; - const GLfloat texW = (GLfloat) texImg->WidthScale; - const GLfloat texH = (GLfloat) texImg->HeightScale; - GLchan rgba[4]; - - GLfloat lambda = _swrast_compute_lambda(texdx[0], texdy[0], /* ds/dx, ds/dy */ - texdx[1], texdy[1], /* dt/dx, dt/dy */ - texdx[3], texdy[2], /* dq/dx, dq/dy */ - texW, texH, - texcoord[0], texcoord[1], texcoord[3], - 1.0F / texcoord[3]); - - swrast->TextureSample[unit](ctx, ctx->Texture.Unit[unit]._Current, - 1, (const GLfloat (*)[4]) texcoord, - &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - - -/** - * Return a pointer to the 4-element float vector specified by the given - * source register. - */ -static INLINE const GLfloat * -get_register_pointer( GLcontext *ctx, - const struct prog_src_register *source, - const struct fp_machine *machine, - const struct gl_fragment_program *program ) -{ - switch (source->File) { - case PROGRAM_TEMPORARY: - ASSERT(source->Index < MAX_PROGRAM_TEMPS); - return machine->Temporaries[source->Index]; - case PROGRAM_INPUT: - ASSERT(source->Index < FRAG_ATTRIB_MAX); - return machine->Inputs[source->Index]; - case PROGRAM_OUTPUT: - /* This is only for PRINT */ - ASSERT(source->Index < FRAG_RESULT_MAX); - return machine->Outputs[source->Index]; - case PROGRAM_LOCAL_PARAM: - ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); - return program->Base.LocalParams[source->Index]; - case PROGRAM_ENV_PARAM: - ASSERT(source->Index < MAX_NV_FRAGMENT_PROGRAM_PARAMS); - return ctx->FragmentProgram.Parameters[source->Index]; - case PROGRAM_STATE_VAR: - /* Fallthrough */ - case PROGRAM_CONSTANT: - /* Fallthrough */ - case PROGRAM_UNIFORM: - /* Fallthrough */ - case PROGRAM_NAMED_PARAM: - ASSERT(source->Index < (GLint) program->Base.Parameters->NumParameters); - return program->Base.Parameters->ParameterValues[source->Index]; - default: - _mesa_problem(ctx, "Invalid input register file %d in fp " - "get_register_pointer", source->File); - return NULL; - } -} - - -/** - * Fetch a 4-element float vector from the given source register. - * Apply swizzling and negating as needed. - */ -static void -fetch_vector4( GLcontext *ctx, - const struct prog_src_register *source, - const struct fp_machine *machine, - const struct gl_fragment_program *program, - GLfloat result[4] ) -{ - const GLfloat *src = get_register_pointer(ctx, source, machine, program); - ASSERT(src); - - if (source->Swizzle == MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, - SWIZZLE_Z, SWIZZLE_W)) { - /* no swizzling */ - COPY_4V(result, src); - } - else { - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - result[1] = src[GET_SWZ(source->Swizzle, 1)]; - result[2] = src[GET_SWZ(source->Swizzle, 2)]; - result[3] = src[GET_SWZ(source->Swizzle, 3)]; - } - - if (source->NegateBase) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } - if (source->Abs) { - result[0] = FABSF(result[0]); - result[1] = FABSF(result[1]); - result[2] = FABSF(result[2]); - result[3] = FABSF(result[3]); - } - if (source->NegateAbs) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } -} - - -/** - * Fetch the derivative with respect to X for the given register. - * \return GL_TRUE if it was easily computed or GL_FALSE if we - * need to execute another instance of the program (ugh)! - */ -static GLboolean -fetch_vector4_deriv( GLcontext *ctx, - const struct prog_src_register *source, - const SWspan *span, - char xOrY, GLint column, GLfloat result[4] ) -{ - GLfloat src[4]; - - ASSERT(xOrY == 'X' || xOrY == 'Y'); - - switch (source->Index) { - case FRAG_ATTRIB_WPOS: - if (xOrY == 'X') { - src[0] = 1.0; - src[1] = 0.0; - src[2] = span->dzdx / ctx->DrawBuffer->_DepthMaxF; - src[3] = span->dwdx; - } - else { - src[0] = 0.0; - src[1] = 1.0; - src[2] = span->dzdy / ctx->DrawBuffer->_DepthMaxF; - src[3] = span->dwdy; - } - break; - case FRAG_ATTRIB_COL0: - if (xOrY == 'X') { - src[0] = span->drdx * (1.0F / CHAN_MAXF); - src[1] = span->dgdx * (1.0F / CHAN_MAXF); - src[2] = span->dbdx * (1.0F / CHAN_MAXF); - src[3] = span->dadx * (1.0F / CHAN_MAXF); - } - else { - src[0] = span->drdy * (1.0F / CHAN_MAXF); - src[1] = span->dgdy * (1.0F / CHAN_MAXF); - src[2] = span->dbdy * (1.0F / CHAN_MAXF); - src[3] = span->dady * (1.0F / CHAN_MAXF); - } - break; - case FRAG_ATTRIB_COL1: - if (xOrY == 'X') { - src[0] = span->dsrdx * (1.0F / CHAN_MAXF); - src[1] = span->dsgdx * (1.0F / CHAN_MAXF); - src[2] = span->dsbdx * (1.0F / CHAN_MAXF); - src[3] = 0.0; /* XXX need this */ - } - else { - src[0] = span->dsrdy * (1.0F / CHAN_MAXF); - src[1] = span->dsgdy * (1.0F / CHAN_MAXF); - src[2] = span->dsbdy * (1.0F / CHAN_MAXF); - src[3] = 0.0; /* XXX need this */ - } - break; - case FRAG_ATTRIB_FOGC: - if (xOrY == 'X') { - src[0] = span->dfogdx; - src[1] = 0.0; - src[2] = 0.0; - src[3] = 0.0; - } - else { - src[0] = span->dfogdy; - src[1] = 0.0; - src[2] = 0.0; - src[3] = 0.0; - } - break; - case FRAG_ATTRIB_TEX0: - case FRAG_ATTRIB_TEX1: - case FRAG_ATTRIB_TEX2: - case FRAG_ATTRIB_TEX3: - case FRAG_ATTRIB_TEX4: - case FRAG_ATTRIB_TEX5: - case FRAG_ATTRIB_TEX6: - case FRAG_ATTRIB_TEX7: - if (xOrY == 'X') { - const GLuint u = source->Index - FRAG_ATTRIB_TEX0; - /* this is a little tricky - I think I've got it right */ - const GLfloat invQ = 1.0f / (span->tex[u][3] - + span->texStepX[u][3] * column); - src[0] = span->texStepX[u][0] * invQ; - src[1] = span->texStepX[u][1] * invQ; - src[2] = span->texStepX[u][2] * invQ; - src[3] = span->texStepX[u][3] * invQ; - } - else { - const GLuint u = source->Index - FRAG_ATTRIB_TEX0; - /* Tricky, as above, but in Y direction */ - const GLfloat invQ = 1.0f / (span->tex[u][3] + span->texStepY[u][3]); - src[0] = span->texStepY[u][0] * invQ; - src[1] = span->texStepY[u][1] * invQ; - src[2] = span->texStepY[u][2] * invQ; - src[3] = span->texStepY[u][3] * invQ; - } - break; - default: - return GL_FALSE; - } - - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - result[1] = src[GET_SWZ(source->Swizzle, 1)]; - result[2] = src[GET_SWZ(source->Swizzle, 2)]; - result[3] = src[GET_SWZ(source->Swizzle, 3)]; - - if (source->NegateBase) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } - if (source->Abs) { - result[0] = FABSF(result[0]); - result[1] = FABSF(result[1]); - result[2] = FABSF(result[2]); - result[3] = FABSF(result[3]); - } - if (source->NegateAbs) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } - return GL_TRUE; -} - - -/** - * As above, but only return result[0] element. - */ -static void -fetch_vector1( GLcontext *ctx, - const struct prog_src_register *source, - const struct fp_machine *machine, - const struct gl_fragment_program *program, - GLfloat result[4] ) -{ - const GLfloat *src = get_register_pointer(ctx, source, machine, program); - ASSERT(src); - - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - - if (source->NegateBase) { - result[0] = -result[0]; - } - if (source->Abs) { - result[0] = FABSF(result[0]); - } - if (source->NegateAbs) { - result[0] = -result[0]; - } -} - - -/** - * Test value against zero and return GT, LT, EQ or UN if NaN. - */ -static INLINE GLuint -generate_cc( float value ) -{ - if (value != value) - return COND_UN; /* NaN */ - if (value > 0.0F) - return COND_GT; - if (value < 0.0F) - return COND_LT; - return COND_EQ; -} - - -/** - * Test if the ccMaskRule is satisfied by the given condition code. - * Used to mask destination writes according to the current condition code. - */ -static INLINE GLboolean -test_cc(GLuint condCode, GLuint ccMaskRule) -{ - switch (ccMaskRule) { - case COND_EQ: return (condCode == COND_EQ); - case COND_NE: return (condCode != COND_EQ); - case COND_LT: return (condCode == COND_LT); - case COND_GE: return (condCode == COND_GT || condCode == COND_EQ); - case COND_LE: return (condCode == COND_LT || condCode == COND_EQ); - case COND_GT: return (condCode == COND_GT); - case COND_TR: return GL_TRUE; - case COND_FL: return GL_FALSE; - default: return GL_TRUE; - } -} - - -/** - * Store 4 floats into a register. Observe the instructions saturate and - * set-condition-code flags. - */ -static void -store_vector4( const struct prog_instruction *inst, - struct fp_machine *machine, - const GLfloat value[4] ) -{ - const struct prog_dst_register *dest = &(inst->DstReg); - const GLboolean clamp = inst->SaturateMode == SATURATE_ZERO_ONE; - GLfloat *dstReg; - GLfloat dummyReg[4]; - GLfloat clampedValue[4]; - GLuint writeMask = dest->WriteMask; - - switch (dest->File) { - case PROGRAM_OUTPUT: - dstReg = machine->Outputs[dest->Index]; - break; - case PROGRAM_TEMPORARY: - dstReg = machine->Temporaries[dest->Index]; - break; - case PROGRAM_WRITE_ONLY: - dstReg = dummyReg; - return; - default: - _mesa_problem(NULL, "bad register file in store_vector4(fp)"); - return; - } - -#if 0 - if (value[0] > 1.0e10 || - IS_INF_OR_NAN(value[0]) || - IS_INF_OR_NAN(value[1]) || - IS_INF_OR_NAN(value[2]) || - IS_INF_OR_NAN(value[3]) ) - printf("store %g %g %g %g\n", value[0], value[1], value[2], value[3]); -#endif - - if (clamp) { - clampedValue[0] = CLAMP(value[0], 0.0F, 1.0F); - clampedValue[1] = CLAMP(value[1], 0.0F, 1.0F); - clampedValue[2] = CLAMP(value[2], 0.0F, 1.0F); - clampedValue[3] = CLAMP(value[3], 0.0F, 1.0F); - value = clampedValue; - } - - if (dest->CondMask != COND_TR) { - /* condition codes may turn off some writes */ - if (writeMask & WRITEMASK_X) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 0)], - dest->CondMask)) - writeMask &= ~WRITEMASK_X; - } - if (writeMask & WRITEMASK_Y) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 1)], - dest->CondMask)) - writeMask &= ~WRITEMASK_Y; - } - if (writeMask & WRITEMASK_Z) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 2)], - dest->CondMask)) - writeMask &= ~WRITEMASK_Z; - } - if (writeMask & WRITEMASK_W) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 3)], - dest->CondMask)) - writeMask &= ~WRITEMASK_W; - } - } - - if (writeMask & WRITEMASK_X) - dstReg[0] = value[0]; - if (writeMask & WRITEMASK_Y) - dstReg[1] = value[1]; - if (writeMask & WRITEMASK_Z) - dstReg[2] = value[2]; - if (writeMask & WRITEMASK_W) - dstReg[3] = value[3]; - - if (inst->CondUpdate) { - if (writeMask & WRITEMASK_X) - machine->CondCodes[0] = generate_cc(value[0]); - if (writeMask & WRITEMASK_Y) - machine->CondCodes[1] = generate_cc(value[1]); - if (writeMask & WRITEMASK_Z) - machine->CondCodes[2] = generate_cc(value[2]); - if (writeMask & WRITEMASK_W) - machine->CondCodes[3] = generate_cc(value[3]); - } -} - - -/** - * Initialize a new machine state instance from an existing one, adding - * the partial derivatives onto the input registers. - * Used to implement DDX and DDY instructions in non-trivial cases. - */ -static void -init_machine_deriv( GLcontext *ctx, - const struct fp_machine *machine, - const struct gl_fragment_program *program, - const SWspan *span, char xOrY, - struct fp_machine *dMachine ) -{ - GLuint u, v; - - ASSERT(xOrY == 'X' || xOrY == 'Y'); - - /* copy existing machine */ - _mesa_memcpy(dMachine, machine, sizeof(struct fp_machine)); - - if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { - /* Clear temporary registers (undefined for ARB_f_p) */ - _mesa_bzero( (void*) machine->Temporaries, - MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); - } - - /* Add derivatives */ - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_WPOS)) { - GLfloat *wpos = (GLfloat*) machine->Inputs[FRAG_ATTRIB_WPOS]; - if (xOrY == 'X') { - wpos[0] += 1.0F; - wpos[1] += 0.0F; - wpos[2] += span->dzdx; - wpos[3] += span->dwdx; - } - else { - wpos[0] += 0.0F; - wpos[1] += 1.0F; - wpos[2] += span->dzdy; - wpos[3] += span->dwdy; - } - } - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_COL0)) { - GLfloat *col0 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL0]; - if (xOrY == 'X') { - col0[0] += span->drdx * (1.0F / CHAN_MAXF); - col0[1] += span->dgdx * (1.0F / CHAN_MAXF); - col0[2] += span->dbdx * (1.0F / CHAN_MAXF); - col0[3] += span->dadx * (1.0F / CHAN_MAXF); - } - else { - col0[0] += span->drdy * (1.0F / CHAN_MAXF); - col0[1] += span->dgdy * (1.0F / CHAN_MAXF); - col0[2] += span->dbdy * (1.0F / CHAN_MAXF); - col0[3] += span->dady * (1.0F / CHAN_MAXF); - } - } - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_COL1)) { - GLfloat *col1 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL1]; - if (xOrY == 'X') { - col1[0] += span->dsrdx * (1.0F / CHAN_MAXF); - col1[1] += span->dsgdx * (1.0F / CHAN_MAXF); - col1[2] += span->dsbdx * (1.0F / CHAN_MAXF); - col1[3] += 0.0; /*XXX fix */ - } - else { - col1[0] += span->dsrdy * (1.0F / CHAN_MAXF); - col1[1] += span->dsgdy * (1.0F / CHAN_MAXF); - col1[2] += span->dsbdy * (1.0F / CHAN_MAXF); - col1[3] += 0.0; /*XXX fix */ - } - } - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_FOGC)) { - GLfloat *fogc = (GLfloat*) machine->Inputs[FRAG_ATTRIB_FOGC]; - if (xOrY == 'X') { - fogc[0] += span->dfogdx; - } - else { - fogc[0] += span->dfogdy; - } - } - for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - if (program->Base.InputsRead & (1 << (FRAG_ATTRIB_TEX0 + u))) { - GLfloat *tex = (GLfloat*) machine->Inputs[FRAG_ATTRIB_TEX0 + u]; - /* XXX perspective-correct interpolation */ - if (xOrY == 'X') { - tex[0] += span->texStepX[u][0]; - tex[1] += span->texStepX[u][1]; - tex[2] += span->texStepX[u][2]; - tex[3] += span->texStepX[u][3]; - } - else { - tex[0] += span->texStepY[u][0]; - tex[1] += span->texStepY[u][1]; - tex[2] += span->texStepY[u][2]; - tex[3] += span->texStepY[u][3]; - } - } - } - - for (v = 0; v < ctx->Const.MaxVarying; v++) { - if (program->Base.InputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { - GLfloat *var = (GLfloat*) machine->Inputs[FRAG_ATTRIB_VAR0 + v]; - /* XXXX finish this */ - var[0] += span->varStepX[v][0]; - var[1] += span->varStepX[v][1]; - var[2] += span->varStepX[v][2]; - var[3] += span->varStepX[v][3]; - } - } - - /* init condition codes */ - dMachine->CondCodes[0] = COND_EQ; - dMachine->CondCodes[1] = COND_EQ; - dMachine->CondCodes[2] = COND_EQ; - dMachine->CondCodes[3] = COND_EQ; -} - - -/** - * Execute the given vertex program. - * NOTE: we do everything in single-precision floating point; we don't - * currently observe the single/half/fixed-precision qualifiers. - * \param ctx - rendering context - * \param program - the fragment program to execute - * \param machine - machine state (register file) - * \param maxInst - max number of instructions to execute - * \return GL_TRUE if program completed or GL_FALSE if program executed KIL. - */ -static GLboolean -execute_program( GLcontext *ctx, - const struct gl_fragment_program *program, GLuint maxInst, - struct fp_machine *machine, const SWspan *span, - GLuint column ) -{ - GLuint pc; - - if (DEBUG_FRAG) { - printf("execute fragment program --------------------\n"); - } - - for (pc = 0; pc < maxInst; pc++) { - const struct prog_instruction *inst = program->Base.Instructions + pc; - - if (ctx->FragmentProgram.CallbackEnabled && - ctx->FragmentProgram.Callback) { - ctx->FragmentProgram.CurrentPosition = inst->StringPos; - ctx->FragmentProgram.Callback(program->Base.Target, - ctx->FragmentProgram.CallbackData); - } - - if (DEBUG_FRAG) { - _mesa_print_instruction(inst); - } - - switch (inst->Opcode) { - case OPCODE_ABS: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = FABSF(a[0]); - result[1] = FABSF(a[1]); - result[2] = FABSF(a[2]); - result[3] = FABSF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_ADD: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[0] + b[0]; - result[1] = a[1] + b[1]; - result[2] = a[2] + b[2]; - result[3] = a[3] + b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("ADD (%g %g %g %g) = (%g %g %g %g) + (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_BRA: /* conditional branch */ - { - /* NOTE: The return is conditional! */ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - /* take branch */ - pc = inst->BranchTarget; - } - } - break; - case OPCODE_CAL: /* Call subroutine */ - { - /* NOTE: The call is conditional! */ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - machine->CallStack[machine->StackDepth++] = pc + 1; - pc = inst->BranchTarget; - } - } - break; - case OPCODE_CMP: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] < 0.0F ? b[0] : c[0]; - result[1] = a[1] < 0.0F ? b[1] : c[1]; - result[2] = a[2] < 0.0F ? b[2] : c[2]; - result[3] = a[3] < 0.0F ? b[3] : c[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_COS: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat) _mesa_cos(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DDX: /* Partial derivative with respect to X */ - { - GLfloat a[4], aNext[4], result[4]; - struct fp_machine dMachine; - if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'X', - column, result)) { - /* This is tricky. Make a copy of the current machine state, - * increment the input registers by the dx or dy partial - * derivatives, then re-execute the program up to the - * preceeding instruction, then fetch the source register. - * Finally, find the difference in the register values for - * the original and derivative runs. - */ - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - init_machine_deriv(ctx, machine, program, span, - 'X', &dMachine); - execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); - result[0] = aNext[0] - a[0]; - result[1] = aNext[1] - a[1]; - result[2] = aNext[2] - a[2]; - result[3] = aNext[3] - a[3]; - } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DDY: /* Partial derivative with respect to Y */ - { - GLfloat a[4], aNext[4], result[4]; - struct fp_machine dMachine; - if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'Y', - column, result)) { - init_machine_deriv(ctx, machine, program, span, - 'Y', &dMachine); - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); - result[0] = aNext[0] - a[0]; - result[1] = aNext[1] - a[1]; - result[2] = aNext[2] - a[2]; - result[3] = aNext[3] - a[3]; - } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DP3: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] = DOT3(a, b); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("DP3 %g = (%g %g %g) . (%g %g %g)\n", - result[0], a[0], a[1], a[2], b[0], b[1], b[2]); - } - } - break; - case OPCODE_DP4: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] = DOT4(a,b); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("DP4 %g = (%g, %g %g %g) . (%g, %g %g %g)\n", - result[0], a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_DPH: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] = - a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DST: /* Distance vector */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = 1.0F; - result[1] = a[1] * b[1]; - result[2] = a[2]; - result[3] = b[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_EX2: /* Exponential base 2 */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] = - (GLfloat) _mesa_pow(2.0, a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_FLR: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = FLOORF(a[0]); - result[1] = FLOORF(a[1]); - result[2] = FLOORF(a[2]); - result[3] = FLOORF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_FRC: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = a[0] - FLOORF(a[0]); - result[1] = a[1] - FLOORF(a[1]); - result[2] = a[2] - FLOORF(a[2]); - result[3] = a[3] - FLOORF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_KIL_NV: /* NV_f_p only */ - { - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - return GL_FALSE; - } - } - break; - case OPCODE_KIL: /* ARB_f_p only */ - { - GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { - return GL_FALSE; - } - } - break; - case OPCODE_LG2: /* log base 2 */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_LIT: - { - const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = MAX2(a[0], 0.0F); - a[1] = MAX2(a[1], 0.0F); - /* XXX ARB version clamps a[3], NV version doesn't */ - a[3] = CLAMP(a[3], -(128.0F - epsilon), (128.0F - epsilon)); - result[0] = 1.0F; - result[1] = a[0]; - /* XXX we could probably just use pow() here */ - if (a[0] > 0.0F) { - if (a[1] == 0.0 && a[3] == 0.0) - result[2] = 1.0; - else - result[2] = EXPF(a[3] * LOGF(a[1])); - } - else { - result[2] = 0.0; - } - result[3] = 1.0F; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("LIT (%g %g %g %g) : (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3]); - } - } - break; - case OPCODE_LRP: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; - result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; - result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; - result[3] = a[3] * b[3] + (1.0F - a[3]) * c[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("LRP (%g %g %g %g) = (%g %g %g %g), " - "(%g %g %g %g), (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3], - c[0], c[1], c[2], c[3]); - } - } - break; - case OPCODE_MAD: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] * b[0] + c[0]; - result[1] = a[1] * b[1] + c[1]; - result[2] = a[2] * b[2] + c[2]; - result[3] = a[3] * b[3] + c[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MAD (%g %g %g %g) = (%g %g %g %g) * " - "(%g %g %g %g) + (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3], - c[0], c[1], c[2], c[3]); - } - } - break; - case OPCODE_MAX: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = MAX2(a[0], b[0]); - result[1] = MAX2(a[1], b[1]); - result[2] = MAX2(a[2], b[2]); - result[3] = MAX2(a[3], b[3]); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MAX (%g %g %g %g) = (%g %g %g %g), (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_MIN: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = MIN2(a[0], b[0]); - result[1] = MIN2(a[1], b[1]); - result[2] = MIN2(a[2], b[2]); - result[3] = MIN2(a[3], b[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_MOV: - { - GLfloat result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, result ); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MOV (%g %g %g %g)\n", - result[0], result[1], result[2], result[3]); - } - } - break; - case OPCODE_MUL: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[0] * b[0]; - result[1] = a[1] * b[1]; - result[2] = a[2] * b[2]; - result[3] = a[3] * b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MUL (%g %g %g %g) = (%g %g %g %g) * (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ - { - GLfloat a[4], result[4]; - GLhalfNV hx, hy; - GLuint *rawResult = (GLuint *) result; - GLuint twoHalves; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - hx = _mesa_float_to_half(a[0]); - hy = _mesa_float_to_half(a[1]); - twoHalves = hx | (hy << 16); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = twoHalves; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK2US: /* pack two GLushorts into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint usx, usy, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = CLAMP(a[0], 0.0F, 1.0F); - a[1] = CLAMP(a[1], 0.0F, 1.0F); - usx = IROUND(a[0] * 65535.0F); - usy = IROUND(a[1] * 65535.0F); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = usx | (usy << 16); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK4B: /* pack four GLbytes into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); - a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); - a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); - a[3] = CLAMP(a[3], -128.0F / 127.0F, 1.0F); - ubx = IROUND(127.0F * a[0] + 128.0F); - uby = IROUND(127.0F * a[1] + 128.0F); - ubz = IROUND(127.0F * a[2] + 128.0F); - ubw = IROUND(127.0F * a[3] + 128.0F); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK4UB: /* pack four GLubytes into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = CLAMP(a[0], 0.0F, 1.0F); - a[1] = CLAMP(a[1], 0.0F, 1.0F); - a[2] = CLAMP(a[2], 0.0F, 1.0F); - a[3] = CLAMP(a[3], 0.0F, 1.0F); - ubx = IROUND(255.0F * a[0]); - uby = IROUND(255.0F * a[1]); - ubz = IROUND(255.0F * a[2]); - ubw = IROUND(255.0F * a[3]); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_POW: - { - GLfloat a[4], b[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector1( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat)_mesa_pow(a[0], b[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RCP: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - if (DEBUG_FRAG) { - if (a[0] == 0) - printf("RCP(0)\n"); - else if (IS_INF_OR_NAN(a[0])) - printf("RCP(inf)\n"); - } - result[0] = result[1] = result[2] = result[3] = 1.0F / a[0]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RET: /* return from subroutine */ - { - /* NOTE: The return is conditional! */ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - if (machine->StackDepth == 0) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - pc = machine->CallStack[--machine->StackDepth]; - } - } - break; - case OPCODE_RFL: /* reflection vector */ - { - GLfloat axis[4], dir[4], result[4], tmpX, tmpW; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, axis ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dir ); - tmpW = DOT3(axis, axis); - tmpX = (2.0F * DOT3(axis, dir)) / tmpW; - result[0] = tmpX * axis[0] - dir[0]; - result[1] = tmpX * axis[1] - dir[1]; - result[2] = tmpX * axis[2] - dir[2]; - /* result[3] is never written! XXX enforce in parser! */ - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RSQ: /* 1 / sqrt() */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = FABSF(a[0]); - result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("RSQ %g = 1/sqrt(|%g|)\n", result[0], a[0]); - } - } - break; - case OPCODE_SCS: /* sine and cos */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = (GLfloat)_mesa_cos(a[0]); - result[1] = (GLfloat)_mesa_sin(a[0]); - result[2] = 0.0; /* undefined! */ - result[3] = 0.0; /* undefined! */ - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SEQ: /* set on equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] == b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SFL: /* set false, operands ignored */ - { - static const GLfloat result[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SGE: /* set on greater or equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] >= b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SGT: /* set on greater */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SIN: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat) _mesa_sin(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SLE: /* set on less or equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] <= b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SLT: /* set on less */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] < b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SNE: /* set on not equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] != b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_STR: /* set true, operands ignored */ - { - static const GLfloat result[4] = { 1.0F, 1.0F, 1.0F, 1.0F }; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SUB: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[0] - b[0]; - result[1] = a[1] - b[1]; - result[2] = a[2] - b[2]; - result[3] = a[3] - b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("SUB (%g %g %g %g) = (%g %g %g %g) - (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_SWZ: /* extended swizzle */ - { - const struct prog_src_register *source = &inst->SrcReg[0]; - const GLfloat *src = get_register_pointer(ctx, source, - machine, program); - GLfloat result[4]; - GLuint i; - for (i = 0; i < 4; i++) { - const GLuint swz = GET_SWZ(source->Swizzle, i); - if (swz == SWIZZLE_ZERO) - result[i] = 0.0; - else if (swz == SWIZZLE_ONE) - result[i] = 1.0; - else { - ASSERT(swz >= 0); - ASSERT(swz <= 3); - result[i] = src[swz]; - } - if (source->NegateBase & (1 << i)) - result[i] = -result[i]; - } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_TEX: /* Both ARB and NV frag prog */ - /* Texel lookup */ - { - /* Note: only use the precomputed lambda value when we're - * sampling texture unit [K] with texcoord[K]. - * Otherwise, the lambda value may have no relation to the - * instruction's texcoord or texture image. Using the wrong - * lambda is usually bad news. - * The rest of the time, just use zero (until we get a more - * sophisticated way of computing lambda). - */ - GLfloat coord[4], color[4], lambda; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); - fetch_texel( ctx, coord, lambda, inst->TexSrcUnit, color ); - if (DEBUG_FRAG) { - printf("TEX (%g, %g, %g, %g) = texture[%d][%g, %g, %g, %g], " - "lod %f\n", - color[0], color[1], color[2], color[3], - inst->TexSrcUnit, - coord[0], coord[1], coord[2], coord[3], lambda); - } - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXB: /* GL_ARB_fragment_program only */ - /* Texel lookup with LOD bias */ - { - GLfloat coord[4], color[4], lambda, bias; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); - /* coord[3] is the bias to add to lambda */ - bias = ctx->Texture.Unit[inst->TexSrcUnit].LodBias - + ctx->Texture.Unit[inst->TexSrcUnit]._Current->LodBias - + coord[3]; - fetch_texel(ctx, coord, lambda + bias, inst->TexSrcUnit, color); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXD: /* GL_NV_fragment_program only */ - /* Texture lookup w/ partial derivatives for LOD */ - { - GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, texcoord ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dtdx ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, dtdy ); - fetch_texel_deriv( ctx, texcoord, dtdx, dtdy, inst->TexSrcUnit, - color ); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXP: /* GL_ARB_fragment_program only */ - /* Texture lookup w/ projective divide */ - { - GLfloat texcoord[4], color[4], lambda; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); - /* Not so sure about this test - if texcoord[3] is - * zero, we'd probably be fine except for an ASSERT in - * IROUND_POS() which gets triggered by the inf values created. - */ - if (texcoord[3] != 0.0) { - texcoord[0] /= texcoord[3]; - texcoord[1] /= texcoord[3]; - texcoord[2] /= texcoord[3]; - } - fetch_texel( ctx, texcoord, lambda, inst->TexSrcUnit, color ); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXP_NV: /* GL_NV_fragment_program only */ - /* Texture lookup w/ projective divide */ - { - GLfloat texcoord[4], color[4], lambda; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); - if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && - texcoord[3] != 0.0) { - texcoord[0] /= texcoord[3]; - texcoord[1] /= texcoord[3]; - texcoord[2] /= texcoord[3]; - } - fetch_texel( ctx, texcoord, lambda, inst->TexSrcUnit, color ); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_UP2H: /* unpack two 16-bit floats */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - GLhalfNV hx, hy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - hx = rawBits[0] & 0xffff; - hy = rawBits[0] >> 16; - result[0] = result[2] = _mesa_half_to_float(hx); - result[1] = result[3] = _mesa_half_to_float(hy); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP2US: /* unpack two GLushorts */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - GLushort usx, usy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - usx = rawBits[0] & 0xffff; - usy = rawBits[0] >> 16; - result[0] = result[2] = usx * (1.0f / 65535.0f); - result[1] = result[3] = usy * (1.0f / 65535.0f); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP4B: /* unpack four GLbytes */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; - result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; - result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; - result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP4UB: /* unpack four GLubytes */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; - result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; - result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; - result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_XPD: /* cross product */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[1] * b[2] - a[2] * b[1]; - result[1] = a[2] * b[0] - a[0] * b[2]; - result[2] = a[0] * b[1] - a[1] * b[0]; - result[3] = 1.0; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_X2D: /* 2-D matrix transform */ - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; - result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; - result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; - result[3] = a[3] + b[0] * c[2] + b[1] * c[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PRINT: - { - if (inst->SrcReg[0].File != -1) { - GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, - a[0], a[1], a[2], a[3]); - } - else { - _mesa_printf("%s\n", (const char *) inst->Data); - } - } - break; - case OPCODE_END: - return GL_TRUE; - default: - _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program", - inst->Opcode); - return GL_TRUE; /* return value doesn't matter */ - } - } - return GL_TRUE; -} - - -/** - * Initialize the virtual fragment program machine state prior to running - * fragment program on a fragment. This involves initializing the input - * registers, condition codes, etc. - * \param machine the virtual machine state to init - * \param program the fragment program we're about to run - * \param span the span of pixels we'll operate on - * \param col which element (column) of the span we'll operate on - */ -static void -init_machine( GLcontext *ctx, struct fp_machine *machine, - const struct gl_fragment_program *program, - const SWspan *span, GLuint col ) -{ - GLuint inputsRead = program->Base.InputsRead; - GLuint u, v; - - if (ctx->FragmentProgram.CallbackEnabled) - inputsRead = ~0; - - if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { - /* Clear temporary registers (undefined for ARB_f_p) */ - _mesa_bzero(machine->Temporaries, - MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); - } - - /* Load input registers */ - if (inputsRead & (1 << FRAG_ATTRIB_WPOS)) { - GLfloat *wpos = machine->Inputs[FRAG_ATTRIB_WPOS]; - ASSERT(span->arrayMask & SPAN_Z); - if (span->arrayMask & SPAN_XY) { - wpos[0] = (GLfloat) span->array->x[col]; - wpos[1] = (GLfloat) span->array->y[col]; - } - else { - wpos[0] = (GLfloat) span->x + col; - wpos[1] = (GLfloat) span->y; - } - wpos[2] = (GLfloat) span->array->z[col] / ctx->DrawBuffer->_DepthMaxF; - wpos[3] = span->w + col * span->dwdx; - } - if (inputsRead & (1 << FRAG_ATTRIB_COL0)) { - ASSERT(span->arrayMask & SPAN_RGBA); - COPY_4V(machine->Inputs[FRAG_ATTRIB_COL0], - span->array->color.sz4.rgba[col]); - } - if (inputsRead & (1 << FRAG_ATTRIB_COL1)) { - ASSERT(span->arrayMask & SPAN_SPEC); - COPY_4V(machine->Inputs[FRAG_ATTRIB_COL1], - span->array->color.sz4.spec[col]); - } - if (inputsRead & (1 << FRAG_ATTRIB_FOGC)) { - GLfloat *fogc = machine->Inputs[FRAG_ATTRIB_FOGC]; - ASSERT(span->arrayMask & SPAN_FOG); - fogc[0] = span->array->fog[col]; - fogc[1] = 0.0F; - fogc[2] = 0.0F; - fogc[3] = 0.0F; - } - for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - if (inputsRead & (1 << (FRAG_ATTRIB_TEX0 + u))) { - GLfloat *tex = machine->Inputs[FRAG_ATTRIB_TEX0 + u]; - /*ASSERT(ctx->Texture._EnabledCoordUnits & (1 << u));*/ - COPY_4V(tex, span->array->texcoords[u][col]); - /*ASSERT(tex[0] != 0 || tex[1] != 0 || tex[2] != 0);*/ - } - } - for (v = 0; v < ctx->Const.MaxVarying; v++) { - if (inputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { -#if 0 - printf("Frag Var %d: %f %f %f\n", col, - span->array->varying[col][v][0], - span->array->varying[col][v][1], - span->array->varying[col][v][2]); -#endif - COPY_4V(machine->Inputs[FRAG_ATTRIB_VAR0 + v], - span->array->varying[col][v]); - } - } - - /* init condition codes */ - machine->CondCodes[0] = COND_EQ; - machine->CondCodes[1] = COND_EQ; - machine->CondCodes[2] = COND_EQ; - machine->CondCodes[3] = COND_EQ; - - /* init call stack */ - machine->StackDepth = 0; -} - - -/** - * Run fragment program on the pixels in span from 'start' to 'end' - 1. - */ -static void -run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) -{ - const struct gl_fragment_program *program = ctx->FragmentProgram._Current; - struct fp_machine machine; - GLuint i; - - CurrentMachine = &machine; - - for (i = start; i < end; i++) { - if (span->array->mask[i]) { - init_machine(ctx, &machine, program, span, i); - - if (execute_program(ctx, program, ~0, &machine, span, i)) { - /* Store result color */ - COPY_4V(span->array->color.sz4.rgba[i], - machine.Outputs[FRAG_RESULT_COLR]); - - /* Store result depth/z */ - if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { - const GLfloat depth = machine.Outputs[FRAG_RESULT_DEPR][2]; - if (depth <= 0.0) - span->array->z[i] = 0; - else if (depth >= 1.0) - span->array->z[i] = ctx->DrawBuffer->_DepthMax; - else - span->array->z[i] = IROUND(depth * ctx->DrawBuffer->_DepthMaxF); - } - } - else { - /* killed fragment */ - span->array->mask[i] = GL_FALSE; - span->writeAll = GL_FALSE; - } - } - } - - CurrentMachine = NULL; -} - - -/** - * Execute the current fragment program for all the fragments - * in the given span. - */ -void -_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span ) -{ - const struct gl_fragment_program *program = ctx->FragmentProgram._Current; - - /* incoming colors should be floats */ - ASSERT(span->array->ChanType == GL_FLOAT); - - ctx->_CurrentProgram = GL_FRAGMENT_PROGRAM_ARB; /* or NV, doesn't matter */ - - run_program(ctx, span, 0, span->end); - - if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { - span->interpMask &= ~SPAN_Z; - span->arrayMask |= SPAN_Z; - } - - ctx->_CurrentProgram = 0; -} - diff --git a/src/mesa/swrast/s_nvfragprog.h b/src/mesa/swrast/s_nvfragprog.h deleted file mode 100644 index 188bacc3d8..0000000000 --- a/src/mesa/swrast/s_nvfragprog.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef S_NVFRAGPROG_H -#define S_NVFRAGPROG_H - - -#include "s_context.h" - - -extern void -_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span ); - - -#endif -- cgit v1.2.3 From c968d3d410a1897ecbb41d3557adaef69a4c627a Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 08:50:02 -0700 Subject: Renamed s_nvfragprog.[ch] to s_fragprog.[ch] --- src/mesa/swrast/s_fragprog.c | 11 +---------- src/mesa/swrast/s_fragprog.h | 13 +++++++------ src/mesa/swrast/s_span.c | 2 +- 3 files changed, 9 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index ac2f5d93b6..d4985fa2d8 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -22,15 +22,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* - * Regarding GL_NV_fragment_program: - * - * Portions of this software may use or implement intellectual - * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims - * any and all warranties with respect to such intellectual property, - * including any use thereof or modifications thereto. - */ - #include "glheader.h" #include "colormac.h" #include "context.h" @@ -39,7 +30,7 @@ #include "prog_print.h" #include "program.h" -#include "s_nvfragprog.h" +#include "s_fragprog.h" #include "s_span.h" diff --git a/src/mesa/swrast/s_fragprog.h b/src/mesa/swrast/s_fragprog.h index 188bacc3d8..e1b7e67918 100644 --- a/src/mesa/swrast/s_fragprog.h +++ b/src/mesa/swrast/s_fragprog.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,15 +23,16 @@ */ -#ifndef S_NVFRAGPROG_H -#define S_NVFRAGPROG_H +#ifndef S_FRAGPROG_H +#define S_FRAGPROG_H #include "s_context.h" extern void -_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span ); +_swrast_exec_fragment_program(GLcontext *ctx, SWspan *span); -#endif +#endif /* S_FRAGPROG_H */ + diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index e4904e1dd2..f091887838 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -45,7 +45,7 @@ #include "s_fog.h" #include "s_logic.h" #include "s_masking.h" -#include "s_nvfragprog.h" +#include "s_fragprog.h" #include "s_span.h" #include "s_stencil.h" #include "s_texcombine.h" -- cgit v1.2.3 From 39adc3025071927b6fd4ec1b9dbe9c03b20c82de Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 08:55:49 -0700 Subject: change/add/rm several filenames --- src/mesa/sources | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index cdae7b4d31..eed6fb0a0e 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -98,11 +98,11 @@ SWRAST_SOURCES = \ swrast/s_drawpix.c \ swrast/s_feedback.c \ swrast/s_fog.c \ + swrast/s_fragprog.c \ swrast/s_imaging.c \ swrast/s_lines.c \ swrast/s_logic.c \ swrast/s_masking.c \ - swrast/s_nvfragprog.c \ swrast/s_points.c \ swrast/s_readpix.c \ swrast/s_span.c \ @@ -157,9 +157,16 @@ SHADER_SOURCES = \ shader/nvvertexec.c \ shader/nvvertparse.c \ shader/program.c \ + shader/prog_instruction.c \ + shader/prog_parameter.c \ + shader/prog_print.c \ + shader/prog_statevars.c \ shader/programopt.c \ - shader/shaderobjects.c \ - shader/shaderobjects_3dlabs.c + shader/shader_api.c \ + + +## shader/shaderobjects.c \ +## shader/shaderobjects_3dlabs.c SLANG_SOURCES = \ shader/slang/slang_analyse.c \ -- cgit v1.2.3 From a90046f1097ad95de2aa95ca65741dff5cddced9 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:07:26 -0700 Subject: Lots of assorted changes for new GLSL compiler backend. New datatypes, constants, variables. --- src/mesa/main/config.h | 10 +-- src/mesa/main/context.c | 61 +++++++++++++++--- src/mesa/main/extensions.c | 4 +- src/mesa/main/get.c | 6 +- src/mesa/main/get_gen.py | 2 +- src/mesa/main/mtypes.h | 140 +++++++++++++++++++++++++++--------------- src/mesa/main/state.c | 89 +++++++++++++++++++-------- src/mesa/main/texenvprogram.c | 66 ++++++++++++-------- src/mesa/main/texstate.c | 13 +++- 9 files changed, 265 insertions(+), 126 deletions(-) (limited to 'src') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 13c6281f07..d779860f11 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -199,18 +199,14 @@ #define MAX_PROGRAM_MATRICES 8 #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 #define MAX_PROGRAM_CALL_DEPTH 8 -/*@}*/ - -/** For GL_ARB_fragment_shader */ -/*@{*/ -#define MAX_FRAGMENT_UNIFORM_COMPONENTS 64 +#define MAX_PROGRAM_TEMPS 128 +#define MAX_UNIFORMS 128 +#define MAX_VARYING 8 /*@}*/ /** For GL_ARB_vertex_shader */ /*@{*/ #define MAX_VERTEX_ATTRIBS 16 -#define MAX_VERTEX_UNIFORM_COMPONENTS 512 -#define MAX_VARYING_FLOATS 32 #define MAX_VERTEX_TEXTURE_IMAGE_UNITS 0 #define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS + MAX_VERTEX_TEXTURE_IMAGE_UNITS) /*@}*/ diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 7ff45cffe8..4986b29ef0 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -706,6 +706,8 @@ alloc_shared_state( GLcontext *ctx ) #if FEATURE_ARB_shader_objects ss->GL2Objects = _mesa_NewHashTable (); + ss->ShaderObjects = _mesa_NewHashTable(); + ss->ProgramObjects = _mesa_NewHashTable(); #endif ss->Default1D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D); @@ -782,8 +784,11 @@ alloc_shared_state( GLcontext *ctx ) _mesa_DeleteHashTable (ss->ArrayObjects); #if FEATURE_ARB_shader_objects - if (ss->GL2Objects) + if (ss->GL2Objects) { _mesa_DeleteHashTable (ss->GL2Objects); + _mesa_DeleteHashTable (ss->ShaderObjects); + _mesa_DeleteHashTable (ss->ProgramObjects); + } #endif #if FEATURE_EXT_framebuffer_object @@ -1063,9 +1068,10 @@ _mesa_init_constants( GLcontext *ctx ) ctx->Const.VertexProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; ctx->Const.VertexProgram.MaxEnvParams = MAX_NV_VERTEX_PROGRAM_PARAMS; ctx->Const.VertexProgram.MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS; - ctx->Const.VertexProgram.MaxUniformComponents = MAX_VERTEX_UNIFORM_COMPONENTS; + ctx->Const.VertexProgram.MaxUniformComponents = 4 * MAX_UNIFORMS; init_natives(&ctx->Const.VertexProgram); #endif + #if FEATURE_ARB_fragment_program ctx->Const.FragmentProgram.MaxInstructions = MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS; ctx->Const.FragmentProgram.MaxAluInstructions = MAX_FRAGMENT_PROGRAM_ALU_INSTRUCTIONS; @@ -1077,7 +1083,7 @@ _mesa_init_constants( GLcontext *ctx ) ctx->Const.FragmentProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; ctx->Const.FragmentProgram.MaxEnvParams = MAX_NV_FRAGMENT_PROGRAM_PARAMS; ctx->Const.FragmentProgram.MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS; - ctx->Const.FragmentProgram.MaxUniformComponents = MAX_FRAGMENT_UNIFORM_COMPONENTS; + ctx->Const.FragmentProgram.MaxUniformComponents = 4 * MAX_UNIFORMS; init_natives(&ctx->Const.FragmentProgram); #endif ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES; @@ -1106,7 +1112,7 @@ _mesa_init_constants( GLcontext *ctx ) #if FEATURE_ARB_vertex_shader ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS; - ctx->Const.MaxVaryingFloats = MAX_VARYING_FLOATS; + ctx->Const.MaxVarying = MAX_VARYING; #endif /* sanity checks */ @@ -1114,6 +1120,11 @@ _mesa_init_constants( GLcontext *ctx ) ctx->Const.MaxTextureCoordUnits)); ASSERT(ctx->Const.FragmentProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); ASSERT(ctx->Const.VertexProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); + + ASSERT(MAX_NV_FRAGMENT_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); + ASSERT(MAX_NV_VERTEX_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); + ASSERT(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX); + ASSERT(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX); } @@ -1351,12 +1362,14 @@ _mesa_initialize_context( GLcontext *ctx, ctx->TnlModule.SwapCount = 0; #endif - ctx->_MaintainTexEnvProgram = (_mesa_getenv("MESA_TEX_PROG") != NULL); - ctx->_UseTexEnvProgram = ctx->_MaintainTexEnvProgram; - - ctx->_MaintainTnlProgram = (_mesa_getenv("MESA_TNL_PROG") != NULL); - if (ctx->_MaintainTnlProgram) - ctx->_MaintainTexEnvProgram = 1; /* this is required... */ + ctx->VertexProgram._MaintainTnlProgram + = (_mesa_getenv("MESA_TNL_PROG") != NULL); + if (ctx->VertexProgram._MaintainTnlProgram) + /* this is required... */ + ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; + else + ctx->FragmentProgram._MaintainTexEnvProgram + = (_mesa_getenv("MESA_TEX_PROG") != NULL); ctx->FirstTimeCurrent = GL_TRUE; @@ -1678,6 +1691,10 @@ void _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, GLframebuffer *readBuffer ) { +#if 0 + GET_CURRENT_CONTEXT(oldCtx); +#endif + if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(newCtx, "_mesa_make_current()\n"); @@ -1698,6 +1715,30 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, } } +#if 0 /** XXX enable this someday */ + if (oldCtx && oldCtx != newCtx) { + /* unbind old context's draw/read buffers */ + if (oldCtx->DrawBuffer && oldCtx->DrawBuffer->Name == 0) { + oldCtx->DrawBuffer->RefCount--; + oldCtx->DrawBuffer = NULL; + } + if (oldCtx->ReadBuffer && oldCtx->ReadBuffer->Name == 0) { + oldCtx->ReadBuffer->RefCount--; + oldCtx->ReadBuffer = NULL; + } + if (oldCtx->WinSysDrawBuffer) { + ASSERT(oldCtx->WinSysDrawBuffer->Name == 0); + oldCtx->WinSysDrawBuffer->RefCount--; + oldCtx->WinSysDrawBuffer = NULL; + } + if (oldCtx->WinSysReadBuffer) { + ASSERT(oldCtx->WinSysReadBuffer->Name == 0); + oldCtx->WinSysReadBuffer->RefCount--; + oldCtx->WinSysReadBuffer = NULL; + } + } +#endif + /* We used to call _glapi_check_multithread() here. Now do it in drivers */ _glapi_set_context((void *) newCtx); ASSERT(_mesa_get_current_context() == newCtx); diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 135323f9c1..7845ea018e 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -409,7 +409,9 @@ _mesa_enable_2_1_extensions(GLcontext *ctx) #if FEATURE_EXT_texture_sRGB ctx->Extensions.EXT_texture_sRGB = GL_TRUE; #endif - /* plus: shading language extensions, non-square uniform matrices */ +#ifdef FEATURE_ARB_shading_language_120 + ctx->Extensions.ARB_shading_language_120 = GL_TRUE; +#endif } diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 858c822659..335443ef4f 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1878,7 +1878,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) break; case GL_MAX_VARYING_FLOATS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetBooleanv"); - params[0] = INT_TO_BOOLEAN(ctx->Const.MaxVaryingFloats); + params[0] = INT_TO_BOOLEAN(ctx->Const.MaxVarying * 4); break; case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetBooleanv"); @@ -3705,7 +3705,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) break; case GL_MAX_VARYING_FLOATS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetFloatv"); - params[0] = (GLfloat)(ctx->Const.MaxVaryingFloats); + params[0] = (GLfloat)(ctx->Const.MaxVarying * 4); break; case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetFloatv"); @@ -5532,7 +5532,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) break; case GL_MAX_VARYING_FLOATS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetIntegerv"); - params[0] = ctx->Const.MaxVaryingFloats; + params[0] = ctx->Const.MaxVarying * 4; break; case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetIntegerv"); diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 0f2ca00b83..5a9ca0720e 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -989,7 +989,7 @@ StateVars = [ ["ctx->Const.VertexProgram.MaxUniformComponents"], "", ["ARB_vertex_shader"] ), ( "GL_MAX_VARYING_FLOATS_ARB", GLint, - ["ctx->Const.MaxVaryingFloats"], "", ["ARB_vertex_shader"] ), + ["ctx->Const.MaxVarying * 4"], "", ["ARB_vertex_shader"] ), ( "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB", GLint, ["ctx->Const.MaxVertexTextureImageUnits"], "", ["ARB_vertex_shader"] ), ( "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB", GLint, diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 0ed73beb3c..5ed95ccf65 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -213,22 +213,6 @@ enum #define VERT_BIT_GENERIC(g) (1 << (VERT_ATTRIB_GENERIC0 + (g))) /*@}*/ -/** - * GLSL allows shader writers to allocate vertex result attributes (varyings) in - * single float component granularity. This is in contrast to vertex / fragment - * programs, where result attributes (actually texcoords) were allocated - * in 4-component vectors of floats granularity. - * For performance reasons, it would be optimal to stick with this scheme on a scalar - * processor. Varyings will likely be allocated as 3-component vectors, so statistically - * we win 2 floats. - * The constant VARYINGS_PER_VECTOR tells us how much of float components we pack into - * one result vector. For scalar processor it would be 1, for vector processor - 4. - * - * NOTE: Currently we pack varyings into vertex attributes. - */ -#define VARYINGS_PER_VECTOR 2 -#define VARYING_EMIT_STYLE EMIT_2F -#define MAX_VARYING_VECTORS ((MAX_VARYING_FLOATS + VARYINGS_PER_VECTOR - 1) / VARYINGS_PER_VECTOR) /** * Indexes for vertex program result attributes @@ -250,7 +234,8 @@ enum #define VERT_RESULT_BFC0 13 #define VERT_RESULT_BFC1 14 #define VERT_RESULT_EDGE 15 -#define VERT_RESULT_MAX 16 +#define VERT_RESULT_VAR0 16 /**< shader varying */ +#define VERT_RESULT_MAX (VERT_RESULT_VAR0 + MAX_VARYING) /*@}*/ @@ -271,7 +256,8 @@ enum FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = 11, - FRAG_ATTRIB_MAX = 12 + FRAG_ATTRIB_VAR0 = 12, /**< shader varying */ + FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING) }; /** @@ -305,12 +291,13 @@ enum /** * Fragment program results */ -/*@{*/ -#define FRAG_RESULT_COLR 0 -#define FRAG_RESULT_COLH 1 -#define FRAG_RESULT_DEPR 2 -#define FRAG_RESULT_MAX 3 -/*@}*/ +enum +{ + FRAG_RESULT_COLR = 0, + FRAG_RESULT_COLH = 1, + FRAG_RESULT_DEPR = 2, + FRAG_RESULT_MAX = 3 +}; /** @@ -1811,22 +1798,30 @@ struct gl_evaluators /** * Names of the various vertex/fragment program register files, etc. + * * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c) * All values should fit in a 4-bit field. + * + * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM, + * PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to + * be "uniform" variables since they can only be set outside glBegin/End. + * They're also all stored in the same Parameters array. */ enum register_file { - PROGRAM_TEMPORARY = 0, - PROGRAM_LOCAL_PARAM = 1, - PROGRAM_ENV_PARAM = 2, - PROGRAM_STATE_VAR = 3, - PROGRAM_INPUT = 4, - PROGRAM_OUTPUT = 5, - PROGRAM_NAMED_PARAM = 6, - PROGRAM_CONSTANT = 7, - PROGRAM_WRITE_ONLY = 8, - PROGRAM_ADDRESS = 9, - PROGRAM_UNDEFINED = 10, /* invalid value */ + PROGRAM_TEMPORARY = 0, /**< machine->Temporary[] */ + PROGRAM_LOCAL_PARAM = 1, /**< gl_program->LocalParams[] */ + PROGRAM_ENV_PARAM = 2, /**< gl_program->Parameters[] */ + PROGRAM_STATE_VAR = 3, /**< gl_program->Parameters[] */ + PROGRAM_INPUT = 4, /**< machine->Inputs[] */ + PROGRAM_OUTPUT = 5, /**< machine->Outputs[] */ + PROGRAM_NAMED_PARAM = 6, /**< gl_program->Parameters[] */ + PROGRAM_CONSTANT = 7, /**< gl_program->Parameters[] */ + PROGRAM_UNIFORM = 8, /**< gl_program->Parameters[] */ + PROGRAM_VARYING = 9, /**< machine->Inputs[]/Outputs[] */ + PROGRAM_WRITE_ONLY = 10, /**< A dummy, write-only register */ + PROGRAM_ADDRESS = 11, /**< machine->AddressReg */ + PROGRAM_UNDEFINED = 12, /**< Invalid value */ PROGRAM_FILE_MAX }; @@ -1858,6 +1853,9 @@ struct gl_program /** Numbered local parameters */ GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4]; + /** Vertex/fragment shader varying vars */ + struct gl_program_parameter_list *Varying; + /** Logical counts */ /*@{*/ GLuint NumInstructions; @@ -1923,9 +1921,9 @@ struct gl_vertex_program_state GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ struct gl_vertex_program *Current; /**< ptr to currently bound program */ - const struct gl_vertex_program *_Current; /**< ptr to currently bound - program, including internal - (t_vp_build.c) programs */ + + /** Currently enabled and valid program (including internal programs) */ + struct gl_vertex_program *_Current; GLfloat Parameters[MAX_NV_VERTEX_PROGRAM_PARAMS][4]; /**< Env params */ @@ -1933,6 +1931,12 @@ struct gl_vertex_program_state GLenum TrackMatrix[MAX_NV_VERTEX_PROGRAM_PARAMS / 4]; GLenum TrackMatrixTransform[MAX_NV_VERTEX_PROGRAM_PARAMS / 4]; + /** Should fixed-function T&L be implemented with a vertex prog? */ + GLboolean _MaintainTnlProgram; + + /** Program to emulate fixed-function T&L (see above) */ + struct gl_vertex_program *_TnlProgram; + #if FEATURE_MESA_program_debug GLprogramcallbackMESA Callback; GLvoid *CallbackData; @@ -1949,12 +1953,19 @@ struct gl_fragment_program_state { GLboolean Enabled; /**< User-set fragment program enable flag */ GLboolean _Enabled; /**< Fragment program enabled and valid? */ - GLboolean _Active; /**< Is a user program or internal program active? */ struct gl_fragment_program *Current; /**< User-bound program */ - const struct gl_fragment_program *_Current; /**< currently active program - (including internal programs) */ + + /** Currently enabled and valid program (including internal programs) */ + struct gl_fragment_program *_Current; + GLfloat Parameters[MAX_NV_FRAGMENT_PROGRAM_PARAMS][4]; /**< Env params */ + /** Should fixed-function texturing be implemented with a fragment prog? */ + GLboolean _MaintainTexEnvProgram; + + /** Program to emulate fixed-function texture env/combine (see above) */ + struct gl_fragment_program *_TexEnvProgram; + #if FEATURE_MESA_program_debug GLprogramcallbackMESA Callback; GLvoid *CallbackData; @@ -2030,6 +2041,41 @@ struct gl_query_state }; + +/** + * A GLSL shader object + * A collection of one or more gl_programs... + */ +struct gl_shader +{ + GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER */ + GLuint Name; /**< AKA the handle */ + GLchar *Source; /**< Source code string */ + GLboolean CompileStatus; + GLuint NumPrograms; /**< size of Programs[] array */ + struct gl_program **Programs; /**< Post-compile assembly code */ +}; + + +/** + * This corresponds to a GLSL "program" and is basically a linked collection + * of "shaders" (which are Mesa gl_programs). + * Yes, the terminology is a bit confusing. + */ +struct gl_linked_program +{ + GLenum Type; + GLuint Name; /**< aka handle or ID */ + GLuint NumShaders; /**< total number of shaders in this program */ + struct gl_program **Shaders; /**< List of the shaders */ + struct gl_vertex_program *VertexProgram; /**< Linked vertex program */ + struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */ + GLboolean LinkStatus; /**< GL_LINK_STATUS */ + struct gl_program_parameter_list *Uniforms; /**< Plus constants, etc */ + struct gl_program_parameter_list *Varying; +}; + + /** * Context state for vertex/fragment shaders. */ @@ -2038,6 +2084,7 @@ struct gl_shader_objects_state struct gl2_program_intf **CurrentProgram; GLboolean _VertexShaderPresent; GLboolean _FragmentShaderPresent; + struct gl_linked_program *Linked; /* XXX temporary here */ }; @@ -2099,6 +2146,8 @@ struct gl_shared_state #if FEATURE_ARB_shader_objects struct _mesa_HashTable *GL2Objects; + struct _mesa_HashTable *ShaderObjects; + struct _mesa_HashTable *ProgramObjects; #endif #if FEATURE_EXT_framebuffer_object @@ -2377,7 +2426,7 @@ struct gl_constants GLuint MaxRenderbufferSize; /* GL_ARB_vertex_shader */ GLuint MaxVertexTextureImageUnits; - GLuint MaxVaryingFloats; + GLuint MaxVarying; }; @@ -2915,13 +2964,6 @@ struct __GLcontextRec struct gl_fragment_program_state FragmentProgram; /**< GL_ARB/NV_vertex_program */ struct gl_ati_fragment_shader_state ATIFragmentShader; /**< GL_ATI_fragment_shader */ - struct gl_fragment_program *_TexEnvProgram; /**< Texture state as fragment program */ - struct gl_vertex_program *_TnlProgram; /**< Fixed func TNL state as vertex program */ - - GLboolean _MaintainTnlProgram; - GLboolean _MaintainTexEnvProgram; - GLboolean _UseTexEnvProgram; - struct gl_query_state Query; /**< GL_ARB_occlusion_query */ struct gl_shader_objects_state ShaderObjects; /* GL_ARB_shader_objects */ diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index e62fbe47d1..e121f59258 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -842,11 +842,7 @@ update_arrays( GLcontext *ctx ) /* find min of _MaxElement values for all enabled arrays */ /* 0 */ - if (ctx->ShaderObjects._VertexShaderPresent - && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) { - min = ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0]._MaxElement; - } - else if (ctx->VertexProgram._Enabled + if (ctx->VertexProgram._Current && ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) { min = ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS]._MaxElement; } @@ -930,7 +926,7 @@ update_arrays( GLcontext *ctx ) } /* 16..31 */ - if (ctx->ShaderObjects._VertexShaderPresent) { + if (ctx->VertexProgram._Current) { for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) { if (ctx->Array.ArrayObj->VertexAttrib[i].Enabled) { min = MIN2(min, ctx->Array.ArrayObj->VertexAttrib[i]._MaxElement); @@ -953,30 +949,67 @@ update_arrays( GLcontext *ctx ) static void update_program(GLcontext *ctx) { - /* For now, just set the _Enabled (really enabled) flags. - * In the future we may have to check other state to be sure we really - * have a runable program or shader. - */ + const struct gl_linked_program *linked = ctx->ShaderObjects.Linked; + + + /* These _Enabled flags indicate if the program is enabled AND valid. */ ctx->VertexProgram._Enabled = ctx->VertexProgram.Enabled && ctx->VertexProgram.Current->Base.Instructions; ctx->FragmentProgram._Enabled = ctx->FragmentProgram.Enabled && ctx->FragmentProgram.Current->Base.Instructions; ctx->ATIFragmentShader._Enabled = ctx->ATIFragmentShader.Enabled && ctx->ATIFragmentShader.Current->Instructions; - - ctx->FragmentProgram._Current = ctx->FragmentProgram.Current; - ctx->FragmentProgram._Active = ctx->FragmentProgram._Enabled; - if (ctx->_MaintainTexEnvProgram && !ctx->FragmentProgram._Enabled) { -#if 0 - if (!ctx->_TexEnvProgram) - ctx->_TexEnvProgram = (struct gl_fragment_program *) - ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); - ctx->FragmentProgram._Current = ctx->_TexEnvProgram; -#endif + /* + * Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current + * pointers to the programs that should be enabled/used. + * + * These programs may come from several sources. The priority is as + * follows: + * 1. OpenGL 2.0/ARB vertex/fragment shaders + * 2. ARB/NV vertex/fragment programs + * 3. Programs derived from fixed-function state. + */ + + ctx->FragmentProgram._Current = NULL; + + if (linked && linked->LinkStatus) { + /* Use shader programs */ + ctx->VertexProgram._Current = linked->VertexProgram; + ctx->FragmentProgram._Current = linked->FragmentProgram; + } + else { + if (ctx->VertexProgram._Enabled) { + /* use user-defined vertex program */ + ctx->VertexProgram._Current = ctx->VertexProgram.Current; + } + else if (ctx->VertexProgram._MaintainTnlProgram) { + /* Use vertex program generated from fixed-function state. + * The _Current pointer will get set in + * _tnl_UpdateFixedFunctionProgram() later if appropriate. + */ + ctx->VertexProgram._Current = NULL; + } + else { + /* no vertex program */ + ctx->VertexProgram._Current = NULL; + } - if (ctx->_UseTexEnvProgram) - ctx->FragmentProgram._Active = GL_TRUE; + if (ctx->FragmentProgram._Enabled) { + /* use user-defined vertex program */ + ctx->FragmentProgram._Current = ctx->FragmentProgram.Current; + } + else if (ctx->FragmentProgram._MaintainTexEnvProgram) { + /* Use fragment program generated from fixed-function state. + * The _Current pointer will get set in _mesa_UpdateTexEnvProgram() + * later if appropriate. + */ + ctx->FragmentProgram._Current = NULL; + } + else { + /* no fragment program */ + ctx->FragmentProgram._Current = NULL; + } } } @@ -1013,11 +1046,11 @@ update_color(GLcontext *ctx) } + /** - * If __GLcontextRec::NewState is non-zero then this function \b must be called - * before rendering any primitive. Basically, function pointers and - * miscellaneous flags are updated to reflect the current state of the state - * machine. + * Compute derived GL state. + * If __GLcontextRec::NewState is non-zero then this function \b must + * be called before rendering anything. * * Calls dd_function_table::UpdateState to perform any internal state * management necessary. @@ -1076,7 +1109,7 @@ _mesa_update_state_locked( GLcontext *ctx ) if (new_state & _NEW_COLOR) update_color( ctx ); - if (ctx->_MaintainTexEnvProgram) { + if (ctx->FragmentProgram._MaintainTexEnvProgram) { if (new_state & (_NEW_TEXTURE | _DD_NEW_SEPARATE_SPECULAR | _NEW_FOG)) _mesa_UpdateTexEnvProgram(ctx); } @@ -1122,3 +1155,5 @@ _mesa_update_state( GLcontext *ctx ) /*@}*/ + + diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 5329719cbb..d318a43ebe 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -28,11 +28,12 @@ #include "glheader.h" #include "macros.h" #include "enums.h" +#include "prog_parameter.h" +#include "prog_instruction.h" +#include "prog_print.h" +#include "prog_statevars.h" #include "texenvprogram.h" -#include "shader/program.h" -#include "shader/program_instruction.h" - /** * According to Glean's texCombine test, no more than 21 instructions * are needed. Allow a few extra just in case. @@ -570,12 +571,14 @@ static struct ureg register_const4f( struct texenv_fragment_program *p, GLfloat s3) { GLfloat values[4]; - GLuint idx; + GLuint idx, swizzle; values[0] = s0; values[1] = s1; values[2] = s2; values[3] = s3; - idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4 ); + idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4, + &swizzle ); + ASSERT(swizzle == SWIZZLE_NOOP); return make_ureg(PROGRAM_STATE_VAR, idx); } @@ -1221,44 +1224,55 @@ static GLuint hash_key( const struct state_key *key ) return hash; } -void _mesa_UpdateTexEnvProgram( GLcontext *ctx ) + +/** + * If _MaintainTexEnvProgram is set we'll generate a fragment program that + * implements the current texture env/combine mode. + * This function generates that program and puts it into effect. + */ +void +_mesa_UpdateTexEnvProgram( GLcontext *ctx ) { struct state_key key; GLuint hash; const struct gl_fragment_program *prev = ctx->FragmentProgram._Current; - if (!ctx->FragmentProgram._Enabled) { + ASSERT(ctx->FragmentProgram._MaintainTexEnvProgram); + + /* If a conventional fragment program/shader isn't in effect... */ + if (!ctx->FragmentProgram._Current) { make_state_key(ctx, &key); hash = hash_key(&key); - ctx->FragmentProgram._Current = - ctx->_TexEnvProgram = - search_cache(&ctx->Texture.env_fp_cache, hash, &key, sizeof(key)); - - if (!ctx->_TexEnvProgram) { - if (0) _mesa_printf("Building new texenv proggy for key %x\n", hash); - - ctx->FragmentProgram._Current = ctx->_TexEnvProgram = - (struct gl_fragment_program *) - ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); - - create_new_program(ctx, &key, ctx->_TexEnvProgram); + ctx->FragmentProgram._TexEnvProgram = + search_cache(&ctx->Texture.env_fp_cache, hash, &key, sizeof(key)); + + if (!ctx->FragmentProgram._TexEnvProgram) { + if (0) + _mesa_printf("Building new texenv proggy for key %x\n", hash); + + /* create new tex env program */ + ctx->FragmentProgram._TexEnvProgram = (struct gl_fragment_program *) + ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); + + create_new_program(ctx, &key, ctx->FragmentProgram._TexEnvProgram); - cache_item(&ctx->Texture.env_fp_cache, hash, &key, ctx->_TexEnvProgram); - } else { - if (0) _mesa_printf("Found existing texenv program for key %x\n", hash); + cache_item(&ctx->Texture.env_fp_cache, hash, &key, + ctx->FragmentProgram._TexEnvProgram); } + else { + if (0) + _mesa_printf("Found existing texenv program for key %x\n", hash); + } + ctx->FragmentProgram._Current = ctx->FragmentProgram._TexEnvProgram; } - else { - ctx->FragmentProgram._Current = ctx->FragmentProgram.Current; - } /* Tell the driver about the change. Could define a new target for * this? */ if (ctx->FragmentProgram._Current != prev && ctx->Driver.BindProgram) { ctx->Driver.BindProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, - (struct gl_program *) ctx->FragmentProgram._Current); + (struct gl_program *) ctx->FragmentProgram._Current); } } diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index bcedcafe19..e379933a66 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2920,9 +2920,11 @@ update_texture_state( GLcontext *ctx ) { GLuint unit; +#if 0 /** XXX NEW_SLANG */ #if FEATURE_ARB_fragment_shader struct gl2_program_intf **prog = ctx->ShaderObjects.CurrentProgram; GLbitfield progteximageusage[MAX_TEXTURE_IMAGE_UNITS]; +#endif #endif ctx->NewState |= _NEW_TEXTURE; /* TODO: only set this if there are @@ -2934,6 +2936,7 @@ update_texture_state( GLcontext *ctx ) ctx->Texture._TexMatEnabled = 0; ctx->Texture._TexGenEnabled = 0; +#if 00 /* XXX NEW_SLANG */ #if FEATURE_ARB_fragment_shader /* * Grab texture image usage state from shader program. It must be @@ -2944,6 +2947,7 @@ update_texture_state( GLcontext *ctx ) (**prog).GetTextureImageUsage (prog, progteximageusage); } #endif /* FEATURE_ARB_fragment_shader */ +#endif /* * Update texture unit state. @@ -2957,11 +2961,13 @@ update_texture_state( GLcontext *ctx ) texUnit->_GenFlags = 0; /* Get the bitmask of texture enables */ +#if 000 /* XXX NEW_SLANG */ #if FEATURE_ARB_fragment_shader if (ctx->ShaderObjects._FragmentShaderPresent) { enableBits = progteximageusage[unit]; } else +#endif #endif if (ctx->FragmentProgram._Enabled) { enableBits = ctx->FragmentProgram.Current->TexturesUsed[unit]; @@ -3085,12 +3091,15 @@ update_texture_state( GLcontext *ctx ) /* Fragment programs may need texture coordinates but not the * corresponding texture images. */ +#if 0 /* XXX NEW_SLANG */ if (ctx->ShaderObjects.CurrentProgram != NULL) { ctx->Texture._EnabledCoordUnits |= (1 << ctx->Const.MaxTextureCoordUnits) - 1; } - else if (ctx->FragmentProgram._Enabled) { + else +#endif + if (ctx->FragmentProgram._Enabled) { ctx->Texture._EnabledCoordUnits |= - (ctx->FragmentProgram.Current->Base.InputsRead >> FRAG_ATTRIB_TEX0); + (ctx->FragmentProgram._Current->Base.InputsRead >> FRAG_ATTRIB_TEX0); } } -- cgit v1.2.3 From a7a582296bf23556e3e9c013b33b619ccc0f795c Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:08:02 -0700 Subject: more debug output --- src/mesa/shader/slang/slang_link2.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 4827c8c4cd..9fa5399e53 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -321,11 +321,17 @@ _slang_link2(GLcontext *ctx, _mesa_clone_program(ctx, &fragProg->Base); #if 1 - printf("************** orig program\n"); + printf("************** orig fragment program\n"); _mesa_print_program(&fragProg->Base); _mesa_print_program_parameters(ctx, &fragProg->Base); #endif +#if 1 + printf("************** orig vertex program\n"); + _mesa_print_program(&vertProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); +#endif + link_varying_vars(linked, &linked->VertexProgram->Base); link_varying_vars(linked, &linked->FragmentProgram->Base); @@ -339,9 +345,12 @@ _slang_link2(GLcontext *ctx, linked->FragmentProgram->Base.Parameters = linked->Uniforms; #if 1 - printf("************** linked/cloned\n"); + printf("************** linked/cloned frag prog\n"); _mesa_print_program(&linked->FragmentProgram->Base); _mesa_print_program_parameters(ctx, &linked->FragmentProgram->Base); + printf("************** linked/cloned vert prog\n"); + _mesa_print_program(&linked->VertexProgram->Base); + _mesa_print_program_parameters(ctx, &linked->VertexProgram->Base); #endif linked->LinkStatus = (linked->VertexProgram && linked->FragmentProgram); -- cgit v1.2.3 From e3b266886583cb8ab7feff4fd1df98ecda24d438 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:08:15 -0700 Subject: use MAX_VARYING --- src/mesa/shader/slang/slang_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 6114b7c252..008b7ab369 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -566,7 +566,7 @@ add_varying_binding (slang_varying_bindings *self, slang_export_data_quant *q, c } } - if (self->slot_count + slot_span > MAX_VARYING_FLOATS) { + if (self->slot_count + slot_span > MAX_VARYING * 4) { /* TODO: info log: error: MAX_VARYING_FLOATS exceeded */ return GL_FALSE; } -- cgit v1.2.3 From 89f88058b9321d9aac50200f9e173a7302934c27 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:08:24 -0700 Subject: use MAX_VARYING --- src/mesa/shader/slang/slang_link.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index af45c6657e..e96dd51ed4 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -181,9 +181,9 @@ typedef struct typedef struct { - slang_varying_binding bindings[MAX_VARYING_FLOATS]; + slang_varying_binding bindings[MAX_VARYING * 4]; GLuint binding_count; - slang_varying_slot slots[MAX_VARYING_FLOATS]; + slang_varying_slot slots[MAX_VARYING * 4]; GLuint slot_count; } slang_varying_bindings; /*@}*/ -- cgit v1.2.3 From 60a7200c0de7fc2925430b466739b4021087d14c Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:08:59 -0700 Subject: updated includes --- src/mesa/tnl/t_vb_arbprogram.c | 4 +++- src/mesa/tnl/t_vb_program.c | 3 ++- src/mesa/tnl/t_vp_build.c | 7 +++++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index b7975f3a4e..c59d98e118 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -37,13 +37,15 @@ #include "arbprogparse.h" #include "light.h" #include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_statevars.h" #include "programopt.h" #include "math/m_matrix.h" #include "t_context.h" #include "t_pipeline.h" #include "t_vb_arbprogram.h" #include "tnl.h" -#include "program_instruction.h" #define DISASSEM 0 diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index c901de0588..9df649c5e6 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -42,7 +42,8 @@ #include "program.h" #include "simple_list.h" #include "mtypes.h" -#include "program_instruction.h" +#include "prog_instruction.h" +#include "prog_statevars.h" #include "nvvertexec.h" #include "nvprogram.h" diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index a68127e653..5e146bfb36 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -33,11 +33,14 @@ #include "glheader.h" #include "macros.h" #include "enums.h" +#include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_print.h" +#include "prog_statevars.h" #include "t_context.h" /* NOTE: very light dependency on this */ #include "t_vp_build.h" -#include "shader/program.h" -#include "shader/program_instruction.h" struct state_key { unsigned light_global_enabled:1; -- cgit v1.2.3 From a7e252026db542d362bc4688d49c7e28c2f9f1ea Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:09:12 -0700 Subject: updated includes --- src/mesa/tnl/t_vb_arbprogram_sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbprogram_sse.c b/src/mesa/tnl/t_vb_arbprogram_sse.c index b9126d6d88..d0f66fd619 100644 --- a/src/mesa/tnl/t_vb_arbprogram_sse.c +++ b/src/mesa/tnl/t_vb_arbprogram_sse.c @@ -43,7 +43,7 @@ #include "mtypes.h" #include "arbprogparse.h" #include "program.h" -#include "program_instruction.h" +#include "prog_instruction.h" #include "math/m_matrix.h" #include "math/m_translate.h" #include "t_context.h" -- cgit v1.2.3 From 9abf73b8cc204a9348c751022bace78560d7cb3e Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:09:33 -0700 Subject: varying changes --- src/mesa/tnl/t_context.c | 2 +- src/mesa/tnl/t_context.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index b07f90af02..3887f18213 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -199,7 +199,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) (ctx->VertexProgram._Enabled && ctx->VertexProgram.PointSizeEnabled)) RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POINTSIZE ); -#if NEW_SLANG +#if 1 /* XXX NEW_SLANG */ RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC ); #else diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index d5414bd730..ea2a6bed54 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -422,7 +422,7 @@ struct vertex_buffer GLvector4f *ColorPtr[2]; /* _TNL_BIT_COLOR0 */ GLvector4f *SecondaryColorPtr[2]; /* _TNL_BIT_COLOR1 */ GLvector4f *FogCoordPtr; /* _TNL_BIT_FOG */ - GLvector4f *VaryingPtr[MAX_VARYING_VECTORS]; + GLvector4f *VaryingPtr[MAX_VARYING]; struct tnl_prim *Primitive; GLuint PrimitiveCount; -- cgit v1.2.3 From 464b9f4f6c6514a7cfcc873923b5c127c1c6f60b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:09:49 -0700 Subject: varying var changes --- src/mesa/swrast/s_context.h | 8 ++++---- src/mesa/swrast/s_span.c | 4 ++-- src/mesa/swrast/s_tritemp.h | 22 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 37d7081d4d..f784e18cd4 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -122,7 +122,7 @@ typedef struct sw_span_arrays { GLfloat texcoords[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH][4]; GLfloat lambda[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH]; GLfloat coverage[MAX_WIDTH]; - GLfloat varying[MAX_WIDTH][MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR]; + GLfloat varying[MAX_WIDTH][MAX_VARYING][4]; /** This mask indicates which fragments are alive or culled */ GLubyte mask[MAX_WIDTH]; @@ -200,9 +200,9 @@ typedef struct sw_span { GLfloat texStepX[MAX_TEXTURE_COORD_UNITS][4]; GLfloat texStepY[MAX_TEXTURE_COORD_UNITS][4]; GLfixed intTex[2], intTexStep[2]; /* s, t only */ - GLfloat var[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR]; - GLfloat varStepX[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR]; - GLfloat varStepY[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR]; + GLfloat var[MAX_VARYING][4]; + GLfloat varStepX[MAX_VARYING][4]; + GLfloat varStepY[MAX_VARYING][4]; /* partial derivatives wrt X and Y. */ GLfloat dzdx, dzdy; diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index f091887838..7bfb23f0f7 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -829,8 +829,8 @@ interpolate_varying(GLcontext *ctx, SWspan *span) span->arrayMask |= SPAN_VARYING; - for (i = 0; i < MAX_VARYING_VECTORS; i++) { - for (j = 0; j < VARYINGS_PER_VECTOR; j++) { + for (i = 0; i < MAX_VARYING; i++) { + for (j = 0; j < 4; j++) { const GLfloat dvdx = span->varStepX[i][j]; GLfloat v = span->var[i][j]; const GLfloat dwdx = span->dwdx; diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index 9e0a8a3d32..0ed1772a88 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -144,14 +144,14 @@ #ifdef INTERP_VARYING -#define VARYING_LOOP(CODE)\ - {\ - GLuint iv, ic;\ - for (iv = 0; iv < MAX_VARYING_VECTORS; iv++) {\ - for (ic = 0; ic < VARYINGS_PER_VECTOR; ic++) {\ - CODE\ - }\ - }\ +#define VARYING_LOOP(CODE) \ + { \ + GLuint iv, ic; \ + for (iv = 0; iv < MAX_VARYING; iv++) { \ + for (ic = 0; ic < 4; ic++) { \ + CODE \ + } \ + } \ } #endif @@ -780,9 +780,9 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLfloat dvOuter[MAX_TEXTURE_COORD_UNITS], dvInner[MAX_TEXTURE_COORD_UNITS]; #endif #ifdef INTERP_VARYING - GLfloat varLeft[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR]; - GLfloat dvarOuter[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR]; - GLfloat dvarInner[MAX_VARYING_VECTORS][VARYINGS_PER_VECTOR]; + GLfloat varLeft[MAX_VARYING][4]; + GLfloat dvarOuter[MAX_VARYING][4]; + GLfloat dvarInner[MAX_VARYING][4]; #endif for (subTriangle=0; subTriangle<=1; subTriangle++) { -- cgit v1.2.3 From d6aff512feb102eacb41b36e9f9e750d94c299af Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:10:01 -0700 Subject: varying var changes --- src/mesa/swrast_setup/ss_context.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index cd76375d0c..924b423e88 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -42,6 +42,9 @@ #define _SWSETUP_NEW_RENDERINDEX (_NEW_POLYGON|_NEW_LIGHT|_NEW_PROGRAM) +#define VARYING_EMIT_STYLE EMIT_4F + + GLboolean _swsetup_CreateContext( GLcontext *ctx ) { @@ -147,12 +150,15 @@ _swsetup_RenderStart( GLcontext *ctx ) } } - if (RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC )) { - for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) { - if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_GENERIC(i) )) { - EMIT_ATTR( _TNL_ATTRIB_GENERIC(i), VARYING_EMIT_STYLE, attribute[i] ); - } - } + /* shader varying vars */ + if (RENDERINPUTS_TEST_RANGE( index_bitset, + _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC )) { + for (i = 0; i < ctx->Const.MaxVarying; i++) { + if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_GENERIC(i) )) { + EMIT_ATTR( _TNL_ATTRIB_GENERIC(i), VARYING_EMIT_STYLE, + attribute[i] ); + } + } } if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_POINTSIZE )) -- cgit v1.2.3 From 4b4632f94c726c19d3c1efd05ceb5770a430cefd Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 10:10:23 -0700 Subject: vertex/fragment program field changes --- src/mesa/drivers/dri/i915/i915_context.c | 3 +-- src/mesa/drivers/dri/i915/i915_vtbl.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 2f78fd60b2..b2e9ba3187 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -166,8 +166,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis, I915_MAX_TEX_INSN); ctx->Const.FragmentProgram.MaxNativeTexIndirections = I915_MAX_TEX_INDIRECT; ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* I don't think we have one */ - ctx->_MaintainTexEnvProgram = 1; - ctx->_UseTexEnvProgram = 1; + ctx->_MaintainTexEnvProgram = GL_TRUE; driInitExtensions( ctx, i915_extensions, GL_FALSE ); diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 2936a0fb72..7924754c82 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -46,7 +46,7 @@ static void i915_render_start( intelContextPtr intel ) GLcontext *ctx = &intel->ctx; i915ContextPtr i915 = I915_CONTEXT(intel); - if (ctx->FragmentProgram._Active) + if (ctx->FragmentProgram._Current) i915ValidateFragmentProgram( i915 ); else { assert(!ctx->_MaintainTexEnvProgram); -- cgit v1.2.3 From 6579245800f39c14f738db8e8ae1d93a65a32a4c Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 15:32:11 -0700 Subject: redo mat4 addition, mat4 constructor from vec4s --- src/mesa/shader/slang/library/slang_core.gc | 29 +- src/mesa/shader/slang/library/slang_core_gc.h | 1013 +++++++++++++------------ 2 files changed, 535 insertions(+), 507 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 8f1b0c2d3c..e94fa20a7f 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -307,6 +307,18 @@ mat4 __constructor (const bool b) { return mat4 (b ? 1.0 : 0.0); } + +mat4 __constructor (const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) +{ + __retVal[0] = r0; + __retVal[1] = r1; + __retVal[2] = r2; + __retVal[3] = r3; +} + + + + void __operator += (inout float a, const float b) { __asm float_add a, a, b; } @@ -1040,12 +1052,21 @@ mat3 __operator / (const mat3 m, const mat3 n) { return mat3 (m[0] / n[0], m[1] / n[1], m[2] / n[2]); } -mat4 __operator + (const mat4 m, const mat4 n) { - return mat4 (m[0] + n[0], m[1] + n[1], m[2] + n[2], m[3] + n[3]); + +mat4 __operator + (const mat4 m, const mat4 n) +{ + __retVal[0] = m[0] + n[0]; + __retVal[1] = m[1] + n[1]; + __retVal[2] = m[2] + n[2]; + __retVal[3] = m[3] + n[3]; } -mat4 __operator - (const mat4 m, const mat4 n) { - return mat4 (m[0] - n[0], m[1] - n[1], m[2] - n[2], m[3] - n[3]); +mat4 __operator - (const mat4 m, const mat4 n) +{ + __retVal[0] = m[0] - n[0]; + __retVal[1] = m[1] - n[1]; + __retVal[2] = m[2] - n[2]; + __retVal[3] = m[3] - n[3]; } mat4 __operator / (const mat4 m, const mat4 n) { diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 34f84dd987..c8ee9bc479 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -53,509 +53,516 @@ 102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0, 15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, 120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97, -116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0, -0,1,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0, -0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8, -18,98,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95, -110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,18, -97,0,0,18,99,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117, -108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0, -0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2, -26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105, -110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1, -0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102, -108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0, -0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0, -0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0,9,97,0, -0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58, -105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0, -0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0, -0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, -0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0, -0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0, -59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0, -0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18, -118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18, -117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24, -0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59, -119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18, -118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2, -12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119, -0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0, -9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18, -118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2, -6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18, -118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18, -117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23, -0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2, -8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119, -0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0, -9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0, -59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120, -0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0, -59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18, -118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2, -13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1, -0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16, -8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0, -18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0, -1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0, -57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, -9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0, -0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, -21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114, -50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0, -59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120, -0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114, -51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59, -122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99, -51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0, -14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48,0,57, -48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2,3,1,0, -2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0, -0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2, -15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10, -51,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1, -0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18, -97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1, -4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9, -0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,3, -2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0, -16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49, -0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59, -120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18, -109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18, -114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0, -57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122, -0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0, -9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10, -49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59, -119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, -101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,15,2,21,1,1,0,15,109, -0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110, -0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0, -0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, -1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9, -18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1, -9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1, -0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2, -10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0, -18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18, -118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9, -97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0, -18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18, -118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9, -97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0, -18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18, -118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1, -0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0, -18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2, -12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9, -18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0, -9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0, -18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1, -0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, -49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18, -97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9, -18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109, -0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0, -9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0, -24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109, -0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97, -0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18, -109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18, -97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9, -18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57, -18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0, -9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0, -57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0, -59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46, -0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59, -121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0, -48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0, -18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0, -59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0, -48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0, -57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109, -0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0, -0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21,1,1, -0,12,118,0,0,1,1,0,15,109,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59, -120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,8,48, -0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,8,48,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18, -109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0, -59,122,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,49,0,57,59,119,0, -48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0, -57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109, -0,16,10,50,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,51,0,57,59,120,0,48,18,118,0,59, -121,0,18,109,0,16,10,51,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,51,0,57,59,122,0,48, -46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1, -0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,4,102,108,111,97,116,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97, -0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2, -0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0, -18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18, -120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0, -0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, -110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101, -103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0, -0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0, -0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0, -4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111, -95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108, -121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0, -0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1, -121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0, -0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95, -105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0, -1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121, -0,46,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,21,1,1,0,10, -118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118, -0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118, -101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0, -0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117, -0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0, -0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18, -117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0, -47,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120, -0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59, -122,0,48,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0, -59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117, -0,59,122,0,49,0,0,0,0,1,0,12,2,26,1,1,0,12,118,97,100,100,0,0,1,1,0,12,117,97,100,100,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,100,100,0,0,18,117,97, -100,100,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59, -120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0, -59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12, -117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0, -18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122, -0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0, -1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, -121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1, -0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, -59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18, -117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0, -18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122, -0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99, -51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, -122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, -99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0, -59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, -101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18, -118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0, -46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8, -2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18, -118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, -48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8, -2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, -118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58, -109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0, -0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1, -1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,46,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109, -0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0, -1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,15,2,26,1,1, -0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0, -57,46,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1, -0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,18,109,0, -16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1, -8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57, -18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99, -50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118, -0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98, -0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0, -59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1, -8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2, -21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0, -18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0, -18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1, -0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49, -0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18, -98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8, -58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0, -59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0, -59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2, -27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0, -18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, -118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99, -51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0, -0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97,0,0, -1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0, -49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, -101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98, -0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0, -59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59, -119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59, -120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0, -18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18, -117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0, -59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59, -119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18, -97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0, -18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0, -59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117, -0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0, -18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18, -118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0, -13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0, -57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8, -48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13, -110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, -47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0, -57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110, -0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48, -0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, -18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0, -0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0, -0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18, -98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, -1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18, -97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, -0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97, -0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47, -0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57, -18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14, -2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0, -18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, -49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, -110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, -16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, -52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, -109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, -0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, -16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, -0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, -47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, -57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, -18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, -18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, -97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, -50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, -0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -49,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59, -121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18, -118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99, -52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0, -0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121, -0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118, -0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52, -0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0, -0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10, -49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54, -0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8, -58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57, -54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0, -0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18, -118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0, -52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118, -0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0, -2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7, -118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, -25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, -9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, -16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10, -49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0, -0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18, -97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121, -0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18, -118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0, -51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0, -59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9, -18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120, -0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0, -2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51, -0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9, -18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0, -0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0, -0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0, -2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, -118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, -0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, -25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, -0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, -118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, -61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, -9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, -0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, -1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, -59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, -0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, -1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, -0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, -1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, -0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, -0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, -1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, -57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1, -99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1, -0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, -116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108, -111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5, -97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0, -0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, -111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113, -117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0, -1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0, -0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, -116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97, -108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0, -5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0, -1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8, -18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108, -111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, -5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, +116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12, +114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, +0,57,18,114,51,0,20,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100, +100,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108, +111,97,116,95,110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,9,97,0, +0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0, +18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,18,97,0,0,18,99,0,0,0,0,1,0,0,2,3,1,0,2, +9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105, +118,105,100,101,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4, +102,108,111,97,116,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0, +0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0, +0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120, +0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4, +102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116, +111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0, +0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116, +95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, +0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97, +0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, +1,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0, +18,98,0,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108, +111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118, +0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0, +59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0, +0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, +59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117, +0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0, +1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2, +11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18, +117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0, +12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21, +0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2, +2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117, +0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9, +18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18, +118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122, +0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1, +1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118, +0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6, +118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0, +1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7, +118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117, +0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18, +118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18, +117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8, +117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, +9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3, +1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0, +18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59, +119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18, +118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0, +0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, +0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18, +109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0, +59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0, +0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48, +0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0, +0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, +1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14, +110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0, +16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109, +0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59, +120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0, +20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0, +16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50, +0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59, +122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18, +109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108, +0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86, +97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110, +0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57, +48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9, +18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16, +8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109, +0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, +57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0, +16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,9,0,100,111,116,0,1, +1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1, +0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0, +1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0, +12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98, +0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1, +114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, +120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, +114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59, +122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, +20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18, +118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0, +0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, +51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0, +18,114,52,0,0,18,118,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52, +0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10, +50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0, +0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, +57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, +0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97, +0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0, +59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0, +0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0, +1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59, +122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22, +0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1, +1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59, +122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24, +0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1, +1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59, +122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0, +1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22, +0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59, +120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59, +119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24, +0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24, +0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0, +16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0, +24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109, +0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1, +1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18, +109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0, +1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, +10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9, +97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0, +16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1, +0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109, +0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1, +1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18, +109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0, +0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9, +18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10, +118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, +48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0, +57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10, +118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1, +1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118, +0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,8,48,0,57,59,122,0, +48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0, +57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18, +109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0, +59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, +0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,8,58, +118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16, +8,48,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,18,118,0,59,119,0, +18,109,0,16,8,48,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118, +0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0,57,59,122,0, +48,46,18,118,0,59,119,0,18,109,0,16,10,49,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10, +50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18, +109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,50,0,57,59,119,0,48,46,0,18, +118,0,59,120,0,18,109,0,16,10,51,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,51,0,57,59,121, +0,48,46,18,118,0,59,122,0,18,109,0,16,10,51,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,10, +51,0,57,59,119,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0, +18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5, +97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116, +111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116, +0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4, +102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1, +0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95, +116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0, +0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116, +95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5, +98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18, +98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0, +0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2, +22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0, +18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8, +18,99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120, +0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0, +0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59, +121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101, +99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1, +0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59, +120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11, +117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117, +0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0, +11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, +117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1, +1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0, +18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0, +1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, +0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,12,2,26,1,1,0,12,118, +97,100,100,0,0,1,1,0,12,117,97,100,100,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,97,100,100,0,0,18,117,97,100,100,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1, +0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0, +18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119, +0,47,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0, +12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18, +118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0, +18,117,0,59,119,0,49,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50, +0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2, +27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120, +0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0, +1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59, +121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0, +59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7, +118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18, +118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1, +1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47, +0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2, +21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120, +0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0, +7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59, +120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0, +1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0, +59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18, +118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0, +47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8, +2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18, +118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, +49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0, +13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13, +109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110, +0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, +116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1, +1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,0, +1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57, +18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46, +20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15, +109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, +49,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10, +117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0, +0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0, +46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118, +101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0, +10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121, +0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0, +18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0, +0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0, +49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, +101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0, +9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0, +59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, +8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122, +0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0, +18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11, +2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18, +118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0, +11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, +18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20, +0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0, +49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118, +0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98, +0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58, +118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59, +122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8, +58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0, +18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1, +8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117, +0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0, +1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59, +122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0, +0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0, +18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2, +22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0, +18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12, +2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18, +118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1, +0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1, +0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, +0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1, +0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1, +0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57, +46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1, +0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, +16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1, +1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10, +49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18, +109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, +116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0, +16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18, +109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0, +48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0, +16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1, +0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0, +49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1, +0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18, +110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0, +0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18, +98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10, +51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, +97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, +47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0, +16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1, +1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10, +49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15, +2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0, +18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18, +98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, +110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18, +97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50, +0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58, +118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0, +1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, +1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, +0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118, +101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8, +58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, +1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, +54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109, +97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109, +0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10, +50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54, +0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0, +2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16, +10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0, +1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59, +122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9, +18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, +0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118, +0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0, +9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0, +0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1, +0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109, +0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49, +0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118, +0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18, +118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0, +0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119, +0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0, +2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51, +0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, +122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, +9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18, +109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10, +51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52, +0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0, +52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, +118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, +0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, +109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, +1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, +0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, +0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, +11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, +0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, +24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, +0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, +118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, +60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, +1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115, +115,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8, +58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9, +97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0, +18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, +97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9, +98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18, +98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8, +18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18, +97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3, +2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98, +0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18, +101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58, +102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18, +98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0, +18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95, +112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, 69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, 9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, -0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, -0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From bfc02dd30f625c134638b20a903065dc78e9ccd3 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 15:35:57 -0700 Subject: Lots of assorted changes. Implement assignment/move for types larger than 4 floats. Fix codegen bug for "return expr" in inlined functions. More clean-up of storage allocation code (slang_resolve_storage). --- src/mesa/shader/slang/slang_assemble.h | 7 + src/mesa/shader/slang/slang_codegen.c | 163 +++++++++++------------ src/mesa/shader/slang/slang_compile_operation.c | 11 ++ src/mesa/shader/slang/slang_compile_operation.h | 3 + src/mesa/shader/slang/slang_emit.c | 168 ++++++++++++++++-------- src/mesa/shader/slang/slang_emit.h | 16 ++- src/mesa/shader/slang/slang_link2.c | 28 ++-- 7 files changed, 242 insertions(+), 154 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index d507fc0161..1225ee4411 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -242,6 +242,12 @@ typedef struct slang_assembly_name_space_ struct slang_variable_scope_ *vars; } slang_assembly_name_space; + +typedef struct { + GLboolean TempUsed[MAX_PROGRAM_TEMPS]; +} slang_gen_context; + + typedef struct slang_assemble_ctx_ { slang_assembly_file *file; @@ -253,6 +259,7 @@ typedef struct slang_assemble_ctx_ slang_ref_type ref; slang_swizzle swz; struct gl_program *program; + slang_gen_context *codegen; } slang_assemble_ctx; extern struct slang_function_ * diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index af543adf63..acca05df80 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -53,37 +53,6 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper); -/** - * Allocate storage for given variable, attach it to 'ir'. - */ -static GLboolean -slang_alloc_var_storage(slang_variable *variable, slang_ir_node *ir) -{ - slang_ir_storage *store; - - assert(variable); - - /*assert(!variable->aux);*/ - - if (variable->aux) { - store = (slang_ir_storage *) variable->aux; - ir->Store = store; - if (store) - store->Size = -12; - } - else { - /* alloc storage */ - store = (slang_ir_storage *) _mesa_calloc(sizeof(*store)); - store->File = PROGRAM_TEMPORARY; - store->Index = -1; - store->Size = -10; - variable->aux = store; - ir->Store = store; - } - return GL_TRUE; -} - - static slang_ir_node * new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) { @@ -180,7 +149,7 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, oper->var = v; n->Swizzle = swizzle; n->Var = v; - slang_resolve_storage(NULL, n, A->program); + slang_resolve_storage(A->codegen/**NULL**/, n, A->program); return n; } @@ -221,15 +190,30 @@ slang_is_writemask(const char *field, GLuint *mask) } +/** + * Assemble a "return" statement. + */ static slang_ir_node * slang_assemble_return(slang_assemble_ctx * A, slang_operation *oper) { - if (oper->num_children == 0) { - /* Convert to: + if (oper->num_children == 0 || + (oper->num_children == 1 && + oper->children[0].type == slang_oper_void)) { + /* Convert from: + * return; + * To: * goto __endOfFunction; */ - oper->type = slang_oper_goto; - oper->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + slang_ir_node *n; + slang_operation gotoOp; + slang_operation_construct(&gotoOp); + gotoOp.type = slang_oper_goto; + gotoOp.a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + /* assemble the new code */ + n = slang_assemble_operation(A, &gotoOp); + /* destroy temp code */ + slang_operation_destruct(&gotoOp); + return n; } else { /* @@ -241,11 +225,12 @@ slang_assemble_return(slang_assemble_ctx * A, slang_operation *oper) */ slang_operation *block, *assign, *jump; slang_atom a_retVal; + slang_ir_node *n; a_retVal = slang_atom_pool_atom(A->atoms, "__retVal"); assert(a_retVal); -#if 1 +#if 1 /* DEBUG */ { slang_variable *v = _slang_locate_variable(oper->locals, a_retVal, GL_TRUE); @@ -266,17 +251,13 @@ slang_assemble_return(slang_assemble_ctx * A, slang_operation *oper) assign->locals->outer_scope = block->locals; assign->num_children = 2; assign->children = slang_operation_new(2); - /* lhs */ + /* lhs (__retVal) */ assign->children[0].type = slang_oper_identifier; assign->children[0].a_id = a_retVal; assign->children[0].locals->outer_scope = assign->locals; - /* rhs */ -#if 0 - assign->children[1] = oper->children[0]; /* XXX copy */ -#else + /* rhs (expr) */ + /* XXX we might be able to avoid this copy someday */ slang_operation_copy(&assign->children[1], &oper->children[0]); -#endif - /* child[1]: goto __endOfFunction */ jump = &block->children[1]; @@ -284,17 +265,16 @@ slang_assemble_return(slang_assemble_ctx * A, slang_operation *oper) assert(CurFunction->end_label); jump->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); -#if 00 +#if 0 /* debug */ printf("NEW RETURN:\n"); slang_print_tree(block, 0); #endif - slang_operation_copy(oper, block); - /* XXX destruct block */ + /* assemble the new code */ + n = slang_assemble_operation(A, block); + slang_operation_delete(block); + return n; } - - /* assemble the new code */ - return slang_assemble_operation(A, oper); } @@ -426,28 +406,37 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, } } break; +#if 0 /* XXX rely on default case below */ case slang_oper_return: /* do return replacement here too */ - slang_assemble_return(A, oper); - slang_substitute(A, oper, substCount, substOld, substNew, GL_FALSE); + assert(oper->num_children == 0 || oper->num_children == 1); + if (oper->num_children == 1) { + slang_substitute(A, &oper->children[0], + substCount, substOld, substNew, GL_FALSE); + } break; +#endif case slang_oper_assign: case slang_oper_subscript: /* special case: * child[0] can't have substitutions but child[1] can. */ - slang_substitute(A, &oper->children[0], substCount, substOld, substNew, GL_TRUE); - slang_substitute(A, &oper->children[1], substCount, substOld, substNew, GL_FALSE); + slang_substitute(A, &oper->children[0], + substCount, substOld, substNew, GL_TRUE); + slang_substitute(A, &oper->children[1], + substCount, substOld, substNew, GL_FALSE); break; case slang_oper_field: /* XXX NEW - test */ - slang_substitute(A, &oper->children[0], substCount, substOld, substNew, GL_TRUE); + slang_substitute(A, &oper->children[0], + substCount, substOld, substNew, GL_TRUE); break; default: { GLuint i; for (i = 0; i < oper->num_children; i++) - slang_substitute(A, &oper->children[i], substCount, substOld, substNew, GL_FALSE); + slang_substitute(A, &oper->children[i], + substCount, substOld, substNew, GL_FALSE); } } } @@ -1015,11 +1004,10 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) assert(oper->num_children == 0 || oper->num_children == 1); - v = _slang_locate_variable(oper->locals, - oper->a_id, GL_TRUE); + v = _slang_locate_variable(oper->locals, oper->a_id, GL_TRUE); assert(v); varDecl = new_var_decl(A, v); - slang_alloc_var_storage(v, varDecl); + slang_resolve_storage(A->codegen, varDecl, A->program); if (oper->num_children > 0) { /* child is initializer */ @@ -1027,18 +1015,26 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) assert(oper->num_children == 1); var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); /* XXX make copy of this initializer? */ + /* printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); + */ rhs = slang_assemble_operation(A, &oper->children[0]); init = new_node(IR_MOVE, var, rhs); + /*assert(rhs->Opcode != IR_SEQ);*/ n = new_seq(varDecl, init); } else if (v->initializer) { slang_ir_node *var, *init, *rhs; var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); /* XXX make copy of this initializer? */ + /* printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); + */ rhs = slang_assemble_operation(A, v->initializer); init = new_node(IR_MOVE, var, rhs); + /* + assert(rhs->Opcode != IR_SEQ); + */ n = new_seq(varDecl, init); } else { @@ -1056,10 +1052,9 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) oper->children[1].type == slang_oper_call) { /* special case */ slang_ir_node *n; - printf(">>>>>>>>>>>>>> Assign function call\n"); n = slang_assemble_function_call_name(A, - (const char *) oper->children[1].a_id, - &oper->children[1], &oper->children[0]); + (const char *) oper->children[1].a_id, + &oper->children[1], &oper->children[0]); return n; } else @@ -1077,6 +1072,9 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) c1 = slang_assemble_operation(A, &oper->children[1]); n = new_node(IR_MOVE, c0, c1); + /* + assert(c1->Opcode != IR_SEQ); + */ n->Writemask = mask; return n; } @@ -1148,33 +1146,29 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) /* array dereference */ if (oper->children[1].type == slang_oper_literal_int) { /* compile-time constant index - OK */ - slang_assembly_typeinfo ti; + slang_assembly_typeinfo elem_ti; slang_ir_node *base; - slang_ir_storage *store2; GLint index; - slang_assembly_typeinfo_construct(&ti); - _slang_typeof_operation(A, &oper->children[0], &ti); + + /* get type of array element */ + slang_assembly_typeinfo_construct(&elem_ti); + _slang_typeof_operation(A, oper, &elem_ti); base = slang_assemble_operation(A, &oper->children[0]); assert(base->Opcode == IR_VAR); + assert(base->Store); index = (GLint) oper->children[1].literal[0]; - /* - printf("element[%d]\n", index); - */ -#if 1 - store2 = (slang_ir_storage *) _mesa_calloc(sizeof(*store2)); - *store2 = *base->Store; - base->Store = store2; - base->Store->Size = -15; -#endif - assert(base->Store); + /*printf("element[%d]\n", index);*/ + /* new storage info since we don't want to change the original */ + base->Store = _slang_clone_ir_storage(base->Store); + /* bias Index by array subscript, update storage size */ base->Store->Index += index; - base->Store->Size = 1; + base->Store->Size = _slang_sizeof_type_specifier(&elem_ti.spec); return base; } else { - /* run-time index - TBD */ + /* run-time index - not supported yet - TBD */ abort(); } return NULL; @@ -1192,6 +1186,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); slang_ir_node *sum = new_node(IR_ADD, var, one); slang_ir_node *assign = new_node(IR_MOVE, var, sum); + assert(sum->Opcode != IR_SEQ); return assign; } break; @@ -1233,12 +1228,13 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) return 0; printf("\n*********** Assemble function2(%s)\n", (char*)fun->header.a_name); -#if 0 +#if 1 slang_print_function(fun, 1); #endif A->program->Parameters = _mesa_new_parameter_list(); A->program->Varying = _mesa_new_parameter_list(); + A->codegen = _slang_new_codegen_context(); /*printf("** Begin Simplify\n");*/ slang_simplify(fun->body, &A->space, A->atoms); @@ -1246,11 +1242,11 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) CurFunction = fun; - n = slang_assemble_operation(A, fun->body); - if (!CurFunction->end_label) CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunction_Main"); + n = slang_assemble_operation(A, fun->body); + endLabel = new_label(fun->end_label); n = new_seq(n, endLabel); @@ -1263,14 +1259,13 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); + printf("************* End assemble function2 ************\n\n"); #endif if (_mesa_strcmp((char*) fun->header.a_name, "main") == 0) { - _slang_emit_code(n, A->program); + _slang_emit_code(n, A->codegen, A->program); } - printf("************* End assemble function2 ************\n\n"); - return n; } diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 192f2b086b..28d9fdff7b 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -135,6 +135,17 @@ slang_operation_new(GLuint count) } +/** + * Delete operation and all children + */ +void +slang_operation_delete(slang_operation *oper) +{ + slang_operation_destruct(oper); + _mesa_free(oper); +} + + slang_operation * slang_operation_grow(GLuint *numChildren, slang_operation **children) { diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index f6d0ba85ba..ad52b6690d 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -138,6 +138,9 @@ slang_operation_copy(slang_operation *, const slang_operation *); extern slang_operation * slang_operation_new(GLuint count); +extern void +slang_operation_delete(slang_operation *oper); + extern slang_operation * slang_operation_grow(GLuint *numChildren, slang_operation **children); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 104064fd17..4f7a9dd309 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -130,6 +130,15 @@ _slang_new_ir_storage(enum register_file file, GLint index, GLint size) } +slang_ir_storage * +_slang_clone_ir_storage(slang_ir_storage *store) +{ + slang_ir_storage *clone + = _slang_new_ir_storage(store->File, store->Index, store->Size); + return clone; +} + + static const char * swizzle_string(GLuint swizzle) { @@ -194,10 +203,10 @@ sizeof_struct(const slang_struct *s) } -static GLuint -sizeof_type(const slang_fully_specified_type *t) +GLuint +_slang_sizeof_type_specifier(const slang_type_specifier *spec) { - switch (t->specifier.type) { + switch (spec->type) { case slang_spec_void: abort(); return 0; @@ -240,7 +249,7 @@ sizeof_type(const slang_fully_specified_type *t) abort(); return 0; case slang_spec_struct: - return sizeof_struct(t->specifier._struct); + return sizeof_struct(spec->_struct); case slang_spec_array: return 1; /* XXX */ default: @@ -251,6 +260,14 @@ sizeof_type(const slang_fully_specified_type *t) } + +static GLuint +sizeof_type(const slang_fully_specified_type *t) +{ + return _slang_sizeof_type_specifier(&t->specifier); +} + + #define IND 0 void slang_print_ir(const slang_ir_node *n, int indent) @@ -269,7 +286,7 @@ slang_print_ir(const slang_ir_node *n, int indent) switch (n->Opcode) { case IR_SEQ: #if IND - printf("SEQ store %p\n", (void*) n->Store); + printf("SEQ at %p\n", (void*) n); #endif assert(n->Children[0]); assert(n->Children[1]); @@ -325,12 +342,22 @@ slang_print_ir(const slang_ir_node *n, int indent) static GLint -alloc_temporary(slang_gen_context *gc) +alloc_temporary(slang_gen_context *gc, GLint size) { - GLuint i; + const GLuint sz4 = (size + 3) / 4; + GLuint i, j; + ASSERT(size > 0); /* number of floats */ for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { - if (!gc->TempUsed[i]) { - gc->TempUsed[i] = GL_TRUE; + GLuint found = 0; + for (j = 0; j < sz4; j++) { + if (!gc->TempUsed[i + j]) { + found++; + } + } + if (found == sz4) { + /* found block of size/4 free regs */ + for (j = 0; j < sz4; j++) + gc->TempUsed[i + j] = GL_TRUE; return i; } } @@ -349,10 +376,14 @@ is_temporary(const slang_gen_context *gc, const slang_ir_storage *st) static void -free_temporary(slang_gen_context *gc, GLuint r) +free_temporary(slang_gen_context *gc, GLuint r, GLint size) { - if (gc->TempUsed[r]) - gc->TempUsed[r] = GL_FALSE; + const GLuint sz4 = (size + 3) / 4; + GLuint i; + for (i = 0; i < sz4; i++) { + if (gc->TempUsed[r + i]) + gc->TempUsed[r + i] = GL_FALSE; + } } @@ -589,7 +620,7 @@ slang_alloc_temp_storage(slang_gen_context *gc, slang_ir_node *n, GLint size) assert(!n->Var); assert(!n->Store); assert(size > 0); - indx = alloc_temporary(gc); + indx = alloc_temporary(gc, size); n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, indx, size); } @@ -609,9 +640,12 @@ void slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { - int k = 0; + assert(gc); + assert(n); + assert(prog); + if (!n->Store) { - /**assert(n->Var);**/ + /* allocate storage info for this node */ if (n->Var && n->Var->aux) { /* node storage info = var storage info */ n->Store = (slang_ir_storage *) n->Var->aux; @@ -619,21 +653,19 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, else { /* alloc new storage info */ n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -5); - k = 1; - /*XXX n->Store->Size = sizeof(var's type) */ if (n->Var) n->Var->aux = n->Store; } } if (n->Opcode == IR_VAR_DECL) { - /* allocate storage for a user's variable */ + /* storage declaration */ assert(n->Var); - if (n->Store->Index < 0) { + if (n->Store->Index < 0) { /* XXX assert this? */ assert(gc); n->Store->File = PROGRAM_TEMPORARY; - n->Store->Index = alloc_temporary(gc); n->Store->Size = sizeof_type(&n->Var->type); + n->Store->Index = alloc_temporary(gc, n->Store->Size); printf("alloc var %s storage at %d (size %d)\n", (char *) n->Var->a_name, n->Store->Index, @@ -641,6 +673,7 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, assert(n->Store->Size > 0); n->Var->declared = GL_TRUE; } + assert(n->Store->Size > 0); return; } @@ -649,7 +682,12 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, GLint i; assert(n->Var); - assert(prog); + + if (n->Store->Size < 0) { + /* determine var/storage size now */ + n->Store->Size = sizeof_type(&n->Var->type); + assert(n->Store->Size > 0); + } #if 0 assert(n->Var->declared || @@ -665,7 +703,6 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (i >= 0) { n->Store->File = PROGRAM_INPUT; n->Store->Index = i; - n->Store->Size = sizeof_type(&n->Var->type); assert(n->Store->Size > 0); prog->InputsRead |= (1 << i); return; @@ -675,7 +712,6 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (i >= 0) { n->Store->File = PROGRAM_OUTPUT; n->Store->Index = i; - n->Store->Size = sizeof_type(&n->Var->type); prog->OutputsWritten |= (1 << i); return; } @@ -684,7 +720,6 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (i >= 0) { n->Store->File = PROGRAM_STATE_VAR; n->Store->Index = i; - n->Store->Size = sizeof_type(&n->Var->type); return; } @@ -692,7 +727,6 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (i >= 0) { n->Store->File = PROGRAM_CONSTANT; n->Store->Index = i; - n->Store->Size = sizeof_type(&n->Var->type); return; } @@ -702,7 +736,6 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (i >= 0) { n->Store->File = PROGRAM_UNIFORM; n->Store->Index = i; - n->Store->Size = sizeof_type(&n->Var->type); return; } } @@ -717,27 +750,17 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, #else n->Store->File = PROGRAM_VARYING; #endif - n->Store->Size = sizeof_type(&n->Var->type); n->Store->Index = i; return; } } - /* what is this?!? */ - /* - abort(); - */ - } - - if (n->Store->File == PROGRAM_TEMPORARY && n->Store->Index < 0) { - /* unnamed intermediate temporary */ - if (gc) - n->Store->Index = alloc_temporary(gc); - return; - } - - if (gc && n->Store->File == PROGRAM_UNDEFINED && n->Store->Size < 0) { - abort(); + if (n->Store->File == PROGRAM_UNDEFINED && n->Store->Index < 0) { + /* ordinary local var */ + assert(n->Store->Size > 0); + n->Store->File = PROGRAM_TEMPORARY; + n->Store->Index = alloc_temporary(gc, n->Store->Size); + } } } @@ -755,6 +778,7 @@ alloc_constant(const GLfloat v[], GLuint size, struct gl_program *prog) /** * Swizzle a swizzle. */ +#if 0 static GLuint swizzle_compose(GLuint swz1, GLuint swz2) { @@ -766,6 +790,7 @@ swizzle_compose(GLuint swz1, GLuint swz2) swz = MAKE_SWIZZLE4(s[0], s[1], s[2], s[3]); return swz; } +#endif /** @@ -783,6 +808,7 @@ storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st, }; dst->File = st->File; dst->Index = st->Index; + assert(st->File != PROGRAM_UNDEFINED); assert(st->Size >= 1); assert(st->Size <= 4); dst->WriteMask = defaultWritemask[st->Size - 1] & writemask; @@ -805,6 +831,7 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st, src->File = st->File; src->Index = st->Index; + assert(st->File != PROGRAM_UNDEFINED); assert(st->Size >= 1); assert(st->Size <= 4); /* XXX swizzling logic here may need some work */ @@ -945,7 +972,8 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) * Just modify the RHS to put its result into the dest of this * MOVE operation. Then, this MOVE is a no-op. */ - free_temporary(gc, n->Children[1]->Store->Index); + free_temporary(gc, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); @@ -954,14 +982,40 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) else #endif { - inst = new_instruction(prog, OPCODE_MOV); - storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, - n->Children[1]->Swizzle); +#if 1 + if (n->Children[0]->Store->Size > 4) { + /* move matrix/struct etc */ + slang_ir_storage dstStore = *n->Children[0]->Store; + slang_ir_storage srcStore = *n->Children[1]->Store; + GLint size = srcStore.Size; + ASSERT(n->Children[0]->Writemask == WRITEMASK_XYZW); + ASSERT(n->Children[1]->Swizzle == SWIZZLE_NOOP); + dstStore.Size = 4; + srcStore.Size = 4; + while (size >= 4) { + inst = new_instruction(prog, OPCODE_MOV); + inst->Comment = _mesa_strdup("IR_MOVE block"); + storage_to_dst_reg(&inst->DstReg, &dstStore, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], &srcStore, + n->Children[1]->Swizzle); + srcStore.Index++; + dstStore.Index++; + size -= 4; + } + } + else +#endif + { + inst = new_instruction(prog, OPCODE_MOV); + storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, + n->Children[1]->Swizzle); + } if (n->Children[1]->Store->File == PROGRAM_TEMPORARY) { - free_temporary(gc, n->Children[1]->Store->Index); + free_temporary(gc, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); } - inst->Comment = n->Comment; + /*inst->Comment = _mesa_strdup("IR_MOVE");*/ n->Store = n->Children[0]->Store; /*XXX new */ return inst; } @@ -1012,14 +1066,24 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) } +slang_gen_context * +_slang_new_codegen_context(void) +{ + slang_gen_context *gc = (slang_gen_context *) _mesa_calloc(sizeof(*gc)); + return gc; +} + + GLboolean -_slang_emit_code(slang_ir_node *n, struct gl_program *prog) +_slang_emit_code(slang_ir_node *n, slang_gen_context *gc, + struct gl_program *prog) { - slang_gen_context *gc; /*GET_CURRENT_CONTEXT(ctx);*/ - gc = (slang_gen_context *) _mesa_calloc(sizeof(*gc)); + /* + gc = _slang_new_codegen_context(); + */ printf("************ Begin generate code\n"); diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 1683542b90..8ac17e6c82 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -32,9 +32,8 @@ #include "mtypes.h" -typedef struct { - GLboolean TempUsed[MAX_PROGRAM_TEMPS]; -} slang_gen_context; +extern slang_gen_context * +_slang_new_codegen_context(void); extern void @@ -45,12 +44,21 @@ extern slang_ir_storage * _slang_new_ir_storage(enum register_file file, GLint index, GLint size); +extern slang_ir_storage * +_slang_clone_ir_storage(slang_ir_storage *store); + + +extern GLuint +_slang_sizeof_type_specifier(const slang_type_specifier *spec); + + extern void slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog); extern GLboolean -_slang_emit_code(slang_ir_node *n, struct gl_program *prog); +_slang_emit_code(slang_ir_node *n, slang_gen_context *gc, + struct gl_program *prog); #endif /* SLANG_EMIT_H */ diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 9fa5399e53..50e62d89de 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -320,18 +320,6 @@ _slang_link2(GLcontext *ctx, linked->FragmentProgram = (struct gl_fragment_program *) _mesa_clone_program(ctx, &fragProg->Base); -#if 1 - printf("************** orig fragment program\n"); - _mesa_print_program(&fragProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); -#endif - -#if 1 - printf("************** orig vertex program\n"); - _mesa_print_program(&vertProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); -#endif - link_varying_vars(linked, &linked->VertexProgram->Base); link_varying_vars(linked, &linked->FragmentProgram->Base); @@ -345,10 +333,22 @@ _slang_link2(GLcontext *ctx, linked->FragmentProgram->Base.Parameters = linked->Uniforms; #if 1 - printf("************** linked/cloned frag prog\n"); + printf("************** original fragment program\n"); + _mesa_print_program(&fragProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); +#endif +#if 1 + printf("************** linked fragment prog\n"); _mesa_print_program(&linked->FragmentProgram->Base); _mesa_print_program_parameters(ctx, &linked->FragmentProgram->Base); - printf("************** linked/cloned vert prog\n"); +#endif +#if 1 + printf("************** original vertex program\n"); + _mesa_print_program(&vertProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); +#endif +#if 1 + printf("************** linked vertex prog\n"); _mesa_print_program(&linked->VertexProgram->Base); _mesa_print_program_parameters(ctx, &linked->VertexProgram->Base); #endif -- cgit v1.2.3 From 9b00fa9ac24cb5c2e8740dac4b8c2c28e6b861f5 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 15:36:09 -0700 Subject: code movement --- src/mesa/shader/slang/slang_codegen.c | 92 +++++++++++++++++------------------ src/mesa/shader/slang/slang_emit.c | 5 +- 2 files changed, 47 insertions(+), 50 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index acca05df80..611b6145f5 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -52,6 +52,52 @@ static slang_ir_node * slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper); +/** + * Map "_asm foo" to IR_FOO, etc. + */ +typedef struct +{ + const char *Name; + slang_ir_opcode Opcode; + GLuint HaveRetValue, NumParams; +} slang_asm_info; + + +static slang_asm_info AsmInfo[] = { + /* vec4 binary op */ + { "vec4_add", IR_ADD, 1, 2 }, + { "vec4_multiply", IR_MUL, 1, 2 }, + { "vec4_dot", IR_DOT4, 1, 2 }, + { "vec3_dot", IR_DOT3, 1, 2 }, + { "vec3_cross", IR_CROSS, 1, 2 }, + { "vec4_min", IR_MIN, 1, 2 }, + { "vec4_max", IR_MAX, 1, 2 }, + { "vec4_seq", IR_SEQ, 1, 2 }, + { "vec4_sge", IR_SGE, 1, 2 }, + { "vec4_sgt", IR_SGT, 1, 2 }, + /* vec4 unary */ + { "vec4_floor", IR_FLOOR, 1, 1 }, + { "vec4_frac", IR_FRAC, 1, 1 }, + { "vec4_abs", IR_ABS, 1, 1 }, + /* float binary op */ + { "float_add", IR_ADD, 1, 2 }, + { "float_subtract", IR_SUB, 1, 2 }, + { "float_multiply", IR_MUL, 1, 2 }, + { "float_divide", IR_DIV, 1, 2 }, + { "float_power", IR_POW, 1, 2 }, + /* unary op */ + { "int_to_float", IR_I_TO_F, 1, 1 }, + { "float_exp", IR_EXP, 1, 1 }, + { "float_exp2", IR_EXP2, 1, 1 }, + { "float_log2", IR_LOG2, 1, 1 }, + { "float_rsq", IR_RSQ, 1, 1 }, + { "float_rcp", IR_RCP, 1, 1 }, + { "float_sine", IR_SIN, 1, 1 }, + { "float_cosine", IR_COS, 1, 1 }, + { NULL, IR_NOP, 0, 0 } +}; + + static slang_ir_node * new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) @@ -739,52 +785,6 @@ slang_assemble_function_call(slang_assemble_ctx *A, slang_function *fun, } -/** - * Map "_asm foo" to IR_FOO, etc. - */ -typedef struct -{ - const char *Name; - slang_ir_opcode Opcode; - GLuint HaveRetValue, NumParams; -} slang_asm_info; - - -static slang_asm_info AsmInfo[] = { - /* vec4 binary op */ - { "vec4_add", IR_ADD, 1, 2 }, - { "vec4_multiply", IR_MUL, 1, 2 }, - { "vec4_dot", IR_DOT4, 1, 2 }, - { "vec3_dot", IR_DOT3, 1, 2 }, - { "vec3_cross", IR_CROSS, 1, 2 }, - { "vec4_min", IR_MIN, 1, 2 }, - { "vec4_max", IR_MAX, 1, 2 }, - { "vec4_seq", IR_SEQ, 1, 2 }, - { "vec4_sge", IR_SGE, 1, 2 }, - { "vec4_sgt", IR_SGT, 1, 2 }, - /* vec4 unary */ - { "vec4_floor", IR_FLOOR, 1, 1 }, - { "vec4_frac", IR_FRAC, 1, 1 }, - { "vec4_abs", IR_ABS, 1, 1 }, - /* float binary op */ - { "float_add", IR_ADD, 1, 2 }, - { "float_subtract", IR_SUB, 1, 2 }, - { "float_multiply", IR_MUL, 1, 2 }, - { "float_divide", IR_DIV, 1, 2 }, - { "float_power", IR_POW, 1, 2 }, - /* unary op */ - { "int_to_float", IR_I_TO_F, 1, 1 }, - { "float_exp", IR_EXP, 1, 1 }, - { "float_exp2", IR_EXP2, 1, 1 }, - { "float_log2", IR_LOG2, 1, 1 }, - { "float_rsq", IR_RSQ, 1, 1 }, - { "float_rcp", IR_RCP, 1, 1 }, - { "float_sine", IR_SIN, 1, 1 }, - { "float_cosine", IR_COS, 1, 1 }, - { NULL, IR_NOP, 0, 0 } -}; - - static slang_asm_info * slang_find_asm_info(const char *name) { diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 4f7a9dd309..8b95b94698 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -982,7 +982,6 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) else #endif { -#if 1 if (n->Children[0]->Store->Size > 4) { /* move matrix/struct etc */ slang_ir_storage dstStore = *n->Children[0]->Store; @@ -1003,9 +1002,7 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) size -= 4; } } - else -#endif - { + else { inst = new_instruction(prog, OPCODE_MOV); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, -- cgit v1.2.3 From fa8059a89c91405615c0e0f73b2c469ccb27fb91 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 15:36:29 -0700 Subject: fix double-printing of comment info --- src/mesa/shader/prog_print.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 7bc5016987..b34bbbd482 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -208,9 +208,6 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, _mesa_printf(", "); } - if (inst->Comment) - _mesa_printf(" # %s", inst->Comment); - print_comment(inst); } -- cgit v1.2.3 From f167d0e7d588ab65067ab2e7499664ebc5ab02ec Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 15:37:32 -0700 Subject: added assertion to catch use of too many temporaries --- src/mesa/tnl/t_vb_arbprogram.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index c59d98e118..1f17a7e389 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -832,6 +832,7 @@ static struct reg cvp_load_reg( struct compilation *cp, switch (file) { case PROGRAM_TEMPORARY: + assert(REG_TMP0 + index <= REG_TMP11); return cvp_make_reg(FILE_REG, REG_TMP0 + index); case PROGRAM_INPUT: -- cgit v1.2.3 From cb7ccc4b144e546239294ae754aa634bbebc4c62 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 16:47:42 -0700 Subject: start rewriting the matrix/vector functions --- src/mesa/shader/slang/library/slang_core.gc | 166 +++++++++----- src/mesa/shader/slang/library/slang_core_gc.h | 298 +++++++++++++------------- 2 files changed, 260 insertions(+), 204 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index e94fa20a7f..00d5916150 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -265,6 +265,10 @@ bvec4 __constructor (const int i) { return bvec4 (bool (i)); } + + +//// mat2 constructors + mat2 __constructor (const float f) { return mat2 (f, 0.0, 0.0, f); } @@ -279,6 +283,9 @@ mat2 __constructor (const bool b) { return mat2 (b ? 1.0 : 0.0); } + +//// mat3 constructors + mat3 __constructor (const float f) { return mat3 (f, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, f); } @@ -293,6 +300,9 @@ mat3 __constructor (const bool b) { return mat3 (b ? 1.0 : 0.0); } + +//// mat4 constructors + mat4 __constructor (const float f) { return mat4 (f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f); } @@ -307,7 +317,6 @@ mat4 __constructor (const bool b) { return mat4 (b ? 1.0 : 0.0); } - mat4 __constructor (const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) { __retVal[0] = r0; @@ -553,6 +562,9 @@ vec2 __operator * (const mat2 m, const vec2 v) { ); } + + + mat2 __operator * (const mat2 m, const mat2 n) { return mat2 (m * n[0], m * n[1]); } @@ -578,7 +590,6 @@ void __operator -= (inout mat3 m, const mat3 n) { m[2] -= n[2]; } -//bp: vec3 __operator * (const mat3 m, const vec3 v) { vec3 r1, r2, r3; @@ -626,7 +637,6 @@ void __operator -= (inout mat4 m, const mat4 n) { - //// dot (formerly in slang_common_builtin.gc) float dot(const float a, const float b) @@ -859,33 +869,26 @@ void __operator *= (inout vec3 v, const mat3 m) { v = v * m; } -vec4 __operator * (const vec4 v, const mat4 m) { - return vec4 ( - v.x * m[0].x + v.y * m[0].y + v.z * m[0].z + v.w * m[0].w, - v.x * m[1].x + v.y * m[1].y + v.z * m[1].z + v.w * m[1].w, - v.x * m[2].x + v.y * m[2].y + v.z * m[2].z + v.w * m[2].w, - v.x * m[3].x + v.y * m[3].y + v.z * m[3].z + v.w * m[3].w -//bp: -// dot(v, m[0]), -// dot(v, m[1]), -// dot(v, m[2]), -// dot(v, m[3]) - ); + +vec4 __operator * (const vec4 v, const mat4 m) +{ + __retVal.x = dot(v, m[0]); + __retVal.y = dot(v, m[1]); + __retVal.z = dot(v, m[2]); + __retVal.w = dot(v, m[3]); } void __operator *= (inout vec4 v, const mat4 m) { v = v * m; } -float __operator - (const float a, const float b) { -// float c; -// __asm float_negate c, b; -// __asm float_add c, a, c; -// return c; -//bp: - __asm float_subtract __retVal, a, b; + +float __operator - (const float a, const float b) +{ + __asm vec4_subtract __retVal.x, a, b; } + int __operator + (const int a, const int b) { float x, y; int c; @@ -927,59 +930,90 @@ int __operator / (const int a, const int b) { return c; } -vec2 __operator + (const vec2 v, const vec2 u) { - return vec2 (v.x + u.x, v.y + u.y); + + +//// vec2 +,-,*,/ + +vec2 __operator + (const vec2 v, const vec2 u) +{ + __asm vec4_add __retVal.xy, v, u; } -vec2 __operator - (const vec2 v, const vec2 u) { - return vec2 (v.x - u.x, v.y - u.y); +vec2 __operator - (const vec2 v, const vec2 u) +{ + __asm vec4_subtract __retVal.xy, v, u; } -vec2 __operator * (const vec2 v, const vec2 u) { - return vec2 (v.x * u.x, v.y * u.y); +vec2 __operator * (const vec2 v, const vec2 u) +{ + __asm vec4_multiply __retVal.xy, v, u; } -vec2 __operator / (const vec2 v, const vec2 u) { - return vec2 (v.x / u.x, v.y / u.y); +vec2 __operator / (const vec2 v, const vec2 u) +{ + vec2 w; // = 1 / u + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm vec4_multiply __retVal.xy, v, w; } -vec3 __operator + (const vec3 v, const vec3 u) { - return vec3 (v.x + u.x, v.y + u.y, v.z + u.z); + +//// vec3 +,-,*,/ + +vec3 __operator + (const vec3 v, const vec3 u) +{ + __asm vec4_add __retVal.xyz, v, u; } -vec3 __operator - (const vec3 v, const vec3 u) { - return vec3 (v.x - u.x, v.y - u.y, v.z - u.z); +vec3 __operator - (const vec3 v, const vec3 u) +{ + __asm vec4_subtract __retVal.xyz, v, u; } -vec3 __operator * (const vec3 v, const vec3 u) { - return vec3 (v.x * u.x, v.y * u.y, v.z * u.z); +vec3 __operator * (const vec3 v, const vec3 u) +{ + __asm vec4_multiply __retVal.xyz, v, u; } -vec3 __operator / (const vec3 v, const vec3 u) { - return vec3 (v.x / u.x, v.y / u.y, v.z / u.z); +vec3 __operator / (const vec3 v, const vec3 u) +{ + vec3 w; // = 1 / u + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm float_rcp w.z, u.z; + __asm vec4_multiply __retVal.xyz, v, w; } -vec4 __operator + (const vec4 vadd, const vec4 uadd) { -// return vec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w); -//bp: - __asm vec4_add __retVal, vadd, uadd; + +//// vec4 +,-,*,/ + +vec4 __operator + (const vec4 v, const vec4 u) +{ + __asm vec4_add __retVal, v, u; } -vec4 __operator - (const vec4 v, const vec4 u) { - return vec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w); +vec4 __operator - (const vec4 v, const vec4 u) +{ + __asm vec4_subtract __retVal, v, u; } -vec4 __operator * (const vec4 v, const vec4 u) { -// return vec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w); -// return v; -//bp: +vec4 __operator * (const vec4 v, const vec4 u) +{ __asm vec4_multiply __retVal, v, u; } -vec4 __operator / (const vec4 v, const vec4 u) { - return vec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w); +vec4 __operator / (const vec4 v, const vec4 u) +{ + vec4 w; // = 1 / u + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm float_rcp w.z, u.z; + __asm float_rcp w.w, u.w; + __asm vec4_multiply __retVal, v, w; } + + ivec2 __operator + (const ivec2 v, const ivec2 u) { return ivec2 (v.x + u.x, v.y + u.y); } @@ -1040,16 +1074,26 @@ mat2 __operator / (const mat2 m, const mat2 n) { return mat2 (m[0] / n[0], m[1] / n[1]); } -mat3 __operator + (const mat3 m, const mat3 n) { - return mat3 (m[0] + n[0], m[1] + n[1], m[2] + n[2]); + +mat3 __operator + (const mat3 m, const mat3 n) +{ + __retVal[0] = m[0] + n[0]; + __retVal[1] = m[1] + n[1]; + __retVal[2] = m[2] + n[2]; } -mat3 __operator - (const mat3 m, const mat3 n) { - return mat3 (m[0] - n[0], m[1] - n[1], m[2] - n[2]); +mat3 __operator - (const mat3 m, const mat3 n) +{ + __retVal[0] = m[0] - n[0]; + __retVal[1] = m[1] - n[1]; + __retVal[2] = m[2] - n[2]; } -mat3 __operator / (const mat3 m, const mat3 n) { - return mat3 (m[0] / n[0], m[1] / n[1], m[2] / n[2]); +mat3 __operator / (const mat3 m, const mat3 n) +{ + __retVal[0] = m[0] / n[0]; + __retVal[0] = m[1] / n[1]; + __retVal[0] = m[2] / n[2]; } @@ -1069,8 +1113,14 @@ mat4 __operator - (const mat4 m, const mat4 n) __retVal[3] = m[3] - n[3]; } -mat4 __operator / (const mat4 m, const mat4 n) { - return mat4 (m[0] / n[0], m[1] / n[1], m[2] / n[2], m[3] / n[3]); + + +mat4 __operator / (const mat4 m, const mat4 n) +{ + __retVal[0] = m[0] / n[0]; + __retVal[0] = m[1] / n[1]; + __retVal[0] = m[2] / n[2]; + __retVal[0] = m[3] / n[3]; } vec2 __operator + (const float a, const vec2 u) { diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index c8ee9bc479..64c007142e 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -230,154 +230,160 @@ 57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18, 109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0, 59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, -0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,8,58, -118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16, -8,48,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,18,118,0,59,119,0, -18,109,0,16,8,48,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118, -0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0,57,59,122,0, -48,46,18,118,0,59,119,0,18,109,0,16,10,49,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10, -50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18, -109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,50,0,57,59,119,0,48,46,0,18, -118,0,59,120,0,18,109,0,16,10,51,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,51,0,57,59,121, -0,48,46,18,118,0,59,122,0,18,109,0,16,10,51,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,10, -51,0,57,59,119,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0, -18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5, +0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10, +51,0,57,0,0,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48, +20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0, +0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111, +95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102, +108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5, 97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116, 111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116, -0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4, -102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1, -0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95, -116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0, -0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116, -95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5, -98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18, -98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0, -0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2, -22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0, -18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8, -18,99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120, -0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0, -0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59, -121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101, -99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1, -0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59, -120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117, -0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0, -11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, -117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1, -1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0, -18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0, -1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, -0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,12,2,26,1,1,0,12,118, -97,100,100,0,0,1,1,0,12,117,97,100,100,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,97,100,100,0,0,18,117,97,100,100,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1, -0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0, -18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119, -0,47,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0, -12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18, -118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0, -18,117,0,59,119,0,49,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50, -0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2, -27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120, -0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0, -1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59, -121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0, -59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7, -118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18, -118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1, -1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47, -0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2, -21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120, -0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0, -7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59, -120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0, -1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0, -59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18, -118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0, -47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8, -2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18, -118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, -49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0, -13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13, -109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110, -0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, -116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1, -1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,0, -1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57, -18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46, -20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15, -109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, -49,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10, -117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0, -0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0, -46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118, -101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0, -10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121, -0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0, -18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0, -0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0, -49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, -101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0, -9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0, -59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, -8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122, -0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0, -18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11, -2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18, -118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0, -11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, -18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20, -0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0, -49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118, -0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98, -0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58, -118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59, -122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8, -58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0, -18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1, -8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117, -0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0, -1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59, -122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0, -0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0, -18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9, -98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2, -22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0, -18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12, -2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18, -118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1, -0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1, -0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0, +4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95, +116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98, +0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, +97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, +0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0, +4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1, +1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116, +95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111, +97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18, +120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18, +99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1, +1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2, +26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0, +0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, +0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, +12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1, +3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0, +0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, +59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118, +0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0, +6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18, +118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, +49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120, +0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59, +122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, +59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117, +0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, +118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0, +18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, +0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59, +122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, +99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, +59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8, +118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, +118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0, +18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, +0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, +122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118, +0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, +59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117, +0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0, +0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1, +1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1, +0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0, +16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0, +14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, +0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1, +1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0, +46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, +18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1, +8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2, +27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118, +0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0, +18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1, +1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48, +0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, +120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, +58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26, +1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18, +117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0, +18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0, +1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47, +0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1, +1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0, +48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48, +20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59, +120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0, +11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121, +0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0, +1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18, +117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117, +0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0, +18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, +118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0, +12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, +18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, +0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0, +18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0, +1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49, +0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0, +0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0, +57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1, +8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, +1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, 47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, 58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, 0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -- cgit v1.2.3 From a4be1048870446a45a4a14178b47e2cb1a0d92d6 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Dec 2006 17:05:53 -0700 Subject: start implementing relational operators --- src/mesa/shader/slang/slang_codegen.c | 24 +++++++++++++++++++++++- src/mesa/shader/slang/slang_emit.c | 33 +++++++++++++++++---------------- src/mesa/shader/slang/slang_ir.h | 1 - 3 files changed, 40 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 611b6145f5..f62ff01f2d 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -963,10 +963,32 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) ); } break; + case slang_oper_equal: + return new_node(IR_SEQUAL, + slang_assemble_operation(A, &oper->children[0]), + slang_assemble_operation(A, &oper->children[1])); + case slang_oper_notequal: + return new_node(IR_SNEQUAL, + slang_assemble_operation(A, &oper->children[0]), + slang_assemble_operation(A, &oper->children[1])); + case slang_oper_greater: + return new_node(IR_SGT, + slang_assemble_operation(A, &oper->children[0]), + slang_assemble_operation(A, &oper->children[1])); case slang_oper_less: - return new_node(IR_LESS, + /* child[0] < child[1] ----> child[1] > child[0] */ + return new_node(IR_SGT, + slang_assemble_operation(A, &oper->children[1]), + slang_assemble_operation(A, &oper->children[0])); + case slang_oper_greaterequal: + return new_node(IR_SGE, slang_assemble_operation(A, &oper->children[0]), slang_assemble_operation(A, &oper->children[1])); + case slang_oper_lessequal: + /* child[0] <= child[1] ----> child[1] >= child[0] */ + return new_node(IR_SGE, + slang_assemble_operation(A, &oper->children[1]), + slang_assemble_operation(A, &oper->children[0])); case slang_oper_add: { slang_ir_node *n; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 8b95b94698..3d9d525e18 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -87,7 +87,6 @@ static slang_ir_info IrInfo[] = { { IR_CJUMP, "IR_CJUMP", 0, 0, 0 }, { IR_CALL, "IR_CALL", 0, 0, 0 }, { IR_MOVE, "IR_MOVE", 0, 0, 1 }, - { IR_LESS, "IR_LESS", 0, 1, 2 }, { IR_NOT, "IR_NOT", 0, 1, 1 }, { IR_VAR, "IR_VAR", 0, 0, 0 }, { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, @@ -866,21 +865,23 @@ new_instruction(struct gl_program *prog, gl_inst_opcode opcode) static struct prog_instruction * -gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog); +emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog); /** * Generate code for a simple binary-op instruction. */ static struct prog_instruction * -gen_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); assert(info); - gen(gc, n->Children[0], prog); - gen(gc, n->Children[1], prog); + assert(info->InstOpcode != OPCODE_NOP); + + emit(gc, n->Children[0], prog); + emit(gc, n->Children[1], prog); inst = new_instruction(prog, info->InstOpcode); /* alloc temp storage for the result: */ if (!n->Store || n->Store->File == PROGRAM_UNDEFINED) { @@ -901,7 +902,7 @@ gen_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -gen_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); @@ -909,7 +910,7 @@ gen_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) assert(info->NumParams == 1); - gen(gc, n->Children[0], prog); + emit(gc, n->Children[0], prog); inst = new_instruction(prog, info->InstOpcode); /*slang_resolve_storage(gc, n, prog);*/ @@ -929,7 +930,7 @@ gen_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; if (!n) @@ -939,8 +940,8 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_SEQ: assert(n->Children[0]); assert(n->Children[1]); - gen(gc, n->Children[0], prog); - inst = gen(gc, n->Children[1], prog); + emit(gc, n->Children[0], prog); + inst = emit(gc, n->Children[1], prog); n->Store = n->Children[1]->Store; return inst; break; @@ -962,9 +963,9 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_MOVE: /* rhs */ assert(n->Children[1]); - inst = gen(gc, n->Children[1], prog); + inst = emit(gc, n->Children[1], prog); /* lhs */ - gen(gc, n->Children[0], prog); + emit(gc, n->Children[0], prog); #if 1 if (inst && is_temporary(gc, n->Children[1]->Store)) { @@ -1032,7 +1033,7 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_POW: case IR_EXP: case IR_EXP2: - return gen_binop(gc, n, prog); + return emit_binop(gc, n, prog); break; case IR_RSQ: case IR_RCP: @@ -1041,7 +1042,7 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_ABS: case IR_SIN: case IR_COS: - return gen_unop(gc, n, prog); + return emit_unop(gc, n, prog); break; case IR_LABEL: /*printf("LAB: %s\n", n->Target);*/ @@ -1056,7 +1057,7 @@ gen(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) n->Store = alloc_constant(n->Value, 4, prog); /*XXX fix size */ break; default: - printf("gen: ?\n"); + printf("emit: ?\n"); abort(); } return NULL; @@ -1084,7 +1085,7 @@ _slang_emit_code(slang_ir_node *n, slang_gen_context *gc, printf("************ Begin generate code\n"); - gen(gc, n, prog); + (void) emit(gc, n, prog); { struct prog_instruction *inst; diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 3c583365d8..5c054a5636 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -74,7 +74,6 @@ typedef enum IR_ABS, IR_SIN, IR_COS, - IR_LESS, IR_NOT, IR_VAR, IR_VAR_DECL, -- cgit v1.2.3 From b456413d7644978bf7bd40d9c1bcba83f637f685 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 Dec 2006 12:50:51 -0700 Subject: cases for NOP, BRA --- src/mesa/tnl/t_vb_arbprogram.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 1f17a7e389..ef7b9eaa6c 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -1026,6 +1026,13 @@ static void cvp_emit_inst( struct compilation *cp, } break; + case OPCODE_NOP: + break; + + case OPCODE_BRA: + /* XXX implement */ + break; + default: result = cvp_choose_result( cp, &inst->DstReg, &fixup ); nr_args = _mesa_num_inst_src_regs(inst->Opcode); -- cgit v1.2.3 From 3e1f4bc15be920365a548f64cae6bff1c5ed3ec5 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 Dec 2006 12:51:12 -0700 Subject: added cases for BRA, NOP --- src/mesa/shader/nvvertexec.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 305d028249..75dfd7383c 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -816,6 +816,11 @@ _mesa_exec_vertex_program(GLcontext *ctx, case OPCODE_END: ctx->_CurrentProgram = 0; return; + case OPCODE_BRA: + /* XXX implement */ + /* FALLTHROUGH */ + case OPCODE_NOP: + break; default: /* bad instruction opcode */ _mesa_problem(ctx, "Bad VP Opcode in _mesa_exec_vertex_program"); -- cgit v1.2.3 From 3a2815370d26012b41d742540237985a333b6ae4 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 Dec 2006 12:51:34 -0700 Subject: print BRA instructions --- src/mesa/shader/prog_print.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index b34bbbd482..7e2e1b22c4 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -77,6 +77,9 @@ program_file_string(enum register_file f) /** * Return a string representation of the given swizzle word. * If extended is true, use extended (comma-separated) format. + * \param swizzle the swizzle field + * \param negateBase 4-bit negation vector + * \param extended if true, also allow 0, 1 values */ static const char * swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended) @@ -147,6 +150,25 @@ writemask_string(GLuint writeMask) return s; } + +static const char * +condcode_string(GLuint condcode) +{ + switch (condcode) { + case COND_GT: return "GT"; + case COND_EQ: return "EQ"; + case COND_LT: return "LT"; + case COND_UN: return "UN"; + case COND_GE: return "GE"; + case COND_LE: return "LE"; + case COND_NE: return "NE"; + case COND_TR: return "TR"; + case COND_FL: return "FL"; + default: return "cond???"; + } +} + + static void print_dst_reg(const struct prog_dst_register *dstReg) { @@ -273,7 +295,10 @@ _mesa_print_instruction(const struct prog_instruction *inst) print_comment(inst); break; case OPCODE_BRA: - _mesa_printf("BRA %u", inst->BranchTarget); + _mesa_printf("BRA %u (%s.%s)", + inst->BranchTarget, + condcode_string(inst->DstReg.CondMask), + swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); print_comment(inst); break; case OPCODE_CAL: @@ -284,6 +309,10 @@ _mesa_print_instruction(const struct prog_instruction *inst) _mesa_printf("END"); print_comment(inst); break; + case OPCODE_NOP: + _mesa_printf("NOP"); + print_comment(inst); + break; /* XXX may need other special-case instructions */ default: /* typical alu instruction */ -- cgit v1.2.3 From f7159552ae12f6a47641f3325c9ece6f1c052feb Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 Dec 2006 12:52:19 -0700 Subject: Initial code for conditional constructs. --- src/mesa/shader/slang/slang_codegen.c | 67 +++++++++++++++++++++++++++-------- src/mesa/shader/slang/slang_emit.c | 28 +++++++++++++-- 2 files changed, 79 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index f62ff01f2d..2f2b2b2a4e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -931,13 +931,13 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) /* list of operations */ assert(oper->num_children > 0); { - slang_ir_node *n, *first = NULL; + slang_ir_node *n, *tree = NULL; GLuint i; for (i = 0; i < oper->num_children; i++) { n = slang_assemble_operation(A, &oper->children[i]); - first = first ? new_seq(first, n) : n; + tree = tree ? new_seq(tree, n) : n; } - return first; + return tree; } break; case slang_oper_expression: @@ -945,6 +945,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) break; case slang_oper_while: { + slang_ir_node *tree; slang_ir_node *nStartLabel = new_label("while-start"); slang_ir_node *nCond = slang_assemble_operation(A, &oper->children[0]); slang_ir_node *nNotCond = new_node(IR_NOT, nCond, NULL); @@ -953,14 +954,13 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *nCJump = new_cjump(nNotCond, "while-end"); slang_ir_node *nJump = new_jump("while-start"); - return new_seq(nStartLabel, - new_seq(nCJump, - new_seq(nBody, - new_seq(nJump, - nEndLabel) - ) - ) - ); + tree = new_seq(nStartLabel, nCond); + tree = new_seq(tree, nNotCond); + tree = new_seq(tree, nBody); + tree = new_seq(tree, nEndLabel); + tree = new_seq(tree, nCJump); + tree = new_seq(tree, nJump); + return tree; } break; case slang_oper_equal: @@ -977,9 +977,20 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_assemble_operation(A, &oper->children[1])); case slang_oper_less: /* child[0] < child[1] ----> child[1] > child[0] */ +#if 0 + { + slang_ir_node *n; + assert(oper->num_children == 2); + /* XXX tranpose children */ + n = slang_assemble_function_call_name(A, "<", oper, NULL); + return n; + } +#else + /** the operands must be ints or floats, not vectors */ return new_node(IR_SGT, slang_assemble_operation(A, &oper->children[1]), slang_assemble_operation(A, &oper->children[0])); +#endif case slang_oper_greaterequal: return new_node(IR_SGE, slang_assemble_operation(A, &oper->children[0]), @@ -1101,6 +1112,15 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } break; + case slang_oper_mulassign: + { + slang_ir_node *n; + assert(oper->num_children == 2); + /* XXX tranpose children */ + n = slang_assemble_function_call_name(A, "*=", oper, NULL); + return n; + } + break; case slang_oper_asm: return slang_assemble_asm(A, oper, NULL); case slang_oper_call: @@ -1124,6 +1144,25 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } break; + case slang_oper_if: + { + slang_ir_node *cond, *bra, *body, *endif, *tree; + + cond = slang_assemble_operation(A, &oper->children[0]); + /*assert(cond->Store);*/ + bra = new_node(IR_CJUMP, NULL, NULL); + bra->Target = _mesa_strdup("__endif"); + + body = slang_assemble_operation(A, &oper->children[1]); + + endif = new_label("__endif"); + + tree = new_seq(cond, bra); + tree = new_seq(tree, body); + tree = new_seq(tree, endif); + return tree; + } + break; case slang_oper_field: { slang_assembly_typeinfo ti; @@ -1214,13 +1253,13 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) break; case slang_oper_sequence: { - slang_ir_node *top = NULL; + slang_ir_node *tree = NULL; GLuint i; for (i = 0; i < oper->num_children; i++) { slang_ir_node *n = slang_assemble_operation(A, &oper->children[i]); - top = top ? new_seq(top, n) : n; + tree = tree ? new_seq(tree, n) : n; } - return top; + return tree; } break; case slang_oper_none: diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 3d9d525e18..fbee314d24 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -929,6 +929,29 @@ emit_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) } +static struct prog_instruction * +emit_label(const char *target, struct gl_program *prog) +{ + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_NOP); + inst->Comment = _mesa_strdup(target); + return inst; +} + + +static struct prog_instruction * +emit_cjump(const char *target, struct gl_program *prog) +{ + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_BRA); + inst->DstReg.CondMask = COND_EQ; /* branch if equal to zero */ + inst->DstReg.CondSwizzle = SWIZZLE_X; + inst->Comment = _mesa_strdup(target); + return inst; +} + + + static struct prog_instruction * emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { @@ -1045,8 +1068,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) return emit_unop(gc, n, prog); break; case IR_LABEL: - /*printf("LAB: %s\n", n->Target);*/ - break; + return emit_label(n->Target, prog); case IR_JUMP: #if 0 inst = new_instruction(prog, OPCODE_BRA); @@ -1056,6 +1078,8 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_FLOAT: n->Store = alloc_constant(n->Value, 4, prog); /*XXX fix size */ break; + case IR_CJUMP: + return emit_cjump(n->Target, prog); default: printf("emit: ?\n"); abort(); -- cgit v1.2.3 From 0031ea7d85ae8990872c2181d038fb97b566dc2b Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 16 Dec 2006 12:52:55 -0700 Subject: fix comment, handle NOP --- src/mesa/swrast/s_fragprog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index d4985fa2d8..180b86e7bb 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -708,7 +708,7 @@ execute_program( GLcontext *ctx, break; case OPCODE_BRA: /* conditional branch */ { - /* NOTE: The return is conditional! */ + /* NOTE: The branch is conditional! */ const GLuint swizzle = inst->DstReg.CondSwizzle; const GLuint condMask = inst->DstReg.CondMask; if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || @@ -1044,6 +1044,8 @@ execute_program( GLcontext *ctx, } } break; + case OPCODE_NOP: + break; case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ { GLfloat a[4], result[4]; -- cgit v1.2.3 From 962a9f2f9d0326408c9b400d765a6aa14c5a5f57 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 08:25:23 -0700 Subject: comments --- src/mesa/shader/slang/library/slang_core.gc | 16 ++++++---- src/mesa/shader/slang/library/slang_core_gc.h | 42 +++++++++++++-------------- 2 files changed, 32 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 00d5916150..81be17f9f0 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -687,6 +687,7 @@ vec4 __operator * (const mat4 m, const vec4 v) __asm vec4_dot __retVal.w, r4, v; } +// xxx move mat4 __operator * (const mat4 m, const mat4 n) { return mat4 (m * n[0], m * n[1], m * n[2], m * n[3]); } @@ -870,6 +871,7 @@ void __operator *= (inout vec3 v, const mat3 m) { } + vec4 __operator * (const vec4 v, const mat4 m) { __retVal.x = dot(v, m[0]); @@ -878,7 +880,9 @@ vec4 __operator * (const vec4 v, const mat4 m) __retVal.w = dot(v, m[3]); } -void __operator *= (inout vec4 v, const mat4 m) { +void __operator *= (inout vec4 v, const mat4 m) +{ +// xxx improve codegen for this case v = v * m; } @@ -1676,12 +1680,14 @@ mat4 __operator ++ (inout mat4 m, const int) { return mat4 (m[0]++, m[1]++, m[2]++, m[3]++); } -bool __operator < (const float a, const float b) { - bool c; - __asm float_less c, a, b; - return c; + +// XXX are the inequality operators for floats/ints really needed???? +bool __operator < (const float a, const float b) +{ + __asm vec4_sgt __retVal.x, b, a; } + bool __operator < (const int a, const int b) { return float (a) < float (b); } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 64c007142e..a58e61e125 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -515,27 +515,27 @@ 8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, 60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, 60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, -1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115, -115,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8, -58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9, -97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0, -18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, -97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9, -98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18, -98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8, -18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18, -97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3, -2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98, -0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18, -101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58, -102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18, -98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0, -18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95, -112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, +1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, +0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, +1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, +18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, +0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, +0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, +1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, +4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, +32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, +39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, +114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, 112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, 18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, 112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -- cgit v1.2.3 From ad2519ac6bd4f0464530c5d868045675392ff880 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 08:28:06 -0700 Subject: Use _mesa_free_linked_program_data() --- src/mesa/shader/slang/slang_link2.c | 46 +++++-------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 50e62d89de..6a276d69ac 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.6 + * Version: 6.5.3 * * Copyright (C) 2006 Brian Paul All Rights Reserved. * @@ -23,9 +23,9 @@ */ /** - * \file slang_link.c - * slang linker - * \author Michal Krol + * \file slang_link2.c + * GLSL linker + * \author Brian Paul */ #include "imports.h" @@ -36,7 +36,7 @@ #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" -#include "shaderobjects.h" +#include "shader_api.h" #include "slang_link.h" @@ -229,40 +229,6 @@ link_uniform_vars(struct gl_linked_program *linked, struct gl_program *prog) } -static void -free_linked_program_data(GLcontext *ctx, struct gl_linked_program *linked) -{ - if (linked->VertexProgram) { - if (linked->VertexProgram->Base.Parameters == linked->Uniforms) { - /* to prevent a double-free in the next call */ - linked->VertexProgram->Base.Parameters = NULL; - } - _mesa_delete_program(ctx, &linked->VertexProgram->Base); - linked->VertexProgram = NULL; - } - - if (linked->FragmentProgram) { - if (linked->FragmentProgram->Base.Parameters == linked->Uniforms) { - /* to prevent a double-free in the next call */ - linked->FragmentProgram->Base.Parameters = NULL; - } - _mesa_delete_program(ctx, &linked->FragmentProgram->Base); - linked->FragmentProgram = NULL; - } - - - if (linked->Uniforms) { - _mesa_free_parameter_list(linked->Uniforms); - linked->Uniforms = NULL; - } - - if (linked->Varying) { - _mesa_free_parameter_list(linked->Varying); - linked->Varying = NULL; - } -} - - /** * Shader linker. Currently: * @@ -286,7 +252,7 @@ _slang_link2(GLcontext *ctx, struct gl_fragment_program *fragProg; GLuint i; - free_linked_program_data(ctx, linked); + _mesa_free_linked_program_data(ctx, linked); linked->Uniforms = _mesa_new_parameter_list(); linked->Varying = _mesa_new_parameter_list(); -- cgit v1.2.3 From 34ae99d6049b10115ca64daecdd1d879d3b5140d Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 08:28:54 -0700 Subject: GLSL API functions. --- src/mesa/shader/shader_api.c | 1390 ++++++++++++++++++++++++++++++++++++++++++ src/mesa/shader/shader_api.h | 59 ++ 2 files changed, 1449 insertions(+) create mode 100644 src/mesa/shader/shader_api.c create mode 100644 src/mesa/shader/shader_api.h (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c new file mode 100644 index 0000000000..aaaf942cf5 --- /dev/null +++ b/src/mesa/shader/shader_api.c @@ -0,0 +1,1390 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file shader_api.c + * API functions for shader objects + * \author Brian Paul + */ + +/** + * XXX things to do: + * 1. Check that the right error code is generated for all _mesa_error() calls. + * + */ + + +#include "glheader.h" +#include "context.h" +#include "hash.h" +#include "macros.h" +#include "program.h" +#include "prog_parameter.h" +#include "shaderobjects.h" +#include "shader_api.h" + +#include "slang_compile.h" +#include "slang_link.h" + + + +GLvoid GLAPIENTRY +_mesa_DeleteObjectARB(GLhandleARB obj) +{ +#if 000 + if (obj != 0) { + GET_CURRENT_CONTEXT(ctx); + GET_GENERIC(gen, obj, "glDeleteObjectARB"); + + if (gen != NULL) { + (**gen).Delete(gen); + RELEASE_GENERIC(gen); + } + } +#endif +} + + +GLhandleARB GLAPIENTRY +_mesa_GetHandleARB(GLenum pname) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + + switch (pname) { + case GL_PROGRAM_OBJECT_ARB: + { + struct gl2_program_intf **pro = ctx->ShaderObjects.CurrentProgram; + + if (pro != NULL) + return (**pro)._container._generic. + GetName((struct gl2_generic_intf **) (pro)); + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB"); + } +#endif + return 0; +} + + +GLvoid GLAPIENTRY +_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + struct gl_program *prog = _mesa_lookup_shader(ctx, shader); + const GLuint n = linked->NumShaders; + GLuint i, j; + + if (!linked || !prog) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDetachObjectARB(bad program or shader name)"); + return; + } + + for (i = 0; i < n; i++) { + if (linked->Shaders[i] == prog) { + struct gl_program **newList; + /* found it */ + /* alloc new list */ + newList = (struct gl_program **) + _mesa_malloc((n - 1) * sizeof(struct gl_program *)); + if (!newList) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachObjectARB"); + return; + } + for (j = 0; j < i; j++) { + newList[j] = linked->Shaders[j]; + } + while (++i < n) + newList[j++] = linked->Shaders[i]; + _mesa_free(linked->Shaders); + linked->Shaders = newList; + return; + } + } + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDetachObjectARB(shader not found)"); +} + + +GLhandleARB GLAPIENTRY +_mesa_CreateShaderObjectARB(GLenum shaderType) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_program *newProg; + GLuint name; + + name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1); + + switch (shaderType) { + case GL_FRAGMENT_SHADER_ARB: + /* alloc new gl_fragment_program */ + newProg = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, name); + break; + case GL_VERTEX_SHADER_ARB: + /* alloc new gl_vertex_program */ + newProg = ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, name); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "CreateShaderObject(shaderType)"); + return 0; + } + + _mesa_HashInsert(ctx->Shared->ShaderObjects, name, newProg); + + return name; +} + + + +GLvoid GLAPIENTRY +_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, + const GLcharARB ** string, const GLint * length) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_program *shader; + GLint *offsets; + GLsizei i; + GLcharARB *source; + + if (string == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); + return; + } + + shader = _mesa_lookup_shader(ctx, shaderObj); + if (!shader) { + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(shaderObj)"); + return; + } + + /* + * This array holds offsets of where the appropriate string ends, thus the + * last element will be set to the total length of the source code. + */ + offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); + if (offsets == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); + return; + } + + for (i = 0; i < count; i++) { + if (string[i] == NULL) { + _mesa_free((GLvoid *) offsets); + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(null string)"); + return; + } + if (length == NULL || length[i] < 0) + offsets[i] = _mesa_strlen(string[i]); + else + offsets[i] = length[i]; + /* accumulate string lengths */ + if (i > 0) + offsets[i] += offsets[i - 1]; + } + + source = (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * + sizeof(GLcharARB)); + if (source == NULL) { + _mesa_free((GLvoid *) offsets); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); + return; + } + + for (i = 0; i < count; i++) { + GLint start = (i > 0) ? offsets[i - 1] : 0; + _mesa_memcpy(source + start, string[i], + (offsets[i] - start) * sizeof(GLcharARB)); + } + source[offsets[count - 1]] = '\0'; + + /* free old shader source string and install new one */ + if (shader->String) { + _mesa_free(shader->String); + } + shader->String = (GLubyte *) source; +} + + +GLvoid GLAPIENTRY +_mesa_CompileShaderARB(GLhandleARB shaderObj) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_program *prog = _mesa_lookup_shader(ctx, shaderObj); + slang_info_log info_log; + slang_code_object obj; + slang_unit_type type; + + if (!prog) { + _mesa_error(ctx, GL_INVALID_VALUE, "glCompileShader(shaderObj)"); + return; + } + + slang_info_log_construct(&info_log); + _slang_code_object_ctr(&obj); + + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + type = slang_unit_vertex_shader; + } + else { + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + type = slang_unit_fragment_shader; + } + + if (_slang_compile((const char*) prog->String, &obj, + type, &info_log, prog)) { + /* + prog->CompileStatus = GL_TRUE; + */ + } + else { + /* + prog->CompileStatus = GL_FALSE; + */ + _mesa_problem(ctx, "Program did not compile!"); + } +} + + +GLhandleARB GLAPIENTRY +_mesa_CreateProgramObjectARB(GLvoid) +{ + GET_CURRENT_CONTEXT(ctx); + GLuint name; + struct gl_linked_program *linked; + + name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ProgramObjects, 1); + linked = _mesa_new_linked_program(ctx, name); + + _mesa_HashInsert(ctx->Shared->ProgramObjects, name, linked); + + return name; +} + + +GLvoid GLAPIENTRY +_mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + struct gl_program *prog = _mesa_lookup_shader(ctx, shader); + const GLuint n = linked->NumShaders; + GLuint i; + + if (!linked || !prog) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glAttachShader(bad program or shader name)"); + return; + } + + for (i = 0; i < n; i++) { + if (linked->Shaders[i] == prog) { + /* already attached */ + return; + } + } + + /* grow list */ + linked->Shaders = (struct gl_program **) + _mesa_realloc(linked->Shaders, + n * sizeof(struct gl_program *), + (n + 1) * sizeof(struct gl_program *)); + /* append */ + linked->Shaders[n] = prog; + prog->RefCount++; + linked->NumShaders++; +} + + + + +GLvoid GLAPIENTRY +_mesa_LinkProgramARB(GLhandleARB programObj) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked; + + linked = _mesa_lookup_linked_program(ctx, programObj); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glLinkProgram(programObj)"); + return; + } + _slang_link2(ctx, programObj, linked); +} + + + +GLvoid GLAPIENTRY +_mesa_UseProgramObjectARB(GLhandleARB programObj) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked; + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + linked = _mesa_lookup_linked_program(ctx, programObj); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glUseProgramObjectARB(programObj)"); + return; + } + + ctx->ShaderObjects.Linked = linked; +} + + +GLvoid GLAPIENTRY +_mesa_ValidateProgramARB(GLhandleARB programObj) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glValidateProgramARB"); + + if (pro != NULL) { + (**pro).Validate(pro); + RELEASE_PROGRAM(pro); + } +#endif +} + + +/** + * Helper function for all the _mesa_Uniform*() functions below. + */ +static INLINE void +uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, + const char *caller) +{ + GET_CURRENT_CONTEXT(ctx); + + if (ctx->ShaderObjects.Linked) { + struct gl_linked_program *linked = ctx->ShaderObjects.Linked; + if (location >= 0 && location < linked->Uniforms->NumParameters) { + GLfloat *v = linked->Uniforms->ParameterValues[location]; + const GLfloat *fValues = (const GLfloat *) values; /* XXX */ + GLint i; + if (type == GL_FLOAT_VEC4) + count *= 4; + else if (type == GL_FLOAT_VEC3) + count *= 3; + else + abort(); + + for (i = 0; i < count; i++) + v[i] = fValues[i]; + return; + } + } +} + + +GLvoid GLAPIENTRY +_mesa_Uniform1fARB(GLint location, GLfloat v0) +{ + uniform(location, 1, &v0, GL_FLOAT, "glUniform1fARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) +{ + GLfloat v[2]; + v[0] = v0; + v[1] = v1; + uniform(location, 1, v, GL_FLOAT_VEC2, "glUniform2fARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + GLfloat v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + uniform(location, 1, v, GL_FLOAT_VEC3, "glUniform3fARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, + GLfloat v3) +{ + GLfloat v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + uniform(location, 1, v, GL_FLOAT_VEC4, "glUniform4fARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform1iARB(GLint location, GLint v0) +{ + uniform(location, 1, &v0, GL_INT, "glUniform1iARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1) +{ + GLint v[2]; + v[0] = v0; + v[1] = v1; + uniform(location, 1, v, GL_INT_VEC2, "glUniform2iARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) +{ + GLint v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + uniform(location, 1, v, GL_INT_VEC3, "glUniform3iARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + GLint v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + uniform(location, 1, v, GL_INT_VEC4, "glUniform4iARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + uniform(location, count, value, GL_FLOAT, "glUniform1fvARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + uniform(location, count, value, GL_FLOAT_VEC2, "glUniform2fvARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + uniform(location, count, value, GL_FLOAT_VEC3, "glUniform3fvARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + uniform(location, count, value, GL_FLOAT_VEC4, "glUniform4fvARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value) +{ + uniform(location, count, value, GL_INT, "glUniform1ivARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value) +{ + uniform(location, count, value, GL_INT_VEC2, "glUniform2ivARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value) +{ + uniform(location, count, value, GL_INT_VEC3, "glUniform3ivARB"); +} + +GLvoid GLAPIENTRY +_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) +{ + uniform(location, count, value, GL_INT_VEC4, "glUniform4ivARB"); +} + + +/** + * Helper function used by UniformMatrix**vARB() functions below. + */ +static void +uniform_matrix(GLint cols, GLint rows, const char *caller, + GLenum matrixType, + GLint location, GLsizei count, GLboolean transpose, + const GLfloat *values) +{ + const GLint matElements = rows * cols; + GET_CURRENT_CONTEXT(ctx); + +#ifdef OLD + GET_CURRENT_LINKED_PROGRAM(pro, caller); +#endif + + if (values == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, caller); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (transpose) { + GLfloat *trans, *pt; + const GLfloat *pv; + GLint i, j, k; + + trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); + if (!trans) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); + return; + } + + pt = trans; + pv = values; + for (i = 0; i < count; i++) { + /* transpose from pv matrix into pt matrix */ + for (j = 0; j < cols; j++) { + for (k = 0; k < rows; k++) { + /* XXX verify this */ + pt[j * rows + k] = pv[k * cols + j]; + } + } + pt += matElements; + pv += matElements; + } + +#ifdef OLD + if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); +#endif + _mesa_free(trans); + } + else { +#ifdef OLD + if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); +#endif + } +} + + +GLvoid GLAPIENTRY +_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) +{ + uniform_matrix(2, 2, "glUniformMatrix2fvARB", GL_FLOAT_MAT2, + location, count, transpose, value); +} + +GLvoid GLAPIENTRY +_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) +{ + uniform_matrix(3, 3, "glUniformMatrix3fvARB", GL_FLOAT_MAT3, + location, count, transpose, value); +} + +GLvoid GLAPIENTRY +_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) +{ + uniform_matrix(4, 4, "glUniformMatrix4fvARB", GL_FLOAT_MAT4, + location, count, transpose, value); +} + +static GLboolean +_mesa_get_object_parameter(GLhandleARB obj, GLenum pname, GLvoid * params, + GLboolean * integral, GLint * size) +{ +#if 000 + GET_CURRENT_CONTEXT(ctx); + GLint *ipar = (GLint *) params; + + /* set default values */ + *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ + *size = 1; /* param array size */ + + switch (pname) { + case GL_OBJECT_TYPE_ARB: + case GL_OBJECT_DELETE_STATUS_ARB: + case GL_OBJECT_INFO_LOG_LENGTH_ARB: + { + GET_GENERIC(gen, obj, "glGetObjectParameterivARB"); + + if (gen == NULL) + return GL_FALSE; + + switch (pname) { + case GL_OBJECT_TYPE_ARB: + *ipar = (**gen).GetType(gen); + break; + case GL_OBJECT_DELETE_STATUS_ARB: + *ipar = (**gen).GetDeleteStatus(gen); + break; + case GL_OBJECT_INFO_LOG_LENGTH_ARB: + *ipar = (**gen).GetInfoLogLength(gen); + break; + } + + RELEASE_GENERIC(gen); + } + break; + case GL_OBJECT_SUBTYPE_ARB: + case GL_OBJECT_COMPILE_STATUS_ARB: + case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: + { + GET_SHADER(sha, obj, "glGetObjectParameterivARB"); + + if (sha == NULL) + return GL_FALSE; + + switch (pname) { + case GL_OBJECT_SUBTYPE_ARB: + *ipar = (**sha).GetSubType(sha); + break; + case GL_OBJECT_COMPILE_STATUS_ARB: + *ipar = (**sha).GetCompileStatus(sha); + break; + case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: + { + const GLcharARB *src = (**sha).GetSource(sha); + if (src == NULL) + *ipar = 0; + else + *ipar = _mesa_strlen(src) + 1; + } + break; + } + + RELEASE_SHADER(sha); + } + break; + case GL_OBJECT_LINK_STATUS_ARB: + case GL_OBJECT_VALIDATE_STATUS_ARB: + case GL_OBJECT_ATTACHED_OBJECTS_ARB: + case GL_OBJECT_ACTIVE_UNIFORMS_ARB: + case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: + { + GET_PROGRAM(pro, obj, "glGetObjectParameterivARB"); + + if (pro == NULL) + return GL_FALSE; + + switch (pname) { + case GL_OBJECT_LINK_STATUS_ARB: + *ipar = (**pro).GetLinkStatus(pro); + break; + case GL_OBJECT_VALIDATE_STATUS_ARB: + *ipar = (**pro).GetValidateStatus(pro); + break; + case GL_OBJECT_ATTACHED_OBJECTS_ARB: + *ipar = + (**pro)._container. + GetAttachedCount((struct gl2_container_intf **) (pro)); + break; + case GL_OBJECT_ACTIVE_UNIFORMS_ARB: + *ipar = (**pro).GetActiveUniformCount(pro); + break; + case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: + *ipar = (**pro).GetActiveUniformMaxLength(pro); + break; + case GL_OBJECT_ACTIVE_ATTRIBUTES_ARB: + *ipar = (**pro).GetActiveAttribCount(pro); + break; + case GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB: + *ipar = (**pro).GetActiveAttribMaxLength(pro); + break; + } + + RELEASE_PROGRAM(pro); + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetObjectParameterivARB"); + return GL_FALSE; + } +#endif + return GL_TRUE; +} + +GLvoid GLAPIENTRY +_mesa_GetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat * params) +{ + GET_CURRENT_CONTEXT(ctx); + GLboolean integral; + GLint size; + + if (params == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterfvARB"); + return; + } + + assert(sizeof(GLfloat) == sizeof(GLint)); + + if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, + &integral, &size)) { + if (integral) { + GLint i; + for (i = 0; i < size; i++) + params[i] = (GLfloat) ((GLint *) params)[i]; + } + } +} + +GLvoid GLAPIENTRY +_mesa_GetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint * params) +{ + GET_CURRENT_CONTEXT(ctx); + GLboolean integral; + GLint size; + + if (params == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB"); + return; + } + + assert(sizeof(GLfloat) == sizeof(GLint)); + + if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, + &integral, &size)) { + if (!integral) { + GLint i; + for (i = 0; i < size; i++) + params[i] = (GLint) ((GLfloat *) params)[i]; + } + } +} + + +/** + * Copy string from to , up to maxLength characters, returning + * length of in . + * \param src the strings source + * \param maxLength max chars to copy + * \param length returns numberof chars copied + * \param dst the string destination + */ +static GLvoid +copy_string(const GLcharARB * src, GLsizei maxLength, GLsizei * length, + GLcharARB * dst) +{ + GLsizei len; + for (len = 0; len < maxLength - 1 && src && src[len]; len++) + dst[len] = src[len]; + if (maxLength > 0) + dst[len] = 0; + if (length) + *length = len; +} + + +GLvoid GLAPIENTRY +_mesa_GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, + GLcharARB * infoLog) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_GENERIC(gen, obj, "glGetInfoLogARB"); + + if (gen == NULL) + return; + + if (infoLog == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetInfoLogARB"); + else { + GLsizei actualsize = (**gen).GetInfoLogLength(gen); + if (actualsize > maxLength) + actualsize = maxLength; + (**gen).GetInfoLog(gen, actualsize, infoLog); + if (length != NULL) + *length = (actualsize > 0) ? actualsize - 1 : 0; + } + RELEASE_GENERIC(gen); +#endif +} + + +GLvoid GLAPIENTRY +_mesa_GetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, + GLsizei * count, GLhandleARB * obj) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_CONTAINER(con, containerObj, "glGetAttachedObjectsARB"); + + if (con == NULL) + return; + + if (obj == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttachedObjectsARB"); + else { + GLsizei cnt, i; + + cnt = (**con).GetAttachedCount(con); + if (cnt > maxCount) + cnt = maxCount; + if (count != NULL) + *count = cnt; + + for (i = 0; i < cnt; i++) { + struct gl2_generic_intf **x = (**con).GetAttached(con, i); + obj[i] = (**x).GetName(x); + RELEASE_GENERIC(x); + } + } + RELEASE_CONTAINER(con); +#endif +} + +GLint GLAPIENTRY +_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) +{ + GET_CURRENT_CONTEXT(ctx); + + if (ctx->ShaderObjects.Linked) { + const struct gl_linked_program *linked = ctx->ShaderObjects.Linked; + GLuint loc; + for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { + const struct gl_program_parameter *u + = linked->Uniforms->Parameters + loc; + if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { + return loc; + } + } + } + return -1; + +} + + +GLvoid GLAPIENTRY +_mesa_GetActiveUniformARB(GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLcharARB * name) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glGetActiveUniformARB"); + + if (pro == NULL) + return; + + if (size == NULL || type == NULL || name == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); + else { + if (index < (**pro).GetActiveUniformCount(pro)) + (**pro).GetActiveUniform(pro, index, maxLength, length, size, type, + name); + else + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); + } + RELEASE_PROGRAM(pro); +#endif +} + + +GLvoid GLAPIENTRY +_mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); + + if (!pro) + return; + + if (!(**pro).ReadUniform(pro, location, 1, params, GL_FLOAT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); + + RELEASE_PROGRAM(pro); +#endif +} + + +GLvoid GLAPIENTRY +_mesa_GetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); + + if (!pro) + return; + + if (!(**pro).ReadUniform(pro, location, 1, params, GL_INT)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformivARB"); + RELEASE_PROGRAM(pro); +#endif +} + +GLvoid GLAPIENTRY +_mesa_GetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, + GLcharARB * sourceOut) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_program *shader = _mesa_lookup_shader(ctx, obj); + + if (!shader) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSourceARB(obj)"); + return; + } + + copy_string((GLcharARB *) shader->String, maxLength, length, sourceOut); +} + + +/* GL_ARB_vertex_shader */ + +GLvoid GLAPIENTRY +_mesa_BindAttribLocationARB(GLhandleARB programObj, GLuint index, + const GLcharARB * name) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glBindAttribLocationARB"); + + if (pro == NULL) + return; + + if (name == NULL || index >= MAX_VERTEX_ATTRIBS) + _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); + else if (IS_NAME_WITH_GL_PREFIX(name)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); + else + (**pro).OverrideAttribBinding(pro, index, name); + RELEASE_PROGRAM(pro); +#endif +} + + +GLvoid GLAPIENTRY +_mesa_GetActiveAttribARB(GLhandleARB programObj, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLcharARB * name) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, programObj, "glGetActiveAttribARB"); + + if (pro == NULL) + return; + + if (name == NULL || index >= (**pro).GetActiveAttribCount(pro)) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveAttribARB"); + else + (**pro).GetActiveAttrib(pro, index, maxLength, length, size, type, + name); + RELEASE_PROGRAM(pro); +#endif +} + + +GLint GLAPIENTRY +_mesa_GetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GLint loc = -1; + GET_LINKED_PROGRAM(pro, programObj, "glGetAttribLocationARB"); + + if (!pro) + return -1; + + if (name == NULL) + _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocationARB"); + else if (!IS_NAME_WITH_GL_PREFIX(name)) + loc = (**pro).GetAttribLocation(pro, name); + RELEASE_PROGRAM(pro); + return loc; +#endif + return 0; +} + + +/** + ** OpenGL 2.0 functions which basically wrap the ARB_shader functions + **/ + +void GLAPIENTRY +_mesa_AttachShader(GLuint program, GLuint shader) +{ + _mesa_AttachObjectARB(program, shader); +} + + +GLuint GLAPIENTRY +_mesa_CreateShader(GLenum type) +{ + return (GLuint) _mesa_CreateShaderObjectARB(type); +} + +GLuint GLAPIENTRY +_mesa_CreateProgram(void) +{ + return (GLuint) _mesa_CreateProgramObjectARB(); +} + + +void GLAPIENTRY +_mesa_DeleteProgram(GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked; + + linked = _mesa_lookup_linked_program(ctx, name); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteProgram(name)"); + return; + } + + _mesa_HashRemove(ctx->Shared->ProgramObjects, name); + _mesa_delete_linked_program(ctx, linked); +} + + +void GLAPIENTRY +_mesa_DeleteShader(GLuint shader) +{ + _mesa_DeleteObjectARB(shader); +} + +void GLAPIENTRY +_mesa_DetachShader(GLuint program, GLuint shader) +{ + _mesa_DetachObjectARB(program, shader); +} + +void GLAPIENTRY +_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj) +{ + { + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (linked) { + GLuint i; + for (i = 0; i < maxCount && i < linked->NumShaders; i++) { + obj[i] = linked->Shaders[i]->Id; + } + if (count) + *count = i; + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); + } + } +} + + +void GLAPIENTRY +_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_PROGRAM(pro, program, "glGetProgramiv"); + + if (!pro) + return; + + switch (pname) { + case GL_DELETE_STATUS: + *params = (**pro)._container._generic.GetDeleteStatus((struct gl2_generic_intf **) pro); + break; + case GL_LINK_STATUS: + *params = (**pro).GetLinkStatus(pro); + break; + case GL_VALIDATE_STATUS: + *params = (**pro).GetValidateStatus(pro); + break; + case GL_INFO_LOG_LENGTH: + *params = (**pro)._container._generic.GetInfoLogLength( (struct gl2_generic_intf **) pro ); + break; + case GL_ATTACHED_SHADERS: + *params = (**pro)._container.GetAttachedCount( (struct gl2_container_intf **) pro ); + break; + case GL_ACTIVE_ATTRIBUTES: + *params = (**pro).GetActiveAttribCount(pro); + break; + case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: + *params = (**pro).GetActiveAttribMaxLength(pro); + break; + case GL_ACTIVE_UNIFORMS: + *params = (**pro).GetActiveUniformCount(pro); + break; + case GL_ACTIVE_UNIFORM_MAX_LENGTH: + *params = (**pro).GetActiveUniformMaxLength(pro); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); + return; + } +#endif +} + + +void GLAPIENTRY +_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + _mesa_GetInfoLogARB(program, bufSize, length, infoLog); +} + + +void GLAPIENTRY +_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) +{ +#if 0 + GET_CURRENT_CONTEXT(ctx); + GET_SHADER(sh, shader, "glGetShaderiv"); + + if (!sh) + return; + + switch (pname) { + case GL_SHADER_TYPE: + *params = (**sh).GetSubType(sh); + break; + case GL_DELETE_STATUS: + *params = (**sh)._generic.GetDeleteStatus((struct gl2_generic_intf **) sh); + break; + case GL_COMPILE_STATUS: + *params = (**sh).GetCompileStatus(sh); + break; + case GL_INFO_LOG_LENGTH: + *params = (**sh)._generic.GetInfoLogLength((struct gl2_generic_intf **)sh); + break; + case GL_SHADER_SOURCE_LENGTH: + { + const GLchar *src = (**sh).GetSource(sh); + *params = src ? (_mesa_strlen(src) + 1) : 0; + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)"); + return; + } +#endif +} + + +void GLAPIENTRY +_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + _mesa_GetInfoLogARB(shader, bufSize, length, infoLog); +} + + +GLboolean GLAPIENTRY +_mesa_IsProgram(GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, name); + if (linked) + return GL_TRUE; + else + return GL_FALSE; +} + + +GLboolean GLAPIENTRY +_mesa_IsShader(GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_program *shader = _mesa_lookup_shader(ctx, name); + if (shader) + return GL_TRUE; + else + return GL_FALSE; +} + + +/** + ** 2.1 functions + **/ + +void GLAPIENTRY +_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(2, 3, "glUniformMatrix2x3fv", GL_FLOAT_MAT2x3, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(3, 2, "glUniformMatrix3x2fv", GL_FLOAT_MAT3x2, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(2, 4, "glUniformMatrix2x4fv", GL_FLOAT_MAT2x4, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(4, 2, "glUniformMatrix4x2fv", GL_FLOAT_MAT4x2, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(3, 4, "glUniformMatrix3x4fv", GL_FLOAT_MAT3x4, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + uniform_matrix(4, 3, "glUniformMatrix4x3fv", GL_FLOAT_MAT4x3, + location, count, transpose, value); +} + + +/** + * Create a new GLSL program object. + */ +struct gl_linked_program * +_mesa_new_linked_program(GLcontext *ctx, GLuint name) +{ + struct gl_linked_program *linked; + linked = CALLOC_STRUCT(gl_linked_program); + if (linked) { + linked->Name = name; + } + return linked; +} + + +void +_mesa_free_linked_program_data(GLcontext *ctx, + struct gl_linked_program *linked) +{ + if (linked->VertexProgram) { + if (linked->VertexProgram->Base.Parameters == linked->Uniforms) { + /* to prevent a double-free in the next call */ + linked->VertexProgram->Base.Parameters = NULL; + } + _mesa_delete_program(ctx, &linked->VertexProgram->Base); + linked->VertexProgram = NULL; + } + + if (linked->FragmentProgram) { + if (linked->FragmentProgram->Base.Parameters == linked->Uniforms) { + /* to prevent a double-free in the next call */ + linked->FragmentProgram->Base.Parameters = NULL; + } + _mesa_delete_program(ctx, &linked->FragmentProgram->Base); + linked->FragmentProgram = NULL; + } + + + if (linked->Uniforms) { + _mesa_free_parameter_list(linked->Uniforms); + linked->Uniforms = NULL; + } + + if (linked->Varying) { + _mesa_free_parameter_list(linked->Varying); + linked->Varying = NULL; + } +} + + + +void +_mesa_delete_linked_program(GLcontext *ctx, struct gl_linked_program *linked) +{ + _mesa_free_linked_program_data(ctx, linked); + _mesa_free(linked); +} + + +/** + * Lookup a GLSL program object. + */ +struct gl_linked_program * +_mesa_lookup_linked_program(GLcontext *ctx, GLuint name) +{ + if (name) + return (struct gl_linked_program *) + _mesa_HashLookup(ctx->Shared->ProgramObjects, name); + else + return NULL; +} + + +struct gl_shader * +_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) +{ + struct gl_shader *shader; + assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER); + shader = CALLOC_STRUCT(gl_shader); + if (shader) { + shader->Name = name; + shader->Type = type; + } + return shader; +} + + +/** + * Lookup a GLSL shader object. + */ +struct gl_program * +_mesa_lookup_shader(GLcontext *ctx, GLuint name) +{ + if (name) + return (struct gl_program *) + _mesa_HashLookup(ctx->Shared->ShaderObjects, name); + else + return NULL; +} + + +GLvoid +_mesa_init_shaderobjects(GLcontext * ctx) +{ + + ctx->ShaderObjects.CurrentProgram = NULL; + ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; + ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; + +#if 0 + _mesa_init_shaderobjects_3dlabs(ctx); +#endif +} diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h new file mode 100644 index 0000000000..388692b623 --- /dev/null +++ b/src/mesa/shader/shader_api.h @@ -0,0 +1,59 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef SHADER_API_H +#define SHADER_API_H + + +#include "glheader.h" +#include "mtypes.h" + + +extern struct gl_linked_program * +_mesa_new_linked_program(GLcontext *ctx, GLuint name); + +extern void +_mesa_free_linked_program_data(GLcontext *ctx, + struct gl_linked_program *linked); + +extern void +_mesa_delete_linked_program(GLcontext *ctx, struct gl_linked_program *linked); + +extern struct gl_linked_program * +_mesa_lookup_linked_program(GLcontext *ctx, GLuint name); + + +extern struct gl_shader * +_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type); + +extern struct gl_program * +_mesa_lookup_shader(GLcontext *ctx, GLuint name); + + +extern GLvoid +_mesa_init_shaderobjects(GLcontext * ctx); + + +#endif /* SHADER_API_H */ -- cgit v1.2.3 From 1aee657b0f0fb34a0d6717e47f3bdfd67de8bfc2 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 10:05:24 -0700 Subject: Implement if-conditionals and while loops, added temporary resolve-branches function in linker. --- src/mesa/shader/slang/slang_codegen.c | 149 +++++++++++++++++++++++----------- src/mesa/shader/slang/slang_emit.c | 26 ++++-- src/mesa/shader/slang/slang_link2.c | 44 ++++++++++ 3 files changed, 167 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 2f2b2b2a4e..9cfcfd45d3 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -122,10 +122,10 @@ new_seq(slang_ir_node *left, slang_ir_node *right) } static slang_ir_node * -new_label(const char *name) +new_label(slang_atom labName) { slang_ir_node *n = new_node(IR_LABEL, NULL, NULL); - n->Target = _mesa_strdup(name); + n->Target = (char *) labName; /*_mesa_strdup(name);*/ return n; } @@ -141,20 +141,20 @@ new_float_literal(float x, float y, float z, float w) } static slang_ir_node * -new_cjump(slang_ir_node *cond, const char *target) +new_cjump(slang_atom target) { - slang_ir_node *n = new_node(IR_CJUMP, cond, NULL); - n->Target = _mesa_strdup(target); + slang_ir_node *n = new_node(IR_CJUMP, NULL, NULL); + if (n) + n->Target = (char *) target; return n; } static slang_ir_node * -new_jump(const char *target) +new_jump(slang_atom target) { slang_ir_node *n = new_node(IR_JUMP, NULL, NULL); - if (n) { - n->Target = _mesa_strdup(target); - } + if (n) + n->Target = (char *) target; return n; } @@ -893,6 +893,16 @@ slang_assemble_asm(slang_assemble_ctx *A, slang_operation *oper, +static GLboolean +_slang_is_noop(const slang_operation *oper) +{ + if (!oper || + oper->type == slang_oper_void || + (oper->num_children == 1 && oper->children[0].type == slang_oper_void)) + return GL_TRUE; + else + return GL_FALSE; +} /** @@ -922,6 +932,88 @@ slang_assemble_function_call_name(slang_assemble_ctx *A, const char *name, } +static slang_ir_node * +_slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) +{ + /* + * label "__whileStart" + * eval expr (child[0]), updating condcodes + * branch if false to "__endWhile" + * code body + * jump "__whileStart" + * label "__endWhile" + */ + slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startWhile"); + slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endWhile"); + slang_ir_node *startLab, *cond, *bra, *body, *jump, *endLab, *tree; + + startLab = new_label(startAtom); + cond = slang_assemble_operation(A, &oper->children[0]); + tree = new_seq(startLab, cond); + + bra = new_cjump(endAtom); + tree = new_seq(tree, bra); + + body = slang_assemble_operation(A, &oper->children[1]); + tree = new_seq(tree, body); + + jump = new_jump(startAtom); + tree = new_seq(tree, jump); + + endLab = new_label(endAtom); + tree = new_seq(tree, endLab); + + return tree; +} + + +static slang_ir_node * +_slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) +{ + /* + * eval expr (child[0]), updating condcodes + * branch if false to _else or _endif + * "true" code block + * if haveElseClause clause: + * jump "__endif" + * label "__else" + * "false" code block + * label "__endif" + */ + const GLboolean haveElseClause = !_slang_is_noop(&oper->children[2]); + slang_ir_node *cond, *bra, *trueBody, *endifLab, *tree; + slang_atom elseAtom = slang_atom_pool_gen(A->atoms, "__else"); + slang_atom endifAtom = slang_atom_pool_gen(A->atoms, "__endif"); + + cond = slang_assemble_operation(A, &oper->children[0]); + /*assert(cond->Store);*/ + bra = new_cjump(haveElseClause ? elseAtom : endifAtom); + tree = new_seq(cond, bra); + + trueBody = slang_assemble_operation(A, &oper->children[1]); + tree = new_seq(tree, trueBody); + + if (haveElseClause) { + /* else clause */ + slang_ir_node *jump, *elseLab, *falseBody; + jump = new_jump(endifAtom); + tree = new_seq(tree, jump); + + elseLab = new_label(elseAtom); + tree = new_seq(tree, elseLab); + + falseBody = slang_assemble_operation(A, &oper->children[2]); + tree = new_seq(tree, falseBody); + } + + endifLab = new_label(endifAtom); + tree = new_seq(tree, endifLab); + + return tree; +} + + + static slang_ir_node * slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) { @@ -944,25 +1036,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) return slang_assemble_operation(A, &oper->children[0]); break; case slang_oper_while: - { - slang_ir_node *tree; - slang_ir_node *nStartLabel = new_label("while-start"); - slang_ir_node *nCond = slang_assemble_operation(A, &oper->children[0]); - slang_ir_node *nNotCond = new_node(IR_NOT, nCond, NULL); - slang_ir_node *nBody = slang_assemble_operation(A, &oper->children[1]); - slang_ir_node *nEndLabel = new_label("while-end"); - slang_ir_node *nCJump = new_cjump(nNotCond, "while-end"); - slang_ir_node *nJump = new_jump("while-start"); - - tree = new_seq(nStartLabel, nCond); - tree = new_seq(tree, nNotCond); - tree = new_seq(tree, nBody); - tree = new_seq(tree, nEndLabel); - tree = new_seq(tree, nCJump); - tree = new_seq(tree, nJump); - return tree; - } - break; + return _slang_gen_while(A, oper); case slang_oper_equal: return new_node(IR_SEQUAL, slang_assemble_operation(A, &oper->children[0]), @@ -1145,24 +1219,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) } break; case slang_oper_if: - { - slang_ir_node *cond, *bra, *body, *endif, *tree; - - cond = slang_assemble_operation(A, &oper->children[0]); - /*assert(cond->Store);*/ - bra = new_node(IR_CJUMP, NULL, NULL); - bra->Target = _mesa_strdup("__endif"); - - body = slang_assemble_operation(A, &oper->children[1]); - - endif = new_label("__endif"); - - tree = new_seq(cond, bra); - tree = new_seq(tree, body); - tree = new_seq(tree, endif); - return tree; - } - break; + return _slang_gen_if(A, oper); case slang_oper_field: { slang_assembly_typeinfo ti; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index fbee314d24..ba1290b45e 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -897,6 +897,12 @@ emit_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store, n->Children[1]->Swizzle); inst->Comment = n->Comment; + + if (inst->Opcode == OPCODE_SGT) { + /* update cond codes */ + inst->CondUpdate = GL_TRUE; + } + return inst; } @@ -951,6 +957,18 @@ emit_cjump(const char *target, struct gl_program *prog) } +static struct prog_instruction * +emit_jump(const char *target, struct gl_program *prog) +{ + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_BRA); + inst->DstReg.CondMask = COND_TR; /* always branch */ + /*inst->DstReg.CondSwizzle = SWIZZLE_X;*/ + inst->Comment = _mesa_strdup(target); + return inst; +} + + static struct prog_instruction * emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) @@ -1069,15 +1087,11 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) break; case IR_LABEL: return emit_label(n->Target, prog); - case IR_JUMP: -#if 0 - inst = new_instruction(prog, OPCODE_BRA); - inst->Comment = _mesa_strdup(n->Target); -#endif - break; case IR_FLOAT: n->Store = alloc_constant(n->Value, 4, prog); /*XXX fix size */ break; + case IR_JUMP: + return emit_jump(n->Target, prog); case IR_CJUMP: return emit_cjump(n->Target, prog); default: diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 6a276d69ac..c170b3e053 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -229,6 +229,47 @@ link_uniform_vars(struct gl_linked_program *linked, struct gl_program *prog) } +/** + * XXX Temporary + */ +static void +slang_resolve_branches(struct gl_program *prog) +{ + struct target { + const char *Name; + GLuint Pos; + }; + struct target targets[500]; + GLuint numTargets = 0; + GLuint i, j; + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_NOP && inst->Comment) { + targets[numTargets].Name = inst->Comment; + targets[numTargets].Pos = i; + numTargets++; + } + } + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_BRA) { + for (j = 0; j < numTargets; j++) { + if (!strcmp(inst->Comment, targets[j].Name)) { + inst->BranchTarget = targets[j].Pos; + break; + } + } + if (j == numTargets) { + abort(); + } + } + } +} + + + /** * Shader linker. Currently: * @@ -298,6 +339,9 @@ _slang_link2(GLcontext *ctx, linked->VertexProgram->Base.Parameters = linked->Uniforms; linked->FragmentProgram->Base.Parameters = linked->Uniforms; + slang_resolve_branches(&linked->VertexProgram->Base); + slang_resolve_branches(&linked->FragmentProgram->Base); + #if 1 printf("************** original fragment program\n"); _mesa_print_program(&fragProg->Base); -- cgit v1.2.3 From fbb71da2b918da0ce8a3f95159a3a5fda08e7ca5 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 14:45:26 -0700 Subject: Generate IR code for for/while loops, break and continue statements. --- src/mesa/shader/slang/slang_codegen.c | 103 +++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 9cfcfd45d3..5bcada64e1 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -45,7 +45,12 @@ #include "slang_print.h" +/** + * XXX move these into the slang_assemble_ctx struct + */ static slang_function *CurFunction = NULL; +static slang_atom CurLoopBreak = 0; +static slang_atom CurLoopCont = 0; static slang_ir_node * @@ -116,6 +121,7 @@ new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) static slang_ir_node * new_seq(slang_ir_node *left, slang_ir_node *right) { + /* XXX if either left or right is null, just return pointer to other?? */ assert(left); assert(right); return new_node(IR_SEQ, left, right); @@ -140,6 +146,9 @@ new_float_literal(float x, float y, float z, float w) return n; } +/** + * XXX maybe pass an IR node as second param to indicate the jump target??? + */ static slang_ir_node * new_cjump(slang_atom target) { @@ -149,6 +158,9 @@ new_cjump(slang_atom target) return n; } +/** + * XXX maybe pass an IR node as second param to indicate the jump target??? + */ static slang_ir_node * new_jump(slang_atom target) { @@ -932,20 +944,29 @@ slang_assemble_function_call_name(slang_assemble_ctx *A, const char *name, } +/** + * Generate IR tree for a while-loop. + */ static slang_ir_node * _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) { /* - * label "__whileStart" + * label "__startWhile" * eval expr (child[0]), updating condcodes * branch if false to "__endWhile" * code body - * jump "__whileStart" + * jump "__startWhile" * label "__endWhile" */ slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startWhile"); slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endWhile"); slang_ir_node *startLab, *cond, *bra, *body, *jump, *endLab, *tree; + slang_atom prevLoopBreak = CurLoopBreak; + slang_atom prevLoopCont = CurLoopCont; + + /* Push this loop */ + CurLoopBreak = endAtom; + CurLoopCont = startAtom; startLab = new_label(startAtom); cond = slang_assemble_operation(A, &oper->children[0]); @@ -963,10 +984,79 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) endLab = new_label(endAtom); tree = new_seq(tree, endLab); + /* Pop this loop */ + CurLoopBreak = prevLoopBreak; + CurLoopCont = prevLoopCont; + + return tree; +} + + +/** + * Generate IR tree for a for-loop. + */ +static slang_ir_node * +_slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) +{ + /* + * init code (child[0]) + * label "__startFor" + * eval expr (child[1]), updating condcodes + * branch if false to "__endFor" + * code body (child[3]) + * label "__continueFor" + * incr code (child[2]) + * jump "__startFor" + * label "__endFor" + */ + slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startFor"); + slang_atom contAtom = slang_atom_pool_gen(A->atoms, "__continueFor"); + slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endFor"); + slang_ir_node *init, *startLab, *cond, *bra, *body, *contLab; + slang_ir_node *incr, *jump, *endLab, *tree; + slang_atom prevLoopBreak = CurLoopBreak; + slang_atom prevLoopCont = CurLoopCont; + + /* Push this loop */ + CurLoopBreak = endAtom; + CurLoopCont = contAtom; + + init = slang_assemble_operation(A, &oper->children[0]); + startLab = new_label(startAtom); + tree = new_seq(init, startLab); + + cond = slang_assemble_operation(A, &oper->children[1]); + tree = new_seq(tree, cond); + + bra = new_cjump(endAtom); + tree = new_seq(tree, bra); + + body = slang_assemble_operation(A, &oper->children[3]); + tree = new_seq(tree, body); + + contLab = new_label(contAtom); + tree = new_seq(tree, contLab); + + incr = slang_assemble_operation(A, &oper->children[2]); + tree = new_seq(tree, incr); + + jump = new_jump(startAtom); + tree = new_seq(tree, jump); + + endLab = new_label(endAtom); + tree = new_seq(tree, endLab); + + /* Pop this loop */ + CurLoopBreak = prevLoopBreak; + CurLoopCont = prevLoopCont; + return tree; } +/** + * Generate IR tree for an if/then/else conditional. + */ static slang_ir_node * _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) { @@ -1037,6 +1127,15 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) break; case slang_oper_while: return _slang_gen_while(A, oper); + case slang_oper_for: + return _slang_gen_for(A, oper); + case slang_oper_break: + ASSERT(CurLoopBreak); + return new_jump(CurLoopBreak); + case slang_oper_continue: + ASSERT(CurLoopCont); + return new_jump(CurLoopCont); + break; case slang_oper_equal: return new_node(IR_SEQUAL, slang_assemble_operation(A, &oper->children[0]), -- cgit v1.2.3 From b50280e95f3c044f53c0705d3a5619ebb2db4513 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 16:21:58 -0700 Subject: Check for inst->CondUpdate, print .C suffix. --- src/mesa/shader/prog_print.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 7e2e1b22c4..4cd55d0bca 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -206,16 +206,15 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, GLuint j; _mesa_printf("%s", opcode_string); + if (inst->CondUpdate) + _mesa_printf(".C"); /* frag prog only */ if (inst->SaturateMode == SATURATE_ZERO_ONE) _mesa_printf("_SAT"); if (inst->DstReg.File != PROGRAM_UNDEFINED) { - _mesa_printf(" %s[%d]%s", - program_file_string((enum register_file) inst->DstReg.File), - inst->DstReg.Index, - writemask_string(inst->DstReg.WriteMask)); + print_dst_reg(&inst->DstReg); } else { _mesa_printf(" ???"); -- cgit v1.2.3 From d22079217c5a1954a07afb1193d06eecb2decbb6 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 16:22:27 -0700 Subject: Added instruction counter to catch infinite loops (temporary). --- src/mesa/swrast/s_fragprog.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 180b86e7bb..c59e24debe 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -656,7 +656,8 @@ execute_program( GLcontext *ctx, struct fp_machine *machine, const SWspan *span, GLuint column ) { - GLuint pc; + const GLuint MAX_EXEC = 5000; + GLuint pc, total = 0; if (DEBUG_FRAG) { printf("execute fragment program --------------------\n"); @@ -717,6 +718,9 @@ execute_program( GLcontext *ctx, test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { /* take branch */ pc = inst->BranchTarget; + /* + printf("Take branch to %u\n", pc); + */ } } break; @@ -1518,6 +1522,12 @@ execute_program( GLcontext *ctx, _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program", inst->Opcode); return GL_TRUE; /* return value doesn't matter */ + + } + total++; + if (total > MAX_EXEC) { + _mesa_problem(ctx, "Infinite loop detected in fragment program"); + abort(); } } return GL_TRUE; -- cgit v1.2.3 From 8e20c417d40f8b28467591545dee76c3ffd9dfe3 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 18 Dec 2006 17:54:58 -0700 Subject: Implement array indexing of simple vec2/3/4 types. A bit of a hack for now... --- src/mesa/shader/slang/slang_codegen.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 5bcada64e1..46ae15e21e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1269,6 +1269,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n, *c0, *c1; GLuint mask = WRITEMASK_XYZW; if (lhs->type == slang_oper_field) { + /* XXXX this is a hack! */ /* writemask */ if (!slang_is_writemask((char *) lhs->a_id, &mask)) mask = WRITEMASK_XYZW; @@ -1281,7 +1282,11 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) /* assert(c1->Opcode != IR_SEQ); */ - n->Writemask = mask; + if (c0->Writemask != WRITEMASK_XYZW) + /* XXX this is a hack! */ + n->Writemask = c0->Writemask; + else + n->Writemask = mask; return n; } break; @@ -1363,7 +1368,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) /* array dereference */ if (oper->children[1].type == slang_oper_literal_int) { /* compile-time constant index - OK */ - slang_assembly_typeinfo elem_ti; + slang_assembly_typeinfo array_ti, elem_ti; slang_ir_node *base; GLint index; @@ -1371,6 +1376,11 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_assembly_typeinfo_construct(&elem_ti); _slang_typeof_operation(A, oper, &elem_ti); + /* get type of array */ + slang_assembly_typeinfo_construct(&array_ti); + _slang_typeof_operation(A, &oper->children[0], &array_ti); + + base = slang_assemble_operation(A, &oper->children[0]); assert(base->Opcode == IR_VAR); assert(base->Store); @@ -1379,9 +1389,22 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) /*printf("element[%d]\n", index);*/ /* new storage info since we don't want to change the original */ base->Store = _slang_clone_ir_storage(base->Store); - /* bias Index by array subscript, update storage size */ - base->Store->Index += index; - base->Store->Size = _slang_sizeof_type_specifier(&elem_ti.spec); + if (_slang_type_is_vector(array_ti.spec.type)) { + /* scalar element (float) of a basic vector (vec3) */ + const GLuint max = _slang_type_dim(array_ti.spec.type); + if (index >= max) { + RETURN_ERROR("array index out of bounds", 0); + } + assert(index < 4); + /* use swizzle to access the element */ + base->Swizzle = SWIZZLE_X + index; + base->Writemask = WRITEMASK_X << index; + } + else { + /* bias Index by array subscript, update storage size */ + base->Store->Index += index; + base->Store->Size = _slang_sizeof_type_specifier(&elem_ti.spec); + } return base; } else { -- cgit v1.2.3 From 194bc5afbde4c6b144289e7542612ef52e0e5bd4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 08:58:56 -0700 Subject: rewrite +=, -= etc for floats --- src/mesa/shader/slang/library/slang_core.gc | 36 +- src/mesa/shader/slang/library/slang_core_gc.h | 1025 +++++++++++++------------ 2 files changed, 534 insertions(+), 527 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 81be17f9f0..3c4862baa1 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -326,30 +326,36 @@ mat4 __constructor (const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) } +//// operator += - -void __operator += (inout float a, const float b) { - __asm float_add a, a, b; +void __operator += (inout float a, const float b) +{ + __asm vec4_add a.x, a, b; } -float __operator - (const float a) { - float b; - __asm float_negate b, a; - return b; +void __operator -= (inout float a, const float b) +{ + __asm vec4_subtract a.x, a, b; } -void __operator -= (inout float a, const float b) { - float c; - __asm float_negate c, b; - __asm float_add a, a, c; +void __operator *= (inout float a, const float b) +{ + __asm vec4_multiply a.x, a, b; } -void __operator *= (inout float a, const float b) { - __asm float_multiply a, a, b; +void __operator /= (inout float a, const float b) +{ + float w; // = 1 / b + __asm float_rcp w.x, b; + __asm vec4_multiply a.x, a, w; } -void __operator /= (inout float a, const float b) { - __asm float_divide a, a, b; + + +float __operator - (const float a) { + float b; + __asm float_negate b, a; + return b; } float __operator + (const float a, const float b) { diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index a58e61e125..68af99c886 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -57,518 +57,519 @@ 114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, 0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95, 114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,114,51,0,20,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100, -100,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108, -111,97,116,95,110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,9,97,0, -0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0, -18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,18,97,0,0,18,99,0,0,0,0,1,0,0,2,3,1,0,2, -9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105, -118,105,100,101,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4, -102,108,111,97,116,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0, -0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0, -0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120, -0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4, -102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116, -111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0, -0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116, -95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, -0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97, -0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0, -18,98,0,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108, -111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118, -0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0, -59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0, -0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, -59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0, -1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2, -11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0, -12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21, -0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2, -2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117, -0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9, -18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18, -118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122, -0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1, -1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118, -0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6, -118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0, -1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7, -118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117, -0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18, -118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18, -117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8, -117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, -9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3, -1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59, -119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18, -118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0, -0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, -0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18, -109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0, -59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0, -0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48, -0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0, -0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14, -110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109, -0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59, -120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0, -20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0, -16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50, -0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59, -122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18, -109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86, -97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110, -0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57, -48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9, -18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16, -8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109, -0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,9,0,100,111,116,0,1, -1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1, -0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0, -1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0, -12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98, -0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1, -114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, -120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, -114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, -57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0, -18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, -18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59, -122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, -20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18, -118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0, -0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, -51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0, -18,114,52,0,0,18,118,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52, -0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10, -50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0, -0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, -0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97, -0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0, -59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0, -0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0, -1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59, -122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22, -0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59, -122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24, -0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59, -122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0, -1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22, -0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59, -120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59, -119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24, -0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24, -0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0, -16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0, -24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109, -0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1, -1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18, -109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, -10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0, -16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1, -0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109, -0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1, -1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18, -109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0, -0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9, -18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10, -118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, -48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0, -57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10, -118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1, -1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118, -0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,8,48,0,57,59,122,0, +0,57,18,114,51,0,20,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100, +0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2, +9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0, +0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0, +9,1,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0, +1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100,100,0,18,95,95,114,101, +116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58, +105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0, +0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95, +102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18, +120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18, +98,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0, +9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97, +0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0, +20,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100, +101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5, +98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18, +117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0, +10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22, +0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18, +118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2, +11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18, +117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0, +11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22, +0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18, +118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18, +117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, +12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23, +0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2, +4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117, +0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0, +2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1, +0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0, +2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117, +0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9, +18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118, +0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0, +18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1, +0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0, +2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18, +109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0, +59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46, +0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0, +16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13, +110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,114,49,0,0, +1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, +114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, +57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, +18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, +18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49, +0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, +51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, +101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, +0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48, +0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2, +3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14, +109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2, +1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, +0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110, +0,16,10,51,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0, +48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120, +0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98, +0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0, +0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, +114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, +57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, +18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, +18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, +0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59, +122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0, +20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16, +10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0, +59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18, +95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116, +0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,15,2,21,1,1,0,15, +109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18, +110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0, +0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0, +2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24, +0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0, +0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0, +1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1, +0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23, +0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59, +121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, +0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, +1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59, +122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23, +0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1, +1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59, +122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, +0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21, +0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59, +121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1, +0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23, +0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1, +1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59, +122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0, +1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0, +22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109, +0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50, +0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, +22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2, +14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97, +0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, +18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, +9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, +57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, +0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, +0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, +24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, +51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18, +118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0, 48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0, -57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18, -109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0, -59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, -0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10, -51,0,57,0,0,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48, -20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0, -0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111, -95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102, -108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5, -97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116, -111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116, -0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0, -4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95, -116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98, -0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, -0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0, -4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1, -1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116, -95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18, -120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18, -99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1, -1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2, -26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0, -0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, -0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, -12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1, -3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0, -0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, -59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118, -0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0, -6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18, -118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, -49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120, -0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59, -122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, -59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117, -0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, -118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0, -18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, -0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59, -122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, -99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, -59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8, -118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, -118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0, -18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, -0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, -122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118, -0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, -59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117, -0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0, -0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1, -1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1, -0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0, -14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, -110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, -0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1, -1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0, -46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, -18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1, -8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2, -27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118, -0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0, -18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1, -1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48, -0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, -120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, -58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26, -1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18, -117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0, -0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, -59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0, -18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0, -1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47, -0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1, -1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0, -48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48, -20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59, -120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0, -11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121, -0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0, -1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18, -117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0, -0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, -59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117, -0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0, -18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, -118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0, -12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, -18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, -0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0, -18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0, -1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49, -0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0, -0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0, -57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1, -8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, -1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, -0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1, -0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1, -0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57, -46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1, -0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, -16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1, -1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10, -49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0, -0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18, -109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, -116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0, -16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18, -109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0, -48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0, -16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1, -0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0, -49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1, -0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18, -110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0, -0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18, -98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10, -51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0, -16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1, -1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10, -49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15, -2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0, -18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18, -98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, -110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18, -97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50, -0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58, -118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0, -1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, -1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, -0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118, -101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, -1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, -54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109, -97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109, -0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10, -50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54, -0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0, -2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16, -10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0, -1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59, -122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9, -18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, -0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118, -0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0, -9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0, -0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1, -0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109, -0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49, -0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118, -0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18, -118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0, -0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119, -0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0, -2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51, -0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, -122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, -9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18, -109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10, -51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52, -0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0, -52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, -2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, -118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, -122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, -1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, -0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, -0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, -0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, -109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, -1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, -0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, -0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, -11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, -118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, -0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, -24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, -0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, -118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, -60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, -1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, -108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, -1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, -0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, -18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, -18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, -0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, -0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, -1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, -4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, -32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, -39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, -105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, -114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, +57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18, +109,0,48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, +120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18, +118,0,59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59, +120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10, +49,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18, +109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0, +1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21, +1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0, +18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111, +116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, +100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, +0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, +15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1, +4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0, +3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, +110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100, +100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0, +0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1, +121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0, +0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95, +110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0, +18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8, +18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1, +99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95, +116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105, +112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, +18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, +0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18, +97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97, +116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116, +111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, +0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0, +10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118, +0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120, +0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, +52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1, +0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11, +117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0, +59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, +119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12, +117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12, +2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0, +0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0, +0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0, +1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, +59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6, +117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, +117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0, +18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22, +1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0, +49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1, +8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59, +121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0, +0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0, +59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7, +117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18, +117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1, +0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, +0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0, +1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, +121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0, +59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118, +0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18, +117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1, +0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121, +0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59, +119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, +59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117, +0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0, +13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0, +18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49, +0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0, +0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0, +1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0, +1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110, +0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, +51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49, +20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, +120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, +58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27, +1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18, +117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18, +118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0, +10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, +0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98, +0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58, +118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1, +1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59, +121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18, +97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1, +0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0, +18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1, +0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47, +0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, +101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98, +0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0, +59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1, +0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59, +120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8, +58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0, +59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0, +59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2, +26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0, +18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12, +2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18, +118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1, +0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0, +18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0, +1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47, +0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0, +0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0, +48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0, +0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0, +18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99, +52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0, +18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101, +99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49, +0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97, +116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26, +1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109, +0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, +50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1, +0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, +16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, +50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1, +0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0, +16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, +50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1, +0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, +16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116, +51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, +50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0, +16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0, +0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8, +48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14, +2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0, +18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9, +97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110, +0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0, +9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98, +0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, +58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0, +18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, +51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57, +18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, +110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18, +97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, +0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, +47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1, +0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, +16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0, +0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8, +48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18, +110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52, +0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18, +98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, +1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18, +97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15, +109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10, +49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0, +1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0, +1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0, +1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0, +1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0, +1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0, +1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0, +1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0, +1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0, +1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0, +1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0, +1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0, +1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0, +1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0, +1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0, +1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0, +1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0, +1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0, +1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0, +1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0, +1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0, +1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0, +1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0, +1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0, +1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0, +1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, +0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, +121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18, +118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, +6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, +0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, +121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18, +118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, +13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0, +57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18, +109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58, +109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0, +18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1, +0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0, +59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0, +9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59, +120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25, +1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0, +0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2, +8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118, +0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49, +0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, +52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0, +9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0, +2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16, +10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, +1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, +122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, +18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, +0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118, +0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0, +9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0, +0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1, +0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109, +0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, +0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, +2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0, +1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11, +118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, +0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, +59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, +25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, +0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, +118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, +61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, +9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, +0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, +1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, +59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, +5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, +0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, +18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, +58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, +1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, +0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, +1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, +0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, +0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, +1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, +57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2, +15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111, +97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0, +0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41, +0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, +116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97, +108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0, +5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0, +1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, +108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, +101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0, +0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1, +1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0, +15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97, +116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105, +0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, +0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0, +1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, +121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, -57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, +65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, +0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, +0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 8473ae475fab751b14a42f76643f48c3a746d94c Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 08:59:19 -0700 Subject: new error msg --- src/mesa/shader/slang/slang_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 463088fc5c..6aed167e3f 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2097,7 +2097,7 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, slang_string_free(&preprocessed); grammar_get_last_error((byte *) (buf), sizeof(buf), &pos); slang_info_log_error(infolog, buf); - RETURN_ERROR("syntax error", 0); + RETURN_ERROR("syntax error (possibly in library code)", 0); } slang_string_free(&preprocessed); -- cgit v1.2.3 From bb8f7627f7be71044a2e4cb5d583b8e2d59baab1 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 08:59:36 -0700 Subject: additional error checking --- src/mesa/shader/slang/slang_link2.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index c170b3e053..425ad7a87c 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -318,6 +318,13 @@ _slang_link2(GLcontext *ctx, return; } + if (!vertProg->Base.Varying || !fragProg->Base.Varying) { + /* temporary */ + _mesa_problem(ctx, "vertex/fragment program lacks varying list!"); + linked->LinkStatus = GL_FALSE; + return; + } + /* * Make copies of the vertex/fragment programs now since we'll be * changing src/dst registers after merging the uniforms and varying vars. -- cgit v1.2.3 From af1d46b68acb2e272b06177f2bdb50bf81553018 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 08:59:51 -0700 Subject: lots of clean-up and re-org --- src/mesa/shader/slang/slang_codegen.c | 741 +++++++++++++++++++--------------- 1 file changed, 405 insertions(+), 336 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 46ae15e21e..51bf26ada8 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -54,7 +54,7 @@ static slang_atom CurLoopCont = 0; static slang_ir_node * -slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper); +_slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); /** @@ -171,21 +171,6 @@ new_jump(slang_atom target) } -/** - * New IR_VAR_DECL node - allocate storage for a new variable. - */ -static slang_ir_node * -new_var_decl(slang_assemble_ctx *A, slang_variable *v) -{ - slang_ir_node *n = new_node(IR_VAR_DECL, NULL, NULL); - if (n) { - n->Var = v; - v->declared = GL_TRUE; - } - return n; -} - - /** * New IR_VAR node - a reference to a previously declared variable. */ @@ -248,95 +233,6 @@ slang_is_writemask(const char *field, GLuint *mask) } -/** - * Assemble a "return" statement. - */ -static slang_ir_node * -slang_assemble_return(slang_assemble_ctx * A, slang_operation *oper) -{ - if (oper->num_children == 0 || - (oper->num_children == 1 && - oper->children[0].type == slang_oper_void)) { - /* Convert from: - * return; - * To: - * goto __endOfFunction; - */ - slang_ir_node *n; - slang_operation gotoOp; - slang_operation_construct(&gotoOp); - gotoOp.type = slang_oper_goto; - gotoOp.a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); - /* assemble the new code */ - n = slang_assemble_operation(A, &gotoOp); - /* destroy temp code */ - slang_operation_destruct(&gotoOp); - return n; - } - else { - /* - * Convert from: - * return expr; - * To: - * __retVal = expr; - * goto __endOfFunction; - */ - slang_operation *block, *assign, *jump; - slang_atom a_retVal; - slang_ir_node *n; - - a_retVal = slang_atom_pool_atom(A->atoms, "__retVal"); - assert(a_retVal); - -#if 1 /* DEBUG */ - { - slang_variable *v - = _slang_locate_variable(oper->locals, a_retVal, GL_TRUE); - assert(v); - } -#endif - - block = slang_operation_new(1); - block->type = slang_oper_block_no_new_scope; - block->num_children = 2; - block->children = slang_operation_new(2); - assert(block->locals); - block->locals->outer_scope = oper->locals->outer_scope; - - /* child[0]: __retVal = expr; */ - assign = &block->children[0]; - assign->type = slang_oper_assign; - assign->locals->outer_scope = block->locals; - assign->num_children = 2; - assign->children = slang_operation_new(2); - /* lhs (__retVal) */ - assign->children[0].type = slang_oper_identifier; - assign->children[0].a_id = a_retVal; - assign->children[0].locals->outer_scope = assign->locals; - /* rhs (expr) */ - /* XXX we might be able to avoid this copy someday */ - slang_operation_copy(&assign->children[1], &oper->children[0]); - - /* child[1]: goto __endOfFunction */ - jump = &block->children[1]; - jump->type = slang_oper_goto; - assert(CurFunction->end_label); - jump->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); - -#if 0 /* debug */ - printf("NEW RETURN:\n"); - slang_print_tree(block, 0); -#endif - - /* assemble the new code */ - n = slang_assemble_operation(A, block); - slang_operation_delete(block); - return n; - } -} - - - /** * Check if the given function is really just a wrapper for an * basic assembly instruction. @@ -745,7 +641,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, static slang_ir_node * -slang_assemble_function_call(slang_assemble_ctx *A, slang_function *fun, +_slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, slang_operation *oper, slang_operation *dest) { slang_ir_node *n; @@ -789,7 +685,7 @@ slang_assemble_function_call(slang_assemble_ctx *A, slang_function *fun, #endif /* assemble what we just made XXX here??? */ - n = slang_assemble_operation(A, oper); + n = _slang_gen_operation(A, oper); CurFunction = prevFunc; @@ -841,11 +737,11 @@ make_writemask(char *field) /** - * Generate IR code for an instruction/operation such as: + * Generate IR tree for an asm instruction/operation such as: * __asm vec4_dot __retVal.x, v1, v2; */ static slang_ir_node * -slang_assemble_asm(slang_assemble_ctx *A, slang_operation *oper, +_slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, slang_operation *dest) { const slang_asm_info *info; @@ -870,7 +766,7 @@ slang_assemble_asm(slang_assemble_ctx *A, slang_operation *oper, /* assemble child(ren) */ kids[0] = kids[1] = NULL; for (j = 0; j < info->NumParams; j++) { - kids[j] = slang_assemble_operation(A, &oper->children[firstOperand + j]); + kids[j] = _slang_gen_operation(A, &oper->children[firstOperand + j]); } n = new_node(info->Opcode, kids[0], kids[1]); @@ -891,7 +787,7 @@ slang_assemble_asm(slang_assemble_ctx *A, slang_operation *oper, } assert(dest_oper->type == slang_oper_identifier); - n0 = slang_assemble_operation(A, dest_oper); + n0 = _slang_gen_operation(A, dest_oper); assert(n0->Var); assert(n0->Store); free(n0); @@ -922,8 +818,8 @@ _slang_is_noop(const slang_operation *oper) * \param name the function's name (operators like '*' are possible). */ static slang_ir_node * -slang_assemble_function_call_name(slang_assemble_ctx *A, const char *name, - slang_operation *oper, slang_operation *dest) +_slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, + slang_operation *oper, slang_operation *dest) { slang_operation *params = oper->children; const GLuint param_count = oper->num_children; @@ -940,7 +836,7 @@ slang_assemble_function_call_name(slang_assemble_ctx *A, const char *name, RETURN_ERROR2("Undefined function", name, 0); } - return slang_assemble_function_call(A, fun, oper, dest); + return _slang_gen_function_call(A, fun, oper, dest); } @@ -969,13 +865,13 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) CurLoopCont = startAtom; startLab = new_label(startAtom); - cond = slang_assemble_operation(A, &oper->children[0]); + cond = _slang_gen_operation(A, &oper->children[0]); tree = new_seq(startLab, cond); bra = new_cjump(endAtom); tree = new_seq(tree, bra); - body = slang_assemble_operation(A, &oper->children[1]); + body = _slang_gen_operation(A, &oper->children[1]); tree = new_seq(tree, body); jump = new_jump(startAtom); @@ -1021,23 +917,23 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) CurLoopBreak = endAtom; CurLoopCont = contAtom; - init = slang_assemble_operation(A, &oper->children[0]); + init = _slang_gen_operation(A, &oper->children[0]); startLab = new_label(startAtom); tree = new_seq(init, startLab); - cond = slang_assemble_operation(A, &oper->children[1]); + cond = _slang_gen_operation(A, &oper->children[1]); tree = new_seq(tree, cond); bra = new_cjump(endAtom); tree = new_seq(tree, bra); - body = slang_assemble_operation(A, &oper->children[3]); + body = _slang_gen_operation(A, &oper->children[3]); tree = new_seq(tree, body); contLab = new_label(contAtom); tree = new_seq(tree, contLab); - incr = slang_assemble_operation(A, &oper->children[2]); + incr = _slang_gen_operation(A, &oper->children[2]); tree = new_seq(tree, incr); jump = new_jump(startAtom); @@ -1075,12 +971,12 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) slang_atom elseAtom = slang_atom_pool_gen(A->atoms, "__else"); slang_atom endifAtom = slang_atom_pool_gen(A->atoms, "__endif"); - cond = slang_assemble_operation(A, &oper->children[0]); + cond = _slang_gen_operation(A, &oper->children[0]); /*assert(cond->Store);*/ bra = new_cjump(haveElseClause ? elseAtom : endifAtom); tree = new_seq(cond, bra); - trueBody = slang_assemble_operation(A, &oper->children[1]); + trueBody = _slang_gen_operation(A, &oper->children[1]); tree = new_seq(tree, trueBody); if (haveElseClause) { @@ -1092,7 +988,7 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) elseLab = new_label(elseAtom); tree = new_seq(tree, elseLab); - falseBody = slang_assemble_operation(A, &oper->children[2]); + falseBody = _slang_gen_operation(A, &oper->children[2]); tree = new_seq(tree, falseBody); } @@ -1103,9 +999,321 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Generate IR tree for a return statement. + */ +static slang_ir_node * +_slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) +{ + if (oper->num_children == 0 || + (oper->num_children == 1 && + oper->children[0].type == slang_oper_void)) { + /* Convert from: + * return; + * To: + * goto __endOfFunction; + */ + slang_ir_node *n; + slang_operation gotoOp; + slang_operation_construct(&gotoOp); + gotoOp.type = slang_oper_goto; + gotoOp.a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + /* assemble the new code */ + n = _slang_gen_operation(A, &gotoOp); + /* destroy temp code */ + slang_operation_destruct(&gotoOp); + return n; + } + else { + /* + * Convert from: + * return expr; + * To: + * __retVal = expr; + * goto __endOfFunction; + */ + slang_operation *block, *assign, *jump; + slang_atom a_retVal; + slang_ir_node *n; + + a_retVal = slang_atom_pool_atom(A->atoms, "__retVal"); + assert(a_retVal); + +#if 1 /* DEBUG */ + { + slang_variable *v + = _slang_locate_variable(oper->locals, a_retVal, GL_TRUE); + assert(v); + } +#endif + block = slang_operation_new(1); + block->type = slang_oper_block_no_new_scope; + block->num_children = 2; + block->children = slang_operation_new(2); + assert(block->locals); + block->locals->outer_scope = oper->locals->outer_scope; + + /* child[0]: __retVal = expr; */ + assign = &block->children[0]; + assign->type = slang_oper_assign; + assign->locals->outer_scope = block->locals; + assign->num_children = 2; + assign->children = slang_operation_new(2); + /* lhs (__retVal) */ + assign->children[0].type = slang_oper_identifier; + assign->children[0].a_id = a_retVal; + assign->children[0].locals->outer_scope = assign->locals; + /* rhs (expr) */ + /* XXX we might be able to avoid this copy someday */ + slang_operation_copy(&assign->children[1], &oper->children[0]); + + /* child[1]: goto __endOfFunction */ + jump = &block->children[1]; + jump->type = slang_oper_goto; + assert(CurFunction->end_label); + jump->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + +#if 0 /* debug */ + printf("NEW RETURN:\n"); + slang_print_tree(block, 0); +#endif + + /* assemble the new code */ + n = _slang_gen_operation(A, block); + slang_operation_delete(block); + return n; + } +} + + +/** + * Generate IR tree for a variable declaration. + */ +static slang_ir_node * +_slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) +{ + slang_ir_node *n; + slang_ir_node *varDecl; + slang_variable *v; + + assert(oper->num_children == 0 || oper->num_children == 1); + + v = _slang_locate_variable(oper->locals, oper->a_id, GL_TRUE); + assert(v); + + varDecl = new_node(IR_VAR_DECL, NULL, NULL); + if (!varDecl) + return NULL; + + varDecl->Var = v; + v->declared = GL_TRUE; + + slang_resolve_storage(A->codegen, varDecl, A->program); + + if (oper->num_children > 0) { + /* child is initializer */ + slang_ir_node *var, *init, *rhs; + assert(oper->num_children == 1); + var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); + /* XXX make copy of this initializer? */ + /* + printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); + */ + rhs = _slang_gen_operation(A, &oper->children[0]); + init = new_node(IR_MOVE, var, rhs); + /*assert(rhs->Opcode != IR_SEQ);*/ + n = new_seq(varDecl, init); + } + else if (v->initializer) { + slang_ir_node *var, *init, *rhs; + var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); + /* XXX make copy of this initializer? */ + /* + printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); + */ + rhs = _slang_gen_operation(A, v->initializer); + init = new_node(IR_MOVE, var, rhs); + /* + assert(rhs->Opcode != IR_SEQ); + */ + n = new_seq(varDecl, init); + } + else { + n = varDecl; + } + return n; +} + + +/** + * Generate IR tree for a variable (such as in an expression). + */ static slang_ir_node * -slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) +_slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) +{ + /* If there's a variable associated with this oper (from inlining) + * use it. Otherwise, use the oper's var id. + */ + slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; + slang_ir_node *n = new_var(A, oper, aVar, SWIZZLE_NOOP); + assert(oper->var); + return n; +} + + +/** + * Generate IR tree for an assignment (=). + */ +static slang_ir_node * +_slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) +{ + if (oper->children[0].type == slang_oper_identifier && + oper->children[1].type == slang_oper_call) { + /* Sspecial case of: x = f(a, b) + * Replace with f(a, b, x) (where x == hidden __retVal out param) + */ + slang_ir_node *n; + n = _slang_gen_function_call_name(A, + (const char *) oper->children[1].a_id, + &oper->children[1], &oper->children[0]); + return n; + } + else { + slang_operation *lhs = &oper->children[0]; + slang_ir_node *n, *c0, *c1; + GLuint mask = WRITEMASK_XYZW; + if (lhs->type == slang_oper_field) { + /* XXXX this is a hack! */ + /* writemask */ + if (!slang_is_writemask((char *) lhs->a_id, &mask)) + mask = WRITEMASK_XYZW; + lhs = &lhs->children[0]; + } + c0 = _slang_gen_operation(A, lhs); + c1 = _slang_gen_operation(A, &oper->children[1]); + + n = new_node(IR_MOVE, c0, c1); + /* + assert(c1->Opcode != IR_SEQ); + */ + if (c0->Writemask != WRITEMASK_XYZW) + /* XXX this is a hack! */ + n->Writemask = c0->Writemask; + else + n->Writemask = mask; + return n; + } +} + + +/** + * Generate IR tree for referencing a field in a struct (or basic vector type) + */ +static slang_ir_node * +_slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) +{ + slang_assembly_typeinfo ti; + + slang_assembly_typeinfo_construct(&ti); + _slang_typeof_operation(A, &oper->children[0], &ti); + + if (_slang_type_is_vector(ti.spec.type)) { + /* the field should be a swizzle */ + const GLuint rows = _slang_type_dim(ti.spec.type); + slang_swizzle swz; + slang_ir_node *n; + if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { + RETURN_ERROR("Bad swizzle", 0); + } + n = _slang_gen_operation(A, &oper->children[0]); + n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], + swz.swizzle[1], + swz.swizzle[2], + swz.swizzle[3]); + return n; + } + else if (ti.spec.type == slang_spec_float) { + const GLuint rows = 1; + slang_swizzle swz; + slang_ir_node *n; + if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { + RETURN_ERROR("Bad swizzle", 0); + } + n = _slang_gen_operation(A, &oper->children[0]); + n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], + swz.swizzle[1], + swz.swizzle[2], + swz.swizzle[3]); + return n; + } + else { + /* the field is a structure member */ + abort(); + } +} + + +/** + * Generate IR tree for an array element reference. + */ +static slang_ir_node * +_slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) +{ + if (oper->children[1].type == slang_oper_literal_int) { + /* compile-time constant index - OK */ + slang_assembly_typeinfo array_ti, elem_ti; + slang_ir_node *base; + GLint index; + + /* get type of array element */ + slang_assembly_typeinfo_construct(&elem_ti); + _slang_typeof_operation(A, oper, &elem_ti); + + /* get type of array */ + slang_assembly_typeinfo_construct(&array_ti); + _slang_typeof_operation(A, &oper->children[0], &array_ti); + + + base = _slang_gen_operation(A, &oper->children[0]); + assert(base->Opcode == IR_VAR); + assert(base->Store); + + index = (GLint) oper->children[1].literal[0]; + /*printf("element[%d]\n", index);*/ + /* new storage info since we don't want to change the original */ + base->Store = _slang_clone_ir_storage(base->Store); + if (_slang_type_is_vector(array_ti.spec.type)) { + /* scalar element (float) of a basic vector (vec3) */ + const GLuint max = _slang_type_dim(array_ti.spec.type); + if (index >= max) { + RETURN_ERROR("array index out of bounds", 0); + } + assert(index < 4); + /* use swizzle to access the element */ + base->Swizzle = SWIZZLE_X + index; + base->Writemask = WRITEMASK_X << index; + } + else { + /* bias Index by array subscript, update storage size */ + base->Store->Index += index; + base->Store->Size = _slang_sizeof_type_specifier(&elem_ti.spec); + } + return base; + } + else { + /* run-time index - not supported yet - TBD */ + abort(); + return NULL; + } +} + + +/** + * Generate IR tree for a slang_operation (AST node) + */ +static slang_ir_node * +_slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { switch (oper->type) { case slang_oper_block_no_new_scope: @@ -1116,38 +1324,43 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n, *tree = NULL; GLuint i; for (i = 0; i < oper->num_children; i++) { - n = slang_assemble_operation(A, &oper->children[i]); + n = _slang_gen_operation(A, &oper->children[i]); + if (!n) + return NULL; /* error must have occured */ tree = tree ? new_seq(tree, n) : n; } return tree; } break; case slang_oper_expression: - return slang_assemble_operation(A, &oper->children[0]); + return _slang_gen_operation(A, &oper->children[0]); break; case slang_oper_while: return _slang_gen_while(A, oper); case slang_oper_for: return _slang_gen_for(A, oper); case slang_oper_break: - ASSERT(CurLoopBreak); + if (!CurLoopBreak) { + RETURN_ERROR("'break' not in loop", 0); + } return new_jump(CurLoopBreak); case slang_oper_continue: - ASSERT(CurLoopCont); + if (!CurLoopCont) { + RETURN_ERROR("'continue' not in loop", 0); + } return new_jump(CurLoopCont); - break; case slang_oper_equal: return new_node(IR_SEQUAL, - slang_assemble_operation(A, &oper->children[0]), - slang_assemble_operation(A, &oper->children[1])); + _slang_gen_operation(A, &oper->children[0]), + _slang_gen_operation(A, &oper->children[1])); case slang_oper_notequal: return new_node(IR_SNEQUAL, - slang_assemble_operation(A, &oper->children[0]), - slang_assemble_operation(A, &oper->children[1])); + _slang_gen_operation(A, &oper->children[0]), + _slang_gen_operation(A, &oper->children[1])); case slang_oper_greater: return new_node(IR_SGT, - slang_assemble_operation(A, &oper->children[0]), - slang_assemble_operation(A, &oper->children[1])); + _slang_gen_operation(A, &oper->children[0]), + _slang_gen_operation(A, &oper->children[1])); case slang_oper_less: /* child[0] < child[1] ----> child[1] > child[0] */ #if 0 @@ -1155,138 +1368,75 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n; assert(oper->num_children == 2); /* XXX tranpose children */ - n = slang_assemble_function_call_name(A, "<", oper, NULL); + n = _slang_gen_function_call_name(A, "<", oper, NULL); return n; } #else /** the operands must be ints or floats, not vectors */ return new_node(IR_SGT, - slang_assemble_operation(A, &oper->children[1]), - slang_assemble_operation(A, &oper->children[0])); + _slang_gen_operation(A, &oper->children[1]), + _slang_gen_operation(A, &oper->children[0])); #endif case slang_oper_greaterequal: return new_node(IR_SGE, - slang_assemble_operation(A, &oper->children[0]), - slang_assemble_operation(A, &oper->children[1])); + _slang_gen_operation(A, &oper->children[0]), + _slang_gen_operation(A, &oper->children[1])); case slang_oper_lessequal: /* child[0] <= child[1] ----> child[1] >= child[0] */ return new_node(IR_SGE, - slang_assemble_operation(A, &oper->children[1]), - slang_assemble_operation(A, &oper->children[0])); + _slang_gen_operation(A, &oper->children[1]), + _slang_gen_operation(A, &oper->children[0])); case slang_oper_add: { slang_ir_node *n; assert(oper->num_children == 2); - n = slang_assemble_function_call_name(A, "+", oper, NULL); + n = _slang_gen_function_call_name(A, "+", oper, NULL); return n; } case slang_oper_subtract: { slang_ir_node *n; assert(oper->num_children == 2); - n = slang_assemble_function_call_name(A, "-", oper, NULL); + n = _slang_gen_function_call_name(A, "-", oper, NULL); return n; } case slang_oper_multiply: { slang_ir_node *n; assert(oper->num_children == 2); - n = slang_assemble_function_call_name(A, "*", oper, NULL); + n = _slang_gen_function_call_name(A, "*", oper, NULL); return n; } case slang_oper_divide: { slang_ir_node *n; assert(oper->num_children == 2); - n = slang_assemble_function_call_name(A, "/", oper, NULL); + n = _slang_gen_function_call_name(A, "/", oper, NULL); return n; } case slang_oper_variable_decl: - { - slang_ir_node *n; - slang_ir_node *varDecl; - slang_variable *v; - - assert(oper->num_children == 0 || oper->num_children == 1); - - v = _slang_locate_variable(oper->locals, oper->a_id, GL_TRUE); - assert(v); - varDecl = new_var_decl(A, v); - slang_resolve_storage(A->codegen, varDecl, A->program); - - if (oper->num_children > 0) { - /* child is initializer */ - slang_ir_node *var, *init, *rhs; - assert(oper->num_children == 1); - var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); - /* XXX make copy of this initializer? */ - /* - printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); - */ - rhs = slang_assemble_operation(A, &oper->children[0]); - init = new_node(IR_MOVE, var, rhs); - /*assert(rhs->Opcode != IR_SEQ);*/ - n = new_seq(varDecl, init); - } - else if (v->initializer) { - slang_ir_node *var, *init, *rhs; - var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); - /* XXX make copy of this initializer? */ - /* - printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); - */ - rhs = slang_assemble_operation(A, v->initializer); - init = new_node(IR_MOVE, var, rhs); - /* - assert(rhs->Opcode != IR_SEQ); - */ - n = new_seq(varDecl, init); - } - else { - n = varDecl; - } - return n; - } - break; + return _slang_gen_declaration(A, oper); case slang_oper_assign: - /* assignment */ - /* XXX look for special case of: x = f(a, b) - * and replace with f(a, b, x) (where x == hidden __retVal out param) - */ - if (oper->children[0].type == slang_oper_identifier && - oper->children[1].type == slang_oper_call) { - /* special case */ - slang_ir_node *n; - n = slang_assemble_function_call_name(A, - (const char *) oper->children[1].a_id, - &oper->children[1], &oper->children[0]); - return n; + return _slang_gen_assignment(A, oper); + case slang_oper_addassign: + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = _slang_gen_function_call_name(A, "+=", oper, NULL); + /* The result of this operation should be stored back into child[0] */ + assert(n->Children[0]->Store); + n->Store = n->Children[0]->Store; + return n; } - else + case slang_oper_subassign: { - slang_operation *lhs = &oper->children[0]; - slang_ir_node *n, *c0, *c1; - GLuint mask = WRITEMASK_XYZW; - if (lhs->type == slang_oper_field) { - /* XXXX this is a hack! */ - /* writemask */ - if (!slang_is_writemask((char *) lhs->a_id, &mask)) - mask = WRITEMASK_XYZW; - lhs = &lhs->children[0]; - } - c0 = slang_assemble_operation(A, lhs); - c1 = slang_assemble_operation(A, &oper->children[1]); - - n = new_node(IR_MOVE, c0, c1); - /* - assert(c1->Opcode != IR_SEQ); - */ - if (c0->Writemask != WRITEMASK_XYZW) - /* XXX this is a hack! */ - n->Writemask = c0->Writemask; - else - n->Writemask = mask; + slang_ir_node *n; + assert(oper->num_children == 2); + n = _slang_gen_function_call_name(A, "-=", oper, NULL); + /* The result of this operation should be stored back into child[0] */ + assert(n->Children[0]->Store); + n->Store = n->Children[0]->Store; return n; } break; @@ -1294,124 +1444,41 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; assert(oper->num_children == 2); - /* XXX tranpose children */ - n = slang_assemble_function_call_name(A, "*=", oper, NULL); + n = _slang_gen_function_call_name(A, "*=", oper, NULL); + /* The result of this operation should be stored back into child[0] */ + assert(n->Children[0]->Store); + n->Store = n->Children[0]->Store; + return n; + } + case slang_oper_divassign: + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = _slang_gen_function_call_name(A, "/=", oper, NULL); + /* The result of this operation should be stored back into child[0] */ + assert(n->Children[0]->Store); + n->Store = n->Children[0]->Store; return n; } - break; case slang_oper_asm: - return slang_assemble_asm(A, oper, NULL); + return _slang_gen_asm(A, oper, NULL); case slang_oper_call: - return slang_assemble_function_call_name(A, (const char *) oper->a_id, - oper, NULL); - break; + return _slang_gen_function_call_name(A, (const char *) oper->a_id, + oper, NULL); case slang_oper_return: - return slang_assemble_return(A, oper); + return _slang_gen_return(A, oper); case slang_oper_goto: return new_jump((char*) oper->a_id); case slang_oper_label: return new_label((char*) oper->a_id); case slang_oper_identifier: - { - /* If there's a variable associated with this oper (from inlining) - * use it. Otherwise, use the oper's var id. - */ - slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; - slang_ir_node *n = new_var(A, oper, aVar, SWIZZLE_NOOP); - assert(oper->var); - return n; - } - break; + return _slang_gen_variable(A, oper); case slang_oper_if: return _slang_gen_if(A, oper); case slang_oper_field: - { - slang_assembly_typeinfo ti; - slang_assembly_typeinfo_construct(&ti); - _slang_typeof_operation(A, &oper->children[0], &ti); - if (_slang_type_is_vector(ti.spec.type)) { - /* the field should be a swizzle */ - const GLuint rows = _slang_type_dim(ti.spec.type); - slang_swizzle swz; - slang_ir_node *n; - if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { - RETURN_ERROR("Bad swizzle", 0); - } - n = slang_assemble_operation(A, &oper->children[0]); - n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], - swz.swizzle[1], - swz.swizzle[2], - swz.swizzle[3]); - return n; - } - else if (ti.spec.type == slang_spec_float) { - const GLuint rows = 1; - slang_swizzle swz; - slang_ir_node *n; - if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { - RETURN_ERROR("Bad swizzle", 0); - } - n = slang_assemble_operation(A, &oper->children[0]); - n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], - swz.swizzle[1], - swz.swizzle[2], - swz.swizzle[3]); - return n; - } - else { - /* the field is a structure member */ - abort(); - } - } - break; + return _slang_gen_field(A, oper); case slang_oper_subscript: - /* array dereference */ - if (oper->children[1].type == slang_oper_literal_int) { - /* compile-time constant index - OK */ - slang_assembly_typeinfo array_ti, elem_ti; - slang_ir_node *base; - GLint index; - - /* get type of array element */ - slang_assembly_typeinfo_construct(&elem_ti); - _slang_typeof_operation(A, oper, &elem_ti); - - /* get type of array */ - slang_assembly_typeinfo_construct(&array_ti); - _slang_typeof_operation(A, &oper->children[0], &array_ti); - - - base = slang_assemble_operation(A, &oper->children[0]); - assert(base->Opcode == IR_VAR); - assert(base->Store); - - index = (GLint) oper->children[1].literal[0]; - /*printf("element[%d]\n", index);*/ - /* new storage info since we don't want to change the original */ - base->Store = _slang_clone_ir_storage(base->Store); - if (_slang_type_is_vector(array_ti.spec.type)) { - /* scalar element (float) of a basic vector (vec3) */ - const GLuint max = _slang_type_dim(array_ti.spec.type); - if (index >= max) { - RETURN_ERROR("array index out of bounds", 0); - } - assert(index < 4); - /* use swizzle to access the element */ - base->Swizzle = SWIZZLE_X + index; - base->Writemask = WRITEMASK_X << index; - } - else { - /* bias Index by array subscript, update storage size */ - base->Store->Index += index; - base->Store->Size = _slang_sizeof_type_specifier(&elem_ti.spec); - } - return base; - } - else { - /* run-time index - not supported yet - TBD */ - abort(); - } - return NULL; + return _slang_gen_subscript(A, oper); case slang_oper_literal_float: return new_float_literal(oper->literal[0], oper->literal[1], oper->literal[2], oper->literal[3]); @@ -1422,7 +1489,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_postincrement: /* XXX not 100% about this */ { - slang_ir_node *var = slang_assemble_operation(A, &oper->children[0]); + slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); slang_ir_node *sum = new_node(IR_ADD, var, one); slang_ir_node *assign = new_node(IR_MOVE, var, sum); @@ -1435,7 +1502,7 @@ slang_assemble_operation(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *tree = NULL; GLuint i; for (i = 0; i < oper->num_children; i++) { - slang_ir_node *n = slang_assemble_operation(A, &oper->children[i]); + slang_ir_node *n = _slang_gen_operation(A, &oper->children[i]); tree = tree ? new_seq(tree, n) : n; } return tree; @@ -1485,10 +1552,12 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) if (!CurFunction->end_label) CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunction_Main"); - n = slang_assemble_operation(A, fun->body); + n = _slang_gen_operation(A, fun->body); - endLabel = new_label(fun->end_label); - n = new_seq(n, endLabel); + if (n) { + endLabel = new_label(fun->end_label); + n = new_seq(n, endLabel); + } CurFunction = NULL; -- cgit v1.2.3 From 2e76f0a846b8273843dca701543f1cba70284751 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 09:52:07 -0700 Subject: check for null Parameters ptr in _mesa_clone_program() --- src/mesa/shader/program.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index c504c7c5c5..351427365c 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -358,9 +358,11 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) prog->NumInstructions * sizeof(struct prog_instruction)); clone->InputsRead = prog->InputsRead; clone->OutputsWritten = prog->OutputsWritten; - clone->Parameters = _mesa_clone_parameter_list(prog->Parameters); + if (prog->Parameters) + clone->Parameters = _mesa_clone_parameter_list(prog->Parameters); memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); - clone->Varying = _mesa_clone_parameter_list(prog->Varying); + if (prog->Varying) + clone->Varying = _mesa_clone_parameter_list(prog->Varying); memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); clone->NumInstructions = prog->NumInstructions; clone->NumTemporaries = prog->NumTemporaries; -- cgit v1.2.3 From 46b06bdb2664b7a553fdc9e30367001ab39db804 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 17:59:32 -0700 Subject: Massive re-org of GLSL-related API functions. Added new GLSL functions to struct dd_function_table. main/shaders.c calls GLSL functions through the dd_function_table. shader/shader_api.c implements the API functions. Other assorted changes, fixes everywhere else. --- src/mesa/main/shaders.c | 667 ++++++++++ src/mesa/main/shaders.h | 241 ++++ src/mesa/shader/shaderobjects.c | 1335 -------------------- src/mesa/shader/shaderobjects.h | 364 ------ src/mesa/shader/shaderobjects_3dlabs.c | 2152 -------------------------------- src/mesa/shader/shaderobjects_3dlabs.h | 51 - 6 files changed, 908 insertions(+), 3902 deletions(-) create mode 100644 src/mesa/main/shaders.c create mode 100644 src/mesa/main/shaders.h delete mode 100644 src/mesa/shader/shaderobjects.c delete mode 100644 src/mesa/shader/shaderobjects.h delete mode 100644 src/mesa/shader/shaderobjects_3dlabs.c delete mode 100644 src/mesa/shader/shaderobjects_3dlabs.h (limited to 'src') diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c new file mode 100644 index 0000000000..73f27ed2d3 --- /dev/null +++ b/src/mesa/main/shaders.c @@ -0,0 +1,667 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2004-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "glheader.h" +#include "context.h" +#include "shaders.h" + + +/** + * These are basically just wrappers/adaptors for calling the + * ctx->Driver.foobar() GLSL-related functions. + * + * Things are biased toward the OpenGL 2.0 functions rather than the + * ARB extensions (i.e. the ARB functions are layered on the 2.0 functions). + * + * The general idea here is to allow enough modularity such that a + * completely different GLSL implemenation can be plugged in and co-exist + * with Mesa's native GLSL code. + */ + + + +void GLAPIENTRY +_mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.AttachShader(ctx, program, shader); +} + + +void GLAPIENTRY +_mesa_AttachShader(GLuint program, GLuint shader) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.AttachShader(ctx, program, shader); +} + + +void GLAPIENTRY +_mesa_BindAttribLocationARB(GLhandleARB program, GLuint index, + const GLcharARB *name) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.BindAttribLocation(ctx, program, index, name); +} + + +void GLAPIENTRY +_mesa_CompileShaderARB(GLhandleARB shaderObj) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.CompileShader(ctx, shaderObj); +} + + +GLuint GLAPIENTRY +_mesa_CreateShader(GLenum type) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.CreateShader(ctx, type); +} + + +GLhandleARB APIENTRY +_mesa_CreateShaderObjectARB(GLenum type) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.CreateShader(ctx, type); +} + + +GLuint GLAPIENTRY +_mesa_CreateProgram(void) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.CreateProgram(ctx); +} + + +GLhandleARB APIENTRY +_mesa_CreateProgramObjectARB(void) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.CreateProgram(ctx); +} + + +void GLAPIENTRY +_mesa_DeleteObjectARB(GLhandleARB obj) +{ + GET_CURRENT_CONTEXT(ctx); + if (ctx->Driver.IsProgram(ctx, obj)) { + ctx->Driver.DeleteProgram2(ctx, obj); + } + else if (ctx->Driver.IsShader(ctx, obj)) { + ctx->Driver.DeleteShader(ctx, obj); + } + else { + /* error? */ + } +} + + +void GLAPIENTRY +_mesa_DeleteProgram(GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.DeleteProgram2(ctx, name); +} + + +void GLAPIENTRY +_mesa_DeleteShader(GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.DeleteShader(ctx, name); +} + + +void GLAPIENTRY +_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.DetachShader(ctx, program, shader); +} + + +void GLAPIENTRY +_mesa_DetachShader(GLuint program, GLuint shader) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.DetachShader(ctx, program, shader); +} + + +void GLAPIENTRY +_mesa_GetActiveAttribARB(GLhandleARB program, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLcharARB * name) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetActiveAttrib(ctx, program, index, maxLength, length, size, + type, name); +} + + +void GLAPIENTRY +_mesa_GetActiveUniformARB(GLhandleARB program, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLcharARB * name) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetActiveUniform(ctx, program, index, maxLength, length, size, + type, name); +} + + +void GLAPIENTRY +_mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount, + GLsizei * count, GLhandleARB * obj) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetAttachedShaders(ctx, container, maxCount, count, obj); +} + + +void GLAPIENTRY +_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetAttachedShaders(ctx, program, maxCount, count, obj); +} + + +GLint GLAPIENTRY +_mesa_GetAttribLocationARB(GLhandleARB program, const GLcharARB * name) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.GetAttribLocation(ctx, program, name); +} + + +void GLAPIENTRY +_mesa_GetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei * length, + GLcharARB * infoLog) +{ + GET_CURRENT_CONTEXT(ctx); + /* Implement in terms of GetProgramInfoLog, GetShaderInfoLog */ + if (ctx->Driver.IsProgram(ctx, object)) { + ctx->Driver.GetProgramInfoLog(ctx, object, maxLength, length, infoLog); + } + else if (ctx->Driver.IsShader(ctx, object)) { + ctx->Driver.GetShaderInfoLog(ctx, object, maxLength, length, infoLog); + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetInfoLogARB"); + } +} + + +void GLAPIENTRY +_mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params) +{ + GET_CURRENT_CONTEXT(ctx); + /* Implement in terms of GetProgramiv, GetShaderiv */ + if (ctx->Driver.IsProgram(ctx, object)) { + ctx->Driver.GetProgramiv(ctx, object, pname, params); + } + else if (ctx->Driver.IsShader(ctx, object)) { + ctx->Driver.GetShaderiv(ctx, object, pname, params); + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB"); + } +} + + +void GLAPIENTRY +_mesa_GetObjectParameterfvARB(GLhandleARB object, GLenum pname, + GLfloat *params) +{ + GLint iparams[1]; /* XXX is one element enough? */ + _mesa_GetObjectParameterivARB(object, pname, iparams); + params[0] = (GLfloat) iparams[0]; +} + + +void GLAPIENTRY +_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetProgramiv(ctx, program, pname, params); +} + + +void GLAPIENTRY +_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetShaderiv(ctx, shader, pname, params); +} + + +void GLAPIENTRY +_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetProgramInfoLog(ctx, program, bufSize, length, infoLog); +} + + +void GLAPIENTRY +_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetShaderInfoLog(ctx, shader, bufSize, length, infoLog); +} + + +void GLAPIENTRY +_mesa_GetShaderSourceARB(GLhandleARB shader, GLsizei maxLength, + GLsizei *length, GLcharARB *sourceOut) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetShaderSource(ctx, shader, maxLength, length, sourceOut); +} + + +void GLAPIENTRY +_mesa_GetUniformfvARB(GLhandleARB program, GLint location, GLfloat * params) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.GetUniformfv(ctx, program, location, params); +} + + +void GLAPIENTRY +_mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint * params) +{ + GET_CURRENT_CONTEXT(ctx); + GLfloat fparams[16]; /* XXX is 16 enough? */ + GLuint i; + ctx->Driver.GetUniformfv(ctx, program, location, fparams); + for (i = 0; i < 16; i++) + params[i] = (GLint) fparams[i]; /* XXX correct? */ +} + + + +#if 0 +GLint APIENTRY +_mesa_GetUniformLocation(GLuint program, const GLcharARB *name) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.GetUniformLocation(ctx, program, name); +} +#endif + + +GLhandleARB GLAPIENTRY +_mesa_GetHandleARB(GLenum pname) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.GetHandle(ctx, pname); +} + + +GLint APIENTRY +_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.GetUniformLocation(ctx, programObj, name); +} + + +GLboolean GLAPIENTRY +_mesa_IsProgram(GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.IsProgram(ctx, name); +} + + +GLboolean GLAPIENTRY +_mesa_IsShader(GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->Driver.IsShader(ctx, name); +} + + +void GLAPIENTRY +_mesa_LinkProgramARB(GLhandleARB programObj) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.LinkProgram(ctx, programObj); +} + + +/** + * Called via glShaderSource() and glShaderSourceARB() API functions. + * Basically, concatenate the source code strings into one long string + * and pass it to ctx->Driver.ShaderSource(). + */ +void GLAPIENTRY +_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, + const GLcharARB ** string, const GLint * length) +{ + GET_CURRENT_CONTEXT(ctx); + GLint *offsets; + GLsizei i; + GLcharARB *source; + + if (string == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); + return; + } + + /* + * This array holds offsets of where the appropriate string ends, thus the + * last element will be set to the total length of the source code. + */ + offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); + if (offsets == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); + return; + } + + for (i = 0; i < count; i++) { + if (string[i] == NULL) { + _mesa_free((GLvoid *) offsets); + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(null string)"); + return; + } + if (length == NULL || length[i] < 0) + offsets[i] = _mesa_strlen(string[i]); + else + offsets[i] = length[i]; + /* accumulate string lengths */ + if (i > 0) + offsets[i] += offsets[i - 1]; + } + + source = (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * + sizeof(GLcharARB)); + if (source == NULL) { + _mesa_free((GLvoid *) offsets); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); + return; + } + + for (i = 0; i < count; i++) { + GLint start = (i > 0) ? offsets[i - 1] : 0; + _mesa_memcpy(source + start, string[i], + (offsets[i] - start) * sizeof(GLcharARB)); + } + source[offsets[count - 1]] = '\0'; + + ctx->Driver.ShaderSource(ctx, shaderObj, source); +} + + +void GLAPIENTRY +_mesa_Uniform1fARB(GLint location, GLfloat v0) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, 1, &v0, GL_FLOAT); +} + +void GLAPIENTRY +_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) +{ + GET_CURRENT_CONTEXT(ctx); + GLfloat v[2]; + v[0] = v0; + v[1] = v1; + ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC2); +} + +void GLAPIENTRY +_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +{ + GET_CURRENT_CONTEXT(ctx); + GLfloat v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC3); +} + +void GLAPIENTRY +_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, + GLfloat v3) +{ + GET_CURRENT_CONTEXT(ctx); + GLfloat v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + ctx->Driver.Uniform(ctx, location, 1, v, GL_FLOAT_VEC4); +} + +void GLAPIENTRY +_mesa_Uniform1iARB(GLint location, GLint v0) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, 1, &v0, GL_INT); +} + +void GLAPIENTRY +_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1) +{ + GET_CURRENT_CONTEXT(ctx); + GLint v[2]; + v[0] = v0; + v[1] = v1; + ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC2); +} + +void GLAPIENTRY +_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) +{ + GET_CURRENT_CONTEXT(ctx); + GLint v[3]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC3); +} + +void GLAPIENTRY +_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) +{ + GET_CURRENT_CONTEXT(ctx); + GLint v[4]; + v[0] = v0; + v[1] = v1; + v[2] = v2; + v[3] = v3; + ctx->Driver.Uniform(ctx, location, 1, v, GL_INT_VEC4); +} + +void GLAPIENTRY +_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT); +} + +void GLAPIENTRY +_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC2); +} + +void GLAPIENTRY +_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC3); +} + +void GLAPIENTRY +_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_FLOAT_VEC4); +} + +void GLAPIENTRY +_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_INT); +} + +void GLAPIENTRY +_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC2); +} + +void GLAPIENTRY +_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC3); +} + +void GLAPIENTRY +_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.Uniform(ctx, location, count, value, GL_INT_VEC4); +} + + +void GLAPIENTRY +_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 2, 2, GL_FLOAT_MAT2, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 3, 3, GL_FLOAT_MAT3, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, + const GLfloat * value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 4, 4, GL_FLOAT_MAT4, + location, count, transpose, value); +} + + +/** + * Non-square UniformMatrix are OpenGL 2.1 + */ +void GLAPIENTRY +_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 2, 3, GL_FLOAT_MAT2x3, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 3, 2, GL_FLOAT_MAT3x2, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 2, 4, GL_FLOAT_MAT2x4, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 4, 2, GL_FLOAT_MAT4x2, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 3, 4, GL_FLOAT_MAT3x4, + location, count, transpose, value); +} + +void GLAPIENTRY +_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.UniformMatrix(ctx, 4, 3, GL_FLOAT_MAT4x3, + location, count, transpose, value); +} + + +void GLAPIENTRY +_mesa_UseProgramObjectARB(GLhandleARB program) +{ + GET_CURRENT_CONTEXT(ctx); + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + ctx->Driver.UseProgram(ctx, program); +} + + +void GLAPIENTRY +_mesa_ValidateProgramARB(GLhandleARB program) +{ + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.ValidateProgram(ctx, program); +} + diff --git a/src/mesa/main/shaders.h b/src/mesa/main/shaders.h new file mode 100644 index 0000000000..a098c4c331 --- /dev/null +++ b/src/mesa/main/shaders.h @@ -0,0 +1,241 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2004-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef SHADERS_H +#define SHADERS_H + + +#include "glheader.h" +#include "mtypes.h" + + +extern void GLAPIENTRY +_mesa_DeleteObjectARB(GLhandleARB obj); + +extern GLhandleARB GLAPIENTRY +_mesa_GetHandleARB(GLenum pname); + +extern void GLAPIENTRY +_mesa_DetachObjectARB (GLhandleARB, GLhandleARB); + +extern GLhandleARB GLAPIENTRY +_mesa_CreateShaderObjectARB (GLenum); + +extern void GLAPIENTRY +_mesa_ShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); + +extern void GLAPIENTRY +_mesa_CompileShaderARB (GLhandleARB); + +extern GLhandleARB GLAPIENTRY +_mesa_CreateProgramObjectARB (void); + +extern void GLAPIENTRY +_mesa_AttachObjectARB (GLhandleARB, GLhandleARB); + +extern void GLAPIENTRY +_mesa_LinkProgramARB (GLhandleARB); + +extern void GLAPIENTRY +_mesa_UseProgramObjectARB (GLhandleARB); + +extern void GLAPIENTRY +_mesa_ValidateProgramARB (GLhandleARB); + +extern void GLAPIENTRY +_mesa_Uniform1fARB (GLint, GLfloat); + +extern void GLAPIENTRY +_mesa_Uniform2fARB (GLint, GLfloat, GLfloat); + +extern void GLAPIENTRY +_mesa_Uniform3fARB (GLint, GLfloat, GLfloat, GLfloat); + +extern void GLAPIENTRY +_mesa_Uniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat); + +extern void GLAPIENTRY +_mesa_Uniform1iARB (GLint, GLint); + +extern void GLAPIENTRY +_mesa_Uniform2iARB (GLint, GLint, GLint); + +extern void GLAPIENTRY +_mesa_Uniform3iARB (GLint, GLint, GLint, GLint); + +extern void GLAPIENTRY +_mesa_Uniform4iARB (GLint, GLint, GLint, GLint, GLint); + +extern void GLAPIENTRY +_mesa_Uniform1fvARB (GLint, GLsizei, const GLfloat *); + +extern void GLAPIENTRY +_mesa_Uniform2fvARB (GLint, GLsizei, const GLfloat *); + +extern void GLAPIENTRY +_mesa_Uniform3fvARB (GLint, GLsizei, const GLfloat *); + +extern void GLAPIENTRY +_mesa_Uniform4fvARB (GLint, GLsizei, const GLfloat *); + +extern void GLAPIENTRY +_mesa_Uniform1ivARB (GLint, GLsizei, const GLint *); + +extern void GLAPIENTRY +_mesa_Uniform2ivARB (GLint, GLsizei, const GLint *); + +extern void GLAPIENTRY +_mesa_Uniform3ivARB (GLint, GLsizei, const GLint *); + +extern void GLAPIENTRY +_mesa_Uniform4ivARB (GLint, GLsizei, const GLint *); + +extern void GLAPIENTRY +_mesa_UniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *); + +extern void GLAPIENTRY +_mesa_UniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *); + +extern void GLAPIENTRY +_mesa_UniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *); + +extern void GLAPIENTRY +_mesa_GetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *); + +extern void GLAPIENTRY +_mesa_GetObjectParameterivARB (GLhandleARB, GLenum, GLint *); + +extern void GLAPIENTRY +_mesa_GetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); + +extern void GLAPIENTRY +_mesa_GetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); + +extern GLint GLAPIENTRY +_mesa_GetUniformLocationARB (GLhandleARB, const GLcharARB *); + +extern void GLAPIENTRY +_mesa_GetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); + +extern void GLAPIENTRY +_mesa_GetUniformfvARB (GLhandleARB, GLint, GLfloat *); + +extern void GLAPIENTRY +_mesa_GetUniformivARB (GLhandleARB, GLint, GLint *); + +extern void GLAPIENTRY +_mesa_GetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); + +#if FEATURE_ARB_vertex_shader + +extern void GLAPIENTRY +_mesa_BindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *); + +extern void GLAPIENTRY +_mesa_GetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); + +extern GLint GLAPIENTRY +_mesa_GetAttribLocationARB (GLhandleARB, const GLcharARB *); + +#endif /* FEATURE_ARB_vertex_shader */ + + +/* 2.0 */ +extern void GLAPIENTRY +_mesa_AttachShader(GLuint program, GLuint shader); + +extern GLuint GLAPIENTRY +_mesa_CreateShader(GLenum); + +extern GLuint GLAPIENTRY +_mesa_CreateProgram(void); + +extern void GLAPIENTRY +_mesa_DeleteProgram(GLuint program); + +extern void GLAPIENTRY +_mesa_DeleteShader(GLuint shader); + +extern void GLAPIENTRY +_mesa_DetachShader(GLuint program, GLuint shader); + +extern void GLAPIENTRY +_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj); + +extern void GLAPIENTRY +_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params); + +extern void GLAPIENTRY +_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern void GLAPIENTRY +_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params); + +extern void GLAPIENTRY +_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern GLboolean GLAPIENTRY +_mesa_IsProgram(GLuint program); + +extern GLboolean GLAPIENTRY +_mesa_IsShader(GLuint shader); + + + +/* 2.1 */ +extern void GLAPIENTRY +_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + +extern void GLAPIENTRY +_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, + const GLfloat *value); + + +/*** XXXX temporary here ! */ +extern void +_mesa_init_shader_state(GLcontext *ctx); + + +#endif /* SHADERS_H */ diff --git a/src/mesa/shader/shaderobjects.c b/src/mesa/shader/shaderobjects.c deleted file mode 100644 index 24fab9822b..0000000000 --- a/src/mesa/shader/shaderobjects.c +++ /dev/null @@ -1,1335 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file shaderobjects.c - * ARB_shader_objects state management functions - * \author Michal Krol - */ - - -#include "glheader.h" -#include "context.h" -#include "hash.h" -#include "macros.h" -#include "program.h" -#include "prog_parameter.h" -#include "shaderobjects.h" -#include "shaderobjects_3dlabs.h" -#include "slang_link.h" - -#define NEW_SLANG 1 - -#if FEATURE_ARB_shader_objects - -#define RELEASE_GENERIC(x)\ - (**x)._unknown.Release ((struct gl2_unknown_intf **) (x)) - -#define RELEASE_CONTAINER(x)\ - (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) - -#define RELEASE_PROGRAM(x)\ - (**x)._container._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) - -#define RELEASE_SHADER(x)\ - (**x)._generic._unknown.Release ((struct gl2_unknown_intf **) (x)) - - - -static struct gl2_unknown_intf ** -lookup_handle(GLcontext * ctx, GLhandleARB handle, enum gl2_uiid uiid, - const char *function) -{ - struct gl2_unknown_intf **unk; - - /* - * Note: _mesa_HashLookup() requires non-zero input values, so the - * passed-in handle value must be checked beforehand. - */ - if (handle == 0) { - _mesa_error(ctx, GL_INVALID_VALUE, function); - return NULL; - } - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - unk = (struct gl2_unknown_intf **) _mesa_HashLookup(ctx->Shared->GL2Objects, - handle); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - - if (unk == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, function); - } - else { - unk = (**unk).QueryInterface(unk, uiid); - if (unk == NULL) - _mesa_error(ctx, GL_INVALID_OPERATION, function); - } - return unk; -} - -#define GET_GENERIC(x, handle, function)\ - struct gl2_generic_intf **x = (struct gl2_generic_intf **)\ - lookup_handle (ctx, handle, UIID_GENERIC, function); - -#define GET_CONTAINER(x, handle, function)\ - struct gl2_container_intf **x = (struct gl2_container_intf **)\ - lookup_handle (ctx, handle, UIID_CONTAINER, function); - -#define GET_PROGRAM(x, handle, function)\ - struct gl2_program_intf **x = (struct gl2_program_intf **)\ - lookup_handle (ctx, handle, UIID_PROGRAM, function); - -#define GET_SHADER(x, handle, function)\ - struct gl2_shader_intf **x = (struct gl2_shader_intf **)\ - lookup_handle (ctx, handle, UIID_SHADER, function); - - -#define GET_LINKED_PROGRAM(x, handle, function) \ - GET_PROGRAM(x, handle, function); \ - if (x && (**x).GetLinkStatus(x) == GL_FALSE) { \ - RELEASE_PROGRAM(x); \ - _mesa_error(ctx, GL_INVALID_OPERATION, function); \ - x = NULL; \ - } - -#define GET_CURRENT_LINKED_PROGRAM(x, function) \ - struct gl2_program_intf **x = ctx->ShaderObjects.CurrentProgram; \ - if (!x || (**x).GetLinkStatus(x) == GL_FALSE) { \ - _mesa_error(ctx, GL_INVALID_OPERATION, function); \ - return; \ - } - - - -#define IS_NAME_WITH_GL_PREFIX(x) ((x)[0] == 'g' && (x)[1] == 'l' && (x)[2] == '_') - - -GLvoid GLAPIENTRY -_mesa_DeleteObjectARB(GLhandleARB obj) -{ - if (obj != 0) { - GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, obj, "glDeleteObjectARB"); - - if (gen != NULL) { - (**gen).Delete(gen); - RELEASE_GENERIC(gen); - } - } -} - -GLhandleARB GLAPIENTRY -_mesa_GetHandleARB(GLenum pname) -{ - GET_CURRENT_CONTEXT(ctx); - - switch (pname) { - case GL_PROGRAM_OBJECT_ARB: - { - struct gl2_program_intf **pro = ctx->ShaderObjects.CurrentProgram; - - if (pro != NULL) - return (**pro)._container._generic. - GetName((struct gl2_generic_intf **) (pro)); - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB"); - } - - return 0; -} - -GLvoid GLAPIENTRY -_mesa_DetachObjectARB(GLhandleARB containerObj, GLhandleARB attachedObj) -{ - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glDetachObjectARB"); - - if (con != NULL) { - GET_GENERIC(att, attachedObj, "glDetachObjectARB"); - - if (att != NULL) { - (**con).Detach(con, att); - RELEASE_GENERIC(att); - } - RELEASE_CONTAINER(con); - } -} - -GLhandleARB GLAPIENTRY -_mesa_CreateShaderObjectARB(GLenum shaderType) -{ - return _mesa_3dlabs_create_shader_object(shaderType); -} - -GLvoid GLAPIENTRY -_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, - const GLcharARB ** string, const GLint * length) -{ - GET_CURRENT_CONTEXT(ctx); - GLint *offsets; - GLsizei i; - GLcharARB *source; - GET_SHADER(sha, shaderObj, "glShaderSourceARB"); - - if (sha == NULL) - return; - - if (string == NULL) { - RELEASE_SHADER(sha); - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); - return; - } - - /* - * This array holds offsets of where the appropriate string ends, thus the - * last element will be set to the total length of the source code. - */ - offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); - if (offsets == NULL) { - RELEASE_SHADER(sha); - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } - - for (i = 0; i < count; i++) { - if (string[i] == NULL) { - _mesa_free((GLvoid *) offsets); - RELEASE_SHADER(sha); - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); - return; - } - if (length == NULL || length[i] < 0) - offsets[i] = _mesa_strlen(string[i]); - else - offsets[i] = length[i]; - /* accumulate string lengths */ - if (i > 0) - offsets[i] += offsets[i - 1]; - } - - source = (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * - sizeof(GLcharARB)); - if (source == NULL) { - _mesa_free((GLvoid *) offsets); - RELEASE_SHADER(sha); - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } - - for (i = 0; i < count; i++) { - GLint start = (i > 0) ? offsets[i - 1] : 0; - _mesa_memcpy(source + start, string[i], - (offsets[i] - start) * sizeof(GLcharARB)); - } - source[offsets[count - 1]] = '\0'; - - (**sha).SetSource(sha, source, offsets, count); - RELEASE_SHADER(sha); -} - -GLvoid GLAPIENTRY -_mesa_CompileShaderARB(GLhandleARB shaderObj) -{ - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sha, shaderObj, "glCompileShaderARB"); - - if (sha != NULL) { - (**sha).Compile(sha); - RELEASE_SHADER(sha); - } -} - -GLhandleARB GLAPIENTRY -_mesa_CreateProgramObjectARB(GLvoid) -{ - return _mesa_3dlabs_create_program_object(); -} - -GLvoid GLAPIENTRY -_mesa_AttachObjectARB(GLhandleARB containerObj, GLhandleARB obj) -{ - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glAttachObjectARB"); - - if (con != NULL) { - GET_GENERIC(att, obj, "glAttachObjectARB"); - - if (att != NULL) { - (**con).Attach(con, att); - RELEASE_GENERIC(att); - } - RELEASE_CONTAINER(con); - } -} - -GLvoid GLAPIENTRY -_mesa_LinkProgramARB(GLhandleARB programObj) -{ - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glLinkProgramARB"); - - if (pro != NULL) { - (**pro).Link(pro); - if (pro == ctx->ShaderObjects.CurrentProgram) { - if ((**pro).GetLinkStatus(pro)) - _mesa_UseProgramObjectARB(programObj); - else - _mesa_UseProgramObjectARB(0); - } - RELEASE_PROGRAM(pro); - } -#if NEW_SLANG - { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, programObj); - _slang_link2(ctx, programObj, linked); - } -#endif -} - -GLvoid GLAPIENTRY -_mesa_UseProgramObjectARB(GLhandleARB programObj) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_program_intf **program = NULL; - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (programObj != 0) { - GET_PROGRAM(pro, programObj, "glUseProgramObjectARB(program)"); - - if (pro == NULL) - return; - - if ((**pro).GetLinkStatus(pro) == GL_FALSE) { - RELEASE_PROGRAM(pro); - _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB(not linked)"); - return; - } - - program = pro; - - ctx->ShaderObjects._VertexShaderPresent = - (**pro).IsShaderPresent(pro, GL_VERTEX_SHADER_ARB); - ctx->ShaderObjects._FragmentShaderPresent = - (**pro).IsShaderPresent(pro, GL_FRAGMENT_SHADER_ARB); - } - else { - ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; - ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; - } - - if (ctx->ShaderObjects.CurrentProgram != NULL) - RELEASE_PROGRAM(ctx->ShaderObjects.CurrentProgram); - ctx->ShaderObjects.CurrentProgram = program; - -#if NEW_SLANG - if (programObj) { - ctx->ShaderObjects.Linked = _mesa_lookup_linked_program(ctx, programObj); - } - else { - ctx->ShaderObjects.Linked = NULL; - } -#endif -} - -GLvoid GLAPIENTRY -_mesa_ValidateProgramARB(GLhandleARB programObj) -{ - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glValidateProgramARB"); - - if (pro != NULL) { - (**pro).Validate(pro); - RELEASE_PROGRAM(pro); - } -} - - -/** - * Helper function for all the _mesa_Uniform*() functions below. - */ -static INLINE void -uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, - const char *caller) -{ - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, caller); - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - -#if NEW_SLANG - if (ctx->ShaderObjects.Linked) { - struct gl_linked_program *linked = ctx->ShaderObjects.Linked; - if (location >= 0 && location < linked->Uniforms->NumParameters) { - GLfloat *v = linked->Uniforms->ParameterValues[location]; - const GLfloat *fValues = (const GLfloat *) values; /* XXX */ - GLint i; - if (type == GL_FLOAT_VEC4) - count *= 4; - else if (type == GL_FLOAT_VEC3) - count *= 3; - else - abort(); - - for (i = 0; i < count; i++) - v[i] = fValues[i]; - return; - } - } -#else - if (!(**pro).WriteUniform(pro, location, count, values, type)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif -} - - -GLvoid GLAPIENTRY -_mesa_Uniform1fARB(GLint location, GLfloat v0) -{ - uniform(location, 1, &v0, GL_FLOAT, "glUniform1fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) -{ - GLfloat v[2]; - v[0] = v0; - v[1] = v1; - uniform(location, 1, v, GL_FLOAT_VEC2, "glUniform2fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - GLfloat v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - uniform(location, 1, v, GL_FLOAT_VEC3, "glUniform3fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, - GLfloat v3) -{ - GLfloat v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - uniform(location, 1, v, GL_FLOAT_VEC4, "glUniform4fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1iARB(GLint location, GLint v0) -{ - uniform(location, 1, &v0, GL_INT, "glUniform1iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1) -{ - GLint v[2]; - v[0] = v0; - v[1] = v1; - uniform(location, 1, v, GL_INT_VEC2, "glUniform2iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) -{ - GLint v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - uniform(location, 1, v, GL_INT_VEC3, "glUniform3iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - GLint v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - uniform(location, 1, v, GL_INT_VEC4, "glUniform4iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT, "glUniform1fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC2, "glUniform2fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC3, "glUniform3fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC4, "glUniform4fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT, "glUniform1ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC2, "glUniform2ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC3, "glUniform3ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC4, "glUniform4ivARB"); -} - - -/** - * Helper function used by UniformMatrix**vARB() functions below. - */ -static void -uniform_matrix(GLint cols, GLint rows, const char *caller, - GLenum matrixType, - GLint location, GLsizei count, GLboolean transpose, - const GLfloat *values) -{ - const GLint matElements = rows * cols; - GET_CURRENT_CONTEXT(ctx); - GET_CURRENT_LINKED_PROGRAM(pro, caller); - - if (values == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, caller); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - GLint i, j, k; - - trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); - if (!trans) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); - return; - } - - pt = trans; - pv = values; - for (i = 0; i < count; i++) { - /* transpose from pv matrix into pt matrix */ - for (j = 0; j < cols; j++) { - for (k = 0; k < rows; k++) { - /* XXX verify this */ - pt[j * rows + k] = pv[k * cols + j]; - } - } - pt += matElements; - pv += matElements; - } - - if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); - _mesa_free(trans); - } - else { - if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); - } -} - - -GLvoid GLAPIENTRY -_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(2, 2, "glUniformMatrix2fvARB", GL_FLOAT_MAT2, - location, count, transpose, value); -} - -GLvoid GLAPIENTRY -_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(3, 3, "glUniformMatrix3fvARB", GL_FLOAT_MAT3, - location, count, transpose, value); -} - -GLvoid GLAPIENTRY -_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(4, 4, "glUniformMatrix4fvARB", GL_FLOAT_MAT4, - location, count, transpose, value); -} - -static GLboolean -_mesa_get_object_parameter(GLhandleARB obj, GLenum pname, GLvoid * params, - GLboolean * integral, GLint * size) -{ - GET_CURRENT_CONTEXT(ctx); - GLint *ipar = (GLint *) params; - - /* set default values */ - *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ - *size = 1; /* param array size */ - - switch (pname) { - case GL_OBJECT_TYPE_ARB: - case GL_OBJECT_DELETE_STATUS_ARB: - case GL_OBJECT_INFO_LOG_LENGTH_ARB: - { - GET_GENERIC(gen, obj, "glGetObjectParameterivARB"); - - if (gen == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_TYPE_ARB: - *ipar = (**gen).GetType(gen); - break; - case GL_OBJECT_DELETE_STATUS_ARB: - *ipar = (**gen).GetDeleteStatus(gen); - break; - case GL_OBJECT_INFO_LOG_LENGTH_ARB: - *ipar = (**gen).GetInfoLogLength(gen); - break; - } - - RELEASE_GENERIC(gen); - } - break; - case GL_OBJECT_SUBTYPE_ARB: - case GL_OBJECT_COMPILE_STATUS_ARB: - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - GET_SHADER(sha, obj, "glGetObjectParameterivARB"); - - if (sha == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_SUBTYPE_ARB: - *ipar = (**sha).GetSubType(sha); - break; - case GL_OBJECT_COMPILE_STATUS_ARB: - *ipar = (**sha).GetCompileStatus(sha); - break; - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - const GLcharARB *src = (**sha).GetSource(sha); - if (src == NULL) - *ipar = 0; - else - *ipar = _mesa_strlen(src) + 1; - } - break; - } - - RELEASE_SHADER(sha); - } - break; - case GL_OBJECT_LINK_STATUS_ARB: - case GL_OBJECT_VALIDATE_STATUS_ARB: - case GL_OBJECT_ATTACHED_OBJECTS_ARB: - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - { - GET_PROGRAM(pro, obj, "glGetObjectParameterivARB"); - - if (pro == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_LINK_STATUS_ARB: - *ipar = (**pro).GetLinkStatus(pro); - break; - case GL_OBJECT_VALIDATE_STATUS_ARB: - *ipar = (**pro).GetValidateStatus(pro); - break; - case GL_OBJECT_ATTACHED_OBJECTS_ARB: - *ipar = - (**pro)._container. - GetAttachedCount((struct gl2_container_intf **) (pro)); - break; - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - *ipar = (**pro).GetActiveUniformCount(pro); - break; - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveUniformMaxLength(pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTES_ARB: - *ipar = (**pro).GetActiveAttribCount(pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveAttribMaxLength(pro); - break; - } - - RELEASE_PROGRAM(pro); - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetObjectParameterivARB"); - return GL_FALSE; - } - - return GL_TRUE; -} - -GLvoid GLAPIENTRY -_mesa_GetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat * params) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterfvARB"); - return; - } - - assert(sizeof(GLfloat) == sizeof(GLint)); - - if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, - &integral, &size)) { - if (integral) { - GLint i; - for (i = 0; i < size; i++) - params[i] = (GLfloat) ((GLint *) params)[i]; - } - } -} - -GLvoid GLAPIENTRY -_mesa_GetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint * params) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB"); - return; - } - - assert(sizeof(GLfloat) == sizeof(GLint)); - - if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, - &integral, &size)) { - if (!integral) { - GLint i; - for (i = 0; i < size; i++) - params[i] = (GLint) ((GLfloat *) params)[i]; - } - } -} - - -/** - * Copy string from to , up to maxLength characters, returning - * length of in . - * \param src the strings source - * \param maxLength max chars to copy - * \param length returns numberof chars copied - * \param dst the string destination - */ -static GLvoid -copy_string(const GLcharARB * src, GLsizei maxLength, GLsizei * length, - GLcharARB * dst) -{ - GLsizei len; - for (len = 0; len < maxLength - 1 && src && src[len]; len++) - dst[len] = src[len]; - if (maxLength > 0) - dst[len] = 0; - if (length) - *length = len; -} - - -GLvoid GLAPIENTRY -_mesa_GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, - GLcharARB * infoLog) -{ - GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, obj, "glGetInfoLogARB"); - - if (gen == NULL) - return; - - if (infoLog == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetInfoLogARB"); - else { - GLsizei actualsize = (**gen).GetInfoLogLength(gen); - if (actualsize > maxLength) - actualsize = maxLength; - (**gen).GetInfoLog(gen, actualsize, infoLog); - if (length != NULL) - *length = (actualsize > 0) ? actualsize - 1 : 0; - } - RELEASE_GENERIC(gen); -} - -GLvoid GLAPIENTRY -_mesa_GetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, - GLsizei * count, GLhandleARB * obj) -{ - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glGetAttachedObjectsARB"); - - if (con == NULL) - return; - - if (obj == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttachedObjectsARB"); - else { - GLsizei cnt, i; - - cnt = (**con).GetAttachedCount(con); - if (cnt > maxCount) - cnt = maxCount; - if (count != NULL) - *count = cnt; - - for (i = 0; i < cnt; i++) { - struct gl2_generic_intf **x = (**con).GetAttached(con, i); - obj[i] = (**x).GetName(x); - RELEASE_GENERIC(x); - } - } - RELEASE_CONTAINER(con); -} - -GLint GLAPIENTRY -_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) -{ -#if NEW_SLANG - GET_CURRENT_CONTEXT(ctx); - - if (ctx->ShaderObjects.Linked) { - const struct gl_linked_program *linked = ctx->ShaderObjects.Linked; - GLuint loc; - for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { - const struct gl_program_parameter *u - = linked->Uniforms->Parameters + loc; - if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { - return loc; - } - } - } - return -1; -#else - GET_CURRENT_CONTEXT(ctx); - GLint loc = -1; - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformLocationARB"); - - if (!pro) - return -1; - - if (name == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetUniformLocationARB"); - else { - if (!IS_NAME_WITH_GL_PREFIX(name)) - loc = (**pro).GetUniformLocation(pro, name); - } - RELEASE_PROGRAM(pro); - return loc; -#endif -} - -GLvoid GLAPIENTRY -_mesa_GetActiveUniformARB(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLcharARB * name) -{ - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveUniformARB"); - - if (pro == NULL) - return; - - if (size == NULL || type == NULL || name == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - else { - if (index < (**pro).GetActiveUniformCount(pro)) - (**pro).GetActiveUniform(pro, index, maxLength, length, size, type, - name); - else - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - } - RELEASE_PROGRAM(pro); -} - -GLvoid GLAPIENTRY -_mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) -{ - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); - - if (!pro) - return; - - if (!(**pro).ReadUniform(pro, location, 1, params, GL_FLOAT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); - - RELEASE_PROGRAM(pro); -} - -GLvoid GLAPIENTRY -_mesa_GetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) -{ - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); - - if (!pro) - return; - - if (!(**pro).ReadUniform(pro, location, 1, params, GL_INT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformivARB"); - RELEASE_PROGRAM(pro); -} - -GLvoid GLAPIENTRY -_mesa_GetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, - GLcharARB * source) -{ - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sha, obj, "glGetShaderSourceARB"); - - if (sha == NULL) - return; - - if (source == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSourceARB"); - else - copy_string((**sha).GetSource(sha), maxLength, length, source); - RELEASE_SHADER(sha); -} - -/* GL_ARB_vertex_shader */ - -GLvoid GLAPIENTRY -_mesa_BindAttribLocationARB(GLhandleARB programObj, GLuint index, - const GLcharARB * name) -{ - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glBindAttribLocationARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= MAX_VERTEX_ATTRIBS) - _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); - else if (IS_NAME_WITH_GL_PREFIX(name)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); - else - (**pro).OverrideAttribBinding(pro, index, name); - RELEASE_PROGRAM(pro); -} - -GLvoid GLAPIENTRY -_mesa_GetActiveAttribARB(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLcharARB * name) -{ - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveAttribARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= (**pro).GetActiveAttribCount(pro)) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveAttribARB"); - else - (**pro).GetActiveAttrib(pro, index, maxLength, length, size, type, - name); - RELEASE_PROGRAM(pro); -} - -GLint GLAPIENTRY -_mesa_GetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) -{ - GET_CURRENT_CONTEXT(ctx); - GLint loc = -1; - GET_LINKED_PROGRAM(pro, programObj, "glGetAttribLocationARB"); - - if (!pro) - return -1; - - if (name == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocationARB"); - else if (!IS_NAME_WITH_GL_PREFIX(name)) - loc = (**pro).GetAttribLocation(pro, name); - RELEASE_PROGRAM(pro); - return loc; -} - - -/** - ** OpenGL 2.0 functions which basically wrap the ARB_shader functions - **/ - -void GLAPIENTRY -_mesa_AttachShader(GLuint program, GLuint shader) -{ - _mesa_AttachObjectARB(program, shader); -#if NEW_SLANG - { - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - struct gl_program *prog - = _mesa_lookup_shader(ctx, shader); - const GLuint n = linked->NumShaders; - GLuint i; - if (!linked || !prog) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glAttachShader(bad program or shader name)"); - return; - } - for (i = 0; i < n; i++) { - if (linked->Shaders[i] == prog) { - /* already attached */ - return; - } - } - /* append to list */ - linked->Shaders = _mesa_realloc(linked->Shaders, - n * sizeof(struct gl_program *), - (n + 1) * sizeof(struct gl_program *)); - linked->Shaders[n] = prog; - prog->RefCount++; - linked->NumShaders++; - } -#endif -} - - -GLuint GLAPIENTRY -_mesa_CreateShader(GLenum type) -{ - return (GLuint) _mesa_CreateShaderObjectARB(type); -} - -GLuint GLAPIENTRY -_mesa_CreateProgram(void) -{ - return (GLuint) _mesa_CreateProgramObjectARB(); -} - -void GLAPIENTRY -_mesa_DeleteProgram(GLuint program) -{ - _mesa_DeleteObjectARB(program); -} - - -void GLAPIENTRY -_mesa_DeleteShader(GLuint shader) -{ - _mesa_DeleteObjectARB(shader); -} - -void GLAPIENTRY -_mesa_DetachShader(GLuint program, GLuint shader) -{ - _mesa_DetachObjectARB(program, shader); -} - -void GLAPIENTRY -_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, - GLsizei *count, GLuint *obj) -{ - _mesa_GetAttachedObjectsARB(program, maxCount, count, obj); -#if NEW_SLANG - { - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - if (linked) { - GLuint i; - for (i = 0; i < maxCount && i < linked->NumShaders; i++) { - obj[i] = linked->Shaders[i]->Id; - } - if (count) - *count = i; - } - else { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); - } - } -#endif -} - -void GLAPIENTRY -_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, program, "glGetProgramiv"); - - if (!pro) - return; - - switch (pname) { - case GL_DELETE_STATUS: - *params = (**pro)._container._generic.GetDeleteStatus((struct gl2_generic_intf **) pro); - break; - case GL_LINK_STATUS: - *params = (**pro).GetLinkStatus(pro); - break; - case GL_VALIDATE_STATUS: - *params = (**pro).GetValidateStatus(pro); - break; - case GL_INFO_LOG_LENGTH: - *params = (**pro)._container._generic.GetInfoLogLength( (struct gl2_generic_intf **) pro ); - break; - case GL_ATTACHED_SHADERS: - *params = (**pro)._container.GetAttachedCount( (struct gl2_container_intf **) pro ); - break; - case GL_ACTIVE_ATTRIBUTES: - *params = (**pro).GetActiveAttribCount(pro); - break; - case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - *params = (**pro).GetActiveAttribMaxLength(pro); - break; - case GL_ACTIVE_UNIFORMS: - *params = (**pro).GetActiveUniformCount(pro); - break; - case GL_ACTIVE_UNIFORM_MAX_LENGTH: - *params = (**pro).GetActiveUniformMaxLength(pro); - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); - return; - } -} - -void GLAPIENTRY -_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, - GLsizei *length, GLchar *infoLog) -{ - _mesa_GetInfoLogARB(program, bufSize, length, infoLog); -} - -void GLAPIENTRY -_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sh, shader, "glGetShaderiv"); - - if (!sh) - return; - - switch (pname) { - case GL_SHADER_TYPE: - *params = (**sh).GetSubType(sh); - break; - case GL_DELETE_STATUS: - *params = (**sh)._generic.GetDeleteStatus((struct gl2_generic_intf **) sh); - break; - case GL_COMPILE_STATUS: - *params = (**sh).GetCompileStatus(sh); - break; - case GL_INFO_LOG_LENGTH: - *params = (**sh)._generic.GetInfoLogLength((struct gl2_generic_intf **)sh); - break; - case GL_SHADER_SOURCE_LENGTH: - { - const GLchar *src = (**sh).GetSource(sh); - *params = src ? (_mesa_strlen(src) + 1) : 0; - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)"); - return; - } -} - -void GLAPIENTRY -_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, - GLsizei *length, GLchar *infoLog) -{ - _mesa_GetInfoLogARB(shader, bufSize, length, infoLog); -} - -GLboolean GLAPIENTRY -_mesa_IsProgram(GLuint program) -{ - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, program, "glIsProgram"); - if (pro) { - RELEASE_PROGRAM(pro); - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - -GLboolean GLAPIENTRY -_mesa_IsShader(GLuint shader) -{ - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sh, shader, "glIsProgram"); - if (sh) { - RELEASE_SHADER(sh); - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - - -/** - ** 2.1 functions - **/ - -void GLAPIENTRY -_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -{ - uniform_matrix(2, 3, "glUniformMatrix2x3fv", GL_FLOAT_MAT2x3, - location, count, transpose, value); -} - -void GLAPIENTRY -_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -{ - uniform_matrix(3, 2, "glUniformMatrix3x2fv", GL_FLOAT_MAT3x2, - location, count, transpose, value); -} - -void GLAPIENTRY -_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -{ - uniform_matrix(2, 4, "glUniformMatrix2x4fv", GL_FLOAT_MAT2x4, - location, count, transpose, value); -} - -void GLAPIENTRY -_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -{ - uniform_matrix(4, 2, "glUniformMatrix4x2fv", GL_FLOAT_MAT4x2, - location, count, transpose, value); -} - -void GLAPIENTRY -_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -{ - uniform_matrix(3, 4, "glUniformMatrix3x4fv", GL_FLOAT_MAT3x4, - location, count, transpose, value); -} - -void GLAPIENTRY -_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) -{ - uniform_matrix(4, 3, "glUniformMatrix4x3fv", GL_FLOAT_MAT4x3, - location, count, transpose, value); -} - - - -#ifdef NEW_SLANG - -struct gl_linked_program * -_mesa_new_linked_program(GLcontext *ctx, GLuint name) -{ - struct gl_linked_program *linked; - linked = CALLOC_STRUCT(gl_linked_program); - linked->Name = name; - return linked; -} - - -struct gl_linked_program * -_mesa_lookup_linked_program(GLcontext *ctx, GLuint name) -{ - GET_PROGRAM(pro, name, "_mesa_lookup_linked_program"); - if (pro) { - if (!(*pro)->Linked) { - (*pro)->Linked = _mesa_new_linked_program(ctx, name); - } - return (*pro)->Linked; - } - return NULL; -} - - -struct gl_program * -_mesa_lookup_shader(GLcontext *ctx, GLuint name) -{ - GET_SHADER(sh, name, "_mesa_lookup_shader"); - if (sh) - return (*sh)->Program; - return NULL; -} - - -#endif /* NEW_SLANG */ - - -#endif /* FEATURE_ARB_shader_objects */ - - - -GLvoid -_mesa_init_shaderobjects(GLcontext * ctx) -{ - ctx->ShaderObjects.CurrentProgram = NULL; - ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; - ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; - - _mesa_init_shaderobjects_3dlabs(ctx); -} diff --git a/src/mesa/shader/shaderobjects.h b/src/mesa/shader/shaderobjects.h deleted file mode 100644 index 0e834d29d1..0000000000 --- a/src/mesa/shader/shaderobjects.h +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SHADEROBJECTS_H -#define SHADEROBJECTS_H - -#include "context.h" - -#if FEATURE_ARB_shader_objects - -/** - * gl2 unique interface identifier. - * Each gl2 interface has its own interface id used for object queries. - */ -enum gl2_uiid -{ - UIID_UNKNOWN, /* supported by all objects */ - UIID_GENERIC, /* generic object */ - UIID_CONTAINER, /* contains generic objects */ - UIID_SHADER, /* shader object */ - UIID_FRAGMENT_SHADER, /* fragment shader */ - UIID_VERTEX_SHADER, /* vertex shader */ - UIID_PROGRAM, /* program object */ - UIID_3DLABS_SHHANDLE, /* encapsulates 3DLabs' ShHandle */ - UIID_DEBUG /* debug object */ -}; - -struct gl2_unknown_intf -{ - GLvoid (* AddRef) (struct gl2_unknown_intf **); - GLvoid (* Release) (struct gl2_unknown_intf **); - struct gl2_unknown_intf **(* QueryInterface) (struct gl2_unknown_intf **, enum gl2_uiid uiid); -}; - -struct gl2_generic_intf -{ - struct gl2_unknown_intf _unknown; - GLvoid (* Delete) (struct gl2_generic_intf **); - GLenum (* GetType) (struct gl2_generic_intf **); - GLhandleARB (* GetName) (struct gl2_generic_intf **); - GLboolean (* GetDeleteStatus) (struct gl2_generic_intf **); - GLvoid (* GetInfoLog) (struct gl2_generic_intf **, GLsizei, GLcharARB *); - GLsizei (* GetInfoLogLength) (struct gl2_generic_intf **); -}; - -struct gl2_container_intf -{ - struct gl2_generic_intf _generic; - GLboolean (* Attach) (struct gl2_container_intf **, struct gl2_generic_intf **); - GLboolean (* Detach) (struct gl2_container_intf **, struct gl2_generic_intf **); - GLsizei (* GetAttachedCount) (struct gl2_container_intf **); - struct gl2_generic_intf **(* GetAttached) (struct gl2_container_intf **, GLuint); -}; - -struct gl2_shader_intf -{ - struct gl2_generic_intf _generic; - GLenum (* GetSubType) (struct gl2_shader_intf **); - GLboolean (* GetCompileStatus) (struct gl2_shader_intf **); - GLvoid (* SetSource) (struct gl2_shader_intf **, GLcharARB *, GLint *, GLsizei); - const GLcharARB *(* GetSource) (struct gl2_shader_intf **); - GLvoid (* Compile) (struct gl2_shader_intf **); - struct gl_program *Program; -}; - -struct gl2_program_intf -{ - struct gl2_container_intf _container; - GLboolean (* GetLinkStatus) (struct gl2_program_intf **); - GLboolean (* GetValidateStatus) (struct gl2_program_intf **); - GLvoid (* Link) (struct gl2_program_intf **); - GLvoid (* Validate) (struct gl2_program_intf **); - GLvoid (* UpdateFixedUniforms) (struct gl2_program_intf **); - GLvoid (* UpdateFixedAttrib) (struct gl2_program_intf **, GLuint, GLvoid *, GLuint, GLuint, - GLboolean); - GLvoid (* UpdateFixedVarying) (struct gl2_program_intf **, GLuint, GLvoid *, GLuint, GLuint, - GLboolean); - GLvoid (* GetTextureImageUsage) (struct gl2_program_intf **, GLbitfield *); - GLboolean (* IsShaderPresent) (struct gl2_program_intf **, GLenum); - GLvoid (* GetActiveUniform) (struct gl2_program_intf **, GLuint index, GLsizei maxLength, - GLsizei *length, GLint *size, GLenum *type, GLchar *name); - GLuint (* GetActiveUniformMaxLength) (struct gl2_program_intf **); - GLuint (* GetActiveUniformCount) (struct gl2_program_intf **); - GLint (* GetUniformLocation) (struct gl2_program_intf **, const GLchar *name); - GLboolean (* WriteUniform) (struct gl2_program_intf **, GLint loc, GLsizei count, - const GLvoid *data, GLenum type); - GLboolean (* ReadUniform) (struct gl2_program_intf **, GLint loc, GLsizei count, - GLvoid *data, GLenum type); - GLvoid (* GetActiveAttrib) (struct gl2_program_intf **, GLuint index, GLsizei maxLength, - GLsizei *length, GLint *size, GLenum *type, GLchar *name); - GLuint (* GetActiveAttribMaxLength) (struct gl2_program_intf **); - GLuint (* GetActiveAttribCount) (struct gl2_program_intf **); - GLint (* GetAttribLocation) (struct gl2_program_intf **, const GLchar *name); - GLvoid (* OverrideAttribBinding) (struct gl2_program_intf **, GLuint, const GLchar *); - GLvoid (* WriteAttrib) (struct gl2_program_intf **, GLuint, const GLfloat *); - GLvoid (* UpdateVarying) (struct gl2_program_intf **, GLuint, GLfloat *, GLboolean); - struct gl_linked_program *Linked; -}; - -struct gl2_fragment_shader_intf -{ - struct gl2_shader_intf _shader; -}; - -struct gl2_vertex_shader_intf -{ - struct gl2_shader_intf _shader; -}; - -struct gl2_3dlabs_shhandle_intf -{ - struct gl2_unknown_intf _unknown; - GLvoid *(* GetShHandle) (struct gl2_3dlabs_shhandle_intf **); -}; - -struct gl2_debug_intf -{ - struct gl2_generic_intf _generic; - GLvoid (* ClearDebugLog) (struct gl2_debug_intf **, GLenum logType, GLenum shaderType); - GLvoid (* GetDebugLog) (struct gl2_debug_intf **, GLenum logType, GLenum shaderType, - GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); - GLsizei (* GetDebugLogLength) (struct gl2_debug_intf **, GLenum logType, GLenum shaderType); -}; - - -extern void GLAPIENTRY -_mesa_DeleteObjectARB(GLhandleARB obj); - -extern GLhandleARB GLAPIENTRY -_mesa_GetHandleARB(GLenum pname); - -extern void GLAPIENTRY -_mesa_DetachObjectARB (GLhandleARB, GLhandleARB); - -extern GLhandleARB GLAPIENTRY -_mesa_CreateShaderObjectARB (GLenum); - -extern void GLAPIENTRY -_mesa_ShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); - -extern void GLAPIENTRY -_mesa_CompileShaderARB (GLhandleARB); - -extern GLhandleARB GLAPIENTRY -_mesa_CreateProgramObjectARB (void); - -extern void GLAPIENTRY -_mesa_AttachObjectARB (GLhandleARB, GLhandleARB); - -extern void GLAPIENTRY -_mesa_LinkProgramARB (GLhandleARB); - -extern void GLAPIENTRY -_mesa_UseProgramObjectARB (GLhandleARB); - -extern void GLAPIENTRY -_mesa_ValidateProgramARB (GLhandleARB); - -extern void GLAPIENTRY -_mesa_Uniform1fARB (GLint, GLfloat); - -extern void GLAPIENTRY -_mesa_Uniform2fARB (GLint, GLfloat, GLfloat); - -extern void GLAPIENTRY -_mesa_Uniform3fARB (GLint, GLfloat, GLfloat, GLfloat); - -extern void GLAPIENTRY -_mesa_Uniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat); - -extern void GLAPIENTRY -_mesa_Uniform1iARB (GLint, GLint); - -extern void GLAPIENTRY -_mesa_Uniform2iARB (GLint, GLint, GLint); - -extern void GLAPIENTRY -_mesa_Uniform3iARB (GLint, GLint, GLint, GLint); - -extern void GLAPIENTRY -_mesa_Uniform4iARB (GLint, GLint, GLint, GLint, GLint); - -extern void GLAPIENTRY -_mesa_Uniform1fvARB (GLint, GLsizei, const GLfloat *); - -extern void GLAPIENTRY -_mesa_Uniform2fvARB (GLint, GLsizei, const GLfloat *); - -extern void GLAPIENTRY -_mesa_Uniform3fvARB (GLint, GLsizei, const GLfloat *); - -extern void GLAPIENTRY -_mesa_Uniform4fvARB (GLint, GLsizei, const GLfloat *); - -extern void GLAPIENTRY -_mesa_Uniform1ivARB (GLint, GLsizei, const GLint *); - -extern void GLAPIENTRY -_mesa_Uniform2ivARB (GLint, GLsizei, const GLint *); - -extern void GLAPIENTRY -_mesa_Uniform3ivARB (GLint, GLsizei, const GLint *); - -extern void GLAPIENTRY -_mesa_Uniform4ivARB (GLint, GLsizei, const GLint *); - -extern void GLAPIENTRY -_mesa_UniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *); - -extern void GLAPIENTRY -_mesa_UniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *); - -extern void GLAPIENTRY -_mesa_UniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *); - -extern void GLAPIENTRY -_mesa_GetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *); - -extern void GLAPIENTRY -_mesa_GetObjectParameterivARB (GLhandleARB, GLenum, GLint *); - -extern void GLAPIENTRY -_mesa_GetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); - -extern void GLAPIENTRY -_mesa_GetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); - -extern GLint GLAPIENTRY -_mesa_GetUniformLocationARB (GLhandleARB, const GLcharARB *); - -extern void GLAPIENTRY -_mesa_GetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); - -extern void GLAPIENTRY -_mesa_GetUniformfvARB (GLhandleARB, GLint, GLfloat *); - -extern void GLAPIENTRY -_mesa_GetUniformivARB (GLhandleARB, GLint, GLint *); - -extern void GLAPIENTRY -_mesa_GetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); - -#if FEATURE_ARB_vertex_shader - -extern void GLAPIENTRY -_mesa_BindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *); - -extern void GLAPIENTRY -_mesa_GetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); - -extern GLint GLAPIENTRY -_mesa_GetAttribLocationARB (GLhandleARB, const GLcharARB *); - -#endif /* FEATURE_ARB_vertex_shader */ - - -/* 2.0 */ -extern void GLAPIENTRY -_mesa_AttachShader(GLuint program, GLuint shader); - -extern GLuint GLAPIENTRY -_mesa_CreateShader(GLenum); - -extern GLuint GLAPIENTRY -_mesa_CreateProgram(void); - -extern void GLAPIENTRY -_mesa_DeleteProgram(GLuint program); - -extern void GLAPIENTRY -_mesa_DeleteShader(GLuint shader); - -extern void GLAPIENTRY -_mesa_DetachShader(GLuint program, GLuint shader); - -extern void GLAPIENTRY -_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, - GLsizei *count, GLuint *obj); - -extern void GLAPIENTRY -_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params); - -extern void GLAPIENTRY -_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, - GLsizei *length, GLchar *infoLog); - -extern void GLAPIENTRY -_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params); - -extern void GLAPIENTRY -_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, - GLsizei *length, GLchar *infoLog); - -extern GLboolean GLAPIENTRY -_mesa_IsProgram(GLuint program); - -extern GLboolean GLAPIENTRY -_mesa_IsShader(GLuint shader); - - - -/* 2.1 */ -extern void GLAPIENTRY -_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); - -extern void GLAPIENTRY -_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); - -extern void GLAPIENTRY -_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); - -extern void GLAPIENTRY -_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); - -extern void GLAPIENTRY -_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); - -extern void GLAPIENTRY -_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value); - - -extern struct gl_linked_program * -_mesa_new_linked_program(GLcontext *ctx, GLuint name); - -extern struct gl_linked_program * -_mesa_lookup_linked_program(GLcontext *ctx, GLuint name); - -extern struct gl_program * -_mesa_lookup_shader(GLcontext *ctx, GLuint name); - - -#endif /* FEATURE_ARB_shader_objects */ - -extern void -_mesa_init_shaderobjects (GLcontext *ctx); - -#endif /* SHADEROBJECTS_H */ diff --git a/src/mesa/shader/shaderobjects_3dlabs.c b/src/mesa/shader/shaderobjects_3dlabs.c deleted file mode 100644 index 2185a7cffb..0000000000 --- a/src/mesa/shader/shaderobjects_3dlabs.c +++ /dev/null @@ -1,2152 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file shaderobjects_3dlabs.c - * shader objects definitions for 3dlabs compiler - * \author Michal Krol - */ - -/* Set this to 1 when we are ready to use 3dlabs' front-end */ -#define USE_3DLABS_FRONTEND 0 - -#include "imports.h" -#include "hash.h" -#include "macros.h" -#include "program.h" -#include "shaderobjects.h" -#include "shaderobjects_3dlabs.h" - -#if USE_3DLABS_FRONTEND -#include "slang_mesa.h" -#include "Public/ShaderLang.h" -#else -#include "slang_link.h" -#endif - -#if FEATURE_ARB_shader_objects - -struct gl2_unknown_obj -{ - GLuint reference_count; - void (*_destructor) (struct gl2_unknown_intf **); -}; - -struct gl2_unknown_impl -{ - struct gl2_unknown_intf *_vftbl; - struct gl2_unknown_obj _obj; -}; - -static void -_unknown_destructor(struct gl2_unknown_intf **intf) -{ -} - -static void -_unknown_AddRef(struct gl2_unknown_intf **intf) -{ - struct gl2_unknown_impl *impl = (struct gl2_unknown_impl *) intf; - - impl->_obj.reference_count++; -} - -static void -_unknown_Release(struct gl2_unknown_intf **intf) -{ - struct gl2_unknown_impl *impl = (struct gl2_unknown_impl *) intf; - - impl->_obj.reference_count--; - if (impl->_obj.reference_count == 0) { - impl->_obj._destructor(intf); - _mesa_free((void *) intf); - } -} - -static struct gl2_unknown_intf ** -_unknown_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) -{ - if (uiid == UIID_UNKNOWN) { - (**intf).AddRef(intf); - return intf; - } - return NULL; -} - -static struct gl2_unknown_intf _unknown_vftbl = { - _unknown_AddRef, - _unknown_Release, - _unknown_QueryInterface -}; - -static void -_unknown_constructor(struct gl2_unknown_impl *impl) -{ - impl->_vftbl = &_unknown_vftbl; - impl->_obj.reference_count = 1; - impl->_obj._destructor = _unknown_destructor; -} - -struct gl2_unkinner_obj -{ - struct gl2_unknown_intf **unkouter; -}; - -struct gl2_unkinner_impl -{ - struct gl2_unknown_intf *_vftbl; - struct gl2_unkinner_obj _obj; -}; - -static void -_unkinner_destructor(struct gl2_unknown_intf **intf) -{ -} - -static void -_unkinner_AddRef(struct gl2_unknown_intf **intf) -{ - struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; - - (**impl->_obj.unkouter).AddRef(impl->_obj.unkouter); -} - -static void -_unkinner_Release(struct gl2_unknown_intf **intf) -{ - struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; - - (**impl->_obj.unkouter).Release(impl->_obj.unkouter); -} - -static struct gl2_unknown_intf ** -_unkinner_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) -{ - struct gl2_unkinner_impl *impl = (struct gl2_unkinner_impl *) intf; - - return (**impl->_obj.unkouter).QueryInterface(impl->_obj.unkouter, uiid); -} - -static struct gl2_unknown_intf _unkinner_vftbl = { - _unkinner_AddRef, - _unkinner_Release, - _unkinner_QueryInterface -}; - -static void -_unkinner_constructor(struct gl2_unkinner_impl *impl, - struct gl2_unknown_intf **outer) -{ - impl->_vftbl = &_unkinner_vftbl; - impl->_obj.unkouter = outer; -} - -struct gl2_generic_obj -{ - struct gl2_unknown_obj _unknown; - GLhandleARB name; - GLboolean delete_status; - GLcharARB *info_log; -}; - -struct gl2_generic_impl -{ - struct gl2_generic_intf *_vftbl; - struct gl2_generic_obj _obj; -}; - -static void -_generic_destructor(struct gl2_unknown_intf **intf) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - - _mesa_free((void *) impl->_obj.info_log); - - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - _mesa_HashRemove(ctx->Shared->GL2Objects, impl->_obj.name); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - - _unknown_destructor(intf); -} - -static struct gl2_unknown_intf ** -_generic_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) -{ - if (uiid == UIID_GENERIC) { - (**intf).AddRef(intf); - return intf; - } - return _unknown_QueryInterface(intf, uiid); -} - -static void -_generic_Delete(struct gl2_generic_intf **intf) -{ - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - - if (impl->_obj.delete_status == GL_FALSE) { - impl->_obj.delete_status = GL_TRUE; - (**intf)._unknown.Release((struct gl2_unknown_intf **) intf); - } -} - -static GLhandleARB -_generic_GetName(struct gl2_generic_intf **intf) -{ - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - - return impl->_obj.name; -} - -static GLboolean -_generic_GetDeleteStatus(struct gl2_generic_intf **intf) -{ - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) intf; - - return impl->_obj.delete_status; -} - -static GLvoid -_generic_GetInfoLog(struct gl2_generic_intf **intf, GLsizei maxlen, - GLcharARB * infolog) -{ - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) (intf); - - if (maxlen > 0) { - _mesa_strncpy(infolog, impl->_obj.info_log, maxlen - 1); - infolog[maxlen - 1] = '\0'; - } -} - -static GLsizei -_generic_GetInfoLogLength(struct gl2_generic_intf **intf) -{ - struct gl2_generic_impl *impl = (struct gl2_generic_impl *) (intf); - - if (impl->_obj.info_log == NULL) - return 1; - return _mesa_strlen(impl->_obj.info_log) + 1; -} - -static struct gl2_generic_intf _generic_vftbl = { - { - _unknown_AddRef, - _unknown_Release, - _generic_QueryInterface}, - _generic_Delete, - NULL, /* abstract GetType */ - _generic_GetName, - _generic_GetDeleteStatus, - _generic_GetInfoLog, - _generic_GetInfoLogLength -}; - -static void -_generic_constructor(struct gl2_generic_impl *impl) -{ - GET_CURRENT_CONTEXT(ctx); - - _unknown_constructor((struct gl2_unknown_impl *) impl); - impl->_vftbl = &_generic_vftbl; - impl->_obj._unknown._destructor = _generic_destructor; - impl->_obj.delete_status = GL_FALSE; - impl->_obj.info_log = NULL; - - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - impl->_obj.name = _mesa_HashFindFreeKeyBlock(ctx->Shared->GL2Objects, 1); - _mesa_HashInsert(ctx->Shared->GL2Objects, impl->_obj.name, (void *) impl); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); -} - -struct gl2_container_obj -{ - struct gl2_generic_obj _generic; - struct gl2_generic_intf ***attached; - GLuint attached_count; -}; - -struct gl2_container_impl -{ - struct gl2_container_intf *_vftbl; - struct gl2_container_obj _obj; -}; - -static void -_container_destructor(struct gl2_unknown_intf **intf) -{ - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - GLuint i; - - for (i = 0; i < impl->_obj.attached_count; i++) { - struct gl2_generic_intf **x = impl->_obj.attached[i]; - (**x)._unknown.Release((struct gl2_unknown_intf **) x); - } - - _generic_destructor(intf); -} - -static struct gl2_unknown_intf ** -_container_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) -{ - if (uiid == UIID_CONTAINER) { - (**intf).AddRef(intf); - return intf; - } - return _generic_QueryInterface(intf, uiid); -} - -static GLboolean -_container_Attach(struct gl2_container_intf **intf, - struct gl2_generic_intf **att) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - GLuint i; - - for (i = 0; i < impl->_obj.attached_count; i++) - if (impl->_obj.attached[i] == att) { - _mesa_error(ctx, GL_INVALID_OPERATION, "_container_Attach"); - return GL_FALSE; - } - - impl->_obj.attached = (struct gl2_generic_intf ***) - _mesa_realloc(impl->_obj.attached, - impl->_obj.attached_count * sizeof(*impl->_obj.attached), - (impl->_obj.attached_count + 1) * sizeof(*impl->_obj.attached)); - if (impl->_obj.attached == NULL) - return GL_FALSE; - - impl->_obj.attached[impl->_obj.attached_count] = att; - impl->_obj.attached_count++; - (**att)._unknown.AddRef((struct gl2_unknown_intf **) att); - return GL_TRUE; -} - -static GLboolean -_container_Detach(struct gl2_container_intf **intf, - struct gl2_generic_intf **att) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - GLuint i, j; - - for (i = 0; i < impl->_obj.attached_count; i++) - if (impl->_obj.attached[i] == att) { - for (j = i; j < impl->_obj.attached_count - 1; j++) - impl->_obj.attached[j] = impl->_obj.attached[j + 1]; - impl->_obj.attached = (struct gl2_generic_intf ***) - _mesa_realloc(impl->_obj.attached, - impl->_obj.attached_count * sizeof(*impl->_obj.attached), - (impl->_obj.attached_count - 1) * sizeof(*impl->_obj.attached)); - impl->_obj.attached_count--; - (**att)._unknown.Release((struct gl2_unknown_intf **) att); - return GL_TRUE; - } - - _mesa_error(ctx, GL_INVALID_OPERATION, "_container_Detach"); - return GL_FALSE; -} - -static GLsizei -_container_GetAttachedCount(struct gl2_container_intf **intf) -{ - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - - return impl->_obj.attached_count; -} - -static struct gl2_generic_intf ** -_container_GetAttached(struct gl2_container_intf **intf, GLuint index) -{ - struct gl2_container_impl *impl = (struct gl2_container_impl *) intf; - - (**impl->_obj.attached[index])._unknown.AddRef((struct gl2_unknown_intf **) - impl->_obj.attached[index]); - return impl->_obj.attached[index]; -} - -static struct gl2_container_intf _container_vftbl = { - { - { - _unknown_AddRef, - _unknown_Release, - _container_QueryInterface - }, - _generic_Delete, - NULL, /* abstract GetType */ - _generic_GetName, - _generic_GetDeleteStatus, - _generic_GetInfoLog, - _generic_GetInfoLogLength - }, - _container_Attach, - _container_Detach, - _container_GetAttachedCount, - _container_GetAttached -}; - -static void -_container_constructor(struct gl2_container_impl *impl) -{ - _generic_constructor((struct gl2_generic_impl *) impl); - impl->_vftbl = &_container_vftbl; - impl->_obj._generic._unknown._destructor = _container_destructor; - impl->_obj.attached = NULL; - impl->_obj.attached_count = 0; -} - -struct gl2_3dlabs_shhandle_obj -{ - struct gl2_unkinner_obj _unknown; -#if USE_3DLABS_FRONTEND - ShHandle handle; -#endif -}; - -struct gl2_3dlabs_shhandle_impl -{ - struct gl2_3dlabs_shhandle_intf *_vftbl; - struct gl2_3dlabs_shhandle_obj _obj; -}; - -static void -_3dlabs_shhandle_destructor(struct gl2_unknown_intf **intf) -{ -#if USE_3DLABS_FRONTEND - struct gl2_3dlabs_shhandle_impl *impl = - (struct gl2_3dlabs_shhandle_impl *) intf; - ShDestruct(impl->_obj.handle); -#endif - _unkinner_destructor(intf); -} - -static GLvoid * -_3dlabs_shhandle_GetShHandle(struct gl2_3dlabs_shhandle_intf **intf) -{ -#if USE_3DLABS_FRONTEND - struct gl2_3dlabs_shhandle_impl *impl = - (struct gl2_3dlabs_shhandle_impl *) intf; - return impl->_obj.handle; -#else - return NULL; -#endif -} - -static struct gl2_3dlabs_shhandle_intf _3dlabs_shhandle_vftbl = { - { - _unkinner_AddRef, - _unkinner_Release, - _unkinner_QueryInterface}, - _3dlabs_shhandle_GetShHandle -}; - -static void -_3dlabs_shhandle_constructor(struct gl2_3dlabs_shhandle_impl *impl, - struct gl2_unknown_intf **outer) -{ - _unkinner_constructor((struct gl2_unkinner_impl *) impl, outer); - impl->_vftbl = &_3dlabs_shhandle_vftbl; -#if USE_3DLABS_FRONTEND - impl->_obj.handle = NULL; -#endif -} - -struct gl2_shader_obj -{ - struct gl2_generic_obj _generic; - struct gl2_3dlabs_shhandle_impl _3dlabs_shhandle; - GLboolean compile_status; - GLcharARB *source; - GLint *offsets; - GLsizei offset_count; - slang_code_object code; -}; - -struct gl2_shader_impl -{ - struct gl2_shader_intf *_vftbl; - struct gl2_shader_obj _obj; -}; - -static void -_shader_destructor(struct gl2_unknown_intf **intf) -{ - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - - _mesa_free((void *) impl->_obj.source); - _mesa_free((void *) impl->_obj.offsets); - _slang_code_object_dtr(&impl->_obj.code); - _3dlabs_shhandle_destructor((struct gl2_unknown_intf **) &impl->_obj. - _3dlabs_shhandle._vftbl); - _generic_destructor(intf); -} - -static struct gl2_unknown_intf ** -_shader_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) -{ -#if USE_3DLABS_FRONTEND - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; -#endif - - if (uiid == UIID_SHADER) { - (**intf).AddRef(intf); - return intf; - } -#if USE_3DLABS_FRONTEND - if (uiid == UIID_3DLABS_SHHANDLE) { - (**intf).AddRef(intf); - return (struct gl2_unknown_intf **) &impl->_obj._3dlabs_shhandle._vftbl; - } -#endif - return _generic_QueryInterface(intf, uiid); -} - -static GLenum -_shader_GetType(struct gl2_generic_intf **intf) -{ - return GL_SHADER_OBJECT_ARB; -} - -static GLvoid -_shader_GetInfoLog(struct gl2_generic_intf **intf, GLsizei maxlen, - GLcharARB * infolog) -{ - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) (intf); - - if (maxlen > 0) { - if (impl->_obj._generic.info_log != NULL) { - GLsizei len = _mesa_strlen(impl->_obj._generic.info_log); - if (len > maxlen - 1) - len = maxlen - 1; - _mesa_memcpy(infolog, impl->_obj._generic.info_log, len); - infolog += len; - maxlen -= len; - } - if (impl->_obj.code.machine.infolog != NULL && - impl->_obj.code.machine.infolog->text != NULL) { - GLsizei len = _mesa_strlen(impl->_obj.code.machine.infolog->text); - if (len > maxlen - 1) - len = maxlen - 1; - _mesa_memcpy(infolog, impl->_obj.code.machine.infolog->text, len); - } - infolog[maxlen - 1] = '\0'; - } -} - -static GLsizei -_shader_GetInfoLogLength(struct gl2_generic_intf **intf) -{ - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) (intf); - GLsizei length = 1; - - if (impl->_obj._generic.info_log != NULL) - length += _mesa_strlen(impl->_obj._generic.info_log); - if (impl->_obj.code.machine.infolog != NULL && - impl->_obj.code.machine.infolog->text != NULL) - length += _mesa_strlen(impl->_obj.code.machine.infolog->text); - return length; -} - -static GLboolean -_shader_GetCompileStatus(struct gl2_shader_intf **intf) -{ - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - - return impl->_obj.compile_status; -} - -static GLvoid -_shader_SetSource(struct gl2_shader_intf **intf, GLcharARB * src, GLint * off, - GLsizei cnt) -{ - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - - _mesa_free((void *) impl->_obj.source); - impl->_obj.source = src; - _mesa_free((void *) impl->_obj.offsets); - impl->_obj.offsets = off; - impl->_obj.offset_count = cnt; -} - -static const GLcharARB * -_shader_GetSource(struct gl2_shader_intf **intf) -{ - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; - - return impl->_obj.source; -} - -static GLvoid -_shader_Compile(struct gl2_shader_intf **intf) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_shader_impl *impl = (struct gl2_shader_impl *) intf; -#if USE_3DLABS_FRONTEND - char **strings; - TBuiltInResource res; -#else - slang_unit_type type; - slang_info_log info_log; -#endif - - impl->_obj.compile_status = GL_FALSE; - _mesa_free((void *) impl->_obj._generic.info_log); - impl->_obj._generic.info_log = NULL; - -#if USE_3DLABS_FRONTEND - /* 3dlabs compiler expects us to feed it with null-terminated string array, - we've got only one big string with offsets, so we must split it; but when - there's only one string to deal with, we pass its address directly */ - - if (impl->_obj.offset_count <= 1) - strings = &impl->_obj.source; - else { - GLsizei i, offset = 0; - - strings = - (char **) _mesa_malloc(impl->_obj.offset_count * sizeof(char *)); - if (strings == NULL) - return; - - for (i = 0; i < impl->_obj.offset_count; i++) { - GLsizei size = impl->_obj.offsets[i] - offset; - - strings[i] = (char *) _mesa_malloc((size + 1) * sizeof(char)); - if (strings[i] == NULL) { - GLsizei j; - - for (j = 0; j < i; j++) - _mesa_free(strings[j]); - _mesa_free(strings); - return; - } - - _mesa_memcpy(strings[i], impl->_obj.source + offset, - size * sizeof(char)); - strings[i][size] = '\0'; - offset = impl->_obj.offsets[i]; - } - } - - /* TODO set these fields to some REAL numbers */ - res.maxLights = 8; - res.maxClipPlanes = 6; - res.maxTextureUnits = 2; - res.maxTextureCoords = 2; - res.maxVertexAttribs = 8; - res.maxVertexUniformComponents = 64; - res.maxVaryingFloats = 8; - res.maxVertexTextureImageUnits = 2; - res.maxCombinedTextureImageUnits = 2; - res.maxTextureImageUnits = 2; - res.maxFragmentUniformComponents = 64; - res.maxDrawBuffers = 1; - - if (ShCompile - (impl->_obj._3dlabs_shhandle._obj.handle, strings, - impl->_obj.offset_count, EShOptFull, &res, 0)) - impl->_obj.compile_status = GL_TRUE; - if (impl->_obj.offset_count > 1) { - GLsizei i; - - for (i = 0; i < impl->_obj.offset_count; i++) - _mesa_free(strings[i]); - _mesa_free(strings); - } - - impl->_obj._generic.info_log = - _mesa_strdup(ShGetInfoLog(impl->_obj._3dlabs_shhandle._obj.handle)); -#else - /* NEW_SLANG */ - if (impl->_vftbl->GetSubType(intf) == GL_FRAGMENT_SHADER) { - type = slang_unit_fragment_shader; - (*intf)->Program = _mesa_new_program(ctx, GL_FRAGMENT_PROGRAM_ARB, 1); - } - else { - type = slang_unit_vertex_shader; - (*intf)->Program = _mesa_new_program(ctx, GL_VERTEX_PROGRAM_ARB, 1); - } - slang_info_log_construct(&info_log); - if (_slang_compile(impl->_obj.source, &impl->_obj.code, type, &info_log, - (*intf)->Program)) - impl->_obj.compile_status = GL_TRUE; - if (info_log.text != NULL) - impl->_obj._generic.info_log = _mesa_strdup(info_log.text); - else if (impl->_obj.compile_status) - impl->_obj._generic.info_log = _mesa_strdup("Compile OK.\n"); - else - impl->_obj._generic.info_log = _mesa_strdup("Compile failed.\n"); - slang_info_log_destruct(&info_log); -#endif -} - -static struct gl2_shader_intf _shader_vftbl = { - { - { - _unknown_AddRef, - _unknown_Release, - _shader_QueryInterface - }, - _generic_Delete, - _shader_GetType, - _generic_GetName, - _generic_GetDeleteStatus, - _shader_GetInfoLog, - _shader_GetInfoLogLength - }, - NULL, /* abstract GetSubType */ - _shader_GetCompileStatus, - _shader_SetSource, - _shader_GetSource, - _shader_Compile -}; - -static void -_shader_constructor(struct gl2_shader_impl *impl) -{ - _generic_constructor((struct gl2_generic_impl *) impl); - _3dlabs_shhandle_constructor(&impl->_obj._3dlabs_shhandle, - (struct gl2_unknown_intf **) - &impl->_vftbl); - impl->_vftbl = &_shader_vftbl; - impl->_obj._generic._unknown._destructor = _shader_destructor; - impl->_obj.compile_status = GL_FALSE; - impl->_obj.source = NULL; - impl->_obj.offsets = NULL; - impl->_obj.offset_count = 0; - _slang_code_object_ctr(&impl->_obj.code); -} - -struct gl2_program_obj -{ - struct gl2_container_obj _container; - GLboolean link_status; - GLboolean validate_status; -#if USE_3DLABS_FRONTEND - ShHandle linker; - ShHandle uniforms; -#endif - slang_program prog; -}; - -struct gl2_program_impl -{ - struct gl2_program_intf *_vftbl; - struct gl2_program_obj _obj; -}; - -static void -_program_destructor(struct gl2_unknown_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; -#if USE_3DLABS_FRONTEND - ShDestruct(impl->_obj.linker); - ShDestruct(impl->_obj.uniforms); -#endif - _container_destructor(intf); - _slang_program_dtr(&impl->_obj.prog); -} - -static struct gl2_unknown_intf ** -_program_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) -{ - if (uiid == UIID_PROGRAM) { - (**intf).AddRef(intf); - return intf; - } - return _container_QueryInterface(intf, uiid); -} - -static GLenum -_program_GetType(struct gl2_generic_intf **intf) -{ - return GL_PROGRAM_OBJECT_ARB; -} - -static GLboolean -_program_Attach(struct gl2_container_intf **intf, - struct gl2_generic_intf **att) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_unknown_intf **sha; - - sha = - (**att)._unknown.QueryInterface((struct gl2_unknown_intf **) att, - UIID_SHADER); - if (sha == NULL) { - _mesa_error(ctx, GL_INVALID_OPERATION, "_program_Attach"); - return GL_FALSE; - } - - (**sha).Release(sha); - return _container_Attach(intf, att); -} - -static GLboolean -_program_GetLinkStatus(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - - return impl->_obj.link_status; -} - -static GLboolean -_program_GetValidateStatus(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - - return impl->_obj.validate_status; -} - -static GLvoid -_program_Link(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; -#if USE_3DLABS_FRONTEND - ShHandle *handles; -#endif - GLuint i, count; - slang_code_object *code[2]; - GLboolean all_compiled = GL_TRUE; - - impl->_obj.link_status = GL_FALSE; - _mesa_free((void *) impl->_obj._container._generic.info_log); - impl->_obj._container._generic.info_log = NULL; - _slang_program_rst(&impl->_obj.prog); - -#if USE_3DLABS_FRONTEND - handles = - (ShHandle *) _mesa_malloc(impl->_obj._container.attached_count * - sizeof(ShHandle)); - if (handles == NULL) - return; - - for (i = 0; i < impl->_obj._container.attached_count; i++) { - struct gl2_generic_intf **gen = impl->_obj._container.attached[i]; - struct gl2_3dlabs_shhandle_intf **sh; - - sh = - (struct gl2_3dlabs_shhandle_intf **) (**gen)._unknown. - QueryInterface((struct gl2_unknown_intf **) gen, - UIID_3DLABS_SHHANDLE); - if (sh != NULL) { - handles[i] = (**sh).GetShHandle(sh); - (**sh)._unknown.Release((struct gl2_unknown_intf **) sh); - } - else { - _mesa_free(handles); - return; - } - } - - if (ShLink(impl->_obj.linker, handles, impl->_obj._container.attached_count, - impl->_obj.uniforms, NULL, NULL)) - impl->_obj.link_status = GL_TRUE; - - impl->_obj._container._generic.info_log = - _mesa_strdup(ShGetInfoLog(impl->_obj.linker)); -#else - count = impl->_obj._container.attached_count; - if (count > 2) - return; - - for (i = 0; i < count; i++) { - struct gl2_generic_intf **obj; - struct gl2_unknown_intf **unk; - struct gl2_shader_impl *sha; - - obj = impl->_obj._container.attached[i]; - unk = - (**obj)._unknown.QueryInterface((struct gl2_unknown_intf **) obj, - UIID_SHADER); - if (unk == NULL) - return; - sha = (struct gl2_shader_impl *) unk; - code[i] = &sha->_obj.code; - all_compiled = all_compiled && sha->_obj.compile_status; - (**unk).Release(unk); - } - - impl->_obj.link_status = all_compiled; - if (!impl->_obj.link_status) { - impl->_obj._container._generic.info_log = - _mesa_strdup - ("Error: One or more shaders has not successfully compiled.\n"); - return; - } - - impl->_obj.link_status = _slang_link(&impl->_obj.prog, code, count); - if (!impl->_obj.link_status) { - impl->_obj._container._generic.info_log = - _mesa_strdup("Link failed.\n"); - return; - } - - impl->_obj._container._generic.info_log = _mesa_strdup("Link OK.\n"); -#endif -} - -static GLvoid -_program_Validate(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - - impl->_obj.validate_status = GL_FALSE; - _mesa_free((void *) impl->_obj._container._generic.info_log); - impl->_obj._container._generic.info_log = NULL; - - /* TODO validate */ -} - -static GLvoid -write_common_fixed(slang_program * pro, GLuint index, const GLvoid * src, - GLuint off, GLuint size) -{ - GLuint i; - - for (i = 0; i < SLANG_SHADER_MAX; i++) { - GLuint addr; - - addr = pro->common_fixed_entries[i][index]; - if (addr != ~0) { - GLubyte *dst; - - dst = (GLubyte *) pro->machines[i]->mem + addr + off * size; - _mesa_memcpy(dst, src, size); - } - } -} - -static GLvoid -write_common_fixed_mat4(slang_program * pro, GLmatrix * matrix, GLuint off, - GLuint i, GLuint ii, GLuint it, GLuint iit) -{ - GLfloat mat[16]; - - /* we want inverse matrix */ - if (!matrix->inv) { - /* allocate inverse matrix and make it dirty */ - _math_matrix_alloc_inv(matrix); - _math_matrix_loadf(matrix, matrix->m); - } - _math_matrix_analyse(matrix); - - write_common_fixed(pro, i, matrix->m, off, 16 * sizeof(GLfloat)); - - /* inverse */ - write_common_fixed(pro, ii, matrix->inv, off, 16 * sizeof(GLfloat)); - - /* transpose */ - _math_transposef(mat, matrix->m); - write_common_fixed(pro, it, mat, off, 16 * sizeof(GLfloat)); - - /* inverse transpose */ - _math_transposef(mat, matrix->inv); - write_common_fixed(pro, iit, mat, off, 16 * sizeof(GLfloat)); -} - -static GLvoid -write_common_fixed_material(GLcontext * ctx, slang_program * pro, GLuint i, - GLuint e, GLuint a, GLuint d, GLuint sp, - GLuint sh) -{ - GLfloat v[17]; - - COPY_4FV(v, ctx->Light.Material.Attrib[e]); - COPY_4FV((v + 4), ctx->Light.Material.Attrib[a]); - COPY_4FV((v + 8), ctx->Light.Material.Attrib[d]); - COPY_4FV((v + 12), ctx->Light.Material.Attrib[sp]); - v[16] = ctx->Light.Material.Attrib[sh][0]; - write_common_fixed(pro, i, v, 0, 17 * sizeof(GLfloat)); -} - -static GLvoid -write_common_fixed_light_model_product(GLcontext * ctx, slang_program * pro, - GLuint i, GLuint e, GLuint a) -{ - GLfloat v[4]; - - SCALE_4V(v, ctx->Light.Material.Attrib[a], ctx->Light.Model.Ambient); - ACC_4V(v, ctx->Light.Material.Attrib[e]); - write_common_fixed(pro, i, v, 0, 4 * sizeof(GLfloat)); -} - -static GLvoid -write_common_fixed_light_product(GLcontext * ctx, slang_program * pro, - GLuint off, GLuint i, GLuint a, GLuint d, - GLuint s) -{ - GLfloat v[12]; - - SCALE_4V(v, ctx->Light.Light[off].Ambient, ctx->Light.Material.Attrib[a]); - SCALE_4V((v + 4), ctx->Light.Light[off].Diffuse, - ctx->Light.Material.Attrib[d]); - SCALE_4V((v + 8), ctx->Light.Light[off].Specular, - ctx->Light.Material.Attrib[s]); - write_common_fixed(pro, i, v, off, 12 * sizeof(GLfloat)); -} - -static GLvoid -_program_UpdateFixedUniforms(struct gl2_program_intf **intf) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint i; - GLfloat v[29]; - GLfloat *p; - - /* MODELVIEW matrix */ - write_common_fixed_mat4(pro, ctx->ModelviewMatrixStack.Top, 0, - SLANG_COMMON_FIXED_MODELVIEWMATRIX, - SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE, - SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE); - - /* PROJECTION matrix */ - write_common_fixed_mat4(pro, ctx->ProjectionMatrixStack.Top, 0, - SLANG_COMMON_FIXED_PROJECTIONMATRIX, - SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE, - SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE); - - /* MVP matrix */ - write_common_fixed_mat4(pro, &ctx->_ModelProjectMatrix, 0, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE); - - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - /* TEXTURE matrix */ - write_common_fixed_mat4(pro, ctx->TextureMatrixStack[i].Top, i, - SLANG_COMMON_FIXED_TEXTUREMATRIX, - SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE, - SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE); - - /* EYE_PLANE texture-coordinate generation */ - write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANES, - ctx->Texture.Unit[i].EyePlaneS, i, - 4 * sizeof(GLfloat)); - write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANET, - ctx->Texture.Unit[i].EyePlaneT, i, - 4 * sizeof(GLfloat)); - write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANER, - ctx->Texture.Unit[i].EyePlaneR, i, - 4 * sizeof(GLfloat)); - write_common_fixed(pro, SLANG_COMMON_FIXED_EYEPLANEQ, - ctx->Texture.Unit[i].EyePlaneQ, i, - 4 * sizeof(GLfloat)); - - /* OBJECT_PLANE texture-coordinate generation */ - write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANES, - ctx->Texture.Unit[i].ObjectPlaneS, i, - 4 * sizeof(GLfloat)); - write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANET, - ctx->Texture.Unit[i].ObjectPlaneT, i, - 4 * sizeof(GLfloat)); - write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANER, - ctx->Texture.Unit[i].ObjectPlaneR, i, - 4 * sizeof(GLfloat)); - write_common_fixed(pro, SLANG_COMMON_FIXED_OBJECTPLANEQ, - ctx->Texture.Unit[i].ObjectPlaneQ, i, - 4 * sizeof(GLfloat)); - } - - /* NORMAL matrix - upper 3x3 inverse transpose of MODELVIEW matrix */ - p = ctx->ModelviewMatrixStack.Top->inv; - v[0] = p[0]; - v[1] = p[4]; - v[2] = p[8]; - v[3] = p[1]; - v[4] = p[5]; - v[5] = p[9]; - v[6] = p[2]; - v[7] = p[6]; - v[8] = p[10]; - write_common_fixed(pro, SLANG_COMMON_FIXED_NORMALMATRIX, v, 0, - 9 * sizeof(GLfloat)); - - /* normal scale */ - write_common_fixed(pro, SLANG_COMMON_FIXED_NORMALSCALE, - &ctx->_ModelViewInvScale, 0, sizeof(GLfloat)); - - /* depth range parameters */ - v[0] = ctx->Viewport.Near; - v[1] = ctx->Viewport.Far; - v[2] = ctx->Viewport.Far - ctx->Viewport.Near; - write_common_fixed(pro, SLANG_COMMON_FIXED_DEPTHRANGE, v, 0, - 3 * sizeof(GLfloat)); - - /* CLIP_PLANEi */ - for (i = 0; i < ctx->Const.MaxClipPlanes; i++) { - write_common_fixed(pro, SLANG_COMMON_FIXED_CLIPPLANE, - ctx->Transform.EyeUserPlane[i], i, - 4 * sizeof(GLfloat)); - } - - /* point parameters */ - v[0] = ctx->Point.Size; - v[1] = ctx->Point.MinSize; - v[2] = ctx->Point.MaxSize; - v[3] = ctx->Point.Threshold; - COPY_3FV((v + 4), ctx->Point.Params); - write_common_fixed(pro, SLANG_COMMON_FIXED_POINT, v, 0, - 7 * sizeof(GLfloat)); - - /* material parameters */ - write_common_fixed_material(ctx, pro, SLANG_COMMON_FIXED_FRONTMATERIAL, - MAT_ATTRIB_FRONT_EMISSION, - MAT_ATTRIB_FRONT_AMBIENT, - MAT_ATTRIB_FRONT_DIFFUSE, - MAT_ATTRIB_FRONT_SPECULAR, - MAT_ATTRIB_FRONT_SHININESS); - write_common_fixed_material(ctx, pro, SLANG_COMMON_FIXED_BACKMATERIAL, - MAT_ATTRIB_BACK_EMISSION, - MAT_ATTRIB_BACK_AMBIENT, - MAT_ATTRIB_BACK_DIFFUSE, - MAT_ATTRIB_BACK_SPECULAR, - MAT_ATTRIB_BACK_SHININESS); - - for (i = 0; i < ctx->Const.MaxLights; i++) { - /* light source parameters */ - COPY_4FV(v, ctx->Light.Light[i].Ambient); - COPY_4FV((v + 4), ctx->Light.Light[i].Diffuse); - COPY_4FV((v + 8), ctx->Light.Light[i].Specular); - COPY_4FV((v + 12), ctx->Light.Light[i].EyePosition); - COPY_2FV((v + 16), ctx->Light.Light[i].EyePosition); - v[18] = ctx->Light.Light[i].EyePosition[2] + 1.0f; - NORMALIZE_3FV((v + 16)); - v[19] = 0.0f; - COPY_3V((v + 20), ctx->Light.Light[i].EyeDirection); - v[23] = ctx->Light.Light[i].SpotExponent; - v[24] = ctx->Light.Light[i].SpotCutoff; - v[25] = ctx->Light.Light[i]._CosCutoffNeg; - v[26] = ctx->Light.Light[i].ConstantAttenuation; - v[27] = ctx->Light.Light[i].LinearAttenuation; - v[28] = ctx->Light.Light[i].QuadraticAttenuation; - write_common_fixed(pro, SLANG_COMMON_FIXED_LIGHTSOURCE, v, i, - 29 * sizeof(GLfloat)); - - /* light product */ - write_common_fixed_light_product(ctx, pro, i, - SLANG_COMMON_FIXED_FRONTLIGHTPRODUCT, - MAT_ATTRIB_FRONT_AMBIENT, - MAT_ATTRIB_FRONT_DIFFUSE, - MAT_ATTRIB_FRONT_SPECULAR); - write_common_fixed_light_product(ctx, pro, i, - SLANG_COMMON_FIXED_BACKLIGHTPRODUCT, - MAT_ATTRIB_BACK_AMBIENT, - MAT_ATTRIB_BACK_DIFFUSE, - MAT_ATTRIB_BACK_SPECULAR); - } - - /* light model parameters */ - write_common_fixed(pro, SLANG_COMMON_FIXED_LIGHTMODEL, - ctx->Light.Model.Ambient, 0, 4 * sizeof(GLfloat)); - - /* light model product */ - write_common_fixed_light_model_product(ctx, pro, - SLANG_COMMON_FIXED_FRONTLIGHTMODELPRODUCT, - MAT_ATTRIB_FRONT_EMISSION, - MAT_ATTRIB_FRONT_AMBIENT); - write_common_fixed_light_model_product(ctx, pro, - SLANG_COMMON_FIXED_BACKLIGHTMODELPRODUCT, - MAT_ATTRIB_BACK_EMISSION, - MAT_ATTRIB_BACK_AMBIENT); - - /* TEXTURE_ENV_COLOR */ - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { - write_common_fixed(pro, SLANG_COMMON_FIXED_TEXTUREENVCOLOR, - ctx->Texture.Unit[i].EnvColor, i, - 4 * sizeof(GLfloat)); - } - - /* fog parameters */ - COPY_4FV(v, ctx->Fog.Color); - v[4] = ctx->Fog.Density; - v[5] = ctx->Fog.Start; - v[6] = ctx->Fog.End; - v[7] = ctx->Fog._Scale; - write_common_fixed(pro, SLANG_COMMON_FIXED_FOG, v, 0, 8 * sizeof(GLfloat)); -} - -static GLvoid -_program_UpdateFixedAttrib(struct gl2_program_intf **intf, GLuint index, - GLvoid * data, GLuint offset, GLuint size, - GLboolean write) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint addr; - - addr = pro->vertex_fixed_entries[index]; - if (addr != ~0) { - GLubyte *mem; - - mem = - (GLubyte *) pro->machines[SLANG_SHADER_VERTEX]->mem + addr + - offset * size; - if (write) - _mesa_memcpy(mem, data, size); - else - _mesa_memcpy(data, mem, size); - } -} - - -/** - * Called during fragment shader execution to either load a varying - * register with values, or fetch values from a varying register. - * \param intf the internal program? - * \param index which varying register, one of the SLANG_FRAGMENT_FIXED_* - * values for example. - * \param data source values to load (or dest to write to) - * \param offset indicates a texture unit or generic varying attribute - * \param size number of bytes to copy - * \param write if true, write to the varying register, else store values - * in 'data' - */ -static GLvoid -_program_UpdateFixedVarying(struct gl2_program_intf **intf, GLuint index, - GLvoid * data, - GLuint offset, GLuint size, GLboolean write) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint addr; - - addr = pro->fragment_fixed_entries[index]; - if (addr != ~0) { - GLubyte *mem; - - mem = - (GLubyte *) pro->machines[SLANG_SHADER_FRAGMENT]->mem + addr + - offset * size; - if (write) - _mesa_memcpy(mem, data, size); - else - _mesa_memcpy(data, mem, size); - } -} - -static GLvoid -_program_GetTextureImageUsage(struct gl2_program_intf **intf, - GLbitfield * teximageusage) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint i; - - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) - teximageusage[i] = 0; - - for (i = 0; i < pro->texture_usage.count; i++) { - GLuint n, addr, j; - - n = slang_export_data_quant_elements(pro->texture_usage.table[i].quant); - addr = pro->texture_usage.table[i].frag_address; - for (j = 0; j < n; j++) { - GLubyte *mem; - GLuint image; - - mem = - (GLubyte *) pro->machines[SLANG_SHADER_FRAGMENT]->mem + addr + - j * 4; - image = (GLuint) * ((GLfloat *) mem); - if (image >= 0 && image < ctx->Const.MaxTextureImageUnits) { - switch (slang_export_data_quant_type - (pro->texture_usage.table[i].quant)) { - case GL_SAMPLER_1D_ARB: - case GL_SAMPLER_1D_SHADOW_ARB: - teximageusage[image] |= TEXTURE_1D_BIT; - break; - case GL_SAMPLER_2D_ARB: - case GL_SAMPLER_2D_SHADOW_ARB: - teximageusage[image] |= TEXTURE_2D_BIT; - break; - case GL_SAMPLER_3D_ARB: - teximageusage[image] |= TEXTURE_3D_BIT; - break; - case GL_SAMPLER_CUBE_ARB: - teximageusage[image] |= TEXTURE_CUBE_BIT; - break; - } - } - } - } - - /* TODO: make sure that for 0<=i<=MaxTextureImageUint bitcount(teximageuint[i])<=0 */ -} - -static GLboolean -_program_IsShaderPresent(struct gl2_program_intf **intf, GLenum subtype) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - - switch (subtype) { - case GL_VERTEX_SHADER_ARB: - return pro->machines[SLANG_SHADER_VERTEX] != NULL; - case GL_FRAGMENT_SHADER_ARB: - return pro->machines[SLANG_SHADER_FRAGMENT] != NULL; - default: - return GL_FALSE; - } -} - -static GLvoid -get_active_variable(slang_active_variable * var, GLsizei maxLength, - GLsizei * length, GLint * size, GLenum * type, - GLchar * name) -{ - GLsizei len; - - len = _mesa_strlen(var->name); - if (len >= maxLength) - len = maxLength - 1; - if (length != NULL) - *length = len; - *size = slang_export_data_quant_elements(var->quant); - *type = slang_export_data_quant_type(var->quant); - _mesa_memcpy(name, var->name, len); - name[len] = '\0'; -} - -static GLuint -get_active_variable_max_length(slang_active_variables * vars) -{ - GLuint i, len = 0; - - for (i = 0; i < vars->count; i++) { - GLuint n = _mesa_strlen(vars->table[i].name); - if (n > len) - len = n; - } - return len; -} - -static GLvoid -_program_GetActiveUniform(struct gl2_program_intf **intf, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLchar * name) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_active_variable *u = &impl->_obj.prog.active_uniforms.table[index]; - - get_active_variable(u, maxLength, length, size, type, name); -} - -static GLuint -_program_GetActiveUniformMaxLength(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - - return get_active_variable_max_length(&impl->_obj.prog.active_uniforms); -} - -static GLuint -_program_GetActiveUniformCount(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - - return impl->_obj.prog.active_uniforms.count; -} - -static GLint -_program_GetUniformLocation(struct gl2_program_intf **intf, - const GLchar * name) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_uniform_bindings *bind = &impl->_obj.prog.uniforms; - GLuint i; - - for (i = 0; i < bind->count; i++) - if (_mesa_strcmp(bind->table[i].name, name) == 0) - return i; - return -1; -} - -/** - * Write a uniform variable into program's memory. - * \return GL_TRUE for success, GL_FALSE if error - */ -static GLboolean -_program_WriteUniform(struct gl2_program_intf **intf, GLint loc, - GLsizei count, const GLvoid * data, GLenum type) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_uniform_bindings *uniforms = &impl->_obj.prog.uniforms; - slang_uniform_binding *uniform; - GLuint i; - GLboolean convert_float_to_bool = GL_FALSE; - GLboolean convert_int_to_bool = GL_FALSE; - GLboolean convert_int_to_float = GL_FALSE; - GLboolean types_match = GL_FALSE; - - if (loc < 0 || loc >= uniforms->count) - return GL_FALSE; - - uniform = &uniforms->table[loc]; - /* TODO: check sizes */ - if (slang_export_data_quant_struct(uniform->quant)) - return GL_FALSE; - - switch (slang_export_data_quant_type(uniform->quant)) { - case GL_BOOL_ARB: - types_match = (type == GL_FLOAT) || (type == GL_INT); - if (type == GL_FLOAT) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_BOOL_VEC2_ARB: - types_match = (type == GL_FLOAT_VEC2_ARB) || (type == GL_INT_VEC2_ARB); - if (type == GL_FLOAT_VEC2_ARB) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_BOOL_VEC3_ARB: - types_match = (type == GL_FLOAT_VEC3_ARB) || (type == GL_INT_VEC3_ARB); - if (type == GL_FLOAT_VEC3_ARB) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_BOOL_VEC4_ARB: - types_match = (type == GL_FLOAT_VEC4_ARB) || (type == GL_INT_VEC4_ARB); - if (type == GL_FLOAT_VEC4_ARB) - convert_float_to_bool = GL_TRUE; - else - convert_int_to_bool = GL_TRUE; - break; - case GL_SAMPLER_1D_ARB: - case GL_SAMPLER_2D_ARB: - case GL_SAMPLER_3D_ARB: - case GL_SAMPLER_CUBE_ARB: - case GL_SAMPLER_1D_SHADOW_ARB: - case GL_SAMPLER_2D_SHADOW_ARB: - types_match = (type == GL_INT); - break; - default: - types_match = (type == slang_export_data_quant_type(uniform->quant)); - break; - } - - if (!types_match) - return GL_FALSE; - - switch (type) { - case GL_INT: - case GL_INT_VEC2_ARB: - case GL_INT_VEC3_ARB: - case GL_INT_VEC4_ARB: - convert_int_to_float = GL_TRUE; - break; - } - - for (i = 0; i < SLANG_SHADER_MAX; i++) { - if (uniform->address[i] != ~0) { - void *dest - = &impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]; - /* total number of values to copy */ - GLuint total - = count * slang_export_data_quant_components(uniform->quant); - GLuint j; - if (convert_float_to_bool) { - const GLfloat *src = (GLfloat *) (data); - GLfloat *dst = (GLfloat *) dest; - for (j = 0; j < total; j++) - dst[j] = src[j] != 0.0f ? 1.0f : 0.0f; - break; - } - else if (convert_int_to_bool) { - const GLint *src = (GLint *) (data); - GLfloat *dst = (GLfloat *) dest; - for (j = 0; j < total; j++) - dst[j] = src[j] ? 1.0f : 0.0f; - break; - } - else if (convert_int_to_float) { - const GLint *src = (GLint *) (data); - GLfloat *dst = (GLfloat *) dest; - for (j = 0; j < total; j++) - dst[j] = (GLfloat) src[j]; - break; - } - else { - _mesa_memcpy(dest, data, total * sizeof(GLfloat)); - break; - } - break; - } - } - return GL_TRUE; -} - -/** - * Read a uniform variable from program's memory. - * \return GL_TRUE for success, GL_FALSE if error - */ -static GLboolean -_program_ReadUniform(struct gl2_program_intf **intf, GLint loc, - GLsizei count, GLvoid *data, GLenum type) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - const slang_uniform_bindings *uniforms = &impl->_obj.prog.uniforms; - const slang_uniform_binding *uniform; - GLuint i; - GLboolean convert_bool_to_float = GL_FALSE; - GLboolean convert_bool_to_int = GL_FALSE; - GLboolean convert_float_to_int = GL_FALSE; - GLboolean types_match = GL_FALSE; - - if (loc < 0 || loc >= uniforms->count) - return GL_FALSE; - - uniform = &uniforms->table[loc]; - - if (slang_export_data_quant_struct(uniform->quant)) - return GL_FALSE; - - switch (slang_export_data_quant_type(uniform->quant)) { - case GL_BOOL_ARB: - types_match = (type == GL_FLOAT) || (type == GL_INT); - if (type == GL_FLOAT) - convert_bool_to_float = GL_TRUE; - else - convert_bool_to_int = GL_TRUE; - break; - case GL_BOOL_VEC2_ARB: - types_match = (type == GL_FLOAT_VEC2_ARB) || (type == GL_INT_VEC2_ARB); - if (type == GL_FLOAT_VEC2_ARB) - convert_bool_to_float = GL_TRUE; - else - convert_bool_to_int = GL_TRUE; - break; - case GL_BOOL_VEC3_ARB: - types_match = (type == GL_FLOAT_VEC3_ARB) || (type == GL_INT_VEC3_ARB); - if (type == GL_FLOAT_VEC3_ARB) - convert_bool_to_float = GL_TRUE; - else - convert_bool_to_int = GL_TRUE; - break; - case GL_BOOL_VEC4_ARB: - types_match = (type == GL_FLOAT_VEC4_ARB) || (type == GL_INT_VEC4_ARB); - if (type == GL_FLOAT_VEC4_ARB) - convert_bool_to_float = GL_TRUE; - else - convert_bool_to_int = GL_TRUE; - break; - case GL_SAMPLER_1D_ARB: - case GL_SAMPLER_2D_ARB: - case GL_SAMPLER_3D_ARB: - case GL_SAMPLER_CUBE_ARB: - case GL_SAMPLER_1D_SHADOW_ARB: - case GL_SAMPLER_2D_SHADOW_ARB: - types_match = (type == GL_INT); - break; - default: - /* uniform is a float type */ - types_match = (type == GL_FLOAT); - break; - } - - if (!types_match) - return GL_FALSE; - - switch (type) { - case GL_INT: - case GL_INT_VEC2_ARB: - case GL_INT_VEC3_ARB: - case GL_INT_VEC4_ARB: - convert_float_to_int = GL_TRUE; - break; - } - - for (i = 0; i < SLANG_SHADER_MAX; i++) { - if (uniform->address[i] != ~0) { - /* XXX if bools are really implemented as floats, some of this - * could probably be culled out. - */ - const void *source - = &impl->_obj.prog.machines[i]->mem[uniform->address[i] / 4]; - /* total number of values to copy */ - const GLuint total - = count * slang_export_data_quant_components(uniform->quant); - GLuint j; - if (convert_bool_to_float) { - GLfloat *dst = (GLfloat *) (data); - const GLfloat *src = (GLfloat *) source; - for (j = 0; j < total; j++) - dst[j] = src[j] == 0.0 ? 0.0 : 1.0; - } - else if (convert_bool_to_int) { - GLint *dst = (GLint *) (data); - const GLfloat *src = (GLfloat *) source; - for (j = 0; j < total; j++) - dst[j] = src[j] == 0.0 ? 0 : 1; - } - else if (convert_float_to_int) { - GLint *dst = (GLint *) (data); - const GLfloat *src = (GLfloat *) source; - for (j = 0; j < total; j++) - dst[j] = (GLint) src[j]; - } - else { - /* no type conversion needed */ - _mesa_memcpy(data, source, total * sizeof(GLfloat)); - } - break; - } /* if */ - } /* for */ - - return GL_TRUE; -} - - -static GLvoid -_program_GetActiveAttrib(struct gl2_program_intf **intf, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLchar * name) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_active_variable *a = &impl->_obj.prog.active_attribs.table[index]; - - get_active_variable(a, maxLength, length, size, type, name); -} - -static GLuint -_program_GetActiveAttribMaxLength(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - - return get_active_variable_max_length(&impl->_obj.prog.active_attribs); -} - -static GLuint -_program_GetActiveAttribCount(struct gl2_program_intf **intf) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - - return impl->_obj.prog.active_attribs.count; -} - -static GLint -_program_GetAttribLocation(struct gl2_program_intf **intf, - const GLchar * name) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_attrib_bindings *attribs = &impl->_obj.prog.attribs; - GLuint i; - - for (i = 0; i < attribs->binding_count; i++) - if (_mesa_strcmp(attribs->bindings[i].name, name) == 0) - return attribs->bindings[i].first_slot_index; - return -1; -} - -static GLvoid -_program_OverrideAttribBinding(struct gl2_program_intf **intf, GLuint index, - const GLchar * name) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_program *pro = &impl->_obj.prog; - - if (!_slang_attrib_overrides_add(&pro->attrib_overrides, index, name)) - _mesa_error(ctx, GL_OUT_OF_MEMORY, "_program_OverrideAttribBinding"); -} - -static GLvoid -_program_WriteAttrib(struct gl2_program_intf **intf, GLuint index, - const GLfloat * value) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) (intf); - slang_program *pro = &impl->_obj.prog; - slang_attrib_slot *slot = &pro->attribs.slots[index]; - - /* - * Generic attributes can be allocated in a shader with scalar, vec - * or mat type. For scalar and vec types (specifically float, vec2 - * and vec3) this is simple - just ignore the extra components. For - * mat type this is more complicated - the vertex_shader spec - * requires to store every column of a matrix in a separate attrib - * slot. To prvent from overwriting data from neighbouring matrix - * columns, the "fill" information is kept to know how many - * components to copy. - */ - - if (slot->addr != ~0) - _mesa_memcpy(&pro->machines[SLANG_SHADER_VERTEX]->mem[slot->addr / 4]. - _float, value, slot->fill * sizeof(GLfloat)); -} - -static GLvoid -_program_UpdateVarying(struct gl2_program_intf **intf, GLuint index, - GLfloat * value, GLboolean vert) -{ - struct gl2_program_impl *impl = (struct gl2_program_impl *) intf; - slang_program *pro = &impl->_obj.prog; - GLuint addr; - - if (index >= pro->varyings.slot_count) - return; - if (vert) - addr = pro->varyings.slots[index].vert_addr / 4; - else - addr = pro->varyings.slots[index].frag_addr / 4; - if (addr != ~0) { - if (vert) - *value = pro->machines[SLANG_SHADER_VERTEX]->mem[addr]._float; - else - pro->machines[SLANG_SHADER_FRAGMENT]->mem[addr]._float = *value; - } -} - -static struct gl2_program_intf _program_vftbl = { - { - { - { - _unknown_AddRef, - _unknown_Release, - _program_QueryInterface - }, - _generic_Delete, - _program_GetType, - _generic_GetName, - _generic_GetDeleteStatus, - _generic_GetInfoLog, - _generic_GetInfoLogLength - }, - _program_Attach, - _container_Detach, - _container_GetAttachedCount, - _container_GetAttached - }, - _program_GetLinkStatus, - _program_GetValidateStatus, - _program_Link, - _program_Validate, - _program_UpdateFixedUniforms, - _program_UpdateFixedAttrib, - _program_UpdateFixedVarying, - _program_GetTextureImageUsage, - _program_IsShaderPresent, - _program_GetActiveUniform, - _program_GetActiveUniformMaxLength, - _program_GetActiveUniformCount, - _program_GetUniformLocation, - _program_WriteUniform, - _program_ReadUniform, - _program_GetActiveAttrib, - _program_GetActiveAttribMaxLength, - _program_GetActiveAttribCount, - _program_GetAttribLocation, - _program_OverrideAttribBinding, - _program_WriteAttrib, - _program_UpdateVarying -}; - -static void -_program_constructor(struct gl2_program_impl *impl) -{ - _container_constructor((struct gl2_container_impl *) impl); - impl->_vftbl = &_program_vftbl; - impl->_obj._container._generic._unknown._destructor = _program_destructor; - impl->_obj.link_status = GL_FALSE; - impl->_obj.validate_status = GL_FALSE; -#if USE_3DLABS_FRONTEND - impl->_obj.linker = ShConstructLinker(EShExVertexFragment, 0); - impl->_obj.uniforms = ShConstructUniformMap(); -#endif - _slang_program_ctr(&impl->_obj.prog); -} - -struct gl2_fragment_shader_obj -{ - struct gl2_shader_obj _shader; -}; - -struct gl2_fragment_shader_impl -{ - struct gl2_fragment_shader_intf *_vftbl; - struct gl2_fragment_shader_obj _obj; -}; - -static void -_fragment_shader_destructor(struct gl2_unknown_intf **intf) -{ - struct gl2_fragment_shader_impl *impl = - (struct gl2_fragment_shader_impl *) intf; - - (void) impl; - /* TODO free fragment shader data */ - - _shader_destructor(intf); -} - -static struct gl2_unknown_intf ** -_fragment_shader_QueryInterface(struct gl2_unknown_intf **intf, - enum gl2_uiid uiid) -{ - if (uiid == UIID_FRAGMENT_SHADER) { - (**intf).AddRef(intf); - return intf; - } - return _shader_QueryInterface(intf, uiid); -} - -static GLenum -_fragment_shader_GetSubType(struct gl2_shader_intf **intf) -{ - return GL_FRAGMENT_SHADER_ARB; -} - -static struct gl2_fragment_shader_intf _fragment_shader_vftbl = { - { - { - { - _unknown_AddRef, - _unknown_Release, - _fragment_shader_QueryInterface - }, - _generic_Delete, - _shader_GetType, - _generic_GetName, - _generic_GetDeleteStatus, - _shader_GetInfoLog, - _shader_GetInfoLogLength - }, - _fragment_shader_GetSubType, - _shader_GetCompileStatus, - _shader_SetSource, - _shader_GetSource, - _shader_Compile - } -}; - -static void -_fragment_shader_constructor(struct gl2_fragment_shader_impl *impl) -{ - _shader_constructor((struct gl2_shader_impl *) impl); - impl->_vftbl = &_fragment_shader_vftbl; - impl->_obj._shader._generic._unknown._destructor = - _fragment_shader_destructor; -#if USE_3DLABS_FRONTEND - impl->_obj._shader._3dlabs_shhandle._obj.handle = - ShConstructCompiler(EShLangFragment, 0); -#endif -} - -struct gl2_vertex_shader_obj -{ - struct gl2_shader_obj _shader; -}; - -struct gl2_vertex_shader_impl -{ - struct gl2_vertex_shader_intf *_vftbl; - struct gl2_vertex_shader_obj _obj; -}; - -static void -_vertex_shader_destructor(struct gl2_unknown_intf **intf) -{ - struct gl2_vertex_shader_impl *impl = - (struct gl2_vertex_shader_impl *) intf; - - (void) impl; - /* TODO free vertex shader data */ - - _shader_destructor(intf); -} - -static struct gl2_unknown_intf ** -_vertex_shader_QueryInterface(struct gl2_unknown_intf **intf, - enum gl2_uiid uiid) -{ - if (uiid == UIID_VERTEX_SHADER) { - (**intf).AddRef(intf); - return intf; - } - return _shader_QueryInterface(intf, uiid); -} - -static GLenum -_vertex_shader_GetSubType(struct gl2_shader_intf **intf) -{ - return GL_VERTEX_SHADER_ARB; -} - -static struct gl2_vertex_shader_intf _vertex_shader_vftbl = { - { - { - { - _unknown_AddRef, - _unknown_Release, - _vertex_shader_QueryInterface - }, - _generic_Delete, - _shader_GetType, - _generic_GetName, - _generic_GetDeleteStatus, - _shader_GetInfoLog, - _shader_GetInfoLogLength - }, - _vertex_shader_GetSubType, - _shader_GetCompileStatus, - _shader_SetSource, - _shader_GetSource, - _shader_Compile - } -}; - -static void -_vertex_shader_constructor(struct gl2_vertex_shader_impl *impl) -{ - _shader_constructor((struct gl2_shader_impl *) impl); - impl->_vftbl = &_vertex_shader_vftbl; - impl->_obj._shader._generic._unknown._destructor = - _vertex_shader_destructor; -#if USE_3DLABS_FRONTEND - impl->_obj._shader._3dlabs_shhandle._obj.handle = - ShConstructCompiler(EShLangVertex, 0); -#endif -} - -struct gl2_debug_obj -{ - struct gl2_generic_obj _generic; -}; - -struct gl2_debug_impl -{ - struct gl2_debug_intf *_vftbl; - struct gl2_debug_obj _obj; -}; - -static GLvoid -_debug_destructor(struct gl2_unknown_intf **intf) -{ - struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); - - (void) (impl); - /* TODO */ - - _generic_destructor(intf); -} - -static struct gl2_unknown_intf ** -_debug_QueryInterface(struct gl2_unknown_intf **intf, enum gl2_uiid uiid) -{ - if (uiid == UIID_DEBUG) { - (**intf).AddRef(intf); - return intf; - } - return _generic_QueryInterface(intf, uiid); -} - -static GLenum -_debug_GetType(struct gl2_generic_intf **intf) -{ - return /*GL_DEBUG_OBJECT_MESA */ 0; -} - -static GLvoid -_debug_ClearDebugLog(struct gl2_debug_intf **intf, GLenum logType, - GLenum shaderType) -{ - struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); - - (void) (impl); - /* TODO */ -} - -static GLvoid -_debug_GetDebugLog(struct gl2_debug_intf **intf, GLenum logType, - GLenum shaderType, GLsizei maxLength, GLsizei * length, - GLcharARB * infoLog) -{ - struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); - - (void) (impl); - /* TODO */ -} - -static GLsizei -_debug_GetDebugLogLength(struct gl2_debug_intf **intf, GLenum logType, - GLenum shaderType) -{ - struct gl2_debug_impl *impl = (struct gl2_debug_impl *) (intf); - - (void) (impl); - /* TODO */ - - return 0; -} - -static struct gl2_debug_intf _debug_vftbl = { - { - { - _unknown_AddRef, - _unknown_Release, - _debug_QueryInterface - }, - _generic_Delete, - _debug_GetType, - _generic_GetName, - _generic_GetDeleteStatus, - _generic_GetInfoLog, - _generic_GetInfoLogLength - }, - _debug_ClearDebugLog, - _debug_GetDebugLog, - _debug_GetDebugLogLength -}; - -static GLvoid -_debug_constructor(struct gl2_debug_impl *impl) -{ - _generic_constructor((struct gl2_generic_impl *) (impl)); - impl->_vftbl = &_debug_vftbl; - impl->_obj._generic._unknown._destructor = _debug_destructor; -} - -GLhandleARB -_mesa_3dlabs_create_shader_object(GLenum shaderType) -{ - switch (shaderType) { - case GL_FRAGMENT_SHADER_ARB: - { - struct gl2_fragment_shader_impl *x = - (struct gl2_fragment_shader_impl *) - _mesa_malloc(sizeof(struct gl2_fragment_shader_impl)); - - if (x != NULL) { - _fragment_shader_constructor(x); - return x->_obj._shader._generic.name; - } - } - break; - case GL_VERTEX_SHADER_ARB: - { - struct gl2_vertex_shader_impl *x = (struct gl2_vertex_shader_impl *) - _mesa_malloc(sizeof(struct gl2_vertex_shader_impl)); - - if (x != NULL) { - _vertex_shader_constructor(x); - return x->_obj._shader._generic.name; - } - } - break; - } - - return 0; -} - -GLhandleARB -_mesa_3dlabs_create_program_object(void) -{ - struct gl2_program_impl *x = (struct gl2_program_impl *) - _mesa_malloc(sizeof(struct gl2_program_impl)); - - if (x != NULL) { - _program_constructor(x); - return x->_obj._container._generic.name; - } - - return 0; -} - -GLhandleARB -_mesa_3dlabs_create_debug_object(GLvoid) -{ - struct gl2_debug_impl *obj; - - obj = - (struct gl2_debug_impl *) (_mesa_malloc(sizeof(struct gl2_debug_impl))); - if (obj != NULL) { - _debug_constructor(obj); - return obj->_obj._generic.name; - } - return 0; -} - -#include "slang_assemble.h" -#include "slang_execute.h" - -int -_slang_fetch_discard(struct gl2_program_intf **pro, GLboolean * val) -{ - struct gl2_program_impl *impl; - - impl = (struct gl2_program_impl *) pro; - *val = - impl->_obj.prog.machines[SLANG_SHADER_FRAGMENT]-> - kill ? GL_TRUE : GL_FALSE; - return 1; -} - -static GLvoid -exec_shader(struct gl2_program_intf **pro, GLuint i) -{ - struct gl2_program_impl *impl; - slang_program *p; - - impl = (struct gl2_program_impl *) pro; - p = &impl->_obj.prog; - - slang_machine_init(p->machines[i]); - p->machines[i]->ip = p->code[i][SLANG_COMMON_CODE_MAIN]; - - _slang_execute2(p->assemblies[i], p->machines[i]); -} - -GLvoid -_slang_exec_fragment_shader(struct gl2_program_intf **pro) -{ - exec_shader(pro, SLANG_SHADER_FRAGMENT); -} - -GLvoid -_slang_exec_vertex_shader(struct gl2_program_intf **pro) -{ - exec_shader(pro, SLANG_SHADER_VERTEX); -} - -#endif - -void -_mesa_init_shaderobjects_3dlabs(GLcontext * ctx) -{ -#if USE_3DLABS_FRONTEND - _glslang_3dlabs_InitProcess(); - _glslang_3dlabs_ShInitialize(); -#endif -} diff --git a/src/mesa/shader/shaderobjects_3dlabs.h b/src/mesa/shader/shaderobjects_3dlabs.h deleted file mode 100644 index 2092dd923e..0000000000 --- a/src/mesa/shader/shaderobjects_3dlabs.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SHADEROBJECTS_3DLABS_H -#define SHADEROBJECTS_3DLABS_H - -#if FEATURE_ARB_shader_objects - -extern int _slang_fetch_discard (struct gl2_program_intf **pro, GLboolean *val); - -extern GLvoid _slang_exec_fragment_shader (struct gl2_program_intf **pro); - -extern GLvoid _slang_exec_vertex_shader (struct gl2_program_intf **pro); - -extern GLhandleARB -_mesa_3dlabs_create_shader_object (GLenum); - -extern GLhandleARB -_mesa_3dlabs_create_program_object (GLvoid); - -extern GLhandleARB -_mesa_3dlabs_create_debug_object (GLvoid); - -#endif /* FEATURE_ARB_shader_objects */ - -extern void -_mesa_init_shaderobjects_3dlabs (GLcontext *ctx); - -#endif - -- cgit v1.2.3 From 5b01c5e9d2c0283cc31981b6c85dc6392144b3db Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 18:02:03 -0700 Subject: Overhaul of GLSL API functions, dispatching, etc. --- src/mesa/shader/prog_parameter.c | 19 + src/mesa/shader/prog_parameter.h | 4 +- src/mesa/shader/shader_api.c | 1585 ++++++++++++++------------------------ src/mesa/shader/shader_api.h | 111 ++- 4 files changed, 693 insertions(+), 1026 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 7094d6fc03..84e92d7ed0 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -444,3 +444,22 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) return clone; } + + +/** + * Find longest name of any parameter in list. + */ +GLuint +_mesa_parameter_longest_name(const struct gl_program_parameter_list *list) +{ + GLuint i, maxLen = 0; + if (!list) + return 0; + for (i = 0; i < list->NumParameters; i++) { + GLuint len = _mesa_strlen(list->Parameters[i].Name); + if (len > maxLen) + maxLen = len; + } + return maxLen; +} + diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index c60ef543b7..fb82757d83 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -115,9 +115,11 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, GLsizei nameLen, const char *name); extern GLboolean -_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, const GLfloat v[], GLsizei vSize, GLint *posOut, GLuint *swizzleOut); +extern GLuint +_mesa_parameter_longest_name(const struct gl_program_parameter_list *list); #endif /* PROG_PARAMETER_H */ diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index aaaf942cf5..ab2fd438c8 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2004-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,24 +24,22 @@ /** * \file shader_api.c - * API functions for shader objects + * Implementation of GLSL-related API functions * \author Brian Paul */ /** * XXX things to do: * 1. Check that the right error code is generated for all _mesa_error() calls. - * + * 2. Insert FLUSH_VERTICES calls in various places */ #include "glheader.h" #include "context.h" #include "hash.h" -#include "macros.h" #include "program.h" #include "prog_parameter.h" -#include "shaderobjects.h" #include "shader_api.h" #include "slang_compile.h" @@ -49,100 +47,106 @@ -GLvoid GLAPIENTRY -_mesa_DeleteObjectARB(GLhandleARB obj) -{ -#if 000 - if (obj != 0) { - GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, obj, "glDeleteObjectARB"); - - if (gen != NULL) { - (**gen).Delete(gen); - RELEASE_GENERIC(gen); - } - } -#endif -} -GLhandleARB GLAPIENTRY -_mesa_GetHandleARB(GLenum pname) +/** + * Copy string from to , up to maxLength characters, returning + * length of in . + * \param src the strings source + * \param maxLength max chars to copy + * \param length returns number of chars copied + * \param dst the string destination + */ +static void +copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src) { -#if 0 - GET_CURRENT_CONTEXT(ctx); + GLsizei len; + for (len = 0; len < maxLength - 1 && src && src[len]; len++) + dst[len] = src[len]; + if (maxLength > 0) + dst[len] = 0; + if (length) + *length = len; +} - switch (pname) { - case GL_PROGRAM_OBJECT_ARB: - { - struct gl2_program_intf **pro = ctx->ShaderObjects.CurrentProgram; - if (pro != NULL) - return (**pro)._container._generic. - GetName((struct gl2_generic_intf **) (pro)); - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB"); - } -#endif - return 0; -} -GLvoid GLAPIENTRY -_mesa_DetachObjectARB(GLhandleARB program, GLhandleARB shader) +/** + * Called via ctx->Driver.AttachShader() + */ +void +_mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader) { - GET_CURRENT_CONTEXT(ctx); struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, program); struct gl_program *prog = _mesa_lookup_shader(ctx, shader); const GLuint n = linked->NumShaders; - GLuint i, j; + GLuint i; if (!linked || !prog) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glDetachObjectARB(bad program or shader name)"); + "glAttachShader(bad program or shader name)"); return; } for (i = 0; i < n; i++) { if (linked->Shaders[i] == prog) { - struct gl_program **newList; - /* found it */ - /* alloc new list */ - newList = (struct gl_program **) - _mesa_malloc((n - 1) * sizeof(struct gl_program *)); - if (!newList) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachObjectARB"); - return; - } - for (j = 0; j < i; j++) { - newList[j] = linked->Shaders[j]; - } - while (++i < n) - newList[j++] = linked->Shaders[i]; - _mesa_free(linked->Shaders); - linked->Shaders = newList; + /* already attached */ return; } } - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDetachObjectARB(shader not found)"); + /* grow list */ + linked->Shaders = (struct gl_program **) + _mesa_realloc(linked->Shaders, + n * sizeof(struct gl_program *), + (n + 1) * sizeof(struct gl_program *)); + if (!linked->Shaders) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAttachShader"); + return; + } + + /* append */ + linked->Shaders[n] = prog; + prog->RefCount++; + linked->NumShaders++; } -GLhandleARB GLAPIENTRY -_mesa_CreateShaderObjectARB(GLenum shaderType) +void +_mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, + const GLchar *name) +{ + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocation(program)"); + return; + } + +#if 0 /* XXXX */ + if (name == NULL || index >= MAX_VERTEX_ATTRIBS) + _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); + else if (IS_NAME_WITH_GL_PREFIX(name)) + _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); + else + (**pro).OverrideAttribBinding(pro, index, name); + RELEASE_PROGRAM(pro); +#endif +} + + +GLuint +_mesa_create_shader(GLcontext *ctx, GLenum type) { - GET_CURRENT_CONTEXT(ctx); struct gl_program *newProg; GLuint name; name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1); - switch (shaderType) { + switch (type) { case GL_FRAGMENT_SHADER_ARB: /* alloc new gl_fragment_program */ newProg = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, name); @@ -152,7 +156,7 @@ _mesa_CreateShaderObjectARB(GLenum shaderType) newProg = ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, name); break; default: - _mesa_error(ctx, GL_INVALID_ENUM, "CreateShaderObject(shaderType)"); + _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)"); return 0; } @@ -162,1119 +166,660 @@ _mesa_CreateShaderObjectARB(GLenum shaderType) } - -GLvoid GLAPIENTRY -_mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, - const GLcharARB ** string, const GLint * length) +GLuint +_mesa_create_program(GLcontext *ctx) { - GET_CURRENT_CONTEXT(ctx); - struct gl_program *shader; - GLint *offsets; - GLsizei i; - GLcharARB *source; - - if (string == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB"); - return; - } - - shader = _mesa_lookup_shader(ctx, shaderObj); - if (!shader) { - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(shaderObj)"); - return; - } - - /* - * This array holds offsets of where the appropriate string ends, thus the - * last element will be set to the total length of the source code. - */ - offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); - if (offsets == NULL) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } - - for (i = 0; i < count; i++) { - if (string[i] == NULL) { - _mesa_free((GLvoid *) offsets); - _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(null string)"); - return; - } - if (length == NULL || length[i] < 0) - offsets[i] = _mesa_strlen(string[i]); - else - offsets[i] = length[i]; - /* accumulate string lengths */ - if (i > 0) - offsets[i] += offsets[i - 1]; - } + GLuint name; + struct gl_linked_program *linked; - source = (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * - sizeof(GLcharARB)); - if (source == NULL) { - _mesa_free((GLvoid *) offsets); - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); - return; - } + name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ProgramObjects, 1); + linked = _mesa_new_linked_program(ctx, name); - for (i = 0; i < count; i++) { - GLint start = (i > 0) ? offsets[i - 1] : 0; - _mesa_memcpy(source + start, string[i], - (offsets[i] - start) * sizeof(GLcharARB)); - } - source[offsets[count - 1]] = '\0'; + _mesa_HashInsert(ctx->Shared->ProgramObjects, name, linked); - /* free old shader source string and install new one */ - if (shader->String) { - _mesa_free(shader->String); - } - shader->String = (GLubyte *) source; + return name; } -GLvoid GLAPIENTRY -_mesa_CompileShaderARB(GLhandleARB shaderObj) +void +_mesa_delete_program2(GLcontext *ctx, GLuint name) { - GET_CURRENT_CONTEXT(ctx); - struct gl_program *prog = _mesa_lookup_shader(ctx, shaderObj); - slang_info_log info_log; - slang_code_object obj; - slang_unit_type type; + struct gl_linked_program *linked; - if (!prog) { - _mesa_error(ctx, GL_INVALID_VALUE, "glCompileShader(shaderObj)"); + linked = _mesa_lookup_linked_program(ctx, name); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteProgram(name)"); return; } - slang_info_log_construct(&info_log); - _slang_code_object_ctr(&obj); - - if (prog->Target == GL_VERTEX_PROGRAM_ARB) { - type = slang_unit_vertex_shader; - } - else { - assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); - type = slang_unit_fragment_shader; - } - - if (_slang_compile((const char*) prog->String, &obj, - type, &info_log, prog)) { - /* - prog->CompileStatus = GL_TRUE; - */ - } - else { - /* - prog->CompileStatus = GL_FALSE; - */ - _mesa_problem(ctx, "Program did not compile!"); - } + /* XXX refcounting! */ + _mesa_HashRemove(ctx->Shared->ProgramObjects, name); + _mesa_delete_linked_program(ctx, linked); } -GLhandleARB GLAPIENTRY -_mesa_CreateProgramObjectARB(GLvoid) +void +_mesa_delete_shader(GLcontext *ctx, GLuint shader) { - GET_CURRENT_CONTEXT(ctx); - GLuint name; - struct gl_linked_program *linked; - - name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ProgramObjects, 1); - linked = _mesa_new_linked_program(ctx, name); - - _mesa_HashInsert(ctx->Shared->ProgramObjects, name, linked); + /* XXX refcounting! */ - return name; + /* + _mesa_DeleteObjectARB(shader); + */ } -GLvoid GLAPIENTRY -_mesa_AttachObjectARB(GLhandleARB program, GLhandleARB shader) +void +_mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) { - GET_CURRENT_CONTEXT(ctx); struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, program); - struct gl_program *prog = _mesa_lookup_shader(ctx, shader); const GLuint n = linked->NumShaders; - GLuint i; + GLuint i, j; - if (!linked || !prog) { + if (!linked) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glAttachShader(bad program or shader name)"); + "glDetachShader(bad program or shader name)"); return; } for (i = 0; i < n; i++) { - if (linked->Shaders[i] == prog) { - /* already attached */ + if (linked->Shaders[i]->Id == shader) { + struct gl_program **newList; + /* found it */ + /* alloc new, smaller array */ + newList = (struct gl_program **) + _mesa_malloc((n - 1) * sizeof(struct gl_program *)); + if (!newList) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachShader"); + return; + } + for (j = 0; j < i; j++) { + newList[j] = linked->Shaders[j]; + } + while (++i < n) + newList[j++] = linked->Shaders[i]; + _mesa_free(linked->Shaders); + + /* XXX refcounting! */ + + linked->Shaders = newList; return; } } - /* grow list */ - linked->Shaders = (struct gl_program **) - _mesa_realloc(linked->Shaders, - n * sizeof(struct gl_program *), - (n + 1) * sizeof(struct gl_program *)); - /* append */ - linked->Shaders[n] = prog; - prog->RefCount++; - linked->NumShaders++; + /* not found */ + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDetachShader(shader not found)"); } - - -GLvoid GLAPIENTRY -_mesa_LinkProgramARB(GLhandleARB programObj) +void +_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *nameOut) { - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked; + static const GLenum vec_types[] = { + GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4 + }; + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + GLint sz; - linked = _mesa_lookup_linked_program(ctx, programObj); if (!linked) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glLinkProgram(programObj)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); return; } - _slang_link2(ctx, programObj, linked); -} + if (!linked->Attributes || index >= linked->Attributes->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)"); + return; + } + copy_string(nameOut, maxLength, length, + linked->Attributes->Parameters[index].Name); + sz = linked->Attributes->Parameters[index].Size; + if (size) + *size = sz; + if (type) + *type = vec_types[sz]; /* XXX this is a temporary hack */ +} -GLvoid GLAPIENTRY -_mesa_UseProgramObjectARB(GLhandleARB programObj) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); +/** + * Called via ctx->Driver.GetActiveUniform(). + */ +void +_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *nameOut) +{ + static const GLenum vec_types[] = { + GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4 + }; + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + GLint sz; - linked = _mesa_lookup_linked_program(ctx, programObj); if (!linked) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glUseProgramObjectARB(programObj)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); + return; + } + + if (!linked->Uniforms || index >= linked->Uniforms->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)"); return; } - ctx->ShaderObjects.Linked = linked; + copy_string(nameOut, maxLength, length, + linked->Uniforms->Parameters[index].Name); + sz = linked->Uniforms->Parameters[index].Size; + if (size) + *size = sz; + if (type) + *type = vec_types[sz]; /* XXX this is a temporary hack */ } -GLvoid GLAPIENTRY -_mesa_ValidateProgramARB(GLhandleARB programObj) +/** + * Called via ctx->Driver.GetAttachedShaders(). + */ +void +_mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj) { -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glValidateProgramARB"); - - if (pro != NULL) { - (**pro).Validate(pro); - RELEASE_PROGRAM(pro); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (linked) { + GLuint i; + for (i = 0; i < maxCount && i < linked->NumShaders; i++) { + obj[i] = linked->Shaders[i]->Id; + } + if (count) + *count = i; + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); } -#endif } -/** - * Helper function for all the _mesa_Uniform*() functions below. - */ -static INLINE void -uniform(GLint location, GLsizei count, const GLvoid *values, GLenum type, - const char *caller) +GLint +_mesa_get_attrib_location(GLcontext *ctx, GLuint program, + const GLchar *name) { - GET_CURRENT_CONTEXT(ctx); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); - if (ctx->ShaderObjects.Linked) { - struct gl_linked_program *linked = ctx->ShaderObjects.Linked; - if (location >= 0 && location < linked->Uniforms->NumParameters) { - GLfloat *v = linked->Uniforms->ParameterValues[location]; - const GLfloat *fValues = (const GLfloat *) values; /* XXX */ - GLint i; - if (type == GL_FLOAT_VEC4) - count *= 4; - else if (type == GL_FLOAT_VEC3) - count *= 3; - else - abort(); - - for (i = 0; i < count; i++) - v[i] = fValues[i]; - return; - } - } -} - - -GLvoid GLAPIENTRY -_mesa_Uniform1fARB(GLint location, GLfloat v0) -{ - uniform(location, 1, &v0, GL_FLOAT, "glUniform1fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1) -{ - GLfloat v[2]; - v[0] = v0; - v[1] = v1; - uniform(location, 1, v, GL_FLOAT_VEC2, "glUniform2fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - GLfloat v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - uniform(location, 1, v, GL_FLOAT_VEC3, "glUniform3fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, - GLfloat v3) -{ - GLfloat v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - uniform(location, 1, v, GL_FLOAT_VEC4, "glUniform4fARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1iARB(GLint location, GLint v0) -{ - uniform(location, 1, &v0, GL_INT, "glUniform1iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2iARB(GLint location, GLint v0, GLint v1) -{ - GLint v[2]; - v[0] = v0; - v[1] = v1; - uniform(location, 1, v, GL_INT_VEC2, "glUniform2iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) -{ - GLint v[3]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - uniform(location, 1, v, GL_INT_VEC3, "glUniform3iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - GLint v[4]; - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; - uniform(location, 1, v, GL_INT_VEC4, "glUniform4iARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT, "glUniform1fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC2, "glUniform2fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC3, "glUniform3fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value) -{ - uniform(location, count, value, GL_FLOAT_VEC4, "glUniform4fvARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT, "glUniform1ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC2, "glUniform2ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC3, "glUniform3ivARB"); -} - -GLvoid GLAPIENTRY -_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value) -{ - uniform(location, count, value, GL_INT_VEC4, "glUniform4ivARB"); -} - - -/** - * Helper function used by UniformMatrix**vARB() functions below. - */ -static void -uniform_matrix(GLint cols, GLint rows, const char *caller, - GLenum matrixType, - GLint location, GLsizei count, GLboolean transpose, - const GLfloat *values) -{ - const GLint matElements = rows * cols; - GET_CURRENT_CONTEXT(ctx); - -#ifdef OLD - GET_CURRENT_LINKED_PROGRAM(pro, caller); -#endif - - if (values == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, caller); - return; - } - - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - - if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - GLint i, j, k; - - trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); - if (!trans) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); - return; - } - - pt = trans; - pv = values; - for (i = 0; i < count; i++) { - /* transpose from pv matrix into pt matrix */ - for (j = 0; j < cols; j++) { - for (k = 0; k < rows; k++) { - /* XXX verify this */ - pt[j * rows + k] = pv[k * cols + j]; - } - } - pt += matElements; - pv += matElements; - } - -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif - _mesa_free(trans); - } - else { -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif - } -} - - -GLvoid GLAPIENTRY -_mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(2, 2, "glUniformMatrix2fvARB", GL_FLOAT_MAT2, - location, count, transpose, value); -} - -GLvoid GLAPIENTRY -_mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(3, 3, "glUniformMatrix3fvARB", GL_FLOAT_MAT3, - location, count, transpose, value); -} - -GLvoid GLAPIENTRY -_mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat * value) -{ - uniform_matrix(4, 4, "glUniformMatrix4fvARB", GL_FLOAT_MAT4, - location, count, transpose, value); -} - -static GLboolean -_mesa_get_object_parameter(GLhandleARB obj, GLenum pname, GLvoid * params, - GLboolean * integral, GLint * size) -{ -#if 000 - GET_CURRENT_CONTEXT(ctx); - GLint *ipar = (GLint *) params; - - /* set default values */ - *integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */ - *size = 1; /* param array size */ - - switch (pname) { - case GL_OBJECT_TYPE_ARB: - case GL_OBJECT_DELETE_STATUS_ARB: - case GL_OBJECT_INFO_LOG_LENGTH_ARB: - { - GET_GENERIC(gen, obj, "glGetObjectParameterivARB"); - - if (gen == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_TYPE_ARB: - *ipar = (**gen).GetType(gen); - break; - case GL_OBJECT_DELETE_STATUS_ARB: - *ipar = (**gen).GetDeleteStatus(gen); - break; - case GL_OBJECT_INFO_LOG_LENGTH_ARB: - *ipar = (**gen).GetInfoLogLength(gen); - break; - } - - RELEASE_GENERIC(gen); - } - break; - case GL_OBJECT_SUBTYPE_ARB: - case GL_OBJECT_COMPILE_STATUS_ARB: - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - GET_SHADER(sha, obj, "glGetObjectParameterivARB"); - - if (sha == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_SUBTYPE_ARB: - *ipar = (**sha).GetSubType(sha); - break; - case GL_OBJECT_COMPILE_STATUS_ARB: - *ipar = (**sha).GetCompileStatus(sha); - break; - case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB: - { - const GLcharARB *src = (**sha).GetSource(sha); - if (src == NULL) - *ipar = 0; - else - *ipar = _mesa_strlen(src) + 1; - } - break; - } - - RELEASE_SHADER(sha); - } - break; - case GL_OBJECT_LINK_STATUS_ARB: - case GL_OBJECT_VALIDATE_STATUS_ARB: - case GL_OBJECT_ATTACHED_OBJECTS_ARB: - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - { - GET_PROGRAM(pro, obj, "glGetObjectParameterivARB"); - - if (pro == NULL) - return GL_FALSE; - - switch (pname) { - case GL_OBJECT_LINK_STATUS_ARB: - *ipar = (**pro).GetLinkStatus(pro); - break; - case GL_OBJECT_VALIDATE_STATUS_ARB: - *ipar = (**pro).GetValidateStatus(pro); - break; - case GL_OBJECT_ATTACHED_OBJECTS_ARB: - *ipar = - (**pro)._container. - GetAttachedCount((struct gl2_container_intf **) (pro)); - break; - case GL_OBJECT_ACTIVE_UNIFORMS_ARB: - *ipar = (**pro).GetActiveUniformCount(pro); - break; - case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveUniformMaxLength(pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTES_ARB: - *ipar = (**pro).GetActiveAttribCount(pro); - break; - case GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB: - *ipar = (**pro).GetActiveAttribMaxLength(pro); - break; - } - - RELEASE_PROGRAM(pro); - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetObjectParameterivARB"); - return GL_FALSE; - } -#endif - return GL_TRUE; -} - -GLvoid GLAPIENTRY -_mesa_GetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat * params) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterfvARB"); - return; - } - - assert(sizeof(GLfloat) == sizeof(GLint)); - - if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, - &integral, &size)) { - if (integral) { - GLint i; - for (i = 0; i < size; i++) - params[i] = (GLfloat) ((GLint *) params)[i]; - } - } -} - -GLvoid GLAPIENTRY -_mesa_GetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint * params) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean integral; - GLint size; - - if (params == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB"); - return; - } - - assert(sizeof(GLfloat) == sizeof(GLint)); - - if (_mesa_get_object_parameter(obj, pname, (GLvoid *) params, - &integral, &size)) { - if (!integral) { - GLint i; - for (i = 0; i < size; i++) - params[i] = (GLint) ((GLfloat *) params)[i]; - } + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttribLocation"); + return -1; } -} - - -/** - * Copy string from to , up to maxLength characters, returning - * length of in . - * \param src the strings source - * \param maxLength max chars to copy - * \param length returns numberof chars copied - * \param dst the string destination - */ -static GLvoid -copy_string(const GLcharARB * src, GLsizei maxLength, GLsizei * length, - GLcharARB * dst) -{ - GLsizei len; - for (len = 0; len < maxLength - 1 && src && src[len]; len++) - dst[len] = src[len]; - if (maxLength > 0) - dst[len] = 0; - if (length) - *length = len; -} - -GLvoid GLAPIENTRY -_mesa_GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, - GLcharARB * infoLog) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_GENERIC(gen, obj, "glGetInfoLogARB"); - - if (gen == NULL) - return; - - if (infoLog == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetInfoLogARB"); - else { - GLsizei actualsize = (**gen).GetInfoLogLength(gen); - if (actualsize > maxLength) - actualsize = maxLength; - (**gen).GetInfoLog(gen, actualsize, infoLog); - if (length != NULL) - *length = (actualsize > 0) ? actualsize - 1 : 0; + if (!linked->LinkStatus) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetAttribLocation(program not linked)"); + return -1; } - RELEASE_GENERIC(gen); -#endif -} + if (!name) + return -1; -GLvoid GLAPIENTRY -_mesa_GetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, - GLsizei * count, GLhandleARB * obj) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_CONTAINER(con, containerObj, "glGetAttachedObjectsARB"); - - if (con == NULL) - return; - - if (obj == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttachedObjectsARB"); - else { - GLsizei cnt, i; - - cnt = (**con).GetAttachedCount(con); - if (cnt > maxCount) - cnt = maxCount; - if (count != NULL) - *count = cnt; - - for (i = 0; i < cnt; i++) { - struct gl2_generic_intf **x = (**con).GetAttached(con, i); - obj[i] = (**x).GetName(x); - RELEASE_GENERIC(x); - } - } - RELEASE_CONTAINER(con); -#endif -} - -GLint GLAPIENTRY -_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) -{ - GET_CURRENT_CONTEXT(ctx); - - if (ctx->ShaderObjects.Linked) { - const struct gl_linked_program *linked = ctx->ShaderObjects.Linked; - GLuint loc; - for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { - const struct gl_program_parameter *u - = linked->Uniforms->Parameters + loc; - if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { - return loc; + if (linked->Attributes) { + GLuint i; + for (i = 0; i < linked->Attributes->NumParameters; i++) { + if (!strcmp(linked->Attributes->Parameters[i].Name, name)) { + return i; } } } return -1; - -} - - -GLvoid GLAPIENTRY -_mesa_GetActiveUniformARB(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLcharARB * name) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveUniformARB"); - - if (pro == NULL) - return; - - if (size == NULL || type == NULL || name == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - else { - if (index < (**pro).GetActiveUniformCount(pro)) - (**pro).GetActiveUniform(pro, index, maxLength, length, size, type, - name); - else - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformARB"); - } - RELEASE_PROGRAM(pro); -#endif -} - - -GLvoid GLAPIENTRY -_mesa_GetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB"); - - if (!pro) - return; - - if (!(**pro).ReadUniform(pro, location, 1, params, GL_FLOAT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfvARB"); - - RELEASE_PROGRAM(pro); -#endif -} - - -GLvoid GLAPIENTRY -_mesa_GetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB"); - - if (!pro) - return; - - if (!(**pro).ReadUniform(pro, location, 1, params, GL_INT)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformivARB"); - RELEASE_PROGRAM(pro); -#endif -} - -GLvoid GLAPIENTRY -_mesa_GetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, - GLcharARB * sourceOut) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_program *shader = _mesa_lookup_shader(ctx, obj); - - if (!shader) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSourceARB(obj)"); - return; - } - - copy_string((GLcharARB *) shader->String, maxLength, length, sourceOut); -} - - -/* GL_ARB_vertex_shader */ - -GLvoid GLAPIENTRY -_mesa_BindAttribLocationARB(GLhandleARB programObj, GLuint index, - const GLcharARB * name) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glBindAttribLocationARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= MAX_VERTEX_ATTRIBS) - _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); - else if (IS_NAME_WITH_GL_PREFIX(name)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); - else - (**pro).OverrideAttribBinding(pro, index, name); - RELEASE_PROGRAM(pro); -#endif -} - - -GLvoid GLAPIENTRY -_mesa_GetActiveAttribARB(GLhandleARB programObj, GLuint index, - GLsizei maxLength, GLsizei * length, GLint * size, - GLenum * type, GLcharARB * name) -{ -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, programObj, "glGetActiveAttribARB"); - - if (pro == NULL) - return; - - if (name == NULL || index >= (**pro).GetActiveAttribCount(pro)) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveAttribARB"); - else - (**pro).GetActiveAttrib(pro, index, maxLength, length, size, type, - name); - RELEASE_PROGRAM(pro); -#endif } -GLint GLAPIENTRY -_mesa_GetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) +GLuint +_mesa_get_handle(GLcontext *ctx, GLenum pname) { #if 0 GET_CURRENT_CONTEXT(ctx); - GLint loc = -1; - GET_LINKED_PROGRAM(pro, programObj, "glGetAttribLocationARB"); - - if (!pro) - return -1; - - if (name == NULL) - _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocationARB"); - else if (!IS_NAME_WITH_GL_PREFIX(name)) - loc = (**pro).GetAttribLocation(pro, name); - RELEASE_PROGRAM(pro); - return loc; -#endif - return 0; -} - - -/** - ** OpenGL 2.0 functions which basically wrap the ARB_shader functions - **/ - -void GLAPIENTRY -_mesa_AttachShader(GLuint program, GLuint shader) -{ - _mesa_AttachObjectARB(program, shader); -} - - -GLuint GLAPIENTRY -_mesa_CreateShader(GLenum type) -{ - return (GLuint) _mesa_CreateShaderObjectARB(type); -} - -GLuint GLAPIENTRY -_mesa_CreateProgram(void) -{ - return (GLuint) _mesa_CreateProgramObjectARB(); -} - - -void GLAPIENTRY -_mesa_DeleteProgram(GLuint name) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked; - - linked = _mesa_lookup_linked_program(ctx, name); - if (!linked) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteProgram(name)"); - return; - } - - _mesa_HashRemove(ctx->Shared->ProgramObjects, name); - _mesa_delete_linked_program(ctx, linked); -} - - -void GLAPIENTRY -_mesa_DeleteShader(GLuint shader) -{ - _mesa_DeleteObjectARB(shader); -} - -void GLAPIENTRY -_mesa_DetachShader(GLuint program, GLuint shader) -{ - _mesa_DetachObjectARB(program, shader); -} -void GLAPIENTRY -_mesa_GetAttachedShaders(GLuint program, GLsizei maxCount, - GLsizei *count, GLuint *obj) -{ - { - GET_CURRENT_CONTEXT(ctx); - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - if (linked) { - GLuint i; - for (i = 0; i < maxCount && i < linked->NumShaders; i++) { - obj[i] = linked->Shaders[i]->Id; - } - if (count) - *count = i; - } - else { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); + switch (pname) { + case GL_PROGRAM_OBJECT_ARB: + { + struct gl2_program_intf **pro = ctx->Shader.CurrentProgram; + + if (pro != NULL) + return (**pro)._container._generic. + GetName((struct gl2_generic_intf **) (pro)); } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB"); } +#endif + return 0; } -void GLAPIENTRY -_mesa_GetProgramiv(GLuint program, GLenum pname, GLint *params) +void +_mesa_get_programiv(GLcontext *ctx, GLuint program, + GLenum pname, GLint *params) { -#if 0 - GET_CURRENT_CONTEXT(ctx); - GET_PROGRAM(pro, program, "glGetProgramiv"); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); - if (!pro) + if (!linked) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramiv(program)"); return; + } switch (pname) { case GL_DELETE_STATUS: - *params = (**pro)._container._generic.GetDeleteStatus((struct gl2_generic_intf **) pro); + *params = linked->DeletePending; break; case GL_LINK_STATUS: - *params = (**pro).GetLinkStatus(pro); + *params = linked->LinkStatus; break; case GL_VALIDATE_STATUS: - *params = (**pro).GetValidateStatus(pro); + *params = linked->Validated; break; case GL_INFO_LOG_LENGTH: - *params = (**pro)._container._generic.GetInfoLogLength( (struct gl2_generic_intf **) pro ); + *params = linked->InfoLog ? strlen(linked->InfoLog) : 0; break; case GL_ATTACHED_SHADERS: - *params = (**pro)._container.GetAttachedCount( (struct gl2_container_intf **) pro ); + *params = linked->NumShaders; break; case GL_ACTIVE_ATTRIBUTES: - *params = (**pro).GetActiveAttribCount(pro); + *params = linked->Uniforms ? linked->Uniforms->NumParameters : 0; break; case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - *params = (**pro).GetActiveAttribMaxLength(pro); + *params = _mesa_parameter_longest_name(linked->Attributes); break; case GL_ACTIVE_UNIFORMS: - *params = (**pro).GetActiveUniformCount(pro); + *params = linked->Uniforms ? linked->Uniforms->NumParameters : 0; break; case GL_ACTIVE_UNIFORM_MAX_LENGTH: - *params = (**pro).GetActiveUniformMaxLength(pro); + *params = _mesa_parameter_longest_name(linked->Uniforms); break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); return; } -#endif } -void GLAPIENTRY -_mesa_GetProgramInfoLog(GLuint program, GLsizei bufSize, - GLsizei *length, GLchar *infoLog) -{ - _mesa_GetInfoLogARB(program, bufSize, length, infoLog); -} - - -void GLAPIENTRY -_mesa_GetShaderiv(GLuint shader, GLenum pname, GLint *params) +void +_mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params) { #if 0 - GET_CURRENT_CONTEXT(ctx); - GET_SHADER(sh, shader, "glGetShaderiv"); + struct gl_program *shader = _mesa_lookup_shader(ctx, name); - if (!sh) + if (!shader) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderiv(shader)"); return; - + } +#else + struct gl_shader *shader; +#endif switch (pname) { case GL_SHADER_TYPE: - *params = (**sh).GetSubType(sh); + *params = shader->Type; break; case GL_DELETE_STATUS: - *params = (**sh)._generic.GetDeleteStatus((struct gl2_generic_intf **) sh); + *params = shader->DeletePending; break; case GL_COMPILE_STATUS: - *params = (**sh).GetCompileStatus(sh); + *params = shader->CompileStatus; break; case GL_INFO_LOG_LENGTH: - *params = (**sh)._generic.GetInfoLogLength((struct gl2_generic_intf **)sh); + *params = shader->InfoLog ? strlen(shader->InfoLog) : 0; break; case GL_SHADER_SOURCE_LENGTH: - { - const GLchar *src = (**sh).GetSource(sh); - *params = src ? (_mesa_strlen(src) + 1) : 0; - } + *params = shader->Source ? strlen((char *) shader->Source) : 0; break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)"); return; } -#endif } -void GLAPIENTRY -_mesa_GetShaderInfoLog(GLuint shader, GLsizei bufSize, - GLsizei *length, GLchar *infoLog) +void +_mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) { - _mesa_GetInfoLogARB(shader, bufSize, length, infoLog); + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramInfoLog(program)"); + return; + } + /* XXX also test length, infoLog params for NULL? */ + copy_string(linked->InfoLog, bufSize, length, infoLog); } -GLboolean GLAPIENTRY -_mesa_IsProgram(GLuint name) +void +_mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog) +{ + struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); + if (!shProg) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderInfoLog(shader)"); + return; + } + /* + copy_string(shProg->InfoLog, bufSize, length, infoLog); + */ +} + + +/** + * Called via ctx->Driver.GetShaderSource(). + */ +void +_mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength, + GLsizei *length, GLchar *sourceOut) +{ + struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); + if (!shProg) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSource(shader)"); + return; + } + copy_string((GLchar *) shProg->String, maxLength, length, sourceOut); +} + + +/** + * Called via ctx->Driver.GetUniformfv(). + */ +void +_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, + GLfloat *params) +{ + struct gl_linked_program *linked + = _mesa_lookup_linked_program(ctx, program); + if (linked) { + GLuint i; + if (location >= 0 && location < linked->Uniforms->NumParameters) { + for (i = 0; i < linked->Uniforms->Parameters[location].Size; i++) { + params[i] = linked->Uniforms->ParameterValues[location][i]; + } + } + else { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetUniformfv(location)"); + } + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(program)"); + } +} + + +/** + * Called via ctx->Driver.GetUniformLocation(). + */ +GLint +_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) +{ + if (ctx->Shader.CurrentProgram) { + const struct gl_linked_program *linked = ctx->Shader.CurrentProgram; + GLuint loc; + for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { + const struct gl_program_parameter *u + = linked->Uniforms->Parameters + loc; + if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { + return loc; + } + } + } + return -1; + +} + + +GLboolean +_mesa_is_program(GLcontext *ctx, GLuint name) { - GET_CURRENT_CONTEXT(ctx); struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, name); - if (linked) - return GL_TRUE; - else - return GL_FALSE; + return linked ? GL_TRUE : GL_FALSE; } -GLboolean GLAPIENTRY -_mesa_IsShader(GLuint name) +GLboolean +_mesa_is_shader(GLcontext *ctx, GLuint name) { - GET_CURRENT_CONTEXT(ctx); struct gl_program *shader = _mesa_lookup_shader(ctx, name); - if (shader) - return GL_TRUE; - else - return GL_FALSE; + return shader ? GL_TRUE : GL_FALSE; } -/** - ** 2.1 functions - **/ -void GLAPIENTRY -_mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) +/** + * Called via ctx->Driver.ShaderSource() + */ +void +_mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) { - uniform_matrix(2, 3, "glUniformMatrix2x3fv", GL_FLOAT_MAT2x3, - location, count, transpose, value); + struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); + if (!shProg) { + _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSource(shaderObj)"); + return; + } + + /* free old shader source string and install new one */ + if (shProg->String) { + _mesa_free(shProg->String); + } + shProg->String = (GLubyte *) source; } -void GLAPIENTRY -_mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called via ctx->Driver.CompileShader() + */ +void +_mesa_compile_shader(GLcontext *ctx, GLuint shaderObj) { - uniform_matrix(3, 2, "glUniformMatrix3x2fv", GL_FLOAT_MAT3x2, - location, count, transpose, value); + struct gl_program *prog = _mesa_lookup_shader(ctx, shaderObj); + slang_info_log info_log; + slang_code_object obj; + slang_unit_type type; + + if (!prog) { + _mesa_error(ctx, GL_INVALID_VALUE, "glCompileShader(shaderObj)"); + return; + } + + slang_info_log_construct(&info_log); + _slang_code_object_ctr(&obj); + + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + type = slang_unit_vertex_shader; + } + else { + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + type = slang_unit_fragment_shader; + } + + if (_slang_compile((const char*) prog->String, &obj, + type, &info_log, prog)) { + /* + prog->CompileStatus = GL_TRUE; + */ + } + else { + /* + prog->CompileStatus = GL_FALSE; + */ + _mesa_problem(ctx, "Program did not compile!"); + } } -void GLAPIENTRY -_mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called via ctx->Driver.LinkProgram() + */ +void +_mesa_link_program(GLcontext *ctx, GLuint program) { - uniform_matrix(2, 4, "glUniformMatrix2x4fv", GL_FLOAT_MAT2x4, - location, count, transpose, value); + struct gl_linked_program *linked; + + linked = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glLinkProgram(program)"); + return; + } + + _slang_link2(ctx, program, linked); +} + + +/** + * Called via ctx->Driver.UseProgram() + */ +void +_mesa_use_program(GLcontext *ctx, GLuint program) +{ + /* XXXX need to handle reference counting here! */ + if (program) { + struct gl_linked_program *linked; + linked = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glUseProgramObjectARB(programObj)"); + return; + } + ctx->Shader.CurrentProgram = linked; + } + else { + /* don't use a shader program */ + ctx->Shader.CurrentProgram = NULL; + } } -void GLAPIENTRY -_mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called via ctx->Driver.Uniform(). + */ +void +_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, + const GLvoid *values, GLenum type) { - uniform_matrix(4, 2, "glUniformMatrix4x2fv", GL_FLOAT_MAT4x2, - location, count, transpose, value); + if (ctx->Shader.CurrentProgram) { + struct gl_linked_program *linked = ctx->Shader.CurrentProgram; + if (location >= 0 && location < linked->Uniforms->NumParameters) { + GLfloat *v = linked->Uniforms->ParameterValues[location]; + const GLfloat *fValues = (const GLfloat *) values; /* XXX */ + GLint i; + if (type == GL_FLOAT_VEC4) + count *= 4; + else if (type == GL_FLOAT_VEC3) + count *= 3; + else + abort(); + + for (i = 0; i < count; i++) + v[i] = fValues[i]; + return; + } + } + else { + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); + } } -void GLAPIENTRY -_mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +/** + * Called by ctx->Driver.UniformMatrix(). + */ +void +_mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, + GLenum matrixType, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *values) { - uniform_matrix(3, 4, "glUniformMatrix3x4fv", GL_FLOAT_MAT3x4, - location, count, transpose, value); + const char *caller = "glUniformMatrix"; + const GLint matElements = rows * cols; + + if (values == NULL) { + _mesa_error(ctx, GL_INVALID_VALUE, caller); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + if (transpose) { + GLfloat *trans, *pt; + const GLfloat *pv; + GLint i, j, k; + + trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); + if (!trans) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); + return; + } + + pt = trans; + pv = values; + for (i = 0; i < count; i++) { + /* transpose from pv matrix into pt matrix */ + for (j = 0; j < cols; j++) { + for (k = 0; k < rows; k++) { + /* XXX verify this */ + pt[j * rows + k] = pv[k * cols + j]; + } + } + pt += matElements; + pv += matElements; + } + +#ifdef OLD + if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); +#endif + _mesa_free(trans); + } + else { +#ifdef OLD + if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) + _mesa_error(ctx, GL_INVALID_OPERATION, caller); +#endif + } } -void GLAPIENTRY -_mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *value) + +void +_mesa_validate_program(GLcontext *ctx, GLuint program) { - uniform_matrix(4, 3, "glUniformMatrix4x3fv", GL_FLOAT_MAT4x3, - location, count, transpose, value); + struct gl_linked_program *linked; + linked = _mesa_lookup_linked_program(ctx, program); + if (!linked) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glValidateProgram(program)"); + return; + } + /* XXX temporary */ + linked->Validated = GL_TRUE; + + /* From the GL spec: + any two active samplers in the current program object are of + different types, but refer to the same texture image unit, + + any active sampler in the current program object refers to a texture + image unit where fixed-function fragment processing accesses a + texture target that does not match the sampler type, or + + the sum of the number of active samplers in the program and the + number of texture image units enabled for fixed-function fragment + processing exceeds the combined limit on the total number of texture + image units allowed. + */ } + +/**********************************************************************/ + + /** * Create a new GLSL program object. */ @@ -1376,15 +921,9 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name) } -GLvoid -_mesa_init_shaderobjects(GLcontext * ctx) +void +_mesa_init_shader_state(GLcontext * ctx) { - - ctx->ShaderObjects.CurrentProgram = NULL; - ctx->ShaderObjects._FragmentShaderPresent = GL_FALSE; - ctx->ShaderObjects._VertexShaderPresent = GL_FALSE; - -#if 0 - _mesa_init_shaderobjects_3dlabs(ctx); -#endif + ctx->Shader._FragmentShaderPresent = GL_FALSE; + ctx->Shader._VertexShaderPresent = GL_FALSE; } diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h index 388692b623..723f92690d 100644 --- a/src/mesa/shader/shader_api.h +++ b/src/mesa/shader/shader_api.h @@ -31,6 +31,13 @@ #include "mtypes.h" +/** + * Internal functions + */ + +extern void +_mesa_init_shader_state(GLcontext * ctx); + extern struct gl_linked_program * _mesa_new_linked_program(GLcontext *ctx, GLuint name); @@ -52,8 +59,108 @@ extern struct gl_program * _mesa_lookup_shader(GLcontext *ctx, GLuint name); -extern GLvoid -_mesa_init_shaderobjects(GLcontext * ctx); +/** + * API/Driver functions + */ + +extern void +_mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader); + +extern void +_mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, + const GLchar *name); + +extern void +_mesa_compile_shader(GLcontext *ctx, GLuint shaderObj); + +extern GLuint +_mesa_create_shader(GLcontext *ctx, GLenum type); + +extern GLuint +_mesa_create_program(GLcontext *ctx); + +extern void +_mesa_delete_program2(GLcontext *ctx, GLuint name); + +extern void +_mesa_delete_shader(GLcontext *ctx, GLuint shader); + +extern void +_mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader); + +extern void +_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *name); + +extern void +_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLchar *name); + +extern void +_mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj); + +extern GLint +_mesa_get_attrib_location(GLcontext *ctx, GLuint program, + const GLchar *name); + +extern GLuint +_mesa_get_handle(GLcontext *ctx, GLenum pname); + +extern void +_mesa_get_programiv(GLcontext *ctx, GLuint program, + GLenum pname, GLint *params); + +extern void +_mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern void +_mesa_get_shaderiv(GLcontext *ctx, GLuint shader, GLenum pname, GLint *params); + +extern void +_mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + +extern void +_mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength, + GLsizei *length, GLchar *sourceOut); + +extern void +_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, + GLfloat *params); + +extern GLint +_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name); + +extern GLboolean +_mesa_is_program(GLcontext *ctx, GLuint name); + +extern GLboolean +_mesa_is_shader(GLcontext *ctx, GLuint name); + +extern void +_mesa_link_program(GLcontext *ctx, GLuint program); + +extern void +_mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source); + +extern void +_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, + const GLvoid *values, GLenum type); + +void +_mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, + GLenum matrixType, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *values); + +extern void +_mesa_use_program(GLcontext *ctx, GLuint program); + +extern void +_mesa_validate_program(GLcontext *ctx, GLuint program); #endif /* SHADER_API_H */ -- cgit v1.2.3 From 0bf5dbe002a64e198f55724cc1542602c012490f Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 18:02:41 -0700 Subject: Overhaul of GLSL API functions, dispatching, etc. --- src/mesa/drivers/common/driverfuncs.c | 46 +++++++++++++++++++++++++++++-- src/mesa/drivers/common/driverfuncs.h | 8 ++++-- src/mesa/main/context.c | 17 ++++++------ src/mesa/main/dd.h | 52 +++++++++++++++++++++++++++++++++++ src/mesa/main/mtypes.h | 22 +++++++++------ src/mesa/main/state.c | 4 +-- src/mesa/main/texstate.c | 2 +- src/mesa/sources | 5 +--- src/mesa/swrast/s_context.c | 2 +- src/mesa/swrast/s_span.c | 2 +- 10 files changed, 130 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 1e44904b93..bc637a879e 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -43,6 +43,7 @@ #include "fbobject.h" #include "texrender.h" #endif +#include "shader_api.h" #include "arrayobj.h" #include "driverfuncs.h" @@ -248,4 +249,45 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->EndList = NULL; driver->BeginCallList = NULL; driver->EndCallList = NULL; + + + /* XXX temporary here */ + _mesa_init_glsl_driver_functions(driver); +} + + +/** + * Plug in Mesa's GLSL functions. + */ +void +_mesa_init_glsl_driver_functions(struct dd_function_table *driver) +{ + driver->AttachShader = _mesa_attach_shader; + driver->BindAttribLocation = _mesa_bind_attrib_location; + driver->CompileShader = _mesa_compile_shader; + driver->CreateProgram = _mesa_create_program; + driver->CreateShader = _mesa_create_shader; + driver->DeleteProgram2 = _mesa_delete_program2; + driver->DeleteShader = _mesa_delete_shader; + driver->DetachShader = _mesa_detach_shader; + driver->GetActiveAttrib = _mesa_get_active_attrib; + driver->GetActiveUniform = _mesa_get_active_uniform; + driver->GetAttachedShaders = _mesa_get_attached_shaders; + driver->GetAttribLocation = _mesa_get_attrib_location; + driver->GetHandle = _mesa_get_handle; + driver->GetProgramiv = _mesa_get_programiv; + driver->GetProgramInfoLog = _mesa_get_program_info_log; + driver->GetShaderiv = _mesa_get_shaderiv; + driver->GetShaderInfoLog = _mesa_get_shader_info_log; + driver->GetShaderSource = _mesa_get_shader_source; + driver->GetUniformfv = _mesa_get_uniformfv; + driver->GetUniformLocation = _mesa_get_uniform_location; + driver->IsProgram = _mesa_is_program; + driver->IsShader = _mesa_is_shader; + driver->LinkProgram = _mesa_link_program; + driver->ShaderSource = _mesa_shader_source; + driver->Uniform = _mesa_uniform; + driver->UniformMatrix = _mesa_uniform_matrix; + driver->UseProgram = _mesa_use_program; + driver->ValidateProgram = _mesa_validate_program; } diff --git a/src/mesa/drivers/common/driverfuncs.h b/src/mesa/drivers/common/driverfuncs.h index 64f56d91f9..50f2b4271d 100644 --- a/src/mesa/drivers/common/driverfuncs.h +++ b/src/mesa/drivers/common/driverfuncs.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -29,4 +29,8 @@ extern void _mesa_init_driver_functions(struct dd_function_table *driver); + +extern void +_mesa_init_glsl_driver_functions(struct dd_function_table *driver); + #endif diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 4986b29ef0..c5220b5b2e 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -131,7 +131,7 @@ #include "math/m_xform.h" #include "math/mathmod.h" #endif -#include "shaderobjects.h" +#include "shaders.h" #ifdef USE_SPARC_ASM #include "sparc/sparc.h" @@ -705,7 +705,6 @@ alloc_shared_state( GLcontext *ctx ) ss->ArrayObjects = _mesa_NewHashTable(); #if FEATURE_ARB_shader_objects - ss->GL2Objects = _mesa_NewHashTable (); ss->ShaderObjects = _mesa_NewHashTable(); ss->ProgramObjects = _mesa_NewHashTable(); #endif @@ -784,11 +783,10 @@ alloc_shared_state( GLcontext *ctx ) _mesa_DeleteHashTable (ss->ArrayObjects); #if FEATURE_ARB_shader_objects - if (ss->GL2Objects) { - _mesa_DeleteHashTable (ss->GL2Objects); + if (ss->ShaderObjects) _mesa_DeleteHashTable (ss->ShaderObjects); + if (ss->ProgramObjects) _mesa_DeleteHashTable (ss->ProgramObjects); - } #endif #if FEATURE_EXT_framebuffer_object @@ -953,8 +951,11 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) _mesa_DeleteHashTable(ss->ArrayObjects); #if FEATURE_ARB_shader_objects - _mesa_HashDeleteAll(ss->GL2Objects, delete_shaderobj_cb, ctx); - _mesa_DeleteHashTable(ss->GL2Objects); + /* XXX SLANG TO-DO */ + /* + struct _mesa_HashTable *ShaderObjects; + struct _mesa_HashTable *ProgramObjects; + */ #endif #if FEATURE_EXT_framebuffer_object @@ -1202,7 +1203,7 @@ init_attrib_groups( GLcontext *ctx ) _mesa_init_query( ctx ); _mesa_init_rastpos( ctx ); _mesa_init_scissor( ctx ); - _mesa_init_shaderobjects (ctx); + _mesa_init_shader_state( ctx ); _mesa_init_stencil( ctx ); _mesa_init_transform( ctx ); _mesa_init_varray( ctx ); diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 1de2542bee..90c1f69c3d 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -821,6 +821,58 @@ struct dd_function_table { void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj); /*@}*/ + /** + * \name GLSL-related functions (ARB extensions and OpenGL 2.x) + */ + /*@{*/ + void (*AttachShader)(GLcontext *ctx, GLuint program, GLuint shader); + void (*BindAttribLocation)(GLcontext *ctx, GLuint program, GLuint index, + const GLcharARB *name); + void (*CompileShader)(GLcontext *ctx, GLuint shader); + GLuint (*CreateShader)(GLcontext *ctx, GLenum type); + GLuint (*CreateProgram)(GLcontext *ctx); + void (*DeleteProgram2)(GLcontext *ctx, GLuint program); + void (*DeleteShader)(GLcontext *ctx, GLuint shader); + void (*DetachShader)(GLcontext *ctx, GLuint program, GLuint shader); + void (*GetActiveAttrib)(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei * length, GLint * size, + GLenum * type, GLcharARB * name); + void (*GetActiveUniform)(GLcontext *ctx, GLuint program, GLuint index, + GLsizei maxLength, GLsizei *length, GLint *size, + GLenum *type, GLcharARB *name); + void (*GetAttachedShaders)(GLcontext *ctx, GLuint program, GLsizei maxCount, + GLsizei *count, GLuint *obj); + GLint (*GetAttribLocation)(GLcontext *ctx, GLuint program, + const GLcharARB *name); + GLuint (*GetHandle)(GLcontext *ctx, GLenum pname); + void (*GetProgramiv)(GLcontext *ctx, GLuint program, + GLenum pname, GLint *params); + void (*GetProgramInfoLog)(GLcontext *ctx, GLuint program, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + void (*GetShaderiv)(GLcontext *ctx, GLuint shader, + GLenum pname, GLint *params); + void (*GetShaderInfoLog)(GLcontext *ctx, GLuint shader, GLsizei bufSize, + GLsizei *length, GLchar *infoLog); + void (*GetShaderSource)(GLcontext *ctx, GLuint shader, GLsizei maxLength, + GLsizei *length, GLcharARB *sourceOut); + void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location, + GLfloat *params); + GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program, + const GLcharARB *name); + GLboolean (*IsProgram)(GLcontext *ctx, GLuint name); + GLboolean (*IsShader)(GLcontext *ctx, GLuint name); + void (*LinkProgram)(GLcontext *ctx, GLuint program); + void (*ShaderSource)(GLcontext *ctx, GLuint shader, const GLchar *source); + void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count, + const GLvoid *values, GLenum type); + void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows, + GLenum matrixType, GLint location, GLsizei count, + GLboolean transpose, const GLfloat *values); + void (*UseProgram)(GLcontext *ctx, GLuint program); + void (*ValidateProgram)(GLcontext *ctx, GLuint program); + /* XXX many more to come */ + /*@}*/ + /** * \name Support for multiple T&L engines diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 5ed95ccf65..4a8f7d22e3 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -7,9 +7,9 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -2052,8 +2052,10 @@ struct gl_shader GLuint Name; /**< AKA the handle */ GLchar *Source; /**< Source code string */ GLboolean CompileStatus; + GLboolean DeletePending; GLuint NumPrograms; /**< size of Programs[] array */ struct gl_program **Programs; /**< Post-compile assembly code */ + GLchar *InfoLog; }; @@ -2070,21 +2072,24 @@ struct gl_linked_program struct gl_program **Shaders; /**< List of the shaders */ struct gl_vertex_program *VertexProgram; /**< Linked vertex program */ struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */ - GLboolean LinkStatus; /**< GL_LINK_STATUS */ struct gl_program_parameter_list *Uniforms; /**< Plus constants, etc */ struct gl_program_parameter_list *Varying; + struct gl_program_parameter_list *Attributes; /**< Vertex attributes */ + GLboolean LinkStatus; /**< GL_LINK_STATUS */ + GLboolean Validated; + GLboolean DeletePending; + GLchar *InfoLog; }; /** - * Context state for vertex/fragment shaders. + * Context state for GLSL vertex/fragment shaders. */ -struct gl_shader_objects_state +struct gl_shader_state { - struct gl2_program_intf **CurrentProgram; GLboolean _VertexShaderPresent; GLboolean _FragmentShaderPresent; - struct gl_linked_program *Linked; /* XXX temporary here */ + struct gl_linked_program *CurrentProgram; }; @@ -2145,7 +2150,6 @@ struct gl_shared_state #endif #if FEATURE_ARB_shader_objects - struct _mesa_HashTable *GL2Objects; struct _mesa_HashTable *ShaderObjects; struct _mesa_HashTable *ProgramObjects; #endif @@ -2966,7 +2970,7 @@ struct __GLcontextRec struct gl_query_state Query; /**< GL_ARB_occlusion_query */ - struct gl_shader_objects_state ShaderObjects; /* GL_ARB_shader_objects */ + struct gl_shader_state Shader; /**< GLSL shader object state */ /*@}*/ #if FEATURE_EXT_framebuffer_object diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index e121f59258..1d8666888e 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -93,7 +93,7 @@ #include "texenvprogram.h" #endif #if FEATURE_ARB_shader_objects -#include "shaderobjects.h" +#include "shaders.h" #endif #include "debug.h" #include "dispatch.h" @@ -949,7 +949,7 @@ update_arrays( GLcontext *ctx ) static void update_program(GLcontext *ctx) { - const struct gl_linked_program *linked = ctx->ShaderObjects.Linked; + const struct gl_linked_program *linked = ctx->Shader.CurrentProgram; /* These _Enabled flags indicate if the program is enabled AND valid. */ diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index e379933a66..e089de9310 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -41,7 +41,7 @@ #include "texenvprogram.h" #include "mtypes.h" #include "math/m_xform.h" -#include "shaderobjects.h" +/*#include "shaderobjects.h"*/ diff --git a/src/mesa/sources b/src/mesa/sources index eed6fb0a0e..19f43384ea 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -48,6 +48,7 @@ MAIN_SOURCES = \ main/rastpos.c \ main/rbadaptors.c \ main/renderbuffer.c \ + main/shaders.c \ main/state.c \ main/stencil.c \ main/texcompress.c \ @@ -164,10 +165,6 @@ SHADER_SOURCES = \ shader/programopt.c \ shader/shader_api.c \ - -## shader/shaderobjects.c \ -## shader/shaderobjects_3dlabs.c - SLANG_SOURCES = \ shader/slang/slang_analyse.c \ shader/slang/slang_assemble.c \ diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 46f99ef6e0..749e278ffa 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -102,7 +102,7 @@ _swrast_update_rasterflags( GLcontext *ctx ) rasterMask |= FRAGPROG_BIT; } - if (ctx->ShaderObjects._FragmentShaderPresent) { + if (ctx->Shader._FragmentShaderPresent) { rasterMask |= FRAGPROG_BIT; } diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 7bfb23f0f7..536ac30033 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1365,7 +1365,7 @@ shade_texture_span(GLcontext *ctx, SWspan *span) if (span->interpMask & SPAN_Z) _swrast_span_interpolate_z (ctx, span); - if (ctx->ShaderObjects.Linked && span->interpMask & SPAN_VARYING) + if (ctx->Shader.CurrentProgram && span->interpMask & SPAN_VARYING) interpolate_varying(ctx, span); /* Run fragment program/shader now */ -- cgit v1.2.3 From 65a18442e5d846940714bb662f5b1bb47ab60c29 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 19 Dec 2006 18:46:56 -0700 Subject: Clean-up and re-org of the main GLSL object types. Use the gl_shader struct as it should be. Renamed gl_linked_program to gl_shader_program. Store both shaders and programs in the same hash table and use the Type field to distinguish them. --- src/mesa/main/context.c | 3 - src/mesa/main/mtypes.h | 25 ++- src/mesa/main/state.c | 9 +- src/mesa/shader/shader_api.c | 385 +++++++++++++++++----------------- src/mesa/shader/shader_api.h | 16 +- src/mesa/shader/slang/slang_compile.c | 23 +- src/mesa/shader/slang/slang_compile.h | 2 +- src/mesa/shader/slang/slang_link.h | 2 +- src/mesa/shader/slang/slang_link2.c | 80 +++---- 9 files changed, 288 insertions(+), 257 deletions(-) (limited to 'src') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index c5220b5b2e..2196591ba2 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -706,7 +706,6 @@ alloc_shared_state( GLcontext *ctx ) #if FEATURE_ARB_shader_objects ss->ShaderObjects = _mesa_NewHashTable(); - ss->ProgramObjects = _mesa_NewHashTable(); #endif ss->Default1D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D); @@ -785,8 +784,6 @@ alloc_shared_state( GLcontext *ctx ) #if FEATURE_ARB_shader_objects if (ss->ShaderObjects) _mesa_DeleteHashTable (ss->ShaderObjects); - if (ss->ProgramObjects) - _mesa_DeleteHashTable (ss->ProgramObjects); #endif #if FEATURE_EXT_framebuffer_object diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 4a8f7d22e3..57f174a7d4 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -44,6 +44,12 @@ #include "bitset.h" +/** + * Special, internal token + */ +#define GL_SHADER_PROGRAM 0x9999 + + /** * Color channel data type. */ @@ -2044,13 +2050,13 @@ struct gl_query_state /** * A GLSL shader object - * A collection of one or more gl_programs... */ struct gl_shader { - GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER */ + GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER (first field!) */ GLuint Name; /**< AKA the handle */ - GLchar *Source; /**< Source code string */ + GLint RefCount; + const GLchar *Source; /**< Source code string */ GLboolean CompileStatus; GLboolean DeletePending; GLuint NumPrograms; /**< size of Programs[] array */ @@ -2061,15 +2067,14 @@ struct gl_shader /** * This corresponds to a GLSL "program" and is basically a linked collection - * of "shaders" (which are Mesa gl_programs). - * Yes, the terminology is a bit confusing. + * of "shaders". */ -struct gl_linked_program +struct gl_shader_program { - GLenum Type; + GLenum Type; /**< Always GL_SHADER_PROGRAM (internal token) */ GLuint Name; /**< aka handle or ID */ GLuint NumShaders; /**< total number of shaders in this program */ - struct gl_program **Shaders; /**< List of the shaders */ + struct gl_shader **Shaders; /**< List of the shaders */ struct gl_vertex_program *VertexProgram; /**< Linked vertex program */ struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */ struct gl_program_parameter_list *Uniforms; /**< Plus constants, etc */ @@ -2089,7 +2094,7 @@ struct gl_shader_state { GLboolean _VertexShaderPresent; GLboolean _FragmentShaderPresent; - struct gl_linked_program *CurrentProgram; + struct gl_shader_program *CurrentProgram; }; @@ -2150,8 +2155,8 @@ struct gl_shared_state #endif #if FEATURE_ARB_shader_objects + /** Table of both gl_shader and gl_shader_program objects */ struct _mesa_HashTable *ShaderObjects; - struct _mesa_HashTable *ProgramObjects; #endif #if FEATURE_EXT_framebuffer_object diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 1d8666888e..947d3136d5 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -949,8 +949,7 @@ update_arrays( GLcontext *ctx ) static void update_program(GLcontext *ctx) { - const struct gl_linked_program *linked = ctx->Shader.CurrentProgram; - + const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; /* These _Enabled flags indicate if the program is enabled AND valid. */ ctx->VertexProgram._Enabled = ctx->VertexProgram.Enabled @@ -973,10 +972,10 @@ update_program(GLcontext *ctx) ctx->FragmentProgram._Current = NULL; - if (linked && linked->LinkStatus) { + if (shProg && shProg->LinkStatus) { /* Use shader programs */ - ctx->VertexProgram._Current = linked->VertexProgram; - ctx->FragmentProgram._Current = linked->FragmentProgram; + ctx->VertexProgram._Current = shProg->VertexProgram; + ctx->FragmentProgram._Current = shProg->FragmentProgram; } else { if (ctx->VertexProgram._Enabled) { diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index ab2fd438c8..e49feea3d8 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -78,39 +78,39 @@ copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src) void _mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - struct gl_program *prog = _mesa_lookup_shader(ctx, shader); - const GLuint n = linked->NumShaders; + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); + struct gl_shader *sh = _mesa_lookup_shader(ctx, shader); + const GLuint n = shProg->NumShaders; GLuint i; - if (!linked || !prog) { + if (!shProg || !sh) { _mesa_error(ctx, GL_INVALID_OPERATION, "glAttachShader(bad program or shader name)"); return; } for (i = 0; i < n; i++) { - if (linked->Shaders[i] == prog) { + if (shProg->Shaders[i] == sh) { /* already attached */ return; } } /* grow list */ - linked->Shaders = (struct gl_program **) - _mesa_realloc(linked->Shaders, - n * sizeof(struct gl_program *), - (n + 1) * sizeof(struct gl_program *)); - if (!linked->Shaders) { + shProg->Shaders = (struct gl_shader **) + _mesa_realloc(shProg->Shaders, + n * sizeof(struct gl_shader *), + (n + 1) * sizeof(struct gl_shader *)); + if (!shProg->Shaders) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAttachShader"); return; } /* append */ - linked->Shaders[n] = prog; - prog->RefCount++; - linked->NumShaders++; + shProg->Shaders[n] = sh; + sh->RefCount++; + shProg->NumShaders++; } @@ -118,10 +118,10 @@ void _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, const GLchar *name) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); - if (!linked) { + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocation(program)"); return; } @@ -141,26 +141,22 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, GLuint _mesa_create_shader(GLcontext *ctx, GLenum type) { - struct gl_program *newProg; + struct gl_shader *sh; GLuint name; name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1); switch (type) { - case GL_FRAGMENT_SHADER_ARB: - /* alloc new gl_fragment_program */ - newProg = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, name); - break; - case GL_VERTEX_SHADER_ARB: - /* alloc new gl_vertex_program */ - newProg = ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, name); + case GL_FRAGMENT_SHADER: + case GL_VERTEX_SHADER: + sh = _mesa_new_shader(ctx, name, type); break; default: _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)"); return 0; } - _mesa_HashInsert(ctx->Shared->ShaderObjects, name, newProg); + _mesa_HashInsert(ctx->Shared->ShaderObjects, name, sh); return name; } @@ -170,12 +166,12 @@ GLuint _mesa_create_program(GLcontext *ctx) { GLuint name; - struct gl_linked_program *linked; + struct gl_shader_program *shProg; - name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ProgramObjects, 1); - linked = _mesa_new_linked_program(ctx, name); + name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1); + shProg = _mesa_new_shader_program(ctx, name); - _mesa_HashInsert(ctx->Shared->ProgramObjects, name, linked); + _mesa_HashInsert(ctx->Shared->ShaderObjects, name, shProg); return name; } @@ -184,17 +180,17 @@ _mesa_create_program(GLcontext *ctx) void _mesa_delete_program2(GLcontext *ctx, GLuint name) { - struct gl_linked_program *linked; + struct gl_shader_program *shProg; - linked = _mesa_lookup_linked_program(ctx, name); - if (!linked) { + shProg = _mesa_lookup_shader_program(ctx, name); + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteProgram(name)"); return; } /* XXX refcounting! */ - _mesa_HashRemove(ctx->Shared->ProgramObjects, name); - _mesa_delete_linked_program(ctx, linked); + _mesa_HashRemove(ctx->Shared->ShaderObjects, name); + _mesa_delete_shader_program(ctx, shProg); } @@ -212,38 +208,38 @@ _mesa_delete_shader(GLcontext *ctx, GLuint shader) void _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - const GLuint n = linked->NumShaders; + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); + const GLuint n = shProg->NumShaders; GLuint i, j; - if (!linked) { + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDetachShader(bad program or shader name)"); return; } for (i = 0; i < n; i++) { - if (linked->Shaders[i]->Id == shader) { - struct gl_program **newList; + if (shProg->Shaders[i]->Name == shader) { + struct gl_shader **newList; /* found it */ /* alloc new, smaller array */ - newList = (struct gl_program **) - _mesa_malloc((n - 1) * sizeof(struct gl_program *)); + newList = (struct gl_shader **) + _mesa_malloc((n - 1) * sizeof(struct gl_shader *)); if (!newList) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachShader"); return; } for (j = 0; j < i; j++) { - newList[j] = linked->Shaders[j]; + newList[j] = shProg->Shaders[j]; } while (++i < n) - newList[j++] = linked->Shaders[i]; - _mesa_free(linked->Shaders); + newList[j++] = shProg->Shaders[i]; + _mesa_free(shProg->Shaders); /* XXX refcounting! */ - linked->Shaders = newList; + shProg->Shaders = newList; return; } } @@ -262,23 +258,23 @@ _mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, static const GLenum vec_types[] = { GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4 }; - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); GLint sz; - if (!linked) { + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); return; } - if (!linked->Attributes || index >= linked->Attributes->NumParameters) { + if (!shProg->Attributes || index >= shProg->Attributes->NumParameters) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)"); return; } copy_string(nameOut, maxLength, length, - linked->Attributes->Parameters[index].Name); - sz = linked->Attributes->Parameters[index].Size; + shProg->Attributes->Parameters[index].Name); + sz = shProg->Attributes->Parameters[index].Size; if (size) *size = sz; if (type) @@ -297,23 +293,23 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, static const GLenum vec_types[] = { GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4 }; - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); GLint sz; - if (!linked) { + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); return; } - if (!linked->Uniforms || index >= linked->Uniforms->NumParameters) { + if (!shProg->Uniforms || index >= shProg->Uniforms->NumParameters) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)"); return; } copy_string(nameOut, maxLength, length, - linked->Uniforms->Parameters[index].Name); - sz = linked->Uniforms->Parameters[index].Size; + shProg->Uniforms->Parameters[index].Name); + sz = shProg->Uniforms->Parameters[index].Size; if (size) *size = sz; if (type) @@ -328,12 +324,12 @@ void _mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - if (linked) { + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); + if (shProg) { GLuint i; - for (i = 0; i < maxCount && i < linked->NumShaders; i++) { - obj[i] = linked->Shaders[i]->Id; + for (i = 0; i < maxCount && i < shProg->NumShaders; i++) { + obj[i] = shProg->Shaders[i]->Name; } if (count) *count = i; @@ -348,15 +344,15 @@ GLint _mesa_get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); - if (!linked) { + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttribLocation"); return -1; } - if (!linked->LinkStatus) { + if (!shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttribLocation(program not linked)"); return -1; @@ -365,10 +361,10 @@ _mesa_get_attrib_location(GLcontext *ctx, GLuint program, if (!name) return -1; - if (linked->Attributes) { + if (shProg->Attributes) { GLuint i; - for (i = 0; i < linked->Attributes->NumParameters; i++) { - if (!strcmp(linked->Attributes->Parameters[i].Name, name)) { + for (i = 0; i < shProg->Attributes->NumParameters; i++) { + if (!strcmp(shProg->Attributes->Parameters[i].Name, name)) { return i; } } @@ -405,41 +401,41 @@ void _mesa_get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); - if (!linked) { + if (!shProg) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramiv(program)"); return; } switch (pname) { case GL_DELETE_STATUS: - *params = linked->DeletePending; + *params = shProg->DeletePending; break; case GL_LINK_STATUS: - *params = linked->LinkStatus; + *params = shProg->LinkStatus; break; case GL_VALIDATE_STATUS: - *params = linked->Validated; + *params = shProg->Validated; break; case GL_INFO_LOG_LENGTH: - *params = linked->InfoLog ? strlen(linked->InfoLog) : 0; + *params = shProg->InfoLog ? strlen(shProg->InfoLog) : 0; break; case GL_ATTACHED_SHADERS: - *params = linked->NumShaders; + *params = shProg->NumShaders; break; case GL_ACTIVE_ATTRIBUTES: - *params = linked->Uniforms ? linked->Uniforms->NumParameters : 0; + *params = shProg->Uniforms ? shProg->Uniforms->NumParameters : 0; break; case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - *params = _mesa_parameter_longest_name(linked->Attributes); + *params = _mesa_parameter_longest_name(shProg->Attributes); break; case GL_ACTIVE_UNIFORMS: - *params = linked->Uniforms ? linked->Uniforms->NumParameters : 0; + *params = shProg->Uniforms ? shProg->Uniforms->NumParameters : 0; break; case GL_ACTIVE_UNIFORM_MAX_LENGTH: - *params = _mesa_parameter_longest_name(linked->Uniforms); + *params = _mesa_parameter_longest_name(shProg->Uniforms); break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)"); @@ -451,16 +447,13 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program, void _mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params) { -#if 0 - struct gl_program *shader = _mesa_lookup_shader(ctx, name); + struct gl_shader *shader = _mesa_lookup_shader(ctx, name); if (!shader) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderiv(shader)"); return; } -#else - struct gl_shader *shader; -#endif + switch (pname) { case GL_SHADER_TYPE: *params = shader->Type; @@ -488,14 +481,13 @@ void _mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - if (!linked) { + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); + if (!shProg) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramInfoLog(program)"); return; } - /* XXX also test length, infoLog params for NULL? */ - copy_string(linked->InfoLog, bufSize, length, infoLog); + copy_string(infoLog, bufSize, length, shProg->InfoLog); } @@ -503,14 +495,12 @@ void _mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { - struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); - if (!shProg) { + struct gl_shader *sh = _mesa_lookup_shader(ctx, shader); + if (!sh) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderInfoLog(shader)"); return; } - /* - copy_string(shProg->InfoLog, bufSize, length, infoLog); - */ + copy_string(infoLog, bufSize, length, sh->InfoLog); } @@ -521,12 +511,12 @@ void _mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *sourceOut) { - struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); - if (!shProg) { + struct gl_shader *sh = _mesa_lookup_shader(ctx, shader); + if (!sh) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetShaderSource(shader)"); return; } - copy_string((GLchar *) shProg->String, maxLength, length, sourceOut); + copy_string(sourceOut, maxLength, length, sh->Source); } @@ -537,13 +527,13 @@ void _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, GLfloat *params) { - struct gl_linked_program *linked - = _mesa_lookup_linked_program(ctx, program); - if (linked) { + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); + if (shProg) { GLuint i; - if (location >= 0 && location < linked->Uniforms->NumParameters) { - for (i = 0; i < linked->Uniforms->Parameters[location].Size; i++) { - params[i] = linked->Uniforms->ParameterValues[location][i]; + if (location >= 0 && location < shProg->Uniforms->NumParameters) { + for (i = 0; i < shProg->Uniforms->Parameters[location].Size; i++) { + params[i] = shProg->Uniforms->ParameterValues[location][i]; } } else { @@ -563,11 +553,11 @@ GLint _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) { if (ctx->Shader.CurrentProgram) { - const struct gl_linked_program *linked = ctx->Shader.CurrentProgram; + const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; GLuint loc; - for (loc = 0; loc < linked->Uniforms->NumParameters; loc++) { + for (loc = 0; loc < shProg->Uniforms->NumParameters; loc++) { const struct gl_program_parameter *u - = linked->Uniforms->Parameters + loc; + = shProg->Uniforms->Parameters + loc; if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { return loc; } @@ -581,15 +571,15 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) GLboolean _mesa_is_program(GLcontext *ctx, GLuint name) { - struct gl_linked_program *linked = _mesa_lookup_linked_program(ctx, name); - return linked ? GL_TRUE : GL_FALSE; + struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, name); + return shProg ? GL_TRUE : GL_FALSE; } GLboolean _mesa_is_shader(GLcontext *ctx, GLuint name) { - struct gl_program *shader = _mesa_lookup_shader(ctx, name); + struct gl_shader *shader = _mesa_lookup_shader(ctx, name); return shader ? GL_TRUE : GL_FALSE; } @@ -601,17 +591,17 @@ _mesa_is_shader(GLcontext *ctx, GLuint name) void _mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) { - struct gl_program *shProg = _mesa_lookup_shader(ctx, shader); - if (!shProg) { + struct gl_shader *sh = _mesa_lookup_shader(ctx, shader); + if (!sh) { _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSource(shaderObj)"); return; } /* free old shader source string and install new one */ - if (shProg->String) { - _mesa_free(shProg->String); + if (sh->Source) { + _mesa_free((void *) sh->Source); } - shProg->String = (GLubyte *) source; + sh->Source = source; } @@ -621,12 +611,12 @@ _mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) void _mesa_compile_shader(GLcontext *ctx, GLuint shaderObj) { - struct gl_program *prog = _mesa_lookup_shader(ctx, shaderObj); + struct gl_shader *sh = _mesa_lookup_shader(ctx, shaderObj); slang_info_log info_log; slang_code_object obj; slang_unit_type type; - if (!prog) { + if (!sh) { _mesa_error(ctx, GL_INVALID_VALUE, "glCompileShader(shaderObj)"); return; } @@ -634,24 +624,20 @@ _mesa_compile_shader(GLcontext *ctx, GLuint shaderObj) slang_info_log_construct(&info_log); _slang_code_object_ctr(&obj); - if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + if (sh->Type == GL_VERTEX_SHADER) { type = slang_unit_vertex_shader; } else { - assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + assert(sh->Type == GL_FRAGMENT_SHADER); type = slang_unit_fragment_shader; } - if (_slang_compile((const char*) prog->String, &obj, - type, &info_log, prog)) { - /* - prog->CompileStatus = GL_TRUE; - */ + if (_slang_compile(sh->Source, &obj, type, &info_log, sh)) { + sh->CompileStatus = GL_TRUE; } else { - /* - prog->CompileStatus = GL_FALSE; - */ + sh->CompileStatus = GL_FALSE; + /* XXX temporary */ _mesa_problem(ctx, "Program did not compile!"); } } @@ -663,15 +649,15 @@ _mesa_compile_shader(GLcontext *ctx, GLuint shaderObj) void _mesa_link_program(GLcontext *ctx, GLuint program) { - struct gl_linked_program *linked; + struct gl_shader_program *shProg; - linked = _mesa_lookup_linked_program(ctx, program); - if (!linked) { + shProg = _mesa_lookup_shader_program(ctx, program); + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glLinkProgram(program)"); return; } - _slang_link2(ctx, program, linked); + _slang_link2(ctx, program, shProg); } @@ -683,14 +669,14 @@ _mesa_use_program(GLcontext *ctx, GLuint program) { /* XXXX need to handle reference counting here! */ if (program) { - struct gl_linked_program *linked; - linked = _mesa_lookup_linked_program(ctx, program); - if (!linked) { + struct gl_shader_program *shProg; + shProg = _mesa_lookup_shader_program(ctx, program); + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB(programObj)"); return; } - ctx->Shader.CurrentProgram = linked; + ctx->Shader.CurrentProgram = shProg; } else { /* don't use a shader program */ @@ -707,9 +693,9 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, const GLvoid *values, GLenum type) { if (ctx->Shader.CurrentProgram) { - struct gl_linked_program *linked = ctx->Shader.CurrentProgram; - if (location >= 0 && location < linked->Uniforms->NumParameters) { - GLfloat *v = linked->Uniforms->ParameterValues[location]; + struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; + if (location >= 0 && location < shProg->Uniforms->NumParameters) { + GLfloat *v = shProg->Uniforms->ParameterValues[location]; const GLfloat *fValues = (const GLfloat *) values; /* XXX */ GLint i; if (type == GL_FLOAT_VEC4) @@ -791,14 +777,14 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, void _mesa_validate_program(GLcontext *ctx, GLuint program) { - struct gl_linked_program *linked; - linked = _mesa_lookup_linked_program(ctx, program); - if (!linked) { + struct gl_shader_program *shProg; + shProg = _mesa_lookup_shader_program(ctx, program); + if (!shProg) { _mesa_error(ctx, GL_INVALID_OPERATION, "glValidateProgram(program)"); return; } /* XXX temporary */ - linked->Validated = GL_TRUE; + shProg->Validated = GL_TRUE; /* From the GL spec: any two active samplers in the current program object are of @@ -821,78 +807,93 @@ _mesa_validate_program(GLcontext *ctx, GLuint program) /** - * Create a new GLSL program object. + * Allocate a new gl_shader_program object, initialize it. */ -struct gl_linked_program * -_mesa_new_linked_program(GLcontext *ctx, GLuint name) +struct gl_shader_program * +_mesa_new_shader_program(GLcontext *ctx, GLuint name) { - struct gl_linked_program *linked; - linked = CALLOC_STRUCT(gl_linked_program); - if (linked) { - linked->Name = name; + struct gl_shader_program *shProg; + shProg = CALLOC_STRUCT(gl_shader_program); + if (shProg) { + shProg->Type = GL_SHADER_PROGRAM; + shProg->Name = name; } - return linked; + return shProg; } void -_mesa_free_linked_program_data(GLcontext *ctx, - struct gl_linked_program *linked) +_mesa_free_shader_program_data(GLcontext *ctx, + struct gl_shader_program *shProg) { - if (linked->VertexProgram) { - if (linked->VertexProgram->Base.Parameters == linked->Uniforms) { + assert(shProg->Type == GL_SHADER_PROGRAM); + + if (shProg->VertexProgram) { + if (shProg->VertexProgram->Base.Parameters == shProg->Uniforms) { /* to prevent a double-free in the next call */ - linked->VertexProgram->Base.Parameters = NULL; + shProg->VertexProgram->Base.Parameters = NULL; } - _mesa_delete_program(ctx, &linked->VertexProgram->Base); - linked->VertexProgram = NULL; + _mesa_delete_program(ctx, &shProg->VertexProgram->Base); + shProg->VertexProgram = NULL; } - if (linked->FragmentProgram) { - if (linked->FragmentProgram->Base.Parameters == linked->Uniforms) { + if (shProg->FragmentProgram) { + if (shProg->FragmentProgram->Base.Parameters == shProg->Uniforms) { /* to prevent a double-free in the next call */ - linked->FragmentProgram->Base.Parameters = NULL; + shProg->FragmentProgram->Base.Parameters = NULL; } - _mesa_delete_program(ctx, &linked->FragmentProgram->Base); - linked->FragmentProgram = NULL; + _mesa_delete_program(ctx, &shProg->FragmentProgram->Base); + shProg->FragmentProgram = NULL; } - if (linked->Uniforms) { - _mesa_free_parameter_list(linked->Uniforms); - linked->Uniforms = NULL; + if (shProg->Uniforms) { + _mesa_free_parameter_list(shProg->Uniforms); + shProg->Uniforms = NULL; } - if (linked->Varying) { - _mesa_free_parameter_list(linked->Varying); - linked->Varying = NULL; + if (shProg->Varying) { + _mesa_free_parameter_list(shProg->Varying); + shProg->Varying = NULL; } } void -_mesa_delete_linked_program(GLcontext *ctx, struct gl_linked_program *linked) +_mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) { - _mesa_free_linked_program_data(ctx, linked); - _mesa_free(linked); + _mesa_free_shader_program_data(ctx, shProg); + _mesa_free(shProg); } /** * Lookup a GLSL program object. */ -struct gl_linked_program * -_mesa_lookup_linked_program(GLcontext *ctx, GLuint name) +struct gl_shader_program * +_mesa_lookup_shader_program(GLcontext *ctx, GLuint name) { - if (name) - return (struct gl_linked_program *) - _mesa_HashLookup(ctx->Shared->ProgramObjects, name); - else - return NULL; + struct gl_shader_program *shProg; + if (name) { + shProg = (struct gl_shader_program *) + _mesa_HashLookup(ctx->Shared->ShaderObjects, name); + /* Note that both gl_shader and gl_shader_program objects are kept + * in the same hash table. Check the object's type to be sure it's + * what we're expecting. + */ + if (shProg && shProg->Type != GL_SHADER_PROGRAM) { + return NULL; + } + return shProg; + } + return NULL; } +/** + * Allocate a new gl_shader object, initialize it. + */ struct gl_shader * _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) { @@ -900,8 +901,8 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER); shader = CALLOC_STRUCT(gl_shader); if (shader) { - shader->Name = name; shader->Type = type; + shader->Name = name; } return shader; } @@ -910,14 +911,24 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) /** * Lookup a GLSL shader object. */ -struct gl_program * +struct gl_shader * _mesa_lookup_shader(GLcontext *ctx, GLuint name) { - if (name) - return (struct gl_program *) + if (name) { + struct gl_shader *sh = (struct gl_shader *) _mesa_HashLookup(ctx->Shared->ShaderObjects, name); - else - return NULL; + /* Note that both gl_shader and gl_shader_program objects are kept + * in the same hash table. Check the object's type to be sure it's + * what we're expecting. + */ + if (sh && sh->Type == GL_SHADER_PROGRAM) { + assert(sh->Type == GL_VERTEX_SHADER || + sh->Type == GL_FRAGMENT_SHADER); + return NULL; + } + return sh; + } + return NULL; } diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h index 723f92690d..2f73bb8887 100644 --- a/src/mesa/shader/shader_api.h +++ b/src/mesa/shader/shader_api.h @@ -38,24 +38,24 @@ extern void _mesa_init_shader_state(GLcontext * ctx); -extern struct gl_linked_program * -_mesa_new_linked_program(GLcontext *ctx, GLuint name); +extern struct gl_shader_program * +_mesa_new_shader_program(GLcontext *ctx, GLuint name); extern void -_mesa_free_linked_program_data(GLcontext *ctx, - struct gl_linked_program *linked); +_mesa_free_shader_program_data(GLcontext *ctx, + struct gl_shader_program *shProg); extern void -_mesa_delete_linked_program(GLcontext *ctx, struct gl_linked_program *linked); +_mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg); -extern struct gl_linked_program * -_mesa_lookup_linked_program(GLcontext *ctx, GLuint name); +extern struct gl_shader_program * +_mesa_lookup_shader_program(GLcontext *ctx, GLuint name); extern struct gl_shader * _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type); -extern struct gl_program * +extern struct gl_shader * _mesa_lookup_shader(GLcontext *ctx, GLuint name); diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 6aed167e3f..286e25d54b 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2223,6 +2223,7 @@ compile_object(grammar * id, const char *source, slang_code_object * object, } +#if 0 static void slang_create_uniforms(const slang_export_data_table *exports, struct gl_program *program) @@ -2237,16 +2238,34 @@ slang_create_uniforms(const slang_export_data_table *exports, } } } +#endif GLboolean _slang_compile(const char *source, slang_code_object * object, slang_unit_type type, slang_info_log * infolog, - struct gl_program *program) + struct gl_shader *shader) { + GET_CURRENT_CONTEXT(ctx); + struct gl_program *program; GLboolean success; grammar id = 0; + /* XXX temporary hack */ + if (!shader->Programs) { + GLenum progTarget; + if (shader->Type == GL_VERTEX_SHADER) + progTarget = GL_VERTEX_PROGRAM_ARB; + else + progTarget = GL_FRAGMENT_PROGRAM_ARB; + shader->Programs + = (struct gl_program **) malloc(sizeof(struct gl_program*)); + shader->Programs[0] = _mesa_new_program(ctx, progTarget, 1); + shader->NumPrograms = 1; + } + program = shader->Programs[0]; + assert(program); + _slang_code_object_dtr(object); _slang_code_object_ctr(object); @@ -2265,7 +2284,7 @@ _slang_compile(const char *source, slang_code_object * object, #if NEW_SLANG { GET_CURRENT_CONTEXT(ctx); - slang_create_uniforms(&object->expdata, program); + slang_create_uniforms(&object->expdata, shader); _mesa_print_program(program); _mesa_print_program_parameters(ctx, program); } diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index a41c00a3f5..8a72f43486 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -109,7 +109,7 @@ int slang_info_log_warning (slang_info_log *, const char *, ...); void slang_info_log_memory (slang_info_log *); extern GLboolean -_slang_compile (const char *, slang_code_object *, slang_unit_type, slang_info_log *, struct gl_program *program); +_slang_compile (const char *, slang_code_object *, slang_unit_type, slang_info_log *, struct gl_shader *shader); #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index e96dd51ed4..f56d717873 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -351,7 +351,7 @@ _slang_link (slang_program *, slang_code_object **, GLuint); extern void _slang_link2(GLcontext *ctx, GLhandleARB h, - struct gl_linked_program *linked); + struct gl_shader_program *shProg); #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 425ad7a87c..fa29e42706 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -43,7 +43,7 @@ static GLboolean -link_varying_vars(struct gl_linked_program *linked, struct gl_program *prog) +link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog) { GLuint *map, i, firstVarying, newFile; GLbitfield varsWritten, varsRead; @@ -57,17 +57,17 @@ link_varying_vars(struct gl_linked_program *linked, struct gl_program *prog) const struct gl_program_parameter *var = prog->Varying->Parameters + i; - GLint j = _mesa_lookup_parameter_index(linked->Varying, -1, var->Name); + GLint j = _mesa_lookup_parameter_index(shProg->Varying, -1, var->Name); if (j >= 0) { /* already in list, check size */ - if (var->Size != linked->Varying->Parameters[j].Size) { + if (var->Size != shProg->Varying->Parameters[j].Size) { /* error */ return GL_FALSE; } } else { /* not already in linked list */ - j = _mesa_add_varying(linked->Varying, var->Name, var->Size); + j = _mesa_add_varying(shProg->Varying, var->Name, var->Size); } ASSERT(j >= 0); @@ -143,7 +143,7 @@ is_uniform(enum register_file file) static GLboolean -link_uniform_vars(struct gl_linked_program *linked, struct gl_program *prog) +link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) { GLuint *map, i; @@ -161,12 +161,12 @@ link_uniform_vars(struct gl_linked_program *linked, struct gl_program *prog) assert(is_uniform(p->Type)); if (p->Name) { - j = _mesa_lookup_parameter_index(linked->Uniforms, -1, p->Name); + j = _mesa_lookup_parameter_index(shProg->Uniforms, -1, p->Name); } else { GLuint swizzle; ASSERT(p->Type == PROGRAM_CONSTANT); - if (_mesa_lookup_parameter_constant(linked->Uniforms, pVals, + if (_mesa_lookup_parameter_constant(shProg->Uniforms, pVals, p->Size, &j, &swizzle)) { assert(j >= 0); } @@ -177,21 +177,21 @@ link_uniform_vars(struct gl_linked_program *linked, struct gl_program *prog) if (j >= 0) { /* already in list, check size XXX check this */ - assert(p->Size == linked->Uniforms->Parameters[j].Size); + assert(p->Size == shProg->Uniforms->Parameters[j].Size); } else { /* not already in linked list */ switch (p->Type) { case PROGRAM_ENV_PARAM: - j = _mesa_add_named_parameter(linked->Uniforms, p->Name, pVals); + j = _mesa_add_named_parameter(shProg->Uniforms, p->Name, pVals); case PROGRAM_CONSTANT: - j = _mesa_add_named_constant(linked->Uniforms, p->Name, pVals, p->Size); + j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size); break; case PROGRAM_STATE_VAR: - j = _mesa_add_state_reference(linked->Uniforms, (const GLint *) p->StateIndexes); + j = _mesa_add_state_reference(shProg->Uniforms, (const GLint *) p->StateIndexes); break; case PROGRAM_UNIFORM: - j = _mesa_add_uniform(linked->Uniforms, p->Name, p->Size); + j = _mesa_add_uniform(shProg->Uniforms, p->Name, p->Size); break; default: abort(); @@ -287,41 +287,41 @@ slang_resolve_branches(struct gl_program *prog) void _slang_link2(GLcontext *ctx, GLhandleARB programObj, - struct gl_linked_program *linked) + struct gl_shader_program *shProg) { struct gl_vertex_program *vertProg; struct gl_fragment_program *fragProg; GLuint i; - _mesa_free_linked_program_data(ctx, linked); + _mesa_free_shader_program_data(ctx, shProg); - linked->Uniforms = _mesa_new_parameter_list(); - linked->Varying = _mesa_new_parameter_list(); + shProg->Uniforms = _mesa_new_parameter_list(); + shProg->Varying = _mesa_new_parameter_list(); /** * Find attached vertex shader, fragment shader */ vertProg = NULL; fragProg = NULL; - for (i = 0; i < linked->NumShaders; i++) { - if (linked->Shaders[i]->Target == GL_VERTEX_PROGRAM_ARB) - vertProg = (struct gl_vertex_program *) linked->Shaders[i]; - else if (linked->Shaders[i]->Target == GL_FRAGMENT_PROGRAM_ARB) - fragProg = (struct gl_fragment_program *) linked->Shaders[i]; + for (i = 0; i < shProg->NumShaders; i++) { + if (shProg->Shaders[i]->Type == GL_VERTEX_SHADER) + vertProg = (struct gl_vertex_program *) shProg->Shaders[i]->Programs[0]; + else if (shProg->Shaders[i]->Type == GL_FRAGMENT_SHADER) + fragProg = (struct gl_fragment_program *) shProg->Shaders[i]->Programs[0]; else _mesa_problem(ctx, "unexpected shader target in slang_link2()"); } if (!vertProg || !fragProg) { /* XXX is it legal to have one but not the other?? */ /* XXX record error */ - linked->LinkStatus = GL_FALSE; + shProg->LinkStatus = GL_FALSE; return; } if (!vertProg->Base.Varying || !fragProg->Base.Varying) { /* temporary */ _mesa_problem(ctx, "vertex/fragment program lacks varying list!"); - linked->LinkStatus = GL_FALSE; + shProg->LinkStatus = GL_FALSE; return; } @@ -329,25 +329,25 @@ _slang_link2(GLcontext *ctx, * Make copies of the vertex/fragment programs now since we'll be * changing src/dst registers after merging the uniforms and varying vars. */ - linked->VertexProgram = (struct gl_vertex_program *) + shProg->VertexProgram = (struct gl_vertex_program *) _mesa_clone_program(ctx, &vertProg->Base); - linked->FragmentProgram = (struct gl_fragment_program *) + shProg->FragmentProgram = (struct gl_fragment_program *) _mesa_clone_program(ctx, &fragProg->Base); - link_varying_vars(linked, &linked->VertexProgram->Base); - link_varying_vars(linked, &linked->FragmentProgram->Base); + link_varying_vars(shProg, &shProg->VertexProgram->Base); + link_varying_vars(shProg, &shProg->FragmentProgram->Base); - link_uniform_vars(linked, &linked->VertexProgram->Base); - link_uniform_vars(linked, &linked->FragmentProgram->Base); + link_uniform_vars(shProg, &shProg->VertexProgram->Base); + link_uniform_vars(shProg, &shProg->FragmentProgram->Base); /* The vertex and fragment programs share a common set of uniforms now */ - _mesa_free_parameter_list(linked->VertexProgram->Base.Parameters); - _mesa_free_parameter_list(linked->FragmentProgram->Base.Parameters); - linked->VertexProgram->Base.Parameters = linked->Uniforms; - linked->FragmentProgram->Base.Parameters = linked->Uniforms; + _mesa_free_parameter_list(shProg->VertexProgram->Base.Parameters); + _mesa_free_parameter_list(shProg->FragmentProgram->Base.Parameters); + shProg->VertexProgram->Base.Parameters = shProg->Uniforms; + shProg->FragmentProgram->Base.Parameters = shProg->Uniforms; - slang_resolve_branches(&linked->VertexProgram->Base); - slang_resolve_branches(&linked->FragmentProgram->Base); + slang_resolve_branches(&shProg->VertexProgram->Base); + slang_resolve_branches(&shProg->FragmentProgram->Base); #if 1 printf("************** original fragment program\n"); @@ -356,8 +356,8 @@ _slang_link2(GLcontext *ctx, #endif #if 1 printf("************** linked fragment prog\n"); - _mesa_print_program(&linked->FragmentProgram->Base); - _mesa_print_program_parameters(ctx, &linked->FragmentProgram->Base); + _mesa_print_program(&shProg->FragmentProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); #endif #if 1 printf("************** original vertex program\n"); @@ -366,10 +366,10 @@ _slang_link2(GLcontext *ctx, #endif #if 1 printf("************** linked vertex prog\n"); - _mesa_print_program(&linked->VertexProgram->Base); - _mesa_print_program_parameters(ctx, &linked->VertexProgram->Base); + _mesa_print_program(&shProg->VertexProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); #endif - linked->LinkStatus = (linked->VertexProgram && linked->FragmentProgram); + shProg->LinkStatus = (shProg->VertexProgram && shProg->FragmentProgram); } -- cgit v1.2.3 From 9e4bae9ccac5a76a2361c5c3cbe377a3c6b6a95b Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 09:27:42 -0700 Subject: Fix shader object reference counting and hash table deallocation. --- src/mesa/main/context.c | 26 ++++++++++------- src/mesa/main/mtypes.h | 20 ++++++++----- src/mesa/main/shaders.h | 5 ---- src/mesa/shader/shader_api.c | 69 +++++++++++++++++++++++++++++++++++++++----- src/mesa/shader/shader_api.h | 5 +++- 5 files changed, 94 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 2196591ba2..0e2a780476 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -131,7 +131,7 @@ #include "math/m_xform.h" #include "math/mathmod.h" #endif -#include "shaders.h" +#include "shader_api.h" #ifdef USE_SPARC_ASM #include "sparc/sparc.h" @@ -877,13 +877,22 @@ delete_arrayobj_cb(GLuint id, void *data, void *userData) } /** - * Callback for deleting an shader object. Called by _mesa_HashDeleteAll(). + * Callback for deleting shader and shader programs objects. + * Called by _mesa_HashDeleteAll(). */ static void -delete_shaderobj_cb(GLuint id, void *data, void *userData) +delete_shader_cb(GLuint id, void *data, void *userData) { - /* XXX probably need to fix this */ - _mesa_free(data); + GLcontext *ctx = (GLcontext *) userData; + struct gl_shader *sh = (struct gl_shader *) data; + if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER) { + _mesa_free_shader(ctx, sh); + } + else { + struct gl_shader_program *shProg = (struct gl_shader_program *) data; + ASSERT(shProg->Type == GL_SHADER_PROGRAM); + _mesa_free_shader_program(ctx, shProg); + } } @@ -948,11 +957,8 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) _mesa_DeleteHashTable(ss->ArrayObjects); #if FEATURE_ARB_shader_objects - /* XXX SLANG TO-DO */ - /* - struct _mesa_HashTable *ShaderObjects; - struct _mesa_HashTable *ProgramObjects; - */ + _mesa_HashDeleteAll(ss->ShaderObjects, delete_shader_cb, ctx); + _mesa_DeleteHashTable(ss->ShaderObjects); #endif #if FEATURE_EXT_framebuffer_object diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 57f174a7d4..e73c625a82 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2049,16 +2049,17 @@ struct gl_query_state /** - * A GLSL shader object + * A GLSL shader object. */ struct gl_shader { GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER (first field!) */ GLuint Name; /**< AKA the handle */ - GLint RefCount; + GLint RefCount; /**< Reference count */ + GLboolean DeletePending; + const GLchar *Source; /**< Source code string */ GLboolean CompileStatus; - GLboolean DeletePending; GLuint NumPrograms; /**< size of Programs[] array */ struct gl_program **Programs; /**< Post-compile assembly code */ GLchar *InfoLog; @@ -2066,15 +2067,19 @@ struct gl_shader /** - * This corresponds to a GLSL "program" and is basically a linked collection - * of "shaders". + * A GLSL program object. Basically a linked collection of "shaders". */ struct gl_shader_program { GLenum Type; /**< Always GL_SHADER_PROGRAM (internal token) */ GLuint Name; /**< aka handle or ID */ - GLuint NumShaders; /**< total number of shaders in this program */ - struct gl_shader **Shaders; /**< List of the shaders */ + GLint RefCount; /**< Reference count */ + GLboolean DeletePending; + + GLuint NumShaders; /**< number of attached shaders */ + struct gl_shader **Shaders; /**< List of attached the shaders */ + + /* post-link info: */ struct gl_vertex_program *VertexProgram; /**< Linked vertex program */ struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */ struct gl_program_parameter_list *Uniforms; /**< Plus constants, etc */ @@ -2082,7 +2087,6 @@ struct gl_shader_program struct gl_program_parameter_list *Attributes; /**< Vertex attributes */ GLboolean LinkStatus; /**< GL_LINK_STATUS */ GLboolean Validated; - GLboolean DeletePending; GLchar *InfoLog; }; diff --git a/src/mesa/main/shaders.h b/src/mesa/main/shaders.h index a098c4c331..17339ccf62 100644 --- a/src/mesa/main/shaders.h +++ b/src/mesa/main/shaders.h @@ -233,9 +233,4 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -/*** XXXX temporary here ! */ -extern void -_mesa_init_shader_state(GLcontext *ctx); - - #endif /* SHADERS_H */ diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index e49feea3d8..2d1056e667 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -126,6 +126,15 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, return; } + if (!name) + return; + + if (strncmp(name, "gl_", 3) == 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBindAttribLocation(illegal name)"); + return; + } + #if 0 /* XXXX */ if (name == NULL || index >= MAX_VERTEX_ATTRIBS) _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); @@ -188,20 +197,32 @@ _mesa_delete_program2(GLcontext *ctx, GLuint name) return; } - /* XXX refcounting! */ + /* always remove from hash table */ _mesa_HashRemove(ctx->Shared->ShaderObjects, name); - _mesa_delete_shader_program(ctx, shProg); + + shProg->DeletePending = GL_TRUE; + + /* decrement refcount, delete if zero */ + shProg->RefCount--; + if (shProg->RefCount <= 0) { + _mesa_free_shader_program(ctx, shProg); + } } void _mesa_delete_shader(GLcontext *ctx, GLuint shader) { - /* XXX refcounting! */ + struct gl_shader *sh = _mesa_lookup_shader(ctx, shader); + if (!sh) { + return; + } - /* - _mesa_DeleteObjectARB(shader); - */ + sh->DeletePending = GL_TRUE; + sh->RefCount--; + if (sh->RefCount <= 0) { + _mesa_free_shader(ctx, sh); + } } @@ -223,6 +244,9 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) if (shProg->Shaders[i]->Name == shader) { struct gl_shader **newList; /* found it */ + + shProg->Shaders[i]->RefCount--; + /* alloc new, smaller array */ newList = (struct gl_shader **) _mesa_malloc((n - 1) * sizeof(struct gl_shader *)); @@ -602,6 +626,7 @@ _mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) _mesa_free((void *) sh->Source); } sh->Source = source; + sh->CompileStatus = GL_FALSE; } @@ -667,6 +692,15 @@ _mesa_link_program(GLcontext *ctx, GLuint program) void _mesa_use_program(GLcontext *ctx, GLuint program) { + /* unbind old */ + if (ctx->Shader.CurrentProgram) { + ctx->Shader.CurrentProgram->RefCount--; + if (ctx->Shader.CurrentProgram->RefCount <= 0) { + _mesa_free_shader_program(ctx, ctx->Shader.CurrentProgram); + } + ctx->Shader.CurrentProgram = NULL; + } + /* XXXX need to handle reference counting here! */ if (program) { struct gl_shader_program *shProg; @@ -677,6 +711,7 @@ _mesa_use_program(GLcontext *ctx, GLuint program) return; } ctx->Shader.CurrentProgram = shProg; + shProg->RefCount++; } else { /* don't use a shader program */ @@ -817,6 +852,7 @@ _mesa_new_shader_program(GLcontext *ctx, GLuint name) if (shProg) { shProg->Type = GL_SHADER_PROGRAM; shProg->Name = name; + shProg->RefCount = 1; } return shProg; } @@ -861,7 +897,7 @@ _mesa_free_shader_program_data(GLcontext *ctx, void -_mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) +_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) { _mesa_free_shader_program_data(ctx, shProg); _mesa_free(shProg); @@ -903,11 +939,30 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) if (shader) { shader->Type = type; shader->Name = name; + shader->RefCount = 1; } return shader; } +void +_mesa_free_shader(GLcontext *ctx, struct gl_shader *sh) +{ + GLuint i; + if (sh->Source) + _mesa_free((void *) sh->Source); + if (sh->InfoLog) + _mesa_free(sh->InfoLog); + for (i = 0; i < sh->NumPrograms; i++) { + assert(sh->Programs[i]); + _mesa_delete_program(ctx, sh->Programs[i]); + } + if (sh->Programs) + _mesa_free(sh->Programs); + _mesa_free(sh); +} + + /** * Lookup a GLSL shader object. */ diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h index 2f73bb8887..315f60a35f 100644 --- a/src/mesa/shader/shader_api.h +++ b/src/mesa/shader/shader_api.h @@ -46,7 +46,7 @@ _mesa_free_shader_program_data(GLcontext *ctx, struct gl_shader_program *shProg); extern void -_mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg); +_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg); extern struct gl_shader_program * _mesa_lookup_shader_program(GLcontext *ctx, GLuint name); @@ -55,6 +55,9 @@ _mesa_lookup_shader_program(GLcontext *ctx, GLuint name); extern struct gl_shader * _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type); +extern void +_mesa_free_shader(GLcontext *ctx, struct gl_shader *sh); + extern struct gl_shader * _mesa_lookup_shader(GLcontext *ctx, GLuint name); -- cgit v1.2.3 From d881a9c1365a085ecb1f7e3ee406a2ce3fbf854f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 09:31:07 -0700 Subject: Minor clean-ups, reformatting, comment changes. --- src/mesa/main/context.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 0e2a780476..eb5a0318de 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -976,7 +976,7 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss ) * Initialize fields of gl_current_attrib (aka ctx->Current.*) */ static void -_mesa_init_current( GLcontext *ctx ) +_mesa_init_current(GLcontext *ctx) { GLuint i; @@ -1019,7 +1019,7 @@ init_natives(struct gl_program_constants *prog) * some of these values (such as number of texture units). */ static void -_mesa_init_constants( GLcontext *ctx ) +_mesa_init_constants(GLcontext *ctx) { assert(ctx); @@ -1170,7 +1170,7 @@ check_context_limits(GLcontext *ctx) * functions for the more complex data structures. */ static GLboolean -init_attrib_groups( GLcontext *ctx ) +init_attrib_groups(GLcontext *ctx) { assert(ctx); @@ -1293,11 +1293,11 @@ alloc_dispatch_table(void) * \param driverContext pointer to driver-specific context data */ GLboolean -_mesa_initialize_context( GLcontext *ctx, - const GLvisual *visual, - GLcontext *share_list, - const struct dd_function_table *driverFunctions, - void *driverContext ) +_mesa_initialize_context(GLcontext *ctx, + const GLvisual *visual, + GLcontext *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext) { ASSERT(driverContext); assert(driverFunctions->NewTextureObject); @@ -1396,11 +1396,10 @@ _mesa_initialize_context( GLcontext *ctx, * \return pointer to a new __GLcontextRec or NULL if error. */ GLcontext * -_mesa_create_context( const GLvisual *visual, - GLcontext *share_list, - const struct dd_function_table *driverFunctions, - void *driverContext ) - +_mesa_create_context(const GLvisual *visual, + GLcontext *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext) { GLcontext *ctx; @@ -1855,12 +1854,11 @@ _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare) /** - * Get current context for the calling thread. - * - * \return pointer to the current GL context. + * \return pointer to the current GL context for this thread. * * Calls _glapi_get_context(). This isn't the fastest way to get the current - * context. If you need speed, see the #GET_CURRENT_CONTEXT macro in context.h. + * context. If you need speed, see the #GET_CURRENT_CONTEXT macro in + * context.h. */ GLcontext * _mesa_get_current_context( void ) @@ -1868,6 +1866,7 @@ _mesa_get_current_context( void ) return (GLcontext *) _glapi_get_context(); } + /** * Get context's current API dispatch table. * @@ -1907,7 +1906,7 @@ _mesa_get_dispatch(GLcontext *ctx) * This is called via _mesa_error(). */ void -_mesa_record_error( GLcontext *ctx, GLenum error ) +_mesa_record_error(GLcontext *ctx, GLenum error) { if (!ctx) return; @@ -1918,10 +1917,11 @@ _mesa_record_error( GLcontext *ctx, GLenum error ) /* Call device driver's error handler, if any. This is used on the Mac. */ if (ctx->Driver.Error) { - (*ctx->Driver.Error)( ctx ); + ctx->Driver.Error(ctx); } } + /** * Execute glFinish(). * @@ -1929,15 +1929,16 @@ _mesa_record_error( GLcontext *ctx, GLenum error ) * dd_function_table::Finish driver callback, if not NULL. */ void GLAPIENTRY -_mesa_Finish( void ) +_mesa_Finish(void) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->Driver.Finish) { - (*ctx->Driver.Finish)( ctx ); + ctx->Driver.Finish(ctx); } } + /** * Execute glFlush(). * @@ -1945,12 +1946,12 @@ _mesa_Finish( void ) * dd_function_table::Flush driver callback, if not NULL. */ void GLAPIENTRY -_mesa_Flush( void ) +_mesa_Flush(void) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->Driver.Flush) { - (*ctx->Driver.Flush)( ctx ); + ctx->Driver.Flush(ctx); } } -- cgit v1.2.3 From f2923613a40e07d06ce08d3355f3120d81b9e759 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 09:56:44 -0700 Subject: code re-org --- src/mesa/shader/shader_api.c | 313 +++++++++++++++++++++---------------------- 1 file changed, 155 insertions(+), 158 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 2d1056e667..7fb4a8ac43 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -47,6 +47,161 @@ +/** + * Allocate a new gl_shader_program object, initialize it. + */ +struct gl_shader_program * +_mesa_new_shader_program(GLcontext *ctx, GLuint name) +{ + struct gl_shader_program *shProg; + shProg = CALLOC_STRUCT(gl_shader_program); + if (shProg) { + shProg->Type = GL_SHADER_PROGRAM; + shProg->Name = name; + shProg->RefCount = 1; + } + return shProg; +} + + +void +_mesa_free_shader_program_data(GLcontext *ctx, + struct gl_shader_program *shProg) +{ + assert(shProg->Type == GL_SHADER_PROGRAM); + + if (shProg->VertexProgram) { + if (shProg->VertexProgram->Base.Parameters == shProg->Uniforms) { + /* to prevent a double-free in the next call */ + shProg->VertexProgram->Base.Parameters = NULL; + } + _mesa_delete_program(ctx, &shProg->VertexProgram->Base); + shProg->VertexProgram = NULL; + } + + if (shProg->FragmentProgram) { + if (shProg->FragmentProgram->Base.Parameters == shProg->Uniforms) { + /* to prevent a double-free in the next call */ + shProg->FragmentProgram->Base.Parameters = NULL; + } + _mesa_delete_program(ctx, &shProg->FragmentProgram->Base); + shProg->FragmentProgram = NULL; + } + + + if (shProg->Uniforms) { + _mesa_free_parameter_list(shProg->Uniforms); + shProg->Uniforms = NULL; + } + + if (shProg->Varying) { + _mesa_free_parameter_list(shProg->Varying); + shProg->Varying = NULL; + } +} + + + +void +_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) +{ + _mesa_free_shader_program_data(ctx, shProg); + _mesa_free(shProg); +} + + +/** + * Lookup a GLSL program object. + */ +struct gl_shader_program * +_mesa_lookup_shader_program(GLcontext *ctx, GLuint name) +{ + struct gl_shader_program *shProg; + if (name) { + shProg = (struct gl_shader_program *) + _mesa_HashLookup(ctx->Shared->ShaderObjects, name); + /* Note that both gl_shader and gl_shader_program objects are kept + * in the same hash table. Check the object's type to be sure it's + * what we're expecting. + */ + if (shProg && shProg->Type != GL_SHADER_PROGRAM) { + return NULL; + } + return shProg; + } + return NULL; +} + + +/** + * Allocate a new gl_shader object, initialize it. + */ +struct gl_shader * +_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) +{ + struct gl_shader *shader; + assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER); + shader = CALLOC_STRUCT(gl_shader); + if (shader) { + shader->Type = type; + shader->Name = name; + shader->RefCount = 1; + } + return shader; +} + + +void +_mesa_free_shader(GLcontext *ctx, struct gl_shader *sh) +{ + GLuint i; + if (sh->Source) + _mesa_free((void *) sh->Source); + if (sh->InfoLog) + _mesa_free(sh->InfoLog); + for (i = 0; i < sh->NumPrograms; i++) { + assert(sh->Programs[i]); + _mesa_delete_program(ctx, sh->Programs[i]); + } + if (sh->Programs) + _mesa_free(sh->Programs); + _mesa_free(sh); +} + + +/** + * Lookup a GLSL shader object. + */ +struct gl_shader * +_mesa_lookup_shader(GLcontext *ctx, GLuint name) +{ + if (name) { + struct gl_shader *sh = (struct gl_shader *) + _mesa_HashLookup(ctx->Shared->ShaderObjects, name); + /* Note that both gl_shader and gl_shader_program objects are kept + * in the same hash table. Check the object's type to be sure it's + * what we're expecting. + */ + if (sh && sh->Type == GL_SHADER_PROGRAM) { + assert(sh->Type == GL_VERTEX_SHADER || + sh->Type == GL_FRAGMENT_SHADER); + return NULL; + } + return sh; + } + return NULL; +} + + +void +_mesa_init_shader_state(GLcontext * ctx) +{ + ctx->Shader._FragmentShaderPresent = GL_FALSE; + ctx->Shader._VertexShaderPresent = GL_FALSE; +} + + + /** @@ -835,161 +990,3 @@ _mesa_validate_program(GLcontext *ctx, GLuint program) image units allowed. */ } - - - -/**********************************************************************/ - - -/** - * Allocate a new gl_shader_program object, initialize it. - */ -struct gl_shader_program * -_mesa_new_shader_program(GLcontext *ctx, GLuint name) -{ - struct gl_shader_program *shProg; - shProg = CALLOC_STRUCT(gl_shader_program); - if (shProg) { - shProg->Type = GL_SHADER_PROGRAM; - shProg->Name = name; - shProg->RefCount = 1; - } - return shProg; -} - - -void -_mesa_free_shader_program_data(GLcontext *ctx, - struct gl_shader_program *shProg) -{ - assert(shProg->Type == GL_SHADER_PROGRAM); - - if (shProg->VertexProgram) { - if (shProg->VertexProgram->Base.Parameters == shProg->Uniforms) { - /* to prevent a double-free in the next call */ - shProg->VertexProgram->Base.Parameters = NULL; - } - _mesa_delete_program(ctx, &shProg->VertexProgram->Base); - shProg->VertexProgram = NULL; - } - - if (shProg->FragmentProgram) { - if (shProg->FragmentProgram->Base.Parameters == shProg->Uniforms) { - /* to prevent a double-free in the next call */ - shProg->FragmentProgram->Base.Parameters = NULL; - } - _mesa_delete_program(ctx, &shProg->FragmentProgram->Base); - shProg->FragmentProgram = NULL; - } - - - if (shProg->Uniforms) { - _mesa_free_parameter_list(shProg->Uniforms); - shProg->Uniforms = NULL; - } - - if (shProg->Varying) { - _mesa_free_parameter_list(shProg->Varying); - shProg->Varying = NULL; - } -} - - - -void -_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) -{ - _mesa_free_shader_program_data(ctx, shProg); - _mesa_free(shProg); -} - - -/** - * Lookup a GLSL program object. - */ -struct gl_shader_program * -_mesa_lookup_shader_program(GLcontext *ctx, GLuint name) -{ - struct gl_shader_program *shProg; - if (name) { - shProg = (struct gl_shader_program *) - _mesa_HashLookup(ctx->Shared->ShaderObjects, name); - /* Note that both gl_shader and gl_shader_program objects are kept - * in the same hash table. Check the object's type to be sure it's - * what we're expecting. - */ - if (shProg && shProg->Type != GL_SHADER_PROGRAM) { - return NULL; - } - return shProg; - } - return NULL; -} - - -/** - * Allocate a new gl_shader object, initialize it. - */ -struct gl_shader * -_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) -{ - struct gl_shader *shader; - assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER); - shader = CALLOC_STRUCT(gl_shader); - if (shader) { - shader->Type = type; - shader->Name = name; - shader->RefCount = 1; - } - return shader; -} - - -void -_mesa_free_shader(GLcontext *ctx, struct gl_shader *sh) -{ - GLuint i; - if (sh->Source) - _mesa_free((void *) sh->Source); - if (sh->InfoLog) - _mesa_free(sh->InfoLog); - for (i = 0; i < sh->NumPrograms; i++) { - assert(sh->Programs[i]); - _mesa_delete_program(ctx, sh->Programs[i]); - } - if (sh->Programs) - _mesa_free(sh->Programs); - _mesa_free(sh); -} - - -/** - * Lookup a GLSL shader object. - */ -struct gl_shader * -_mesa_lookup_shader(GLcontext *ctx, GLuint name) -{ - if (name) { - struct gl_shader *sh = (struct gl_shader *) - _mesa_HashLookup(ctx->Shared->ShaderObjects, name); - /* Note that both gl_shader and gl_shader_program objects are kept - * in the same hash table. Check the object's type to be sure it's - * what we're expecting. - */ - if (sh && sh->Type == GL_SHADER_PROGRAM) { - assert(sh->Type == GL_VERTEX_SHADER || - sh->Type == GL_FRAGMENT_SHADER); - return NULL; - } - return sh; - } - return NULL; -} - - -void -_mesa_init_shader_state(GLcontext * ctx) -{ - ctx->Shader._FragmentShaderPresent = GL_FALSE; - ctx->Shader._VertexShaderPresent = GL_FALSE; -} -- cgit v1.2.3 From 79a340bc15e13643b1016d011556ba622dd18a5f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 09:57:56 -0700 Subject: use cast wrappers for sanity checking --- src/mesa/shader/slang/slang_link2.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index fa29e42706..d3d5394265 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -269,6 +269,23 @@ slang_resolve_branches(struct gl_program *prog) } +/** cast wrapper */ +static struct gl_vertex_program * +vertex_program(struct gl_program *prog) +{ + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + return (struct gl_vertex_program *) prog; +} + + +/** cast wrapper */ +static struct gl_fragment_program * +fragment_program(struct gl_program *prog) +{ + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + return (struct gl_fragment_program *) prog; +} + /** * Shader linker. Currently: @@ -305,9 +322,9 @@ _slang_link2(GLcontext *ctx, fragProg = NULL; for (i = 0; i < shProg->NumShaders; i++) { if (shProg->Shaders[i]->Type == GL_VERTEX_SHADER) - vertProg = (struct gl_vertex_program *) shProg->Shaders[i]->Programs[0]; + vertProg = vertex_program(shProg->Shaders[i]->Programs[0]); else if (shProg->Shaders[i]->Type == GL_FRAGMENT_SHADER) - fragProg = (struct gl_fragment_program *) shProg->Shaders[i]->Programs[0]; + fragProg = fragment_program(shProg->Shaders[i]->Programs[0]); else _mesa_problem(ctx, "unexpected shader target in slang_link2()"); } @@ -329,10 +346,10 @@ _slang_link2(GLcontext *ctx, * Make copies of the vertex/fragment programs now since we'll be * changing src/dst registers after merging the uniforms and varying vars. */ - shProg->VertexProgram = (struct gl_vertex_program *) - _mesa_clone_program(ctx, &vertProg->Base); - shProg->FragmentProgram = (struct gl_fragment_program *) - _mesa_clone_program(ctx, &fragProg->Base); + shProg->VertexProgram + = vertex_program(_mesa_clone_program(ctx, &vertProg->Base)); + shProg->FragmentProgram + = fragment_program(_mesa_clone_program(ctx, &fragProg->Base)); link_varying_vars(shProg, &shProg->VertexProgram->Base); link_varying_vars(shProg, &shProg->FragmentProgram->Base); -- cgit v1.2.3 From 2cc7dba718aa45ce446c63cf9a64cb88b1a3c39f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 12:41:59 -0700 Subject: New IR_COND node for evaluating conditional expressions (for if/while/for). --- src/mesa/shader/slang/slang_codegen.c | 11 +++++++++ src/mesa/shader/slang/slang_emit.c | 42 ++++++++++++++++++++++++++++------- src/mesa/shader/slang/slang_ir.h | 37 +++++++++++++++--------------- 3 files changed, 64 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 51bf26ada8..a2be043542 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -813,6 +813,14 @@ _slang_is_noop(const slang_operation *oper) } +static slang_ir_node * +_slang_gen_cond(slang_ir_node *n) +{ + slang_ir_node *c = new_node(IR_COND, n, NULL); + return c; +} + + /** * Assemble a function call, given a particular function name. * \param name the function's name (operators like '*' are possible). @@ -866,6 +874,7 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) startLab = new_label(startAtom); cond = _slang_gen_operation(A, &oper->children[0]); + cond = _slang_gen_cond(cond); tree = new_seq(startLab, cond); bra = new_cjump(endAtom); @@ -922,6 +931,7 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) tree = new_seq(init, startLab); cond = _slang_gen_operation(A, &oper->children[1]); + cond = _slang_gen_cond(cond); tree = new_seq(tree, cond); bra = new_cjump(endAtom); @@ -972,6 +982,7 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) slang_atom endifAtom = slang_atom_pool_gen(A->atoms, "__endif"); cond = _slang_gen_operation(A, &oper->children[0]); + cond = _slang_gen_cond(cond); /*assert(cond->Store);*/ bra = new_cjump(haveElseClause ? elseAtom : endifAtom); tree = new_seq(cond, bra); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index ba1290b45e..d7c224541a 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -85,6 +85,7 @@ static slang_ir_info IrInfo[] = { { IR_LABEL, "IR_LABEL", 0, 0, 0 }, { IR_JUMP, "IR_JUMP", 0, 0, 0 }, { IR_CJUMP, "IR_CJUMP", 0, 0, 0 }, + { IR_COND, "IR_COND", 0, 0, 0 }, { IR_CALL, "IR_CALL", 0, 0, 0 }, { IR_MOVE, "IR_MOVE", 0, 0, 1 }, { IR_NOT, "IR_NOT", 0, 1, 1 }, @@ -300,6 +301,10 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_LABEL: printf("LABEL: %s\n", n->Target); break; + case IR_COND: + printf("COND\n"); + slang_print_ir(n->Children[0], indent + 3); + break; case IR_JUMP: printf("JUMP %s\n", n->Target); break; @@ -897,12 +902,6 @@ emit_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store, n->Children[1]->Swizzle); inst->Comment = n->Comment; - - if (inst->Opcode == OPCODE_SGT) { - /* update cond codes */ - inst->CondUpdate = GL_TRUE; - } - return inst; } @@ -1075,7 +1074,6 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_EXP: case IR_EXP2: return emit_binop(gc, n, prog); - break; case IR_RSQ: case IR_RCP: case IR_FLOOR: @@ -1084,12 +1082,40 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_SIN: case IR_COS: return emit_unop(gc, n, prog); - break; case IR_LABEL: return emit_label(n->Target, prog); case IR_FLOAT: n->Store = alloc_constant(n->Value, 4, prog); /*XXX fix size */ break; + case IR_COND: + { + /* Conditional expression (in if/while/for stmts). + * Need to update condition code register. + * Next instruction is typically an IR_CJUMP. + */ + /* last child expr instruction: */ + struct prog_instruction *inst = emit(gc, n->Children[0], prog); + if (inst) { + /* set inst's CondUpdate flag */ + inst->CondUpdate = GL_TRUE; + return inst; /* XXX or null? */ + } + else { + /* This'll happen for things like "if (i) ..." where no code + * is normally generated for the expression "i". + * Generate a move instruction just to set condition codes. + */ + slang_alloc_temp_storage(gc, n, 1); + inst = new_instruction(prog, OPCODE_MOV); + inst->CondUpdate = GL_TRUE; + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, + n->Children[0]->Swizzle); + free_temporary(gc, n->Store->Index, n->Store->Size); + return inst; /* XXX or null? */ + } + } + return NULL; case IR_JUMP: return emit_jump(n->Target, prog); case IR_CJUMP: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 5c054a5636..188d7d96d3 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -44,11 +44,12 @@ typedef enum { IR_NOP = 0, - IR_SEQ, + IR_SEQ, /* sequence (eval left, then right) */ IR_LABEL, /* target of a jump or cjump */ IR_JUMP, /* unconditional jump */ IR_CJUMP, /* conditional jump */ - IR_CALL, + IR_COND, /* conditional expression */ + IR_CALL, /* call subroutine */ IR_MOVE, IR_ADD, IR_SUB, @@ -56,27 +57,27 @@ typedef enum IR_DIV, IR_DOT4, IR_DOT3, - IR_CROSS, + IR_CROSS, /* vec3 cross product */ IR_MIN, IR_MAX, - IR_SEQUAL, - IR_SNEQUAL, - IR_SGE, - IR_SGT, - IR_POW, - IR_EXP, - IR_EXP2, - IR_LOG2, - IR_RSQ, - IR_RCP, + IR_SEQUAL, /* Set if not equal */ + IR_SNEQUAL, /* Set if equal */ + IR_SGE, /* Set if greater or equal */ + IR_SGT, /* Set if greater than */ + IR_POW, /* x^y */ + IR_EXP, /* e^x */ + IR_EXP2, /* 2^x */ + IR_LOG2, /* log base 2 */ + IR_RSQ, /* 1/sqrt() */ + IR_RCP, /* recipricol */ IR_FLOOR, IR_FRAC, IR_ABS, - IR_SIN, - IR_COS, - IR_NOT, - IR_VAR, - IR_VAR_DECL, + IR_SIN, /* sine */ + IR_COS, /* cosine */ + IR_NOT, /* logical not */ + IR_VAR, /* variable reference */ + IR_VAR_DECL,/* var declaration */ IR_FLOAT, IR_FIELD, IR_I_TO_F -- cgit v1.2.3 From 83ca3ff384ac09524ff6946134cded4174590d92 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 17:17:38 -0700 Subject: added _mesa_print_parameter_list() --- src/mesa/shader/prog_print.c | 22 ++++++++++++++-------- src/mesa/shader/prog_print.h | 3 +++ 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 4cd55d0bca..07b383dc56 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -344,8 +344,6 @@ _mesa_print_program(const struct gl_program *prog) void _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog) { - GLint i; - _mesa_printf("InputsRead: 0x%x\n", prog->InputsRead); _mesa_printf("OutputsWritten: 0x%x\n", prog->OutputsWritten); _mesa_printf("NumInstructions=%d\n", prog->NumInstructions); @@ -363,13 +361,21 @@ _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog) _mesa_printf("%2d: %f, %f, %f, %f\n", i, p[0], p[1], p[2], p[3]); } #endif + _mesa_print_parameter_list(prog->Parameters); +} + - for (i = 0; i < prog->Parameters->NumParameters; i++){ - struct gl_program_parameter *param = prog->Parameters->Parameters + i; - const GLfloat *v = prog->Parameters->ParameterValues[i]; - _mesa_printf("param[%d] %s %s = {%.3f, %.3f, %.3f, %.3f};\n", - i, - program_file_string(prog->Parameters->Parameters[i].Type), +void +_mesa_print_parameter_list(const struct gl_program_parameter_list *list) +{ + GLuint i; + _mesa_printf("param list %p\n", (void *) list); + for (i = 0; i < list->NumParameters; i++){ + struct gl_program_parameter *param = list->Parameters + i; + const GLfloat *v = list->ParameterValues[i]; + _mesa_printf("param[%d] sz=%d %s %s = {%.3f, %.3f, %.3f, %.3f};\n", + i, param->Size, + program_file_string(list->Parameters[i].Type), param->Name, v[0], v[1], v[2], v[3]); } } diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h index 595a0dcf37..8bc2c69c6f 100644 --- a/src/mesa/shader/prog_print.h +++ b/src/mesa/shader/prog_print.h @@ -41,5 +41,8 @@ _mesa_print_program(const struct gl_program *prog); extern void _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog); +extern void +_mesa_print_parameter_list(const struct gl_program_parameter_list *list); + #endif /* PROG_PRINT_H */ -- cgit v1.2.3 From 3a8e2776a626c971bc02cd2ee3e576cb8b4267e9 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 17:19:16 -0700 Subject: Uniform matrix support. Implement _mesa_uniform_matrix() Support for program parameters/uniforms with more than 4 elements. Store 4x4 matrices in column-major order in registers. Update mat mul built-in functions accordingly. --- src/mesa/shader/prog_parameter.c | 60 +- src/mesa/shader/prog_parameter.h | 2 +- src/mesa/shader/shader_api.c | 109 ++-- src/mesa/shader/slang/library/slang_core.gc | 156 ++--- src/mesa/shader/slang/library/slang_core_gc.h | 848 +++++++++++++------------- src/mesa/shader/slang/slang_emit.c | 20 +- src/mesa/shader/slang/slang_link2.c | 30 +- 7 files changed, 638 insertions(+), 587 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 84e92d7ed0..cdc8a20001 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -66,36 +66,41 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) /** * Add a new parameter to a parameter list. + * Note that parameter values are usually 4-element GLfloat vectors. + * When size > 4 we'll allocate a sequential block of parameters to + * store all the values (in blocks of 4). + * * \param paramList the list to add the parameter to * \param name the parameter name, will be duplicated/copied! * \param values initial parameter value, up to 4 GLfloats - * \param size number of elements in 'values' vector (1..4) + * \param size number of elements in 'values' vector (1..4, or more) * \param type type of parameter, such as * \return index of new parameter in the list, or -1 if error (out of mem) */ GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], GLuint size, + const char *name, const GLfloat *values, GLuint size, enum register_file type) { - const GLuint n = paramList->NumParameters; + const GLuint oldNum = paramList->NumParameters; + const GLuint sz4 = (size + 3) / 4; /* no. of new param slots needed */ + + assert(size > 0); + assert(size <= 16); /* XXX anything larger than a matrix??? */ - if (n == paramList->Size) { - /* Need to grow the parameter list array */ - if (paramList->Size == 0) - paramList->Size = 8; - else - paramList->Size *= 2; + if (oldNum + sz4 > paramList->Size) { + /* Need to grow the parameter list array (alloc some extra) */ + paramList->Size = paramList->Size + 4 * sz4; /* realloc arrays */ paramList->Parameters = (struct gl_program_parameter *) _mesa_realloc(paramList->Parameters, - n * sizeof(struct gl_program_parameter), + oldNum * sizeof(struct gl_program_parameter), paramList->Size * sizeof(struct gl_program_parameter)); paramList->ParameterValues = (GLfloat (*)[4]) _mesa_align_realloc(paramList->ParameterValues, /* old buf */ - n * 4 * sizeof(GLfloat), /* old size */ + oldNum * 4 * sizeof(GLfloat), /* old size */ paramList->Size * 4 *sizeof(GLfloat), /* new sz */ 16); } @@ -108,17 +113,25 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, return -1; } else { - paramList->NumParameters = n + 1; + GLuint i; + + paramList->NumParameters = oldNum + sz4; - _mesa_memset(¶mList->Parameters[n], 0, - sizeof(struct gl_program_parameter)); + _mesa_memset(¶mList->Parameters[oldNum], 0, + sz4 * sizeof(struct gl_program_parameter)); - paramList->Parameters[n].Name = name ? _mesa_strdup(name) : NULL; - paramList->Parameters[n].Type = type; - paramList->Parameters[n].Size = size; - if (values) - COPY_4V(paramList->ParameterValues[n], values); - return (GLint) n; + for (i = 0; i < sz4; i++) { + struct gl_program_parameter *p = paramList->Parameters + oldNum + i; + p->Name = name ? _mesa_strdup(name) : NULL; + p->Type = type; + p->Size = size; + if (values) { + COPY_4V(paramList->ParameterValues[oldNum + i], values); + values += 4; + } + size -= 4; + } + return (GLint) oldNum; } } @@ -203,7 +216,6 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList, return i; } else { - assert(size == 4); i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); return i; } @@ -429,8 +441,9 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) /** Not too efficient, but correct */ for (i = 0; i < list->NumParameters; i++) { struct gl_program_parameter *p = list->Parameters + i; + GLuint size = MIN2(p->Size, 4); GLint j = _mesa_add_parameter(clone, p->Name, list->ParameterValues[i], - p->Size, p->Type); + size, p->Type); ASSERT(j >= 0); /* copy state indexes */ if (p->Type == PROGRAM_STATE_VAR) { @@ -440,6 +453,9 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) q->StateIndexes[k] = p->StateIndexes[k]; } } + else { + clone->Parameters[j].Size = p->Size; + } } return clone; diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index fb82757d83..6ce96c7972 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -77,7 +77,7 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list); extern GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat values[4], GLuint size, + const char *name, const GLfloat *values, GLuint size, enum register_file type); extern GLint diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 7fb4a8ac43..8daf585f7d 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -882,26 +882,34 @@ void _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, const GLvoid *values, GLenum type) { - if (ctx->Shader.CurrentProgram) { - struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; - if (location >= 0 && location < shProg->Uniforms->NumParameters) { - GLfloat *v = shProg->Uniforms->ParameterValues[location]; - const GLfloat *fValues = (const GLfloat *) values; /* XXX */ - GLint i; - if (type == GL_FLOAT_VEC4) - count *= 4; - else if (type == GL_FLOAT_VEC3) - count *= 3; - else - abort(); - - for (i = 0; i < count; i++) - v[i] = fValues[i]; - return; - } - } - else { + struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; + + if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); + return; + } + + if (location < 0 || location >= shProg->Uniforms->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(location)"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + + { + GLfloat *v = shProg->Uniforms->ParameterValues[location]; + const GLfloat *fValues = (const GLfloat *) values; /* XXX */ + GLint i; + if (type == GL_FLOAT_VEC4) + count *= 4; + else if (type == GL_FLOAT_VEC3) + count *= 3; + else + abort(); + + for (i = 0; i < count; i++) + v[i] = fValues[i]; + return; } } @@ -914,52 +922,45 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, GLenum matrixType, GLint location, GLsizei count, GLboolean transpose, const GLfloat *values) { - const char *caller = "glUniformMatrix"; - const GLint matElements = rows * cols; - + struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; + if (!shProg || !shProg->LinkStatus) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glUniformMatrix(program not linked)"); + return; + } + if (location < 0 || location >= shProg->Uniforms->NumParameters) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix(location)"); + return; + } if (values == NULL) { - _mesa_error(ctx, GL_INVALID_VALUE, caller); + _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix"); return; } FLUSH_VERTICES(ctx, _NEW_PROGRAM); + /* + * Note: the _columns_ of a matrix are stored in program registers, not + * the rows. + */ + /* XXXX need to test 3x3 and 2x2 matrices... */ if (transpose) { - GLfloat *trans, *pt; - const GLfloat *pv; - GLint i, j, k; - - trans = (GLfloat *) _mesa_malloc(count * matElements * sizeof(GLfloat)); - if (!trans) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, caller); - return; - } - - pt = trans; - pv = values; - for (i = 0; i < count; i++) { - /* transpose from pv matrix into pt matrix */ - for (j = 0; j < cols; j++) { - for (k = 0; k < rows; k++) { - /* XXX verify this */ - pt[j * rows + k] = pv[k * cols + j]; - } + GLuint row, col; + for (col = 0; col < cols; col++) { + GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; + for (row = 0; row < rows; row++) { + v[row] = values[col * rows + row]; } - pt += matElements; - pv += matElements; } - -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, trans, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif - _mesa_free(trans); } else { -#ifdef OLD - if (!(**pro).WriteUniform(pro, location, count, values, matrixType)) - _mesa_error(ctx, GL_INVALID_OPERATION, caller); -#endif + GLuint row, col; + for (col = 0; col < cols; col++) { + GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; + for (row = 0; row < rows; row++) { + v[row] = values[row * cols + col]; + } + } } } diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 3c4862baa1..6d733773c3 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -596,25 +596,34 @@ void __operator -= (inout mat3 m, const mat3 n) { m[2] -= n[2]; } -vec3 __operator * (const mat3 m, const vec3 v) + +//// dot (formerly in slang_common_builtin.gc) + +float dot(const float a, const float b) { - vec3 r1, r2, r3; - r1.x = m[0].x; - r1.y = m[1].x; - r1.z = m[2].x; - r2.x = m[0].y; - r2.y = m[1].y; - r2.z = m[2].y; - r3.x = m[0].z; - r3.y = m[1].z; - r3.z = m[2].z; - __asm vec3_dot __retVal.x, r1, v; - __asm vec3_dot __retVal.y, r2, v; - __asm vec3_dot __retVal.z, r3, v; + return a * b; +} + +float dot(const vec2 a, const vec2 b) +{ + return a.x * b.x + a.y * b.y; +} + +float dot(const vec3 a, const vec3 b) +{ + __asm vec3_dot __retVal, a, b; +} + +float dot(const vec4 a, const vec4 b) +{ + __asm vec4_dot __retVal, a, b; } + + + mat3 __operator * (const mat3 m, const mat3 n) { - return mat3 (m * n[0], m * n[1], m * n[2]); +// return mat3 (m * n[0], m * n[1], m * n[2]); } void __operator *= (inout mat3 m, const mat3 n) { @@ -643,57 +652,24 @@ void __operator -= (inout mat4 m, const mat4 n) { -//// dot (formerly in slang_common_builtin.gc) - -float dot(const float a, const float b) +vec4 __operator * (const mat4 mx, const vec4 v) { - return a * b; -} - -float dot(const vec2 a, const vec2 b) -{ - return a.x * b.x + a.y * b.y; -} - -float dot(const vec3 a, const vec3 b) -{ - __asm vec3_dot __retVal, a, b; + __retVal.x = dot(v, mx[0]); + __retVal.y = dot(v, mx[1]); + __retVal.z = dot(v, mx[2]); + __retVal.w = dot(v, mx[3]); } -float dot(const vec4 a, const vec4 b) +//matmul +vec3 __operator * (const mat3 m, const vec3 v) { - __asm vec4_dot __retVal, a, b; + __retVal.x = dot(v, m[0]); + __retVal.y = dot(v, m[1]); + __retVal.z = dot(v, m[2]); } - - -vec4 __operator * (const mat4 m, const vec4 v) -{ - vec4 r1, r2, r3, r4; - r1.x = m[0].x; - r1.y = m[1].x; - r1.z = m[2].x; - r1.w = m[3].x; - r2.x = m[0].y; - r2.y = m[1].y; - r2.z = m[2].y; - r2.w = m[3].y; - r3.x = m[0].z; - r3.y = m[1].z; - r3.z = m[2].z; - r3.w = m[3].z; - r4.x = m[0].w; - r4.y = m[1].w; - r4.z = m[2].w; - r4.w = m[3].w; - __asm vec4_dot __retVal.x, r1, v; - __asm vec4_dot __retVal.y, r2, v; - __asm vec4_dot __retVal.z, r3, v; - __asm vec4_dot __retVal.w, r4, v; -} - -// xxx move +// xxx move this mat4 __operator * (const mat4 m, const mat4 n) { return mat4 (m * n[0], m * n[1], m * n[2], m * n[3]); } @@ -864,28 +840,64 @@ void __operator *= (inout vec2 v, const mat2 m) { v = v * m; } -vec3 __operator * (const vec3 v, const mat3 m) { - return vec3 ( - v.x * m[0].x + v.y * m[0].y + v.z * m[0].z, - v.x * m[1].x + v.y * m[1].y + v.z * m[1].z, - v.x * m[2].x + v.y * m[2].y + v.z * m[2].z - ); -} - void __operator *= (inout vec3 v, const mat3 m) { - v = v * m; +// v = v * m; } vec4 __operator * (const vec4 v, const mat4 m) { - __retVal.x = dot(v, m[0]); - __retVal.y = dot(v, m[1]); - __retVal.z = dot(v, m[2]); - __retVal.w = dot(v, m[3]); + vec4 r1, r2, r3, r4; + r1.x = m[0].x; + r1.y = m[1].x; + r1.z = m[2].x; + r1.w = m[3].x; + r2.x = m[0].y; + r2.y = m[1].y; + r2.z = m[2].y; + r2.w = m[3].y; + r3.x = m[0].z; + r3.y = m[1].z; + r3.z = m[2].z; + r3.w = m[3].z; + r4.x = m[0].w; + r4.y = m[1].w; + r4.z = m[2].w; + r4.w = m[3].w; + __asm vec4_dot __retVal.x, r1, v; + __asm vec4_dot __retVal.y, r2, v; + __asm vec4_dot __retVal.z, r3, v; + __asm vec4_dot __retVal.w, r4, v; +} + +// matmul +vec3 __operator * (const vec3 v, const mat3 m) +{ + vec3 r1, r2, r3; + r1.x = m[0].x; + r1.y = m[1].x; + r1.z = m[2].x; + r2.x = m[0].y; + r2.y = m[1].y; + r2.z = m[2].y; + r3.x = m[0].z; + r3.y = m[1].z; + r3.z = m[2].z; + __asm vec3_dot __retVal.x, r1, v; + __asm vec3_dot __retVal.y, r2, v; + __asm vec3_dot __retVal.z, r3, v; } + + + + + + + + + void __operator *= (inout vec4 v, const mat4 m) { // xxx improve codegen for this case diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 68af99c886..ad7f8f5f0d 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -136,8 +136,94 @@ 57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16, 10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, 16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,114,49,0,0, -1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, +110,0,16,10,50,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98, +0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59, +120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0, +11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98, +0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14, +110,0,0,0,1,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, +0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24, +0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50, +0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8, +48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109, +0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16, +10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10, +49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109, +120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0, +0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, +57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18, +110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0, +18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, +0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18, +118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18, +118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9, +97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18, +118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9, +97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0, +18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, +118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9, +97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0, +18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18, +118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18, +118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18, +97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, +118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, +10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, +1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, +18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, +57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, +0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, +50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, +10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, +13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0, +59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0, +48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, +0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0, +0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1, +114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, +120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, +114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59, +122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, +20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18, +118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0, +0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, +51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0, +18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0, +0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, 114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, 57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, 18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, @@ -146,430 +232,340 @@ 100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, 51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, 101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, -0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48, -0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2, -3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14, -109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2, -1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110, -0,16,10,51,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0, -48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120, -0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98, -0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0, -0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, -114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, -57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, -18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59, -122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0, -20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16, -10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0, -59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18, -95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116, -0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,15,2,21,1,1,0,15, -109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18, -110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0, -0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0, -2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24, -0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0, -0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0, -1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1, -0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23, -0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59, -121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, -0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59, -122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23, -0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59, -122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, -0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21, -0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59, -121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1, -0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23, -0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59, -122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0, -22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109, -0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50, -0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2, -14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97, -0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, -18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, -57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, -0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, -0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, -51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18, -118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0, -48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0, -57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18, -109,0,48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, -120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18, -118,0,59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59, -120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10, -49,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18, -109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0, -1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21, -1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0, -18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111, -116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, -100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, -0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, -15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1, -4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0, -3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, -110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100, -100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0, -0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1, -121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0, -0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0, -18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8, -18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1, -99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95, -116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105, -112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, -18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, -0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18, -97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97, -116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116, -111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, -0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118, -0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120, -0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, -52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0, -59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109, +0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2, +27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0, +0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, +97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, +0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116, +95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5, +98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18, +98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97, +116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, +116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1, +120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0, +0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108, +111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111, +97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0, +1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95, +102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121, +0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10, +2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0, +1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, 117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, -119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12, -117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12, -2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0, -0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0, -1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, -59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, -117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22, -1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0, -49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1, -8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59, -121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0, -0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0, -59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7, -117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18, -117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1, -0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, -0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0, -1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, -121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0, -59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118, -0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18, -117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1, -0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121, -0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59, -119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, -59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117, -0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0, -13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49, -0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0, -0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0, -1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0, -1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110, -0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49, -20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, -120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, -58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27, -1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18, -117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18, -118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0, -10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, -0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98, -0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58, -118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1, -1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59, -121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18, -97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1, -0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0, -18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1, -0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47, -0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, -101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98, -0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0, -59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1, -0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59, -120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8, -58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0, -59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0, -59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2, -26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0, -18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12, -2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18, -118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1, -0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0, -18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0, -1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47, -0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0, -0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0, -48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0, -0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0, -18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99, -52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0, -18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101, -99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49, -0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97, -116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26, -1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109, -0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, -16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0, -16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116, -51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0, -16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0, -0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8, -48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14, -2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0, -18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110, -0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0, -9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98, -0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, -58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0, -18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, -51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57, -18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, -110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18, -97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, -0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, -47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, -16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0, -0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8, -48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18, -110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52, -0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18, -98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, -1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18, -97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10, -49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0, -1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0, -1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0, -1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0, -1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0, -1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0, -1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0, -1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0, -1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0, -1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0, -1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0, -1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0, -1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0, -1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, -0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, -121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18, -118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, -6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, -0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59, -121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18, -118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0, -13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0, -57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18, -109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58, -109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0, -18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1, -0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0, -59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0, -9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25, -1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0, -0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2, -8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118, -0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49, -0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, -52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0, -9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0, -2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16, -10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, -1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, -122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, -18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, -0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118, -0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0, -9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0, -0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1, -0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109, -0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, -0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, -2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0, -1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11, -118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, -0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, -25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, -0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, -118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, -61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, -9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, -0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, -1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, -59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, -0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, -1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, -0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, -1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, -0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, -0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, -1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, -57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2, -15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111, -97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0, -0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41, -0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, -116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97, -108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0, -5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0, -1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, -108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, -101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0, -0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1, -1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0, -15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97, -116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105, -0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0, -1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105, +117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, +122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1, +0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12, +118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2, +0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0, +0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, +59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118, +0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0, +6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18, +118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, +49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120, +0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59, +122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, +59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117, +0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, +118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0, +18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, +0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59, +122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, +99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, +59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8, +118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, +118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0, +18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, +0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, +122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118, +0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, +59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117, +0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0, +0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1, +1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1, +0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0, +16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0, +14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, +0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1, +1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0, +46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, +18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1, +8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2, +27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118, +0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0, +18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1, +1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48, +0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, +120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, +58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26, +1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18, +117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0, +18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0, +1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47, +0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1, +1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0, +48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48, +20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59, +120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0, +11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121, +0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0, +1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18, +117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117, +0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0, +18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, +118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0, +12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, +18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, +0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0, +18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0, +1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49, +0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0, +0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0, +57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1, +8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, +1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, +0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1, +0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1, +0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57, +46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1, +0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, +16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1, +1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10, +49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18, +109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, +116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0, +16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18, +109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0, +48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0, +16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1, +0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0, +49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1, +0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18, +110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0, +0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18, +98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10, +51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, +97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, +47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0, +16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1, +1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10, +49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15, +2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0, +18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18, +98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, +110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18, +97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50, +0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58, +118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0, +1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, +1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, +0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118, +101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8, +58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, +1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, +54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109, +97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109, +0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10, +50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54, +0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0, +2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16, +10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0, +1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59, +122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9, +18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, +0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118, +0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0, +9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0, +0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1, +0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109, +0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49, +0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118, +0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18, +118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0, +0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119, +0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0, +2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51, +0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, +122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, +9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18, +109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10, +51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52, +0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0, +52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, +118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, +0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, +109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, +1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, +0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, +0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, +11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, +0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, +24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, +0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, +118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, +60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, +1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, +0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, +1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, +18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, +0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, +0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, +1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, +4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, +32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, +39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, +114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, -0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, -0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index d7c224541a..39f470046b 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -191,7 +191,7 @@ storage_string(const slang_ir_storage *st) sprintf(s, "%s[%d..%d]", files[st->File], st->Index, st->Index + st->Size - 1); #endif - sprintf(s, "%s", files[st->File]); + sprintf(s, "%s[%d]", files[st->File], st->Index); return s; } @@ -533,15 +533,15 @@ slang_lookup_statevar(const char *name, GLint index, }; static const struct state_info state[] = { { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, { "gl_NormalMatrix", 3, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, STATE_MATRIX_INVTRANS } }, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, 0 } }, { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MVP, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_MVP, 0, 0, 0, 0 } }, { "gl_TextureMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, STATE_MATRIX_TRANSPOSE } }, + { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, 0 } }, { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } }; GLuint i; @@ -580,9 +580,9 @@ slang_lookup_statevar(const char *name, GLint index, static GLint -slang_alloc_uniform(struct gl_program *prog, const char *name) +slang_alloc_uniform(struct gl_program *prog, const char *name, GLuint size) { - GLint i = _mesa_add_uniform(prog->Parameters, name, 4); + GLint i = _mesa_add_uniform(prog->Parameters, name, size); return i; } @@ -736,7 +736,9 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, /* probably a uniform or varying */ if (n->Var->type.qualifier == slang_qual_uniform) { - i = slang_alloc_uniform(prog, (char *) n->Var->a_name); + GLint size = n->Store->Size; + assert(size > 0); + i = slang_alloc_uniform(prog, (char *) n->Var->a_name, size); if (i >= 0) { n->Store->File = PROGRAM_UNIFORM; n->Store->Index = i; diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index d3d5394265..81a1875548 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -147,15 +147,20 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) { GLuint *map, i; +#if 0 + _mesa_print_parameter_list(prog->Parameters); +#endif + map = (GLuint *) malloc(prog->Parameters->NumParameters * sizeof(GLuint)); if (!map) return GL_FALSE; - for (i = 0; i < prog->Parameters->NumParameters; i++) { + for (i = 0; i < prog->Parameters->NumParameters; /* incr below*/) { /* see if this uniform is in the linked uniform list */ const struct gl_program_parameter *p = prog->Parameters->Parameters + i; const GLfloat *pVals = prog->Parameters->ParameterValues[i]; GLint j; + GLint size; /* sanity check */ assert(is_uniform(p->Type)); @@ -177,13 +182,16 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) if (j >= 0) { /* already in list, check size XXX check this */ +#if 0 assert(p->Size == shProg->Uniforms->Parameters[j].Size); +#endif } else { /* not already in linked list */ switch (p->Type) { case PROGRAM_ENV_PARAM: j = _mesa_add_named_parameter(shProg->Uniforms, p->Name, pVals); + break; case PROGRAM_CONSTANT: j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size); break; @@ -200,11 +208,27 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) } ASSERT(j >= 0); - map[i] = j; + size = p->Size; + while (size > 0) { + map[i] = j; + i++; + j++; + size -= 4; + } + } +#if 0 + { + GLuint i; + for (i = 0; i < prog->Parameters->NumParameters; i++) { + printf("map[%d] = %d\n", i, map[i]); + } + _mesa_print_parameter_list(shProg->Uniforms); + } +#endif - /* OK, now scan the program/shader instructions looking for varying vars, + /* OK, now scan the program/shader instructions looking for uniform vars, * replacing the old index with the new index. */ for (i = 0; i < prog->NumInstructions; i++) { -- cgit v1.2.3 From 2a62cbd24b02b0c222d9857ccf9a13e5e167f03a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 17:19:45 -0700 Subject: handle PROGRAM_UNIFORM, fix a _mesa_problem() call --- src/mesa/tnl/t_vb_arbprogram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index ef7b9eaa6c..906fd3f1e8 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -859,6 +859,7 @@ static struct reg cvp_load_reg( struct compilation *cp, case PROGRAM_STATE_VAR: case PROGRAM_CONSTANT: + case PROGRAM_UNIFORM: reg = cvp_make_reg(FILE_STATE_PARAM, index); if (rel) return cvp_emit_rel(cp, reg, tmpreg); @@ -870,7 +871,7 @@ static struct reg cvp_load_reg( struct compilation *cp, case PROGRAM_WRITE_ONLY: case PROGRAM_ADDRESS: default: - _mesa_problem(NULL, "Invalid register file %d in cvp_load_reg()"); + _mesa_problem(NULL, "Invalid register file %d in cvp_load_reg()", file); assert(0); return tmpreg; /* can't happen */ } -- cgit v1.2.3 From 8d239a6880d347b30010330a630be5493e8610d6 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 17:43:56 -0700 Subject: Checkpoing: re-organization of basic arithmetic functions. --- src/mesa/shader/slang/library/slang_core.gc | 519 ++++++++++-------- src/mesa/shader/slang/library/slang_core_gc.h | 758 +++++++++++++------------- 2 files changed, 667 insertions(+), 610 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 6d733773c3..437040b330 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -110,6 +110,10 @@ vec4 vec4(const float a1, const float b1, const float c1, const float d1) __retVal.w = d1; } +//// +//// Assorted constructors +//// + int __constructor (const float f) { int i; __asm float_to_int i, f; @@ -326,51 +330,256 @@ mat4 __constructor (const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) } -//// operator += -void __operator += (inout float a, const float b) +//// Basic int operators + +int __operator + (const int a, const int b) { - __asm vec4_add a.x, a, b; + float x, y; + int c; + __asm int_to_float x, a; + __asm int_to_float y, b; + __asm float_add x, x, y; + __asm float_to_int c, x; + return c; } -void __operator -= (inout float a, const float b) +int __operator - (const int a, const int b) { - __asm vec4_subtract a.x, a, b; + float x, y; + int c; + __asm int_to_float x, a; + __asm int_to_float y, b; + __asm float_negate y, y; + __asm float_add x, x, y; + __asm float_to_int c, x; + return c; } -void __operator *= (inout float a, const float b) +int __operator * (const int a, const int b) { - __asm vec4_multiply a.x, a, b; + float x, y; + int c; + __asm int_to_float x, a; + __asm int_to_float y, b; + __asm float_multiply x, x, y; + __asm float_to_int c, x; + return c; } -void __operator /= (inout float a, const float b) +int __operator / (const int a, const int b) { - float w; // = 1 / b - __asm float_rcp w.x, b; - __asm vec4_multiply a.x, a, w; + float x, y; + int c; + __asm int_to_float x, a; + __asm int_to_float y, b; + __asm float_divide x, x, y; + __asm float_to_int c, x; + return c; } +//// Basic ivec2 operators -float __operator - (const float a) { +ivec2 __operator + (const ivec2 v, const ivec2 u) +{ + return ivec2 (v.x + u.x, v.y + u.y); +} + +ivec2 __operator - (const ivec2 v, const ivec2 u) +{ + return ivec2 (v.x - u.x, v.y - u.y); +} + +ivec2 __operator * (const ivec2 v, const ivec2 u) +{ + return ivec2 (v.x * u.x, v.y * u.y); +} + +ivec2 __operator / (const ivec2 v, const ivec2 u) +{ + return ivec2 (v.x / u.x, v.y / u.y); +} + + +//// Basic ivec3 operators + +ivec3 __operator + (const ivec3 v, const ivec3 u) +{ + return ivec3 (v.x + u.x, v.y + u.y, v.z + u.z); +} + +ivec3 __operator - (const ivec3 v, const ivec3 u) +{ + return ivec3 (v.x - u.x, v.y - u.y, v.z - u.z); +} + +ivec3 __operator * (const ivec3 v, const ivec3 u) +{ + return ivec3 (v.x * u.x, v.y * u.y, v.z * u.z); +} + +ivec3 __operator / (const ivec3 v, const ivec3 u) +{ + return ivec3 (v.x / u.x, v.y / u.y, v.z / u.z); +} + + +//// Basic ivec4 operators + +ivec4 __operator + (const ivec4 v, const ivec4 u) +{ + return ivec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w); +} + +ivec4 __operator - (const ivec4 v, const ivec4 u) +{ + return ivec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w); +} + +ivec4 __operator * (const ivec4 v, const ivec4 u) +{ + return ivec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w); +} + +ivec4 __operator / (const ivec4 v, const ivec4 u) +{ + return ivec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w); +} + + +//// Basic float operators + +float __operator + (const float a, const float b) +{ +// __asm float_add __retVal, a, b; + __asm vec4_add __retVal.x, a, b; +} + +float __operator - (const float a, const float b) +{ + __asm vec4_subtract __retVal.x, a, b; +} + +float __operator * (const float a, const float b) +{ + __asm float_multiply __retVal, a, b; +} + +float __operator / (const float a, const float b) +{ + __asm float_divide __retVal, a, b; +} + + +//// Basic vec2 operators + +vec2 __operator + (const vec2 v, const vec2 u) +{ + __asm vec4_add __retVal.xy, v, u; +} + +vec2 __operator - (const vec2 v, const vec2 u) +{ + __asm vec4_subtract __retVal.xy, v, u; +} + +vec2 __operator * (const vec2 v, const vec2 u) +{ + __asm vec4_multiply __retVal.xy, v, u; +} + +vec2 __operator / (const vec2 v, const vec2 u) +{ + vec2 w; // = 1 / u + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm vec4_multiply __retVal.xy, v, w; +} + + +//// Basic vec3 operators + +vec3 __operator + (const vec3 v, const vec3 u) +{ + __asm vec4_add __retVal.xyz, v, u; +} + +vec3 __operator - (const vec3 v, const vec3 u) +{ + __asm vec4_subtract __retVal.xyz, v, u; +} + +vec3 __operator * (const vec3 v, const vec3 u) +{ + __asm vec4_multiply __retVal.xyz, v, u; +} + +vec3 __operator / (const vec3 v, const vec3 u) +{ + vec3 w; // = 1 / u + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm float_rcp w.z, u.z; + __asm vec4_multiply __retVal.xyz, v, w; +} + + +//// Basic vec4 operators + +vec4 __operator + (const vec4 v, const vec4 u) +{ + __asm vec4_add __retVal, v, u; +} + +vec4 __operator - (const vec4 v, const vec4 u) +{ + __asm vec4_subtract __retVal, v, u; +} + +vec4 __operator * (const vec4 v, const vec4 u) +{ + __asm vec4_multiply __retVal, v, u; +} + +vec4 __operator / (const vec4 v, const vec4 u) +{ + vec4 w; // = 1 / u + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm float_rcp w.z, u.z; + __asm float_rcp w.w, u.w; + __asm vec4_multiply __retVal, v, w; +} + + + +//// Unary negation operator + +float __operator - (const float a) +{ float b; __asm float_negate b, a; return b; } -float __operator + (const float a, const float b) { -// float c; -// __asm float_add c, a, b; -// return c; -//bp: - __asm float_add __retVal, a, b; +vec2 __operator - (const vec2 v) +{ + return vec2 (-v.x, -v.y); } -void __operator += (inout int a, const int b) { - a = int (float (a) + float (b)); +vec3 __operator - (const vec3 v) +{ + return vec3 (-v.x, -v.y, -v.z); } -int __operator - (const int a) { +vec4 __operator - (const vec4 v) +{ + return vec4 (-v.x, -v.y, -v.z, -v.w); +} + +int __operator - (const int a) +{ float x; int b; __asm int_to_float x, a; @@ -379,29 +588,69 @@ int __operator - (const int a) { return b; } +ivec2 __operator - (const ivec2 v) +{ + return ivec2 (-v.x, -v.y); +} + +ivec3 __operator - (const ivec3 v) +{ + return ivec3 (-v.x, -v.y, -v.z); +} + +ivec4 __operator - (const ivec4 v) +{ + return ivec4 (-v.x, -v.y, -v.z, -v.w); +} + + + + + + + +//// operator += + +void __operator += (inout float a, const float b) +{ + __asm vec4_add a.x, a, b; +} + +void __operator -= (inout float a, const float b) +{ + __asm vec4_subtract a.x, a, b; +} + +void __operator *= (inout float a, const float b) +{ + __asm vec4_multiply a.x, a, b; +} + +void __operator /= (inout float a, const float b) +{ + float w; // = 1 / b + __asm float_rcp w.x, b; + __asm vec4_multiply a.x, a, w; +} + + + + +void __operator += (inout int a, const int b) { + a = int (float (a) + float (b)); +} + + void __operator -= (inout int a, const int b) { a += -b; } -float __operator * (const float a, const float b) { -// float c; -// __asm float_multiply c, a, b; -// return c; -//bp: - __asm float_multiply __retVal, a, b; -} + void __operator *= (inout int a, const int b) { a = int (float (a) * float (b)); } -float __operator / (const float a, const float b) { -// float c; -// __asm float_divide c, a, b; -// return c; -//bp: - __asm float_divide __retVal, a, b; -} void __operator /= (inout int a, const int b) { a = int (float (a) / float (b)); @@ -622,7 +871,9 @@ float dot(const vec4 a, const vec4 b) -mat3 __operator * (const mat3 m, const mat3 n) { +mat3 __operator * (const mat3 m, const mat3 n) +{ +// XXX fix // return mat3 (m * n[0], m * n[1], m * n[2]); } @@ -905,184 +1156,9 @@ void __operator *= (inout vec4 v, const mat4 m) } -float __operator - (const float a, const float b) -{ - __asm vec4_subtract __retVal.x, a, b; -} - - -int __operator + (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm float_add x, x, y; - __asm float_to_int c, x; - return c; -} - -int __operator - (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm float_negate y, y; - __asm float_add x, x, y; - __asm float_to_int c, x; - return c; -} - -int __operator * (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm float_multiply x, x, y; - __asm float_to_int c, x; - return c; -} - -int __operator / (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm float_divide x, x, y; - __asm float_to_int c, x; - return c; -} -//// vec2 +,-,*,/ - -vec2 __operator + (const vec2 v, const vec2 u) -{ - __asm vec4_add __retVal.xy, v, u; -} - -vec2 __operator - (const vec2 v, const vec2 u) -{ - __asm vec4_subtract __retVal.xy, v, u; -} - -vec2 __operator * (const vec2 v, const vec2 u) -{ - __asm vec4_multiply __retVal.xy, v, u; -} - -vec2 __operator / (const vec2 v, const vec2 u) -{ - vec2 w; // = 1 / u - __asm float_rcp w.x, u.x; - __asm float_rcp w.y, u.y; - __asm vec4_multiply __retVal.xy, v, w; -} - - -//// vec3 +,-,*,/ - -vec3 __operator + (const vec3 v, const vec3 u) -{ - __asm vec4_add __retVal.xyz, v, u; -} - -vec3 __operator - (const vec3 v, const vec3 u) -{ - __asm vec4_subtract __retVal.xyz, v, u; -} - -vec3 __operator * (const vec3 v, const vec3 u) -{ - __asm vec4_multiply __retVal.xyz, v, u; -} - -vec3 __operator / (const vec3 v, const vec3 u) -{ - vec3 w; // = 1 / u - __asm float_rcp w.x, u.x; - __asm float_rcp w.y, u.y; - __asm float_rcp w.z, u.z; - __asm vec4_multiply __retVal.xyz, v, w; -} - - -//// vec4 +,-,*,/ - -vec4 __operator + (const vec4 v, const vec4 u) -{ - __asm vec4_add __retVal, v, u; -} - -vec4 __operator - (const vec4 v, const vec4 u) -{ - __asm vec4_subtract __retVal, v, u; -} - -vec4 __operator * (const vec4 v, const vec4 u) -{ - __asm vec4_multiply __retVal, v, u; -} - -vec4 __operator / (const vec4 v, const vec4 u) -{ - vec4 w; // = 1 / u - __asm float_rcp w.x, u.x; - __asm float_rcp w.y, u.y; - __asm float_rcp w.z, u.z; - __asm float_rcp w.w, u.w; - __asm vec4_multiply __retVal, v, w; -} - - - -ivec2 __operator + (const ivec2 v, const ivec2 u) { - return ivec2 (v.x + u.x, v.y + u.y); -} - -ivec2 __operator - (const ivec2 v, const ivec2 u) { - return ivec2 (v.x - u.x, v.y - u.y); -} - -ivec2 __operator * (const ivec2 v, const ivec2 u) { - return ivec2 (v.x * u.x, v.y * u.y); -} - -ivec2 __operator / (const ivec2 v, const ivec2 u) { - return ivec2 (v.x / u.x, v.y / u.y); -} - -ivec3 __operator + (const ivec3 v, const ivec3 u) { - return ivec3 (v.x + u.x, v.y + u.y, v.z + u.z); -} - -ivec3 __operator - (const ivec3 v, const ivec3 u) { - return ivec3 (v.x - u.x, v.y - u.y, v.z - u.z); -} - -ivec3 __operator * (const ivec3 v, const ivec3 u) { - return ivec3 (v.x * u.x, v.y * u.y, v.z * u.z); -} - -ivec3 __operator / (const ivec3 v, const ivec3 u) { - return ivec3 (v.x / u.x, v.y / u.y, v.z / u.z); -} - -ivec4 __operator + (const ivec4 v, const ivec4 u) { - return ivec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w); -} - -ivec4 __operator - (const ivec4 v, const ivec4 u) { - return ivec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w); -} - -ivec4 __operator * (const ivec4 v, const ivec4 u) { - return ivec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w); -} - -ivec4 __operator / (const ivec4 v, const ivec4 u) { - return ivec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w); -} mat2 __operator + (const mat2 m, const mat2 n) { return mat2 (m[0] + n[0], m[1] + n[1]); @@ -1437,29 +1513,10 @@ ivec4 __operator / (const ivec4 v, const int b) { return v / ivec4 (b); } -vec2 __operator - (const vec2 v) { - return vec2 (-v.x, -v.y); -} +///foo -vec3 __operator - (const vec3 v) { - return vec3 (-v.x, -v.y, -v.z); -} -vec4 __operator - (const vec4 v) { - return vec4 (-v.x, -v.y, -v.z, -v.w); -} -ivec2 __operator - (const ivec2 v) { - return ivec2 (-v.x, -v.y); -} - -ivec3 __operator - (const ivec3 v) { - return ivec3 (-v.x, -v.y, -v.z); -} - -ivec4 __operator - (const ivec4 v) { - return ivec4 (-v.x, -v.y, -v.z, -v.w); -} mat2 __operator - (const mat2 m) { return mat2 (-m[0], -m[1]); diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index ad7f8f5f0d..99fe5d8155 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -57,53 +57,133 @@ 114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, 0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95, 114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,114,51,0,20,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100, -0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2, -9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0, -0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0, -9,1,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0, -1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58, -105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0, -0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95, -102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18, -120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18, -98,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0, -9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97, -0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0, -20,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5, -98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18, -117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0, -10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22, -0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18, -118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2, -11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0, -11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22, -0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18, -118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18, -117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, -12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23, -0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2, -4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117, -0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0, -2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59, +0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0, +0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, +110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100, +100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0, +0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1, +121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0, +0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95, +110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0, +18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8, +18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1, +99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95, +116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105, +112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, +18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, +0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18, +97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97, +116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116, +111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0, +0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, +59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118, +0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0, +6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18, +118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, +49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120, +0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59, +122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, +59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117, +0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, +118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0, +18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, +0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59, +122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, +99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, +59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8, +118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, +118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0, +18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, +0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, +122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118, +0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, +59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117, +0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1, +0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97, +116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, +0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0, +10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118, +0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120, +0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, +52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1, +0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11, +117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0, +59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, +119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12, +117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12, +2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0, +0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0, +0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0, +1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0, +18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0, +59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0, +18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12, +118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0, +54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0, +0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116, +95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116, +0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18, +118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101, +99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1, +0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59, +122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, +52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, +119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,5,97, +0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, +111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98, +0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111, +97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1, +1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, +116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120, +0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1, +1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121, +0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23, +0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1, +0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0, +18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1, +0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1, +9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0, +59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117, +0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9, +18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18, +118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122, +0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1, +1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121, +0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0, +0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, +59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18, +117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, +59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0, +0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59, 121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0, 18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1, 0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0, @@ -232,340 +312,260 @@ 100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, 51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, 101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, -0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2, -27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95, -114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0, -0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, -0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116, -95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5, -98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18, -98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97, -116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, -116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1, -120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0, -0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108, -111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111, -97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0, -1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95, -102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121, -0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,10, -2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0, -1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, -122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1, -0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12, -118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2, -0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0, -0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, -59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118, -0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0, -6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18, -118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, -49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120, -0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59, -122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, -59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117, -0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, -118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0, -18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, -0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59, -122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, -99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, -59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8, -118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, -118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0, -18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, -0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, -122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118, -0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, -59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117, -0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0, -0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1, -1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1, -0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0, -14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, -110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, -0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1, -1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0, -46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, -18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1, -8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2, -27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118, -0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0, -18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1, -1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48, -0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59, -120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8, -58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26, -1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18, -117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0, -0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, -59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0, -18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0, -1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47, -0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1, -1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0, -48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48, -20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59, -120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0, -11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121, -0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0, -1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18, -117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0, -0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, -59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117, -0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0, -18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, -118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0, -12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, -18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, -0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0, -18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0, -1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49, -0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0, -0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0, -57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1, -8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, -1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, -0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1, -0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1, -0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57, -46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1, -0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, -16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1, -1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10, -49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0, -0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18, -109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, -116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0, -16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18, -109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0, -48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0, -16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1, -0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0, -49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1, -0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18, -110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0, -0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18, -98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10, -51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0, -16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1, -1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10, -49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15, -2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0, -18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18, -98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, -110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18, -97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50, -0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58, -118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0, -1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, -1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54, -0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118, -101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, -1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, -54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109, -97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109, -0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10, -50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54, -0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0, -2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16, -10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0, -1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59, -122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9, -18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, -0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118, -0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0, -9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0, -0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1, -0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109, -0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49, -0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118, -0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18, -118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0, -0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119, -0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0, -2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51, -0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, -122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, -9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18, -109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10, -51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52, -0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0, -52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, -2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, -118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, -122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, -1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, -0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, -0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, -0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, -109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, -1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, -0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, -0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, -11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, -118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, -0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, -24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, -0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, -118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, -60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, -1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, -108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, -1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, -0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, -18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, -18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, -0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, -0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, -1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, -4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, -32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, -39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, -105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, -114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2, +26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8, +48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0, +1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0, +1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0, +0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1, +1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0, +0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0, +0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10, +51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118, +101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0, +10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121, +0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0, +18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0, +0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0, +48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, +101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0, +9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0, +59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0, +59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117, +0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0, +18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0, +18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0, +1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47, +0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0, +1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0, +47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118, +101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122, +0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97, +0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59, +121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8, +58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0, +18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18, +117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0, +59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0, +59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59, +119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18, +97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0, +18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0, +18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18, +118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99, +52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0, +18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18, +118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0, +12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0, +18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1, +1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49, +0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1, +1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10, +49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0, +16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1, +0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49, +0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8, +48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13, +110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57, +48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0, +57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110, +0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49, +0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0, +0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18, +97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, +0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97, +0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47, +0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57, +18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14, +2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0, +18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, +49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, +110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, +16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, +52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, +50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, +109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, +0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, +16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, +0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, +47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, +57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, +18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, +18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, +97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, +50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, +0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, +16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, +0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +49,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0, +16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, +57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0, +0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50, +0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0, +22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9, +18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59, +120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9, +18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0, +0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1, +0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0, +0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0, +52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18, +109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, +16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8, +48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57, +52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1, +9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, +121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, +18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, +121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18, +118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0, +51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0, +59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2, +24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1, +0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50, +0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, +51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0, +5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1, +0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0, +1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2, +25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0, +61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52, +0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0, +0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18, +118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18, +118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, +116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0, +1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109, +0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18, +109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51, +0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, +51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, +0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, +122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49, +0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18, +109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0, +0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97, +0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0, +0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2, +16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, +102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95, +101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0, +5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, +0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, +111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113, +117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0, +1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0, +0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0, +0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, +108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, +1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, 118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, 59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, 69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, 9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, -57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, +65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, +0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, +0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From cec316c9eba31e31fc742a7610b2e67fcac52547 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 17:55:42 -0700 Subject: checkpoint: more basic math operator re-org --- src/mesa/shader/slang/library/slang_core.gc | 206 ++++--- src/mesa/shader/slang/library/slang_core_gc.h | 832 +++++++++++++------------- 2 files changed, 530 insertions(+), 508 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 437040b330..d99eb10a8b 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -605,201 +605,249 @@ ivec4 __operator - (const ivec4 v) +//// dot product - - - -//// operator += - -void __operator += (inout float a, const float b) +float dot(const float a, const float b) { - __asm vec4_add a.x, a, b; + return a * b; } -void __operator -= (inout float a, const float b) +float dot(const vec2 a, const vec2 b) { - __asm vec4_subtract a.x, a, b; + return a.x * b.x + a.y * b.y; } -void __operator *= (inout float a, const float b) +float dot(const vec3 a, const vec3 b) { - __asm vec4_multiply a.x, a, b; + __asm vec3_dot __retVal, a, b; } -void __operator /= (inout float a, const float b) +float dot(const vec4 a, const vec4 b) { - float w; // = 1 / b - __asm float_rcp w.x, b; - __asm vec4_multiply a.x, a, w; + __asm vec4_dot __retVal, a, b; } -void __operator += (inout int a, const int b) { +//// int assignment operators + +void __operator += (inout int a, const int b) +{ a = int (float (a) + float (b)); } - -void __operator -= (inout int a, const int b) { +void __operator -= (inout int a, const int b) +{ a += -b; } - - -void __operator *= (inout int a, const int b) { +void __operator *= (inout int a, const int b) +{ a = int (float (a) * float (b)); } - -void __operator /= (inout int a, const int b) { +void __operator /= (inout int a, const int b) +{ a = int (float (a) / float (b)); } -void __operator += (inout vec2 v, const vec2 u) { + +//// ivec2 assignment operators + +void __operator += (inout ivec2 v, const ivec2 u) +{ v.x += u.x; v.y += u.y; } -void __operator -= (inout vec2 v, const vec2 u) { +void __operator -= (inout ivec2 v, const ivec2 u) +{ v.x -= u.x; v.y -= u.y; } -void __operator *= (inout vec2 v, const vec2 u) { +void __operator *= (inout ivec2 v, const ivec2 u) +{ v.x *= u.x; v.y *= u.y; } -void __operator /= (inout vec2 v, const vec2 u) { +void __operator /= (inout ivec2 v, const ivec2 u) +{ v.x /= u.x; v.y /= u.y; } -void __operator += (inout vec3 v, const vec3 u) { + +//// ivec3 assignment operators + +void __operator += (inout ivec3 v, const ivec3 u) +{ v.x += u.x; v.y += u.y; v.z += u.z; } -void __operator -= (inout vec3 v, const vec3 u) { +void __operator -= (inout ivec3 v, const ivec3 u) +{ v.x -= u.x; v.y -= u.y; v.z -= u.z; } -void __operator *= (inout vec3 v, const vec3 u) { +void __operator *= (inout ivec3 v, const ivec3 u) +{ v.x *= u.x; v.y *= u.y; v.z *= u.z; } -void __operator /= (inout vec3 v, const vec3 u) { +void __operator /= (inout ivec3 v, const ivec3 u) +{ v.x /= u.x; v.y /= u.y; v.z /= u.z; } -void __operator += (inout vec4 v, const vec4 u) { + +//// ivec4 assignment operators + +void __operator += (inout ivec4 v, const ivec4 u) { v.x += u.x; v.y += u.y; v.z += u.z; v.w += u.w; } -void __operator -= (inout vec4 v, const vec4 u) { +void __operator -= (inout ivec4 v, const ivec4 u) { v.x -= u.x; v.y -= u.y; v.z -= u.z; v.w -= u.w; } -void __operator *= (inout vec4 v, const vec4 u) { +void __operator *= (inout ivec4 v, const ivec4 u) { v.x *= u.x; v.y *= u.y; v.z *= u.z; v.w *= u.w; } -void __operator /= (inout vec4 v, const vec4 u) { +void __operator /= (inout ivec4 v, const ivec4 u) { v.x /= u.x; v.y /= u.y; v.z /= u.z; v.w /= u.w; } -void __operator += (inout ivec2 v, const ivec2 u) { + +//// float assignment operators + +void __operator += (inout float a, const float b) +{ + __asm vec4_add a.x, a, b; +} + +void __operator -= (inout float a, const float b) +{ + __asm vec4_subtract a.x, a, b; +} + +void __operator *= (inout float a, const float b) +{ + __asm vec4_multiply a.x, a, b; +} + +void __operator /= (inout float a, const float b) +{ + float w; // = 1 / b + __asm float_rcp w.x, b; + __asm vec4_multiply a.x, a, w; +} + + +//// vec2 assignment operators + +void __operator += (inout vec2 v, const vec2 u) +{ v.x += u.x; v.y += u.y; } -void __operator -= (inout ivec2 v, const ivec2 u) { +void __operator -= (inout vec2 v, const vec2 u) +{ v.x -= u.x; v.y -= u.y; } -void __operator *= (inout ivec2 v, const ivec2 u) { +void __operator *= (inout vec2 v, const vec2 u) +{ v.x *= u.x; v.y *= u.y; } -void __operator /= (inout ivec2 v, const ivec2 u) { +void __operator /= (inout vec2 v, const vec2 u) +{ v.x /= u.x; v.y /= u.y; } -void __operator += (inout ivec3 v, const ivec3 u) { - v.x += u.x; - v.y += u.y; - v.z += u.z; + +//// vec3 assignment operators + +void __operator += (inout vec3 v, const vec3 u) +{ + __asm vec4_add v.xyz, v, u; } -void __operator -= (inout ivec3 v, const ivec3 u) { - v.x -= u.x; - v.y -= u.y; - v.z -= u.z; +void __operator -= (inout vec3 v, const vec3 u) +{ + __asm vec4_subtract v.xyz, v, u; } -void __operator *= (inout ivec3 v, const ivec3 u) { - v.x *= u.x; - v.y *= u.y; - v.z *= u.z; +void __operator *= (inout vec3 v, const vec3 u) +{ + __asm vec4_multiply v.xyz, v, u; } -void __operator /= (inout ivec3 v, const ivec3 u) { +void __operator /= (inout vec3 v, const vec3 u) +{ +// XXX rcp v.x /= u.x; v.y /= u.y; v.z /= u.z; } -void __operator += (inout ivec4 v, const ivec4 u) { - v.x += u.x; - v.y += u.y; - v.z += u.z; - v.w += u.w; + +//// vec4 assignment operators + +void __operator += (inout vec4 v, const vec4 u) +{ + __asm vec4_add v, v, u; } -void __operator -= (inout ivec4 v, const ivec4 u) { - v.x -= u.x; - v.y -= u.y; - v.z -= u.z; - v.w -= u.w; +void __operator -= (inout vec4 v, const vec4 u) +{ + __asm vec4_subtract v, v, u; } -void __operator *= (inout ivec4 v, const ivec4 u) { - v.x *= u.x; - v.y *= u.y; - v.z *= u.z; - v.w *= u.w; +void __operator *= (inout vec4 v, const vec4 u) +{ + __asm vec4_multiply v, v, u; } -void __operator /= (inout ivec4 v, const ivec4 u) { +void __operator /= (inout vec4 v, const vec4 u) +{ +// XXX rcp v.x /= u.x; v.y /= u.y; v.z /= u.z; v.w /= u.w; } + + void __operator += (inout mat2 m, const mat2 n) { m[0] += n[0]; m[1] += n[1]; @@ -846,28 +894,6 @@ void __operator -= (inout mat3 m, const mat3 n) { } -//// dot (formerly in slang_common_builtin.gc) - -float dot(const float a, const float b) -{ - return a * b; -} - -float dot(const vec2 a, const vec2 b) -{ - return a.x * b.x + a.y * b.y; -} - -float dot(const vec3 a, const vec3 b) -{ - __asm vec3_dot __retVal, a, b; -} - -float dot(const vec4 a, const vec4 b) -{ - __asm vec4_dot __retVal, a, b; -} - diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 99fe5d8155..2520d133d8 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -146,426 +146,422 @@ 118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101, 99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1, 0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59, -122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, -52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, -119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,5,97, -0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, -111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98, -0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111, -97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1, -1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, -116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120, -0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1, -1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121, -0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23, -0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1, -0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1, -0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1, -9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0, -59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9, -18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18, -118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122, -0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1, -1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121, -0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0, -0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, -59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18, -117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0, -0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1, -0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0, -2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117, -0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9, -18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118, -0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0, -18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1, -0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0, -2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18, -109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0, -59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46, -0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0, -16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13, -110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98, -0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59, -120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0, -11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98, -0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14, -110,0,0,0,1,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, -0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24, -0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50, -0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109, -0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10, -49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109, -120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0, -0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, -57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18, -110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0, -18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, -0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18, -118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18, -118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9, -97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18, -118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9, -97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0, -18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, -118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9, -97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0, -18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18, -118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18, -118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18, -97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, -118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1, -0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, -0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, -10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, -1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, -57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, -0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, -50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, -10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, -13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0, -59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0, -48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, -0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0, -0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1, -114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, -120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, -114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, -57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0, -18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, -18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59, -122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, -20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18, -118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0, -0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, -51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0, -18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0, -0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, -114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, -57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, -18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49, -0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, -51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, -101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, -0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2, -26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0, -1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0, -1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0, -0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1, -1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0, -0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0, -0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10, -51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118, -101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0, -10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121, -0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0, -18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0, -0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0, -48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, -101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0, -9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0, -59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0, -59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117, -0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0, -18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0, -18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0, -1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47, -0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0, -1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0, -47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118, -101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122, -0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97, -0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59, -121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8, -58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0, -18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18, -117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0, -59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59, -119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18, -97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0, -18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0, -18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18, -118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99, -52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0, -18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18, -118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0, -12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0, -18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1, -1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49, -0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1, -1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10, -49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0, -16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1, -0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49, -0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8, -48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13, -110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57, -48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0, -57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110, -0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49, -0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, -18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0, -0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18, -97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, -0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97, -0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47, -0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57, -18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14, -2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0, -18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, -49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, -110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, -16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, -52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, -109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, -0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, -16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, -0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, -47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, -57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, -18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, -18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, -97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, -50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, -0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -49,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0, -16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, -57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50, -0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0, -22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9, -18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9, -18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0, -0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1, -0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0, -0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0, -52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18, -109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, -16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8, -48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57, -52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1, -9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, -121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, -18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, -121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18, -118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0, -51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0, -59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2, -24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1, -0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50, -0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, -51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0, -5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1, -0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0, -1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2, -25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0, -61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52, -0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0, -0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18, -118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18, -118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, -122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, -116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0, -1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109, -0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18, -109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51, -0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, -51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, -0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0, -2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, -118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, -122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24, -1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49, -0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, -0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0, -0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18, -109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0, -0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97, -0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0, -0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2, -16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, -102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95, -101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0, -5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, -0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, -111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113, -117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0, -1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0, -0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0, -0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, -108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, -1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, +18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, +0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, +97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, +1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, +97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, +54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, +5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, +0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, +117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, +117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, +0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, +0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, +0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, +0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, +1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, +18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, +0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, +1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0, +0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0, +59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0, +0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1, +9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1, +1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, +11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118, +0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0, +18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100, +100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, +12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0, +10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, +48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1, +1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16, +10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, +48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0, +14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109, +0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,14,2,21, +1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0, +18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16, +10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57, +21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109, +120,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, +0,18,109,120,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0, +18,118,0,0,18,109,120,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, +111,116,0,18,118,0,0,18,109,120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, +0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1, +1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109, +0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, +109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0, +0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97, +116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110, +0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0, +15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0, +16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, +0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59, +120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0, +1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1, +1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0, +2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0, +9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120, +0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2, +11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9, +18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2, +12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9, +18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0, +9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0, +18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18, +118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,9,18, +118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, +18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, +8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9, +97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4, +1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, +18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0, +9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0, +22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18, +97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, +18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109, +0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0, +9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0, +22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2, +15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97, +0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0, +2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18, +97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2, +21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0, +57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0, +16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2, +3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11, +118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49, +0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59, +120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18, +109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18, +114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0, +57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119, +0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0, +9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10, +50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59, +120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0, +20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0, +16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108, +0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86, +97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109, +0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8, +48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59, +122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, +20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0, +16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51, +0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59, +122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49, +0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, +114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, +0,18,114,51,0,0,18,118,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0, +18,109,0,48,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1, +0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110, +0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13, +109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, +16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2, +22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0, +16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0, +15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0, +10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0, +0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98, +0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58, +118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1, +1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59, +121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18, +97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1, +0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0, +0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120, +0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58, +118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1, +1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18, +117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0, +18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0, +1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47, +0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1, +1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0, +48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48, +20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59, +120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0, +11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121, +0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0, +1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18, +117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0, +0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, +59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117, +0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0, +18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, +118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0, +12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, +18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, +0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0, +18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0, +1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49, +0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0, +0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0, +57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1, +8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, +1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, +0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1, +0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, +49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1, +0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57, +46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1, +0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, +16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1, +1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10, +49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18, +109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, +116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0, +16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18, +109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0, +48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0, +16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1, +0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0, +49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1, +0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18, +110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0, +0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18, +98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10, +51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, +97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, +47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0, +16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1, +1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10, +49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15, +2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0, +18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18, +98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, +110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18, +97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50, +0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117, +0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117, +0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98, +0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58, +109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14, +109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0, +16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0, +57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0, +1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18, +97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121, +0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18, +118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0, +52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0, +59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9, +18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120, +0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0, +2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52, +0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9, +18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97, +0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2, +10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1, +9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12, +118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0, +59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, +1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122, +0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118, +0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57, +51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, +9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18, +109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16, +10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, +52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, +0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, +118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, +0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, +109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, +1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, +0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, +0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, +11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, +0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, +24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, +0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, +118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, +60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, +1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, +0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, +1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, +18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, +0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, +0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, +1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, +4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, +32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, +39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, +114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, 118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, 59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, 69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, 9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, -0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, -0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From a33532f5f4b06aab49238aa193452f8efee7a291 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 20 Dec 2006 18:04:59 -0700 Subject: checkpoint: re-org assignment operator functions --- src/mesa/shader/slang/library/slang_core.gc | 238 ++++++--- src/mesa/shader/slang/library/slang_core_gc.h | 730 +++++++++++++------------- 2 files changed, 541 insertions(+), 427 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index d99eb10a8b..decf615c0d 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -848,6 +848,173 @@ void __operator /= (inout vec4 v, const vec4 u) +//// ivec2/int assignment operators + +void __operator += (inout ivec2 v, const int a) +{ + v.x += a; + v.y += a; +} + +void __operator -= (inout ivec2 v, const int a) +{ + v.x -= a; + v.y -= a; +} + +void __operator *= (inout ivec2 v, const int a) +{ + v.x *= a; + v.y *= a; +} + +void __operator /= (inout ivec2 v, const int a) +{ +// XXX rcp + v.x /= a; + v.y /= a; +} + + +//// ivec3/int assignment operators + +void __operator += (inout ivec3 v, const int a) +{ + v.x += a; + v.y += a; + v.z += a; +} + +void __operator -= (inout ivec3 v, const int a) +{ + v.x -= a; + v.y -= a; + v.z -= a; +} + +void __operator *= (inout ivec3 v, const int a) +{ + v.x *= a; + v.y *= a; + v.z *= a; +} + +void __operator /= (inout ivec3 v, const int a) +{ + v.x /= a; + v.y /= a; + v.z /= a; +} + + +//// ivec4/int assignment operators + +void __operator += (inout ivec4 v, const int a) +{ + __asm vec4_add v, v, a.xxxx; +} + +void __operator -= (inout ivec4 v, const int a) +{ + __asm vec4_subtract v, v, a.xxxx; +} + +void __operator *= (inout ivec4 v, const int a) +{ + __asm vec4_multiply v, v, a.xxxx; +} + +void __operator /= (inout ivec4 v, const int a) +{ + v.x /= a; + v.y /= a; + v.z /= a; + v.w /= a; +} + + + +//// vec2/float assignment operators + +void __operator += (inout vec2 v, const float a) +{ + __asm vec4_add v.xy, v, a.xx; +} + +void __operator -= (inout vec2 v, const float a) +{ + __asm vec4_subtract v.xy, v, a.xx; +} + +void __operator *= (inout vec2 v, const float a) +{ + __asm vec4_multiply v.xy, v, a.xx; +} + +void __operator /= (inout vec2 v, const float a) +{ +// XXX rcp + v.x /= a; + v.y /= a; +} + + +//// vec3/float assignment operators + +void __operator += (inout vec3 v, const float a) +{ + __asm vec4_add v.xyz, v, a.xxx; +} + +void __operator -= (inout vec3 v, const float a) +{ + __asm vec4_subtract v.xyz, v, a.xxx; +} + +void __operator *= (inout vec3 v, const float a) +{ + __asm vec4_multiply v.xyz, v, a.xxx; +} + +void __operator /= (inout vec3 v, const float a) +{ + v.x /= a; + v.y /= a; + v.z /= a; +} + + +//// vec4/float assignment operators + +void __operator += (inout vec4 v, const float a) +{ + __asm vec4_add v, v, a.xxxx; +} + +void __operator -= (inout vec4 v, const float a) +{ + __asm vec4_subtract v, v, a.xxxx; +} + +void __operator *= (inout vec4 v, const float a) +{ + __asm vec4_multiply v, v, a.xxxx; +} + +void __operator /= (inout vec4 v, const float a) +{ + v.x /= a; + v.y /= a; + v.z /= a; + v.w /= a; +} + + + + + + + void __operator += (inout mat2 m, const mat2 n) { m[0] += n[0]; m[1] += n[1]; @@ -962,77 +1129,6 @@ void __operator /= (inout mat4 m, const mat4 n) { m[3] /= n[3]; } -void __operator += (inout vec2 v, const float a) { - v.x += a; - v.y += a; -} - -void __operator -= (inout vec2 v, const float a) { - v.x -= a; - v.y -= a; -} - -void __operator *= (inout vec2 v, const float a) { - v.x *= a; - v.y *= a; -} - -void __operator /= (inout vec2 v, const float a) { - v.x /= a; - v.y /= a; -} - -void __operator += (inout vec3 v, const float a) { - v.x += a; - v.y += a; - v.z += a; -} - -void __operator -= (inout vec3 v, const float a) { - v.x -= a; - v.y -= a; - v.z -= a; -} - -void __operator *= (inout vec3 v, const float a) { - v.x *= a; - v.y *= a; - v.z *= a; -} - -void __operator /= (inout vec3 v, const float a) { - v.x /= a; - v.y /= a; - v.z /= a; -} - -void __operator += (inout vec4 v, const float a) { - v.x += a; - v.y += a; - v.z += a; - v.w += a; -} - -void __operator -= (inout vec4 v, const float a) { - v.x -= a; - v.y -= a; - v.z -= a; - v.w -= a; -} - -void __operator *= (inout vec4 v, const float a) { - v.x *= a; - v.y *= a; - v.z *= a; - v.w *= a; -} - -void __operator /= (inout vec4 v, const float a) { - v.x /= a; - v.y /= a; - v.z /= a; - v.w /= a; -} void __operator += (inout mat2 m, const float a) { m[0] += a; diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 2520d133d8..cc92de5bd0 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -203,365 +203,383 @@ 12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, 118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117, 0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0, -10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0, -59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, -48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1, -1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16, -10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, -48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0, -14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109, -0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,14,2,21, -1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0, -18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9, -18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57, -21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109, -120,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, -0,18,109,120,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0, -18,118,0,0,18,109,120,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, -111,116,0,18,118,0,0,18,109,120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, -0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1, -1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109, -0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, -109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0, -0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110, -0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0, -15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21, -0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59, -120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0, -1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1, -1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0, -2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0, -9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120, -0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2, -11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9, -18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0, -18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2, -12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9, -18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0, -9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0, -18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18, -118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,9,18, -118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, -18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, -8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4, -1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0, -9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0, -22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18, -97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, -18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109, +24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9, +18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, +5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6, +118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0, +0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, +0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0, +0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97, +0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0, +59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0, +0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0, +24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18, +118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101, +99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1, +0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1, +9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0, +9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10, +118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0, +0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0, +0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59, +121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0, +18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, +1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18, +118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120, +120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, +118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9, +97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, +0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0, +0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120, +120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9, +18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0, +1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0, +9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120, +0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18, +118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18, +110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1, +0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10, +50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,0,1,0,0,2, +3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14, +109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2, +1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, +0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110, +0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,49,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10, +51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,15, +2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48, +0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16, +10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, +48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0, +16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0, +0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0, +1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, +10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109, 0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0, -9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0, -22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2, -15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97, -0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0, -2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18, -97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2, -21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0, -57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0, -16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2, -3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11, -118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49, -0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59, -120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18, -109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18, -114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0, -57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119, -0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0, -9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10, -50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59, -120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0, -20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0, -16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108, -0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86, -97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109, -0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59, -122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, -20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0, -16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51, -0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59, -122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49, -0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, -0,18,114,51,0,0,18,118,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0, -18,109,0,48,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1, -0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110, -0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13, -109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2, -22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0, -15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0, -10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0, -0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98, -0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58, -118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1, -1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59, -121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18, -97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1, -0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0, -0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120, -0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58, -118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1, -1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18, -117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0, -0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, -59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0, -18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0, -1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47, -0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1, -1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0, -48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48, -20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59, -120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0, -11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121, -0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0, -1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18, -117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0, -0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0, -59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117, -0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0, -18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18, -118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0, -12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0, -18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,119,0,0,18,118,0,59,120,121,122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, -0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0, -18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0, -1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49, -0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0, -0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0, -57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1, -8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, -1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1, -0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1, -0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57, -49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1, -0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57, -46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1, -0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0, -16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1, -1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10, -49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0, -0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18, -109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97, -116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0, -16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18, -109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0, -48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0, -16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1, -0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0, -49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1, -0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18, -110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0, -0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18, -98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10, -51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0, -16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1, -1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10, -49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15, -2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0, -18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18, -98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, -110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18, -97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50, -0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117, -0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117, -0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117, -0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98, -0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58, -109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14, -109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0, -16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0, -57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0, -1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18, -97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121, -0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18, -118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0, -52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0, -59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9, -18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120, -0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0, -2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52, -0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9, -18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97, -0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2, -10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1, -9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12, -118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0, -59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, -1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122, -0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118, -0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57, -51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, -9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18, -109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16, -10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, -52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, -0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, -2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, -118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, -122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, -1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, -0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, -0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, -0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, -109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, -1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, -0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, -0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, -11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, -118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, -0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, -24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, -0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, -118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, -60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, -1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, -108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, -1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, -0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, -18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, -18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, -0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, -0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, -1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, -4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, -32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, -39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, -105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, -114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, +16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0, +22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109, +0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1, +1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18, +109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9, +18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, +8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0, +9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, +16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0, +23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, +97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0, +1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18, +109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0, +59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0, +0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0, +12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0, +1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0, +18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9, +18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48, +0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59, +122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0, +20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16, +10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0, +59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119, +0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0, +16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101, +99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4, +118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0, +0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18, +118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0, +0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114, +50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120, +0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114, +51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59, +122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99, +51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,0, +2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2,26,1,1,0, +13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0, +13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0, +14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2, +27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, +57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0, +16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97, +0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9, +98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0, +0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0, +47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, +101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0, +9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0, +59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0, +59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117, +0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1, +0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0, +18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101, +99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46, +0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18, +98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9, +97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0, +59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, +8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122, +0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0, +18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11, +2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18, +118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117, +0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0, +18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0, +18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0, +1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46, +0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0, +0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0, +46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0, +0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120, +0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47, +0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18, +98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0, +47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0, +59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59, +119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,59,120,121, +122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8, +58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0, +59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1, +8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122, +0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0, +1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0, +0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98, +0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8, +58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1, +0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0, +47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8, +58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1, +0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0, +48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8, +58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1, +0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0, +49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, +58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0, +18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, +51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57, +18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18, +110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0, +0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, +98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2, +21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18, +97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, +49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, +110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, +16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, +52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, +50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, +109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, +0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, +16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, +0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, +47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, +57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, +18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, +18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, +97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, +50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, +0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, +16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, +0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, +49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, +49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, +49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, +49,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0, +16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, +57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0, +0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50, +0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0, +22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9, +18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59, +120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9, +18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0, +0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1, +0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0, +0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0, +52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18, +109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, +16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8, +48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57, +52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1, +9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, +121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, +18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, +121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18, +118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0, +51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0, +59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2, +24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1, +0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50, +0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, +51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0, +5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1, +0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0, +1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2, +25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0, +61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52, +0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0, +0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18, +118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18, +118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, +116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0, +1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109, +0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18, +109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51, +0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, +51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, +0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, +122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49, +0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18, +109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0, +0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97, +0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0, +0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2, +16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, +102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95, +101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0, +5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, +0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, +111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113, +117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0, +1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0, +0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0, +0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, +108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, +1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, 118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, 59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, 69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, 9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, -57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, +65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, +0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, +0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From bb1bf8b3aaa20fba05851653adf8f6732ca57cd9 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 09:40:08 -0700 Subject: checkpoint: more basic math rewritting --- src/mesa/shader/slang/library/slang_core.gc | 248 +++++--- src/mesa/shader/slang/library/slang_core_gc.h | 863 +++++++++++++------------- 2 files changed, 593 insertions(+), 518 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index decf615c0d..eb0f882ed9 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -554,6 +554,157 @@ vec4 __operator / (const vec4 v, const vec4 u) + +//// Basic vec2/float operators + +vec2 __operator + (const float a, const vec2 u) +{ + __asm vec4_add __retVal.xy, a.xx, u.xy; +} + +vec2 __operator + (const vec2 v, const float b) +{ + __asm vec4_add __retVal.xy, v.xy, b.xx; +} + +vec2 __operator - (const float a, const vec2 u) +{ + __asm vec4_subtract __retVal.xy, a.xx, u.xy; +} + +vec2 __operator - (const vec2 v, const float b) +{ + __asm vec4_subtract __retVal.xy, v.xy, b.xx; +} + +vec2 __operator * (const float a, const vec2 u) +{ + __asm vec4_multiply __retVal.xy, a.xx, u.xy; +} + +vec2 __operator * (const vec2 v, const float b) +{ + __asm vec4_multiply __retVal.xy, v.xy, b.xx; +} + +vec2 __operator / (const float a, const vec2 u) +{ + vec2 invU; + __asm float_rcp invU.x, u.x; + __asm float_rcp invU.y, u.y; + __asm vec4_multiply __retVal.xy, a.xx, invU.xy; +} + +vec2 __operator / (const vec2 v, const float b) +{ + float invB; + __asm float_rcp invB, b; + __asm vec4_multiply __retVal.xy, v.xy, invB.xx; +} + + +//// Basic vec3/float operators + +vec3 __operator + (const float a, const vec3 u) +{ + __asm vec4_add __retVal.xyz, a.xxx, u.xyz; +} + +vec3 __operator + (const vec3 v, const float b) +{ + __asm vec4_add __retVal.xyz, v.xyz, b.xxx; +} + +vec3 __operator - (const float a, const vec3 u) +{ + __asm vec4_subtract __retVal.xyz, a.xxx, u.xyz; +} + +vec3 __operator - (const vec3 v, const float b) +{ + __asm vec4_subtract __retVal.xyz, v.xyz, b.xxx; +} + +vec3 __operator * (const float a, const vec3 u) +{ + __asm vec4_multiply __retVal.xyz, a.xxx, u.xyz; +} + +vec3 __operator * (const vec3 v, const float b) +{ + __asm vec4_multiply __retVal.xyz, v.xyz, b.xxx; +} + +vec3 __operator / (const float a, const vec3 u) +{ + vec3 invU; + __asm float_rcp invU.x, u.x; + __asm float_rcp invU.y, u.y; + __asm float_rcp invU.z, u.z; + __asm vec4_multiply __retVal.xyz, a.xxx, invU.xyz; +} + +vec3 __operator / (const vec3 v, const float b) +{ + float invB; + __asm float_rcp invB, b; + __asm vec4_multiply __retVal.xyz, v.xyz, invB.xxx; +} + + +//// Basic vec4/float operators + +vec4 __operator + (const float a, const vec4 u) +{ + __asm vec4_add __retVal, a.xxxx, u; +} + +vec4 __operator + (const vec4 v, const float b) +{ + __asm vec4_add __retVal, v, b.xxxx; +} + +vec4 __operator - (const float a, const vec4 u) +{ + __asm vec4_subtract __retVal, a.xxxx, u; +} + +vec4 __operator - (const vec4 v, const float b) +{ + __asm vec4_subtract __retVal, v, b.xxxx; +} + +vec4 __operator * (const float a, const vec4 u) +{ + __asm vec4_multiply __retVal, a.xxxx, u; +} + +vec4 __operator * (const vec4 v, const float b) +{ + __asm vec4_multiply __retVal, v, b.xxxx; +} + +vec4 __operator / (const float a, const vec4 u) +{ + vec4 invU; + __asm float_rcp invU.x, u.x; + __asm float_rcp invU.y, u.y; + __asm float_rcp invU.z, u.z; + __asm float_rcp invU.w, u.w; + __asm vec4_multiply __retVal, a.xxxx, invU; +} + +vec4 __operator / (const vec4 v, const float b) +{ + float invB; + __asm float_rcp invB, b; + __asm vec4_multiply __retVal, v, invB.xxxx; +} + + + + + //// Unary negation operator float __operator - (const float a) @@ -1343,105 +1494,10 @@ mat4 __operator / (const mat4 m, const mat4 n) __retVal[0] = m[3] / n[3]; } -vec2 __operator + (const float a, const vec2 u) { - return vec2 (a + u.x, a + u.y); -} -vec2 __operator + (const vec2 v, const float b) { - return vec2 (v.x + b, v.y + b); -} -vec2 __operator - (const float a, const vec2 u) { - return vec2 (a - u.x, a - u.y); -} - -vec2 __operator - (const vec2 v, const float b) { - return vec2 (v.x - b, v.y - b); -} - -vec2 __operator * (const float a, const vec2 u) { - return vec2 (a * u.x, a * u.y); -} - -vec2 __operator * (const vec2 v, const float b) { - return vec2 (v.x * b, v.y * b); -} - -vec2 __operator / (const float a, const vec2 u) { - return vec2 (a / u.x, a / u.y); -} - -vec2 __operator / (const vec2 v, const float b) { - return vec2 (v.x / b, v.y / b); -} - -vec3 __operator + (const float a, const vec3 u) { - return vec3 (a + u.x, a + u.y, a + u.z); -} - -vec3 __operator + (const vec3 v, const float b) { - return vec3 (v.x + b, v.y + b, v.z + b); -} +//next -vec3 __operator - (const float a, const vec3 u) { - return vec3 (a - u.x, a - u.y, a - u.z); -} - -vec3 __operator - (const vec3 v, const float b) { - return vec3 (v.x - b, v.y - b, v.z - b); -} - -vec3 __operator * (const float a, const vec3 u) { - return vec3 (a * u.x, a * u.y, a * u.z); -} - -//bp: -vec3 __operator * (const vec3 v, const float b) -{ - __retVal.xyz = v.xyz * b.xxx; -} - -vec3 __operator / (const float a, const vec3 u) { - return vec3 (a / u.x, a / u.y, a / u.z); -} - -vec3 __operator / (const vec3 v, const float b) { - return vec3 (v.x / b, v.y / b, v.z / b); -} - -vec4 __operator + (const float a, const vec4 u) { - return vec4 (a + u.x, a + u.y, a + u.z, a + u.w); -} - -vec4 __operator + (const vec4 v, const float b) { - return vec4 (v.x + b, v.y + b, v.z + b, v.w + b); -} - -vec4 __operator - (const float a, const vec4 u) { - return vec4 (a - u.x, a - u.y, a - u.z, a - u.w); -} - -vec4 __operator - (const vec4 v, const float b) { - return vec4 (v.x - b, v.y - b, v.z - b, v.w - b); -} - -vec4 __operator * (const float a, const vec4 u) { - return vec4 (a * u.x, a * u.y, a * u.z, a * u.w); -} - -//bp: -vec4 __operator * (const vec4 v, const float b) -{ - __asm vec4_multiply __retVal.xyzw, v.xyzw, b.xxxx; -} - -vec4 __operator / (const float a, const vec4 u) { - return vec4 (a / u.x, a / u.y, a / u.z, a / u.w); -} - -vec4 __operator / (const vec4 v, const float b) { - return vec4 (v.x / b, v.y / b, v.z / b, v.w / b); -} mat2 __operator + (const float a, const mat2 n) { return mat2 (a + n[0], a + n[1]); diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index cc92de5bd0..e4ccc68767 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -134,431 +134,450 @@ 0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0, 0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52, 95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0, -1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0, -18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0, -59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0, -18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12, -118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0, -54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0, -0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116, -95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116, -0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18, -118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101, -99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1, -0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59, -122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, -18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, -0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, -97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, -1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, -97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, -54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, -5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, -0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, -117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, -117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, -0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, -0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, -1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, -18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, -0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, -1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0, -0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0, -59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0, -0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1, -9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1, -1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, -11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118, -0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0, -18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100, -100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, -12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9, -18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, -5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6, -118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0, -0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, -0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0, -0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97, -0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0, -59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0, -0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0, -24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18, -118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1, -0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1, -9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0, -9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10, -118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0, -0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0, -0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59, -121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0, -18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, -1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18, -118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120, -120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18, -118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9, -97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, -0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0, -0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120, -120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9, -18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0, -1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0, -9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0, +1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1, +0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0, +10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1, +0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0, +10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0, +1,1,0,10,117,0,0,0,1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105, +110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, +85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0, +0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110, +118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0, +59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100, +100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59, +120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0, +18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, +115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120, +121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97, +0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, +59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121, +122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122, +0,0,18,105,110,118,66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18, +117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97, +0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86, +97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118, +0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120, +120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120, +120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118, +85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120, +120,120,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101, +103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101, +99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58, +118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12, +2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18, +118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0, +3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102, +108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111, +95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118, +101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8, +58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, +1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, +54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1, +0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1, +8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111, +116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86, +97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118, +101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1, +0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58, +102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97, +0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5, +97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118, +0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6, +118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0, +2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0, +0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118, +0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117, +0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9, +18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118, +0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0, +18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1, +0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0, +2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117, +0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, +52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9, +97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0, +18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108, +111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117, +0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1, +0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0, +0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1, +4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0, +0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0, +11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24, +0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1, +0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0, +0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0, +0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2, +1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22, +0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59, +121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0, +9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, +0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2, +7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9, +18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7, +118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18, +118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0, +5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59, +120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2, +8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9, +18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120, +0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, +0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118, +0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0, +0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1, +1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0, +18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0, +59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2, +1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97, +0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0, +2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, +118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118, +0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118, +0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2, +13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58, +118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16, +10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0, +18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8, +58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0, +1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, 0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120, -0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18, -118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,18, -110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1, -0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10, -50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,0,1,0,0,2, -3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14, -109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2, -1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110, -0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,49,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10, -51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,15, -2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48, -0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16, -10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, -48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0, -0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0, -1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, -10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109, -0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0, -9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0, -22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109, -0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1, -1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18, -109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9, -18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, -8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0, -9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0, -23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, -97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0, -1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18, -109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0, -59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0, -0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0, -12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0, -1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0, -18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9, -18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48, -0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59, -122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0, -20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16, -10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0, -59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119, -0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0, -16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101, -99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4, -118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0, -0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18, -118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0, -0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114, -50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0, -59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120, -0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114, -51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59, -122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99, -51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,0, -2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2,26,1,1,0, -13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0, -13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1, +0,14,110,0,0,0,1,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48, +20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, +0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0, +16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18, +109,120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18, +118,0,0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, +57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18, +110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0, +18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, +0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, +10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, +1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, +18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, +57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, +0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, +50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, +10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, +13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0, +59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0, +48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, +0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0, +0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1, +114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, +120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, +114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59, +122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, +20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18, +118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0, +0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, +51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0, +18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0, +0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, +114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, +57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, +18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, +18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49, +0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, +51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, +101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, +0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2, +26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8, +48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0, +1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0, +1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0, +0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1, +1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, 101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0, -14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2, -27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, -57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,49,20,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97, -0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9, -98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0, -0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0, -47,0,18,97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118, -101,99,50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0, -9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0, -59,121,0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0, -59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117, -0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1, -0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0, -18,118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101, -99,51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46, -0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18, -98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9, -97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0, -59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, -8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122, -0,18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0, -18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11, -2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18, -118,0,59,120,121,122,0,18,98,0,59,120,120,120,0,48,20,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117, -0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0, -18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0, -18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,0,0,0, -1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,46, -0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,0,0,0, -0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0, -46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,46,0, -0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120, -0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,119,0,47, -0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18, -98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,18,98,0, -47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0, -59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,59, -119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,59,120,121, -122,119,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8, -58,118,101,99,52,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0, -59,122,0,49,0,18,97,0,18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1, -8,58,118,101,99,52,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122, -0,18,98,0,49,0,18,118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0, -1,8,58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0, -0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98, -0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8, -58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1, -0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0, -47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8, -58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1, -0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0, -48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8, -58,109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1, -0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0, -49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, -58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0, -18,110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, -51,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57, -18,98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18, -110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0, -0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, -98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2, -21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18, -97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, -49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, -110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, -16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, -52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, -109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, -0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, -16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, -0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, -47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, -57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, -18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, -18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, -97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, -50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, -0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0, -49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0, -49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0, -49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0, -49,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0, -16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, -57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50, -0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0, -22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9, -18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9, -18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0, -0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1, -0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0, -0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0, -52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18, -109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, -16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8, -48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57, -52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1, -9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, -121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, -18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, -121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18, -118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0, -51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0, -59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2, -24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1, -0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50, -0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, -51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0, -5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1, -0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0, -1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2, -25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0, -61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52, -0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0, -0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18, -118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18, -118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, -122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, -116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0, -1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109, -0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18, -109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51, -0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, -51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, -0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0, -2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, -118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, -122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24, -1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49, -0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, -0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0, -0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18, -109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0, -0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97, -0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0, -0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2, -16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, -102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95, -101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0, -5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, -0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, -111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113, -117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0, -1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0, -0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0, -0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, -108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, -1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0, +0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0, +0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10, +51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109, +97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2, +26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18, +109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97, +116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27, +1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109, +0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, +50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1, +0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0, +16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, +50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1, +0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, +16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116, +51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, +50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0, +16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0, +0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8, +48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14, +2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0, +18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9, +97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110, +0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0, +9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98, +0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, +58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0, +18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, +51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57, +18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, +110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18, +97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, +116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, +0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, +47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1, +0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, +16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0, +0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8, +48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18, +110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52, +0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18, +98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, +1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18, +97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15, +109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10, +49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0, +1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0, +1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0, +1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0, +1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0, +1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0, +1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0, +1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0, +1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0, +1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0, +1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0, +1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0, +1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0, +1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0, +1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0, +1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0, +1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0, +1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0, +1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0, +1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0, +1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0, +1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0, +1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0, +1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0, +1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0, +1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49, +0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0, +18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57, +54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0, +0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18, +118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0, +52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118, +0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0, +2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7, +118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, +25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, +9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, +16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10, +49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0, +0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18, +97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121, +0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18, +118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0, +51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0, +59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9, +18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120, +0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0, +2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51, +0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9, +18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0, +0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0, +0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0, +5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0, +2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, +118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, +0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, +25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, +0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, +118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, +61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, +9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, +0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, +1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, +59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, +5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, +0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, +18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, +58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, +1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, +0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, +1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, +0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, +0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, +1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, +57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2, +15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111, +97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0, +0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41, +0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, +116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97, +108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0, +5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0, +1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, +108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, +101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0, +0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1, +1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0, +15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97, +116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105, +0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, +0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0, +1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, 116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, 69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -- cgit v1.2.3 From c73e07405ca1a4ce4fce76607a3e43ef47b9d8a9 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 10:03:15 -0700 Subject: checkpoint: ivec/int and mat/mat operations --- src/mesa/shader/slang/library/slang_core.gc | 430 ++++++++++------- src/mesa/shader/slang/library/slang_core_gc.h | 648 ++++++++++++++------------ 2 files changed, 613 insertions(+), 465 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index eb0f882ed9..5e1330f48f 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -703,6 +703,107 @@ vec4 __operator / (const vec4 v, const float b) +//// Basic ivec2/int operators + +ivec2 __operator + (const ivec2 v, const int b) { + return v + ivec2 (b); +} + +ivec2 __operator - (const int a, const ivec2 u) { + return ivec2 (a) - u; +} + +ivec2 __operator - (const ivec2 v, const int b) { + return v - ivec2 (b); +} + +ivec2 __operator * (const int a, const ivec2 u) { + return ivec2 (a) * u; +} + +ivec2 __operator * (const ivec2 v, const int b) { + return v * ivec2 (b); +} + +ivec2 __operator / (const int a, const ivec2 u) { + return ivec2 (a) / u; +} + +ivec2 __operator / (const ivec2 v, const int b) { + return v / ivec2 (b); +} + + +//// Basic ivec3/int operators + +ivec3 __operator + (const int a, const ivec3 u) { + return ivec3 (a) + u; +} + +ivec3 __operator + (const ivec3 v, const int b) { + return v + ivec3 (b); +} + +ivec3 __operator - (const int a, const ivec3 u) { + return ivec3 (a) - u; +} + +ivec3 __operator - (const ivec3 v, const int b) { + return v - ivec3 (b); +} + +ivec3 __operator * (const int a, const ivec3 u) { + return ivec3 (a) * u; +} + +ivec3 __operator * (const ivec3 v, const int b) { + return v * ivec3 (b); +} + +ivec3 __operator / (const int a, const ivec3 u) { + return ivec3 (a) / u; +} + +ivec3 __operator / (const ivec3 v, const int b) { + return v / ivec3 (b); +} + + +//// Basic ivec4/int operators + +ivec4 __operator + (const int a, const ivec4 u) { + return ivec4 (a) + u; +} + +ivec4 __operator + (const ivec4 v, const int b) { + return v + ivec4 (b); +} + +ivec4 __operator - (const int a, const ivec4 u) { + return ivec4 (a) - u; +} + +ivec4 __operator - (const ivec4 v, const int b) { + return v - ivec4 (b); +} + +ivec4 __operator * (const int a, const ivec4 u) { + return ivec4 (a) * u; +} + +ivec4 __operator * (const ivec4 v, const int b) { + return v * ivec4 (b); +} + +ivec4 __operator / (const int a, const ivec4 u) { + return ivec4 (a) / u; +} + +ivec4 __operator / (const ivec4 v, const int b) { + return v / ivec4 (b); +} + + //// Unary negation operator @@ -1104,9 +1205,9 @@ void __operator *= (inout vec2 v, const float a) void __operator /= (inout vec2 v, const float a) { -// XXX rcp - v.x /= a; - v.y /= a; + float invA; + __asm float_rcp invA, a; + __asm vec4_multiply v.xy, v.xy, a.xx; } @@ -1129,9 +1230,9 @@ void __operator *= (inout vec3 v, const float a) void __operator /= (inout vec3 v, const float a) { - v.x /= a; - v.y /= a; - v.z /= a; + float invA; + __asm float_rcp invA, a; + __asm vec4_multiply v.xyz, v.xyz, a.xxx; } @@ -1154,16 +1255,161 @@ void __operator *= (inout vec4 v, const float a) void __operator /= (inout vec4 v, const float a) { - v.x /= a; - v.y /= a; - v.z /= a; - v.w /= a; + float invA; + __asm float_rcp invA, a; + __asm vec4_multiply v, v, a.xxxx; } +//// Basic mat2 operations + +mat2 __operator + (const mat2 m, const mat2 n) +{ + __retVal[0] = m[0] + n[0]; + __retVal[1] = m[1] + n[1]; +} + +mat2 __operator - (const mat2 m, const mat2 n) +{ + __retVal[0] = m[0] - n[0]; + __retVal[1] = m[1] - n[1]; +} + +mat2 __operator * (const mat2 m, const mat2 n) +{ + vec2 mRow0, mRow1; + mRow0.x = m[0].x; + mRow0.y = m[1].x; + mRow1.x = m[0].y; + mRow1.y = m[1].y; + __retVal[0].x = dot(mRow0, n[0]); + __retVal[1].x = dot(mRow0, n[1]); + __retVal[0].y = dot(mRow1, n[0]); + __retVal[1].y = dot(mRow1, n[1]); +} + +mat2 __operator / (const mat2 m, const mat2 n) +{ + __retVal[0] = m[0] / n[0]; + __retVal[1] = m[1] / n[1]; +} + + +//// Basic mat3 operations + +mat3 __operator + (const mat3 m, const mat3 n) +{ + __retVal[0] = m[0] + n[0]; + __retVal[1] = m[1] + n[1]; + __retVal[2] = m[2] + n[2]; +} + +mat3 __operator - (const mat3 m, const mat3 n) +{ + __retVal[0] = m[0] - n[0]; + __retVal[1] = m[1] - n[1]; + __retVal[2] = m[2] - n[2]; +} + +mat3 __operator * (const mat3 m, const mat3 n) +{ + vec3 mRow0, mRow1, mRow2; + mRow0.x = m[0].x; + mRow0.y = m[1].x; + mRow0.z = m[2].x; + mRow1.x = m[0].y; + mRow1.y = m[1].y; + mRow1.z = m[2].y; + mRow2.x = m[0].z; + mRow2.y = m[1].z; + mRow2.z = m[2].z; + __retVal[0].x = dot(mRow0, n[0]); + __retVal[1].x = dot(mRow0, n[1]); + __retVal[2].x = dot(mRow0, n[2]); + __retVal[0].y = dot(mRow1, n[0]); + __retVal[1].y = dot(mRow1, n[1]); + __retVal[2].y = dot(mRow1, n[2]); + __retVal[0].z = dot(mRow2, n[0]); + __retVal[1].z = dot(mRow2, n[1]); + __retVal[2].z = dot(mRow2, n[2]); +} + +mat3 __operator / (const mat3 m, const mat3 n) +{ + __retVal[0] = m[0] / n[0]; + __retVal[0] = m[1] / n[1]; + __retVal[0] = m[2] / n[2]; +} + + +//// Basic mat4 operations + +mat4 __operator + (const mat4 m, const mat4 n) +{ + __retVal[0] = m[0] + n[0]; + __retVal[1] = m[1] + n[1]; + __retVal[2] = m[2] + n[2]; + __retVal[3] = m[3] + n[3]; +} + +mat4 __operator - (const mat4 m, const mat4 n) +{ + __retVal[0] = m[0] - n[0]; + __retVal[1] = m[1] - n[1]; + __retVal[2] = m[2] - n[2]; + __retVal[3] = m[3] - n[3]; +} + +mat4 __operator * (const mat4 m, const mat4 n) +{ + vec4 mRow0, mRow1, mRow2, mRow3; + mRow0.x = m[0].x; + mRow0.y = m[1].x; + mRow0.z = m[2].x; + mRow0.w = m[3].x; + mRow1.x = m[0].y; + mRow1.y = m[1].y; + mRow1.z = m[2].y; + mRow1.w = m[3].y; + mRow2.x = m[0].z; + mRow2.y = m[1].z; + mRow2.z = m[2].z; + mRow2.w = m[3].z; + mRow3.x = m[0].w; + mRow3.y = m[1].w; + mRow3.z = m[2].w; + mRow3.w = m[3].w; + __retVal[0].x = dot(mRow0, n[0]); + __retVal[1].x = dot(mRow0, n[1]); + __retVal[2].x = dot(mRow0, n[2]); + __retVal[3].x = dot(mRow0, n[3]); + __retVal[0].y = dot(mRow1, n[0]); + __retVal[1].y = dot(mRow1, n[1]); + __retVal[2].y = dot(mRow1, n[2]); + __retVal[3].y = dot(mRow1, n[3]); + __retVal[0].z = dot(mRow2, n[0]); + __retVal[1].z = dot(mRow2, n[1]); + __retVal[2].z = dot(mRow2, n[2]); + __retVal[3].z = dot(mRow2, n[3]); + __retVal[0].w = dot(mRow3, n[0]); + __retVal[1].w = dot(mRow3, n[1]); + __retVal[2].w = dot(mRow3, n[2]); + __retVal[3].w = dot(mRow3, n[3]); +} + +mat4 __operator / (const mat4 m, const mat4 n) +{ + __retVal[0] = m[0] / n[0]; + __retVal[0] = m[1] / n[1]; + __retVal[0] = m[2] / n[2]; + __retVal[0] = m[3] / n[3]; +} + + + void __operator += (inout mat2 m, const mat2 n) { @@ -1186,10 +1432,6 @@ vec2 __operator * (const mat2 m, const vec2 v) { -mat2 __operator * (const mat2 m, const mat2 n) { - return mat2 (m * n[0], m * n[1]); -} - void __operator *= (inout mat2 m, const mat2 n) { m = m * n; } @@ -1215,11 +1457,6 @@ void __operator -= (inout mat3 m, const mat3 n) { -mat3 __operator * (const mat3 m, const mat3 n) -{ -// XXX fix -// return mat3 (m * n[0], m * n[1], m * n[2]); -} void __operator *= (inout mat3 m, const mat3 n) { m = m * n; @@ -1264,10 +1501,6 @@ vec3 __operator * (const mat3 m, const vec3 v) } -// xxx move this -mat4 __operator * (const mat4 m, const mat4 n) { - return mat4 (m * n[0], m * n[1], m * n[2], m * n[3]); -} void __operator *= (inout mat4 m, const mat4 n) { m = m * n; @@ -1433,66 +1666,8 @@ void __operator *= (inout vec4 v, const mat4 m) -mat2 __operator + (const mat2 m, const mat2 n) { - return mat2 (m[0] + n[0], m[1] + n[1]); -} -mat2 __operator - (const mat2 m, const mat2 n) { - return mat2 (m[0] - n[0], m[1] - n[1]); -} -mat2 __operator / (const mat2 m, const mat2 n) { - return mat2 (m[0] / n[0], m[1] / n[1]); -} - - -mat3 __operator + (const mat3 m, const mat3 n) -{ - __retVal[0] = m[0] + n[0]; - __retVal[1] = m[1] + n[1]; - __retVal[2] = m[2] + n[2]; -} - -mat3 __operator - (const mat3 m, const mat3 n) -{ - __retVal[0] = m[0] - n[0]; - __retVal[1] = m[1] - n[1]; - __retVal[2] = m[2] - n[2]; -} - -mat3 __operator / (const mat3 m, const mat3 n) -{ - __retVal[0] = m[0] / n[0]; - __retVal[0] = m[1] / n[1]; - __retVal[0] = m[2] / n[2]; -} - - -mat4 __operator + (const mat4 m, const mat4 n) -{ - __retVal[0] = m[0] + n[0]; - __retVal[1] = m[1] + n[1]; - __retVal[2] = m[2] + n[2]; - __retVal[3] = m[3] + n[3]; -} - -mat4 __operator - (const mat4 m, const mat4 n) -{ - __retVal[0] = m[0] - n[0]; - __retVal[1] = m[1] - n[1]; - __retVal[2] = m[2] - n[2]; - __retVal[3] = m[3] - n[3]; -} - - - -mat4 __operator / (const mat4 m, const mat4 n) -{ - __retVal[0] = m[0] / n[0]; - __retVal[0] = m[1] / n[1]; - __retVal[0] = m[2] / n[2]; - __retVal[0] = m[3] / n[3]; -} @@ -1599,99 +1774,6 @@ ivec2 __operator + (const int a, const ivec2 u) { return ivec2 (a) + u; } -ivec2 __operator + (const ivec2 v, const int b) { - return v + ivec2 (b); -} - -ivec2 __operator - (const int a, const ivec2 u) { - return ivec2 (a) - u; -} - -ivec2 __operator - (const ivec2 v, const int b) { - return v - ivec2 (b); -} - -ivec2 __operator * (const int a, const ivec2 u) { - return ivec2 (a) * u; -} - -ivec2 __operator * (const ivec2 v, const int b) { - return v * ivec2 (b); -} - -ivec2 __operator / (const int a, const ivec2 u) { - return ivec2 (a) / u; -} - -ivec2 __operator / (const ivec2 v, const int b) { - return v / ivec2 (b); -} - -ivec3 __operator + (const int a, const ivec3 u) { - return ivec3 (a) + u; -} - -ivec3 __operator + (const ivec3 v, const int b) { - return v + ivec3 (b); -} - -ivec3 __operator - (const int a, const ivec3 u) { - return ivec3 (a) - u; -} - -ivec3 __operator - (const ivec3 v, const int b) { - return v - ivec3 (b); -} - -ivec3 __operator * (const int a, const ivec3 u) { - return ivec3 (a) * u; -} - -ivec3 __operator * (const ivec3 v, const int b) { - return v * ivec3 (b); -} - -ivec3 __operator / (const int a, const ivec3 u) { - return ivec3 (a) / u; -} - -ivec3 __operator / (const ivec3 v, const int b) { - return v / ivec3 (b); -} - -ivec4 __operator + (const int a, const ivec4 u) { - return ivec4 (a) + u; -} - -ivec4 __operator + (const ivec4 v, const int b) { - return v + ivec4 (b); -} - -ivec4 __operator - (const int a, const ivec4 u) { - return ivec4 (a) - u; -} - -ivec4 __operator - (const ivec4 v, const int b) { - return v - ivec4 (b); -} - -ivec4 __operator * (const int a, const ivec4 u) { - return ivec4 (a) * u; -} - -ivec4 __operator * (const ivec4 v, const int b) { - return v * ivec4 (b); -} - -ivec4 __operator / (const int a, const ivec4 u) { - return ivec4 (a) / u; -} - -ivec4 __operator / (const ivec4 v, const int b) { - return v / ivec4 (b); -} - -///foo diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index e4ccc68767..df3a2957af 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -194,7 +194,30 @@ 85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102, 108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108, 116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120, -120,120,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101, +120,120,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, +98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, +18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, +98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, +18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, +98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, +18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, +98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, +18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, +98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, +18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, +98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, +18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, +98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, +18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, +98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, +18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, +98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, +18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, +98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, +18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, +98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, +18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, +98,0,0,0,49,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101, 103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101, 99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58, 118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12, @@ -285,299 +308,342 @@ 0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, 116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, 0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118, -0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0, -18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0, -0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1, -1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0, -18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0, -59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2, -1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97, -0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0, -2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, -118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118, -0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118, -0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2, -13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58, -118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16, -10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8, -58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,0,0,0, -1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, +0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118, +65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, +120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0, +59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0, +18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, +0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0, +0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118, +0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, +0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0, +1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120, +120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0, +13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0, +10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, +9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120, +0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82, +111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, +121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1, +0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, +20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0, +0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111, +119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111, +119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0, +16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0, +9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57, +59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82, +111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116, +0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116, +0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116, +0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2, +27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, +57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1, +1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9, +18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59, +122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0, +57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, +111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18, +109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121, +0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119, +50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16, +10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9, +18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59, +121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0, +57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, +0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, +18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116, +0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116, +0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18, +110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111, +116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0, +18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0, +1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0, +9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0, 0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1, -0,14,110,0,0,0,1,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48, -20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, -0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0, -16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18, -109,120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18, -118,0,0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, -57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18, -110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0, -18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, -0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, -0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, -10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, -1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, -57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, -0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, -50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, -10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, -13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0, -59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0, -48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, -0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0, -0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1, -114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, -120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, -114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, -57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0, -18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, -18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59, -122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, -20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18, -118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0, -0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, -51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0, -18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0, -0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18, -114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, +0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120, +0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18, +118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +48,46,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, +0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24, +0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1, +0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14, +109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1, +0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109, +0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, +57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,50,0,57,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,51,0,57,0,0, +20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, +0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, +121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,0,2,3,1,0,2,15,109,0, +0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0, +16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57, +18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2, +13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97, +0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18, +109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0, +1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, +10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, +97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, +16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, +1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, +57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, +0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, +0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, +0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, +49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, +1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, +10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, +0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18, +109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0, +59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48, +46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, +1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0, +1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, +114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, 57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, 18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, -18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49, -0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, -51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, -101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, -0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2, -26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0, -1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0, -1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0, -0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1, -1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0, -0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,22,1,1,0,15,109,0, -0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10, -51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109, -97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2, -26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18, -109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97, -116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27, -1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109, -0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0, -16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116, -50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116, -51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0, -16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0, -0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8, -48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14, -2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0, -18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110, -0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0, -9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98, -0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8, -58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0, -18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116, -51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57, -18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18, -110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18, -97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97, -116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50, -0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57, -47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0, -16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0, -0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8, -48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18, -110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52, -0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18, -98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, -1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18, -97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10, -49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0, -1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0, -1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0, -1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0, -1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0, -1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0, -1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0, -1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0, -1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0, -1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0, -1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0, -1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0, -1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0, -1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0, -1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0, -1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0, -1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0, -1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49, -0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0, -18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8, -58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57, -54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0, -0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18, -118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0, -52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118, -0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0, -2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7, -118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, -25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, -9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, -16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10, -49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0, -0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18, -97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121, -0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18, -118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0, -51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0, -59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9, -18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120, -0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0, -2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51, -0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9, -18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0, -0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0, -0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0, -2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, -118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, -0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, -25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, -0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, -118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, -61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, -9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, -0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, -1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, -59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, -0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, -1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, -0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, -1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, -0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, -0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, -1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, -57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2, -15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111, -97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0, -0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41, -0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, -116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97, -108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0, -5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0, -1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, -108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, -101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0, -0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1, -1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0, -15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97, -116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105, -0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0, -1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, +0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59, +122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0, +20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16, +10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0, +59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18, +95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116, +0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11, +118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0, +59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120, +0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0, +16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50, +0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59, +122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18, +109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108, +0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86, +97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0, +0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, +109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0, +13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46, +0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, +109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0, +13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47, +0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, +109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0, +13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48, +0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, +109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0, +13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49, +0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58, +109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18, +110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51, +0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18, +98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18, +110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0, +0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, +98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2, +21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18, +97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, +49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, +110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, +58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, +16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, +52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, +50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, +0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, +109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, +0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, +16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, +0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, +47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, +57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, +18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, +18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, +97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, +50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, +49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, +0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, +16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, +0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, +46,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0, +16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, +57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0, +0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50, +0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0, +22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9, +18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59, +120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9, +18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0, +0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1, +0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0, +0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0, +52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18, +109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, +16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8, +48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57, +52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1, +9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, +121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, +18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, +121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18, +118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0, +51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0, +59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2, +24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1, +0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50, +0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, +51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0, +5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1, +0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0, +1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2, +25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0, +61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52, +0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0, +0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18, +118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18, +118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, +116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0, +1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109, +0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18, +109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51, +0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, +51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, +0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, +122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49, +0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18, +109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0, +0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97, +0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0, +0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2, +16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, +102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95, +101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0, +5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, +0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, +111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113, +117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0, +1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0, +0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0, +0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, +108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, +1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, 116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, 69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -- cgit v1.2.3 From 356f8ea2132ca8b7a19869e5ff6d7c59a12bd5f0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 10:45:49 -0700 Subject: checkpoint: matrix/float, unary negation rewrite --- src/mesa/shader/slang/library/slang_core.gc | 364 ++++++---- src/mesa/shader/slang/library/slang_core_gc.h | 924 +++++++++++++------------- 2 files changed, 709 insertions(+), 579 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 5e1330f48f..a08044bfd9 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -808,30 +808,9 @@ ivec4 __operator / (const ivec4 v, const int b) { //// Unary negation operator -float __operator - (const float a) -{ - float b; - __asm float_negate b, a; - return b; -} - -vec2 __operator - (const vec2 v) -{ - return vec2 (-v.x, -v.y); -} - -vec3 __operator - (const vec3 v) -{ - return vec3 (-v.x, -v.y, -v.z); -} - -vec4 __operator - (const vec4 v) -{ - return vec4 (-v.x, -v.y, -v.z, -v.w); -} - int __operator - (const int a) { +// XXX redo float x; int b; __asm int_to_float x, a; @@ -842,19 +821,63 @@ int __operator - (const int a) ivec2 __operator - (const ivec2 v) { +// XXX redo return ivec2 (-v.x, -v.y); } ivec3 __operator - (const ivec3 v) { +// XXX redo return ivec3 (-v.x, -v.y, -v.z); } ivec4 __operator - (const ivec4 v) { +// XXX redo return ivec4 (-v.x, -v.y, -v.z, -v.w); } +float __operator - (const float a) +{ + __asm vec4_negate __retVal.x, a; +} + +vec2 __operator - (const vec2 v) +{ + __asm vec4_negate __retVal.xy, v.xy; +} + +vec3 __operator - (const vec3 v) +{ + __asm vec4_negate __retVal.xyz, v.xyz; +} + +vec4 __operator - (const vec4 v) +{ + __asm vec4_negate __retVal, v; +} + +mat2 __operator - (const mat2 m) +{ + __retVal[0] = -m[0]; + __retVal[1] = -m[1]; +} + +mat3 __operator - (const mat3 m) +{ + __retVal[0] = -m[0]; + __retVal[1] = -m[1]; + __retVal[2] = -m[2]; +} + +mat4 __operator - (const mat4 m) +{ + __retVal[0] = -m[0]; + __retVal[1] = -m[1]; + __retVal[2] = -m[2]; + __retVal[3] = -m[3]; +} + //// dot product @@ -881,7 +904,6 @@ float dot(const vec4 a, const vec4 b) - //// int assignment operators void __operator += (inout int a, const int b) @@ -1340,8 +1362,8 @@ mat3 __operator * (const mat3 m, const mat3 n) mat3 __operator / (const mat3 m, const mat3 n) { __retVal[0] = m[0] / n[0]; - __retVal[0] = m[1] / n[1]; - __retVal[0] = m[2] / n[2]; + __retVal[1] = m[1] / n[1]; + __retVal[2] = m[2] / n[2]; } @@ -1403,11 +1425,190 @@ mat4 __operator * (const mat4 m, const mat4 n) mat4 __operator / (const mat4 m, const mat4 n) { __retVal[0] = m[0] / n[0]; - __retVal[0] = m[1] / n[1]; - __retVal[0] = m[2] / n[2]; - __retVal[0] = m[3] / n[3]; + __retVal[1] = m[1] / n[1]; + __retVal[2] = m[2] / n[2]; + __retVal[3] = m[3] / n[3]; +} + + +//// mat2/float operations + +mat2 __operator + (const float a, const mat2 n) +{ + __retVal[0] = a + n[0]; + __retVal[1] = a + n[1]; +} + +mat2 __operator + (const mat2 m, const float b) +{ + __retVal[0] = m[0] + b; + __retVal[1] = m[1] + b; +} + +mat2 __operator - (const float a, const mat2 n) +{ + __retVal[0] = a - n[0]; + __retVal[1] = a - n[1]; +} + +mat2 __operator - (const mat2 m, const float b) +{ + __retVal[0] = m[0] - b; + __retVal[1] = m[1] - b; +} + +mat2 __operator * (const float a, const mat2 n) +{ + __retVal[0] = a * n[0]; + __retVal[1] = a * n[1]; +} + +mat2 __operator * (const mat2 m, const float b) +{ + __retVal[0] = m[0] * b; + __retVal[1] = m[1] * b; +} + +mat2 __operator / (const float a, const mat2 n) +{ + __retVal[0] = a / n[0]; + __retVal[1] = a / n[1]; } +mat2 __operator / (const mat2 m, const float b) +{ + __retVal[0] = m[0] / b; + __retVal[1] = m[1] / b; +} + + +//// mat3/float operations + +mat3 __operator + (const float a, const mat3 n) +{ + __retVal[0] = a + n[0]; + __retVal[1] = a + n[1]; + __retVal[2] = a + n[2]; +} + +mat3 __operator + (const mat3 m, const float b) +{ + __retVal[0] = m[0] + b; + __retVal[1] = m[1] + b; + __retVal[2] = m[2] + b; +} + +mat3 __operator - (const float a, const mat3 n) +{ + __retVal[0] = a - n[0]; + __retVal[1] = a - n[1]; + __retVal[2] = a - n[2]; +} + +mat3 __operator - (const mat3 m, const float b) +{ + __retVal[0] = m[0] - b; + __retVal[1] = m[1] - b; + __retVal[2] = m[2] - b; +} + +mat3 __operator * (const float a, const mat3 n) +{ + __retVal[0] = a * n[0]; + __retVal[1] = a * n[1]; + __retVal[2] = a * n[2]; +} + +mat3 __operator * (const mat3 m, const float b) +{ + __retVal[0] = m[0] * b; + __retVal[1] = m[1] * b; + __retVal[2] = m[2] * b; +} + +mat3 __operator / (const float a, const mat3 n) +{ + __retVal[0] = a / n[0]; + __retVal[1] = a / n[1]; + __retVal[2] = a / n[2]; +} + +mat3 __operator / (const mat3 m, const float b) +{ + __retVal[0] = m[0] / b; + __retVal[1] = m[1] / b; + __retVal[2] = m[2] / b; +} + + +//// mat4/float operations + +mat4 __operator + (const float a, const mat4 n) +{ + __retVal[0] = a + n[0]; + __retVal[1] = a + n[1]; + __retVal[2] = a + n[2]; + __retVal[3] = a + n[3]; +} + +mat4 __operator + (const mat4 m, const float b) +{ + __retVal[0] = m[0] + b; + __retVal[1] = m[1] + b; + __retVal[2] = m[2] + b; + __retVal[3] = m[3] + b; +} + +mat4 __operator - (const float a, const mat4 n) +{ + __retVal[0] = a - n[0]; + __retVal[1] = a - n[1]; + __retVal[2] = a - n[2]; + __retVal[3] = a - n[3]; +} + +mat4 __operator - (const mat4 m, const float b) +{ + __retVal[0] = m[0] - b; + __retVal[1] = m[1] - b; + __retVal[2] = m[2] - b; + __retVal[3] = m[3] - b; +} + +mat4 __operator * (const float a, const mat4 n) +{ + __retVal[0] = a * n[0]; + __retVal[1] = a * n[1]; + __retVal[2] = a * n[2]; + __retVal[3] = a * n[3]; +} + +mat4 __operator * (const mat4 m, const float b) +{ + __retVal[0] = m[0] * b; + __retVal[1] = m[1] * b; + __retVal[2] = m[2] * b; + __retVal[3] = m[3] * b; +} + +mat4 __operator / (const float a, const mat4 n) +{ + __retVal[0] = a / n[0]; + __retVal[1] = a / n[1]; + __retVal[2] = a / n[2]; + __retVal[3] = a / n[3]; +} + +mat4 __operator / (const mat4 m, const float b) +{ + __retVal[0] = m[0] / b; + __retVal[1] = m[1] / b; + __retVal[2] = m[2] / b; + __retVal[3] = m[3] / b; +} + + +////end @@ -1674,101 +1875,6 @@ void __operator *= (inout vec4 v, const mat4 m) //next -mat2 __operator + (const float a, const mat2 n) { - return mat2 (a + n[0], a + n[1]); -} - -mat2 __operator + (const mat2 m, const float b) { - return mat2 (m[0] + b, m[1] + b); -} - -mat2 __operator - (const float a, const mat2 n) { - return mat2 (a - n[0], a - n[1]); -} - -mat2 __operator - (const mat2 m, const float b) { - return mat2 (m[0] - b, m[1] - b); -} - -mat2 __operator * (const float a, const mat2 n) { - return mat2 (a * n[0], a * n[1]); -} - -mat2 __operator * (const mat2 m, const float b) { - return mat2 (m[0] * b, m[1] * b); -} - -mat2 __operator / (const float a, const mat2 n) { - return mat2 (a / n[0], a / n[1]); -} - -mat2 __operator / (const mat2 m, const float b) { - return mat2 (m[0] / b, m[1] / b); -} - -mat3 __operator + (const float a, const mat3 n) { - return mat3 (a + n[0], a + n[1], a + n[2]); -} - -mat3 __operator + (const mat3 m, const float b) { - return mat3 (m[0] + b, m[1] + b, m[2] + b); -} - -mat3 __operator - (const float a, const mat3 n) { - return mat3 (a - n[0], a - n[1], a - n[2]); -} - -mat3 __operator - (const mat3 m, const float b) { - return mat3 (m[0] - b, m[1] - b, m[2] - b); -} - -mat3 __operator * (const float a, const mat3 n) { - return mat3 (a * n[0], a * n[1], a * n[2]); -} - -mat3 __operator * (const mat3 m, const float b) { - return mat3 (m[0] * b, m[1] * b, m[2] * b); -} - -mat3 __operator / (const float a, const mat3 n) { - return mat3 (a / n[0], a / n[1], a / n[2]); -} - -mat3 __operator / (const mat3 m, const float b) { - return mat3 (m[0] / b, m[1] / b, m[2] / b); -} - -mat4 __operator + (const float a, const mat4 n) { - return mat4 (a + n[0], a + n[1], a + n[2], a + n[3]); -} - -mat4 __operator + (const mat4 m, const float b) { - return mat4 (m[0] + b, m[1] + b, m[2] + b, m[3] + b); -} - -mat4 __operator - (const float a, const mat4 n) { - return mat4 (a - n[0], a - n[1], a - n[2], a - n[3]); -} - -mat4 __operator - (const mat4 m, const float b) { - return mat4 (m[0] - b, m[1] - b, m[2] - b, m[3] - b); -} - -mat4 __operator * (const float a, const mat4 n) { - return mat4 (a * n[0], a * n[1], a * n[2], a * n[3]); -} - -mat4 __operator * (const mat4 m, const float b) { - return mat4 (m[0] * b, m[1] * b, m[2] * b, m[3] * b); -} - -mat4 __operator / (const float a, const mat4 n) { - return mat4 (a / n[0], a / n[1], a / n[2], a / n[3]); -} - -mat4 __operator / (const mat4 m, const float b) { - return mat4 (m[0] / b, m[1] / b, m[2] / b, m[3] / b); -} ivec2 __operator + (const int a, const ivec2 u) { return ivec2 (a) + u; @@ -1778,18 +1884,6 @@ ivec2 __operator + (const int a, const ivec2 u) { -mat2 __operator - (const mat2 m) { - return mat2 (-m[0], -m[1]); -} - -mat3 __operator - (const mat3 m) { - return mat3 (-m[0], -m[1], -m[2]); -} - -mat4 __operator - (const mat4 m) { - return mat4 (-m[0], -m[1], -m[2], -m[3]); -} - void __operator -- (inout float a) { a -= 1.0; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index df3a2957af..96282ea66f 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -217,454 +217,490 @@ 18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, 98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, 18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, -98,0,0,0,49,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,110,101, -103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101, -99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58, -118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12, -2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18, -118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0, -3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102, -108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111, -95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118, -101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0, -1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, -54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1, -0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1, -8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111, -116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86, -97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118, -101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1, -0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58, -102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97, -0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102, -108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5, -97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118, -0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6, -118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0, -2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0, -0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9, -18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118, -0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0, -18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1, -0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0, -2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117, -0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9, -97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0, -18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117, -0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1, -0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0, -0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1, -4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0, -0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0, -11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24, -0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1, -0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0, -0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0, -0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2, -1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22, -0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59, -121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0, -9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, -0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2, -7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9, -18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, -18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7, -118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18, -118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0, -5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59, -120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2, -8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9, -18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120, -0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, -116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, -0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118, -0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118, -65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, -120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0, -59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0, -18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, -0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0, -0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118, -0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, -0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0, -1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120, -120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0, -13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0, -10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, -16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, -9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, -121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120, -0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82, -111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, -121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1, -0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, -20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0, -0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111, -119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111, -119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0, -16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0, -9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, -122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57, -59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82, -111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116, -0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116, -0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116, -0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2, -27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, -57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15, -110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1, -1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9, -18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59, -122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0, -57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, -111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18, -109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121, +98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116, +95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97, +116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18, +120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0, +54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, +59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8, +58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118, +0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101, +99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, +121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12, +118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118, +0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20, +0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0, +15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, +18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, +0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, +97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, +1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, +97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, +54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, +5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, +0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, +117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, +117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, +0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, +0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, +0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, +0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, +1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, +18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, +0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, +1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0, +0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0, +59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0, +0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1, +9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1, +1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, +11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118, +0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0, +18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100, +100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, +12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9, +18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, +5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6, +118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0, +0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, +0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0, +0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97, +0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0, +59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0, +0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0, +24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18, +118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101, +99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1, +0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1, +9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0, +9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10, +118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0, +0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0, +0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0, +2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118, +0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, +0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118, +0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105, +110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120, +121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0, +1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, +120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, +99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59, +120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26, +1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, +8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47, +20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109, +82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109, +82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, +48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, +100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, +49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0, +0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1, +1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1, +109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48, +0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49, +0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109, +82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18, +109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121, 0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119, 50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16, -10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9, -18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59, -121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0, -57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, -0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, +10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, +0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, 18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, 49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, 95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116, -0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116, -0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18, -110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111, -116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0, -18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0, -1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0, -9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120, -0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,0,18, -118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -48,46,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, -0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24, -0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1, -0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14, -109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1, -0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109, -0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,50,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,10,51,0,57,0,0, -20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, -0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,0,2,3,1,0,2,15,109,0, -0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15, -110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57, -18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2, -13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97, -0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18, -109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0, -1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, -10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, -16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, -1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, -57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, -0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, -0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, -0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, -49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, -10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, -0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18, -109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,0,18,118,0, -59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48, -46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, -1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0, -1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0,9,18,114,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, -114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, -57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9, -18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59, -122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0, -20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,52,0,59,121,0,18,109,0,16, -10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,52,0, -59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18, -95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,4,118,101,99,52,95,100,111,116, -0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118,0,0,0,0,1,0,11,2,21,1,1,0,11, -118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,49,0, -59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,120, -0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0, -16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50, -0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59, -122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,51,0,59,122,0,18, -109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86, -97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0, -0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, -109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0, -13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46, -0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, -109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0, -13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47, -0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, -109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0, -13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48, -0,18,109,0,16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58, -109,97,116,50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0, -13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49, -0,18,109,0,16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58, -109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18, -110,0,16,10,50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51, -0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18, -98,0,46,0,0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18, -110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0, -0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, -98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2, -21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18, -97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14, -109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10, -49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14, -110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8, -58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0, -16,10,50,0,57,18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116, -52,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10, -50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18, -109,0,16,10,50,0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97, -0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0, -16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1, -0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0, -47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0, -57,18,98,0,47,0,0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0, -18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0, -18,97,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109, -97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10, -50,0,57,18,98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57, -49,0,18,97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1, -0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0, -16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0, -0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0, -46,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0, -16,10,49,0,57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, -57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0, -0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50, -0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0, -22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9, -18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9, -18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0, -0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1, -0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0, -0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0, -52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18, -109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0, -16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8, -48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57, -52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1, -9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, -121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, -18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59, -121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18, -118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0, -51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0, -59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2, -24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1, -0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50, -0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, -51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0, -5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1, -0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0, -1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2, -25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0, -61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52, -0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0, -0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18, -118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18, -118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, -122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, -116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0, -1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109, -0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18, -109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51, -0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, -51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, -0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0, -2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, -118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, -122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24, -1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49, -0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, -0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0, -0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18, -109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0, -0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97, -0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0, -0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2, -16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, -102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95, -101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0, -5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, -0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, -111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113, -117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0, -1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0, -0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0, -0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, -108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, -1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, +0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0, +18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, +0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0, +15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1, +1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, +51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0, +12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119, +51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119, +48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16, +10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9, +18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109, +82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18, +109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122, +0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119, +51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10, +49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18, +109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0, +18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, +49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, +100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111, +119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122, +0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82, +111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, +119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51, +0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26, +1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110, +0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49, +0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, +0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0, +13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13, +2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0, +14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97, +0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0, +16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0, +57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0, +1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0, +15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2, +27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0, +15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0, +0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, +110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, +10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, +48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, +18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, +16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,98,0,49,20,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58, +118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16, +10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0, +18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, +1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, +0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, +0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, +0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0, +16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18, +109,120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18, +118,0,0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, +57,0,0,20,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, +0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24, +0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50, +0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0, +9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2, +2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0, +57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, +0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, +16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0, +9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0, +16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2, +3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0, +57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50, +0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, +21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10, +51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16, +10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0, +16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109, +0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99, +50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57, +59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18, +118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,12,2,21,1,1,0,12, +118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0, +9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, +49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59, +119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, +20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0, +16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114, +51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59, +122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18, +109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18, +114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0, +57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, +52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, +101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, +4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118, +0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1, +114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18, +109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18, +114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0, +57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120, +0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0, +9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,0,2,3,1,0,2,12, +118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1, +0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1, +9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2, +25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11, +118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, +25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, +9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59, +121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18, +118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0, +52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16, +8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52, +0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1, +0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0, +59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0, +9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59, +120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24, +1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0, +0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2, +8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118, +0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49, +0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, +51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, +9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9, +2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0, +5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1, +0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59, +121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120, +0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0, +0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, +118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18, +118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0, +8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59, +121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0, +5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14, +2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16, +10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, +61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2, +18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0, +2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118, +101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0, +5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, +0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0, +18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118, +0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1, +0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0, +59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118, +101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0, +60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, +116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0, +1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18, +109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15, +1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, +0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, +97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9, +98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97, +0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0, +0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0, +1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0, +0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101, +0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0, +1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108, +111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0, +1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, +116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0, +1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116, +0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58, 112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, 0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, -0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, -0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112, +114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4, +105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From a0d6b506cdb1faa74d53fcb9d93de49985bc3e95 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 10:47:28 -0700 Subject: added IR_NEG for negation --- src/mesa/shader/slang/slang_codegen.c | 1 + src/mesa/shader/slang/slang_emit.c | 37 +++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_ir.h | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a2be043542..0f7a5a4cb6 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -84,6 +84,7 @@ static slang_asm_info AsmInfo[] = { { "vec4_floor", IR_FLOOR, 1, 1 }, { "vec4_frac", IR_FRAC, 1, 1 }, { "vec4_abs", IR_ABS, 1, 1 }, + { "vec4_neg", IR_NEG, 1, 1 }, /* float binary op */ { "float_add", IR_ADD, 1, 2 }, { "float_subtract", IR_SUB, 1, 2 }, diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 39f470046b..cc522131ce 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -78,6 +78,7 @@ static slang_ir_info IrInfo[] = { { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, + { IR_NEG, "IR_NEG", OPCODE_NOP, 4, 1 }, /* XXX fix!!!! */ { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, /* other */ @@ -936,6 +937,40 @@ emit_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) } +static struct prog_instruction * +emit_negation(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +{ +#if 0 + struct prog_instruction *inst; + const slang_ir_info *info = slang_find_ir_info(n->Opcode); + assert(info); + + assert(info->NumParams == 1); + + emit(gc, n->Children[0], prog); + + inst = new_instruction(prog, info->InstOpcode); + /*slang_resolve_storage(gc, n, prog);*/ + + if (!n->Store) + slang_alloc_temp_storage(gc, n, info->ResultSize); + + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, + n->Children[0]->Swizzle); + + inst->Comment = n->Comment; + + return inst; +#endif + /* XXX this is something we can optimize for, with a bit of work.*/ + abort(); + return NULL; +#endif +} + + static struct prog_instruction * emit_label(const char *target, struct gl_program *prog) { @@ -1084,6 +1119,8 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_SIN: case IR_COS: return emit_unop(gc, n, prog); + case IR_NEG: + return emit_negation(gc, n, prog): case IR_LABEL: return emit_label(n->Target, prog); case IR_FLOAT: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 188d7d96d3..7c5e044861 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -72,7 +72,8 @@ typedef enum IR_RCP, /* recipricol */ IR_FLOOR, IR_FRAC, - IR_ABS, + IR_ABS, /* absolute value */ + IR_NEG, /* negate */ IR_SIN, /* sine */ IR_COS, /* cosine */ IR_NOT, /* logical not */ -- cgit v1.2.3 From c155ae1dfed9eaec167a06d341e2b8c8c8ef1730 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 10:49:27 -0700 Subject: fix typos --- src/mesa/shader/slang/slang_emit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index cc522131ce..2b631a3b72 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -963,7 +963,7 @@ emit_negation(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) inst->Comment = n->Comment; return inst; -#endif +#else /* XXX this is something we can optimize for, with a bit of work.*/ abort(); return NULL; @@ -1120,7 +1120,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_COS: return emit_unop(gc, n, prog); case IR_NEG: - return emit_negation(gc, n, prog): + return emit_negation(gc, n, prog); case IR_LABEL: return emit_label(n->Target, prog); case IR_FLOAT: -- cgit v1.2.3 From 58af54c76773bd9fc96d43fc209a0dc4db934ca7 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 10:56:09 -0700 Subject: checkpoint: rewrite vec/mat products --- src/mesa/shader/slang/library/slang_core.gc | 174 ++++++------ src/mesa/shader/slang/library/slang_core_gc.h | 390 +++++++++++++------------- 2 files changed, 287 insertions(+), 277 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index a08044bfd9..4c18e6d966 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -705,6 +705,10 @@ vec4 __operator / (const vec4 v, const float b) //// Basic ivec2/int operators +ivec2 __operator + (const int a, const ivec2 u) { + return ivec2 (a) + u; +} + ivec2 __operator + (const ivec2 v, const int b) { return v + ivec2 (b); } @@ -1608,6 +1612,93 @@ mat4 __operator / (const mat4 m, const float b) } + +//// matrix / vector products + +vec2 __operator * (const mat2 m, const vec2 v) +{ + __retVal.x = dot(m[0], v); + __retVal.y = dot(m[1], v); +} + +vec2 __operator * (const vec2 v, const mat2 m) +{ + vec2 r0, r1; + r0.x = m[0].x; + r0.y = m[1].x; + r1.x = m[0].y; + r1.y = m[1].y; + __retVal.x = dot(v, r0); + __retVal.y = dot(v, r1); +} + +vec3 __operator * (const mat3 m, const vec3 v) +{ + __retVal.x = dot(m[0], v); + __retVal.y = dot(m[1], v); + __retVal.z = dot(m[2], v); +} + +vec3 __operator * (const vec3 v, const mat3 m) +{ + vec3 r0, r1, r2; + r0.x = m[0].x; + r0.y = m[1].x; + r0.z = m[2].x; + r1.x = m[0].y; + r1.y = m[1].y; + r1.z = m[2].y; + r2.x = m[0].z; + r2.y = m[1].z; + r2.z = m[2].z; + __asm vec3_dot __retVal.x, v, r0; + __asm vec3_dot __retVal.y, v, r1; + __asm vec3_dot __retVal.z, v, r2; +} + +vec4 __operator * (const mat4 m, const vec4 v) +{ + __retVal.x = dot(m[0], v); + __retVal.y = dot(m[1], v); + __retVal.z = dot(m[2], v); + __retVal.w = dot(m[3], v); +} + +vec4 __operator * (const vec4 v, const mat4 m) +{ + vec4 r0, r1, r2, r3; + r0.x = m[0].x; + r0.y = m[1].x; + r0.z = m[2].x; + r0.w = m[3].x; + r1.x = m[0].y; + r1.y = m[1].y; + r1.z = m[2].y; + r1.w = m[3].y; + r2.x = m[0].z; + r2.y = m[1].z; + r2.z = m[2].z; + r2.w = m[3].z; + r3.x = m[0].w; + r3.y = m[1].w; + r3.z = m[2].w; + r3.w = m[3].w; + __asm vec4_dot __retVal.x, v, r0; + __asm vec4_dot __retVal.y, v, r1; + __asm vec4_dot __retVal.z, v, r2; + __asm vec4_dot __retVal.w, v, r3; +} + + + + + + + + + + + ////end @@ -1623,14 +1714,6 @@ void __operator -= (inout mat2 m, const mat2 n) { m[1] -= n[1]; } -vec2 __operator * (const mat2 m, const vec2 v) { - return vec2 ( - v.x * m[0].x + v.y * m[1].x, - v.x * m[0].y + v.y * m[1].y - ); -} - - void __operator *= (inout mat2 m, const mat2 n) { @@ -1685,22 +1768,6 @@ void __operator -= (inout mat4 m, const mat4 n) { -vec4 __operator * (const mat4 mx, const vec4 v) -{ - __retVal.x = dot(v, mx[0]); - __retVal.y = dot(v, mx[1]); - __retVal.z = dot(v, mx[2]); - __retVal.w = dot(v, mx[3]); -} - -//matmul -vec3 __operator * (const mat3 m, const vec3 v) -{ - __retVal.x = dot(v, m[0]); - __retVal.y = dot(v, m[1]); - __retVal.z = dot(v, m[2]); -} - void __operator *= (inout mat4 m, const mat4 n) { @@ -1787,12 +1854,6 @@ void __operator /= (inout mat4 m, const float a) { m[3] /= a; } -vec2 __operator * (const vec2 v, const mat2 m) { - return vec2 ( - v.x * m[0].x + v.y * m[0].y, - v.x * m[1].x + v.y * m[1].y - ); -} void __operator *= (inout vec2 v, const mat2 m) { v = v * m; @@ -1804,53 +1865,6 @@ void __operator *= (inout vec3 v, const mat3 m) { -vec4 __operator * (const vec4 v, const mat4 m) -{ - vec4 r1, r2, r3, r4; - r1.x = m[0].x; - r1.y = m[1].x; - r1.z = m[2].x; - r1.w = m[3].x; - r2.x = m[0].y; - r2.y = m[1].y; - r2.z = m[2].y; - r2.w = m[3].y; - r3.x = m[0].z; - r3.y = m[1].z; - r3.z = m[2].z; - r3.w = m[3].z; - r4.x = m[0].w; - r4.y = m[1].w; - r4.z = m[2].w; - r4.w = m[3].w; - __asm vec4_dot __retVal.x, r1, v; - __asm vec4_dot __retVal.y, r2, v; - __asm vec4_dot __retVal.z, r3, v; - __asm vec4_dot __retVal.w, r4, v; -} - -// matmul -vec3 __operator * (const vec3 v, const mat3 m) -{ - vec3 r1, r2, r3; - r1.x = m[0].x; - r1.y = m[1].x; - r1.z = m[2].x; - r2.x = m[0].y; - r2.y = m[1].y; - r2.z = m[2].y; - r3.x = m[0].z; - r3.y = m[1].z; - r3.z = m[2].z; - __asm vec3_dot __retVal.x, r1, v; - __asm vec3_dot __retVal.y, r2, v; - __asm vec3_dot __retVal.z, r3, v; -} - - - - - @@ -1876,12 +1890,6 @@ void __operator *= (inout vec4 v, const mat4 m) -ivec2 __operator + (const int a, const ivec2 u) { - return ivec2 (a) + u; -} - - - void __operator -- (inout float a) { diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 96282ea66f..3e2ae404f5 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -194,7 +194,8 @@ 85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102, 108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108, 116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120, -120,120,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, +120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, +18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, 98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, 18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, 98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, @@ -508,199 +509,200 @@ 97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, 10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, 18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,98,0,49,20,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,8,58, -118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16, -10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, -1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, -0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, -0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,15,109,120,0,0,1,1,0,12,118,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,120,0,16,8,48,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,120,0, -16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18, -109,120,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18, -118,0,0,18,109,120,0,16,10,51,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0, -57,0,0,20,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, -0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24, -0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50, -0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0, -9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2, -2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0, -57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, -0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0, -9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0, -16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2, -3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0, -57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50, -0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10, -51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16, -10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0, -16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109, -0,16,10,51,0,57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99, -50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57, -59,121,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18, -118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,12,2,21,1,1,0,12, -118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,1,1,114,52,0,0,0, -9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, -49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59, -119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, -20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0, -16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114, -51,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59, -122,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,51,0,59,119,0,18, -109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,52,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18, -114,52,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,52,0,59,122,0,18,109,0,16,10,50,0, -57,59,119,0,20,0,9,18,114,52,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99, -52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118, -101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0, -4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,52,0,0,18,118, -0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,49,0,0,1,1,114,50,0,0,1,1, -114,51,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,49,0,59,121,0,18, -109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18, -114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0, -57,59,121,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,51,0,59,120, -0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0, -9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,120,0,0,18,114,49,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,50,0,0,18,118,0,0,0,4,118,101,99,51,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,51,0,0,18,118,0,0,0,0,1,0,0,2,3,1,0,2,12, -118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1, -0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1, -9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2, -25,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11, -118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, -25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, -9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59, -121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18, -118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0, -52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16, -8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52, -0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1, -0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0, -59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0, -9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59, -120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24, -1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0, -0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2, -8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118, -0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49, -0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, -51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, -9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9, -2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0, -5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1, -0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59, -121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120, -0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0, -0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, -118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18, -118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0, -8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59, -121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0, -5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14, -2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16, -10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8, -58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, -61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2, -18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0, -2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118, -101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, -0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0, -18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118, -0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1, -0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0, -59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118, -101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0, -60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, -60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, -116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0, -1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18, -109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15, -1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, -97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9, -98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97, -0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0, -0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0, -1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0, -0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101, -0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0, -1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108, -111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0, -1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, -116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0, -1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116, -0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105, +16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0, +10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0, +59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, +0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, +0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, +114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11, +2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9, +18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49, +0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59, +120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0, +16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50, +0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18, +95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0, +1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48, +0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16, +10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109, +0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0, +18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2, +0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48, +0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59, +120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18, +109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18, +114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0, +57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122, +0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0, +9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10, +49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59, +119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, +101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0, +0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0, +2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0, +0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16, +10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, +1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, +1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16, +10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1, +0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51, +0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0, +2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18, +97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, +18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, +8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0, +0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, +10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, +97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, +16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, +1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, +57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, +0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, +0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, +0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, +49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, +1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, +10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, +0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2, +3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118, +0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0, +2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59, +120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9, +18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59, +120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25, +1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0, +0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2, +8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118, +0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49, +0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, +52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0, +9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0, +2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16, +10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, +1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, +122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, +18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, +0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118, +0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0, +9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0, +0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1, +0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109, +0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, +0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, +2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0, +1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11, +118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, +0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, +59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, +25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, +0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, +118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, +61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, +9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, +0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, +1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, +59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, +120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, +5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, +0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, +18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, +58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, +1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, +0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, +1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, +0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, +0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, +1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, +57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2, +15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111, +97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0, +0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41, +0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, +116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97, +108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0, +5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0, +1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, +108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, +101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0, +0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1, +1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0, +15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97, +116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105, +0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, +0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0, +1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58, +121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, 112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, 0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, -101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112, -114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4, -105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, +65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, +0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, +0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 2905385744a385bc8bc6cbd2d749673c93380462 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 11:21:26 -0700 Subject: comment about uniforms --- src/mesa/shader/shader_api.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 8daf585f7d..1e282e7373 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -737,6 +737,10 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) for (loc = 0; loc < shProg->Uniforms->NumParameters; loc++) { const struct gl_program_parameter *u = shProg->Uniforms->Parameters + loc; + /* XXX this is a temporary simplification / short-cut. + * We need to handle things like "e.c[0].b" as seen in the + * GLSL orange book, page 189. + */ if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { return loc; } -- cgit v1.2.3 From eb2a6d62f9353d90be757fc1617040c7ccddac39 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 17:50:07 -0700 Subject: s/attribute/varying/ --- src/mesa/swrast/s_tritemp.h | 9 +++++---- src/mesa/swrast/swrast.h | 2 +- src/mesa/swrast_setup/ss_context.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index 0ed1772a88..c85379b4b1 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -41,7 +41,7 @@ * INTERP_TEX - if defined, interpolate set 0 float STRQ texcoords * NOTE: OpenGL STRQ = Mesa STUV (R was taken for red) * INTERP_MULTITEX - if defined, interpolate N units of STRQ texcoords - * INTERP_VARYING - if defined, interpolate M floats of GLSL varyings + * INTERP_VARYING - if defined, interpolate M GLSL varyings * * When one can directly address pixels in the color buffer the following * macros can be defined and used to compute pixel addresses during @@ -144,6 +144,7 @@ #ifdef INTERP_VARYING +/* XXX need a varyingEnabled[] check */ #define VARYING_LOOP(CODE) \ { \ GLuint iv, ic; \ @@ -669,8 +670,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, /* win[3] is 1/W */ const GLfloat wMax = vMax->win[3], wMin = vMin->win[3], wMid = vMid->win[3]; VARYING_LOOP( - GLfloat eMaj_dvar = vMax->attribute[iv][ic] * wMax - vMin->attribute[iv][ic] * wMin; - GLfloat eBot_dvar = vMid->attribute[iv][ic] * wMid - vMin->attribute[iv][ic] * wMin; + GLfloat eMaj_dvar = vMax->varying[iv][ic] * wMax - vMin->varying[iv][ic] * wMin; + GLfloat eBot_dvar = vMid->varying[iv][ic] * wMid - vMin->varying[iv][ic] * wMin; span.varStepX[iv][ic] = oneOverArea * (eMaj_dvar * eBot.dy - eMaj.dy * eBot_dvar); span.varStepY[iv][ic] = oneOverArea * (eMaj.dx * eBot_dvar - eMaj_dvar * eBot.dx); ) @@ -1060,7 +1061,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_VARYING VARYING_LOOP( const GLfloat invW = vLower->win[3]; - const GLfloat var0 = vLower->attribute[iv][ic] * invW; + const GLfloat var0 = vLower->varying[iv][ic] * invW; varLeft[iv][ic] = var0 + (span.varStepX[iv][ic] * adjx + span.varStepY[iv][ic] * adjy) * (1.0f / FIXED_SCALE); dvarOuter[iv][ic] = span.varStepY[iv][ic] + dxOuter * span.varStepX[iv][ic]; diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h index 09686c8380..2c1c0952af 100644 --- a/src/mesa/swrast/swrast.h +++ b/src/mesa/swrast/swrast.h @@ -73,7 +73,7 @@ typedef struct { GLfloat fog; GLfloat index; GLfloat pointSize; - GLfloat attribute[MAX_VERTEX_ATTRIBS][4]; + GLfloat varying[MAX_VERTEX_ATTRIBS][4]; } SWvertex; diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index 924b423e88..f17e69bfb2 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -156,7 +156,7 @@ _swsetup_RenderStart( GLcontext *ctx ) for (i = 0; i < ctx->Const.MaxVarying; i++) { if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_GENERIC(i) )) { EMIT_ATTR( _TNL_ATTRIB_GENERIC(i), VARYING_EMIT_STYLE, - attribute[i] ); + varying[i] ); } } } -- cgit v1.2.3 From 392d9701e30f4c7b4cbd25cb8714a42ba2512bd4 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 17:50:22 -0700 Subject: added INTERP_VARYING code --- src/mesa/swrast/s_linetemp.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src') diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index f5b2d95653..61c338ac69 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -37,6 +37,7 @@ * INTERP_INDEX - if defined, interpolate color index values * INTERP_TEX - if defined, interpolate unit 0 texcoords * INTERP_MULTITEX - if defined, interpolate multi-texcoords + * INTERP_VARYING - if defined, interpolate GLSL varyings * * When one can directly address pixels in the color buffer the following * macros can be defined and used to directly compute pixel addresses during @@ -333,6 +334,34 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) } } #endif +#ifdef INTERP_VARYING + interpFlags |= SPAN_VARYING; + { /* XXX review this */ + const GLfloat invLen = 1.0F / numPixels; + GLuint v; + for (v = 0; v < MAX_VARYING; v++) { + const GLfloat invw0 = vert0->win[3]; + const GLfloat invw1 = vert1->win[3]; + GLfloat ds, dt, dr, dq; + span.var[v][0] = invw0 * vert0->varying[v][0]; + span.var[v][1] = invw0 * vert0->varying[v][1]; + span.var[v][2] = invw0 * vert0->varying[v][2]; + span.var[v][3] = invw0 * vert0->varying[v][3]; + ds = (invw1 * vert1->varying[v][0]) - span.var[v][0]; + dt = (invw1 * vert1->varying[v][1]) - span.var[v][1]; + dr = (invw1 * vert1->varying[v][2]) - span.var[v][2]; + dq = (invw1 * vert1->varying[v][3]) - span.var[v][3]; + span.varStepX[v][0] = ds * invLen; + span.varStepX[v][1] = dt * invLen; + span.varStepX[v][2] = dr * invLen; + span.varStepX[v][3] = dq * invLen; + span.varStepY[v][0] = 0.0F; + span.varStepY[v][1] = 0.0F; + span.varStepY[v][2] = 0.0F; + span.varStepY[v][3] = 0.0F; + } + } +#endif INIT_SPAN(span, GL_LINE, numPixels, interpFlags, SPAN_XY); -- cgit v1.2.3 From 01f2e7f62fd4791d838350502bb5a47bbcdebd62 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 18:05:06 -0700 Subject: checkpoint: pre/post incr/decr operators --- src/mesa/shader/slang/library/slang_core.gc | 179 ++++++++++---------- src/mesa/shader/slang/library/slang_core_gc.h | 224 +++++++++++++------------- 2 files changed, 208 insertions(+), 195 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 4c18e6d966..30fea370e3 100755 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1691,68 +1691,65 @@ vec4 __operator * (const vec4 v, const mat4 m) +//// mat2 assignment operators - - - - - - - -////end - - - - -void __operator += (inout mat2 m, const mat2 n) { +void __operator += (inout mat2 m, const mat2 n) +{ m[0] += n[0]; m[1] += n[1]; } -void __operator -= (inout mat2 m, const mat2 n) { +void __operator -= (inout mat2 m, const mat2 n) +{ m[0] -= n[0]; m[1] -= n[1]; } - - -void __operator *= (inout mat2 m, const mat2 n) { +void __operator *= (inout mat2 m, const mat2 n) +{ m = m * n; } -void __operator /= (inout mat2 m, const mat2 n) { +void __operator /= (inout mat2 m, const mat2 n) +{ m[0] /= n[0]; m[1] /= n[1]; } -void __operator += (inout mat3 m, const mat3 n) { + +//// mat3 assignment operators + +void __operator += (inout mat3 m, const mat3 n) +{ m[0] += n[0]; m[1] += n[1]; m[2] += n[2]; } -void __operator -= (inout mat3 m, const mat3 n) { +void __operator -= (inout mat3 m, const mat3 n) +{ m[0] -= n[0]; m[1] -= n[1]; m[2] -= n[2]; } - - - - - -void __operator *= (inout mat3 m, const mat3 n) { +void __operator *= (inout mat3 m, const mat3 n) +{ m = m * n; } -void __operator /= (inout mat3 m, const mat3 n) { +void __operator /= (inout mat3 m, const mat3 n) +{ m[0] /= n[0]; m[1] /= n[1]; m[2] /= n[2]; } -void __operator += (inout mat4 m, const mat4 n) { + +// mat4 assignment operators + +void __operator += (inout mat4 m, const mat4 n) +{ m[0] += n[0]; m[1] += n[1]; m[2] += n[2]; @@ -1766,15 +1763,13 @@ void __operator -= (inout mat4 m, const mat4 n) { m[3] -= n[3]; } - - - - -void __operator *= (inout mat4 m, const mat4 n) { +void __operator *= (inout mat4 m, const mat4 n) +{ m = m * n; } -void __operator /= (inout mat4 m, const mat4 n) { +void __operator /= (inout mat4 m, const mat4 n) +{ m[0] /= n[0]; m[1] /= n[1]; m[2] /= n[2]; @@ -1782,6 +1777,8 @@ void __operator /= (inout mat4 m, const mat4 n) { } +//// mat2/float assignment operators + void __operator += (inout mat2 m, const float a) { m[0] += a; m[1] += a; @@ -1802,6 +1799,9 @@ void __operator /= (inout mat2 m, const float a) { m[1] /= a; } + +//// mat3/float assignment operators + void __operator += (inout mat3 m, const float a) { m[0] += a; m[1] += a; @@ -1826,6 +1826,9 @@ void __operator /= (inout mat3 m, const float a) { m[2] /= a; } + +//// mat4/float assignment operators + void __operator += (inout mat4 m, const float a) { m[0] += a; m[1] += a; @@ -1855,106 +1858,103 @@ void __operator /= (inout mat4 m, const float a) { } -void __operator *= (inout vec2 v, const mat2 m) { + +//// vec/mat assignment operators + +void __operator *= (inout vec2 v, const mat2 m) +{ v = v * m; } -void __operator *= (inout vec3 v, const mat3 m) { -// v = v * m; +void __operator *= (inout vec3 v, const mat3 m) +{ + v = v * m; } - - - - - - - void __operator *= (inout vec4 v, const mat4 m) { -// xxx improve codegen for this case v = v * m; } +//// pre-decrement operators - - - - - - - -//next - - - - - -void __operator -- (inout float a) { - a -= 1.0; -} - -void __operator -- (inout int a) { +void __operator -- (inout int a) +{ a -= 1; } -void __operator -- (inout vec2 v) { +void __operator -- (inout ivec2 v) +{ --v.x; --v.y; } -void __operator -- (inout vec3 v) { +void __operator -- (inout ivec3 v) +{ --v.x; --v.y; --v.z; } -void __operator -- (inout vec4 v) { +void __operator -- (inout ivec4 v) +{ --v.x; --v.y; --v.z; --v.w; } -void __operator -- (inout ivec2 v) { - --v.x; - --v.y; +void __operator -- (inout float a) +{ + a -= 1.0; } -void __operator -- (inout ivec3 v) { - --v.x; - --v.y; - --v.z; +void __operator -- (inout vec2 v) +{ + vec2 one = vec1(1.0, 1.0); + v = v - one; } -void __operator -- (inout ivec4 v) { - --v.x; - --v.y; - --v.z; - --v.w; +void __operator -- (inout vec3 v) +{ + vec3 one = vec1(1.0, 1.0, 1.0); + v = v - one; } -void __operator -- (inout mat2 m) { +void __operator -- (inout vec4 v) +{ + vec4 one = vec1(1.0, 1.0, 1.0, 1.0); + v = v - one; +} + +void __operator -- (inout mat2 m) +{ --m[0]; --m[1]; } -void __operator -- (inout mat3 m) { +void __operator -- (inout mat3 m) +{ --m[0]; --m[1]; --m[2]; } -void __operator -- (inout mat4 m) { +void __operator -- (inout mat4 m) +{ --m[0]; --m[1]; --m[2]; --m[3]; } -void __operator ++ (inout float a) { + +//// pre-increment operators + +void __operator ++ (inout float a) +{ a += 1.0; } @@ -2016,9 +2016,12 @@ void __operator ++ (inout mat4 m) { ++m[3]; } + + + // -// NOTE: postfix increment and decrement operators take additional dummy int parameter to -// distinguish their prototypes from prefix ones. +// NOTE: post-increment and decrement operators take an additional +// dummy int parameter to distinguish their prototypes from prefix ones. // float __operator -- (inout float a, const int) { @@ -2118,6 +2121,10 @@ mat4 __operator ++ (inout mat4 m, const int) { } + +//// inequality operators + + // XXX are the inequality operators for floats/ints really needed???? bool __operator < (const float a, const float b) { @@ -2165,6 +2172,8 @@ bool __operator ^^ (const bool a, const bool b) { return a != b; } + + // // These operators are handled internally by the compiler: // @@ -2180,6 +2189,8 @@ bool __operator ! (const bool a) { return a == false; } + + // // MESA-specific extension functions. // diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 3e2ae404f5..297cf36a23 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -593,116 +593,118 @@ 1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, 10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, 0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2, -3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118, -0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0, -2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9, -18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59, -120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25, -1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0, -0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2, -8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118, -0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49, -0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, -52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0, -9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0, -2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16, -10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, -1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59, -122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9, -18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120, -0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118, -0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0, -9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0, -0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1, -0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109, -0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, -0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, -2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0, -1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11, -118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, -0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2, -25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121, -0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, -118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, -61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0, -9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, -0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0, -1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0, -59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59, -120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, -0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8, -58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0, -1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118, -0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1, -1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1, -0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109, -0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0, -1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0, -57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2, -15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111, -97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0, -0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41, -0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, -116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97, -108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0, -5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0, -1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, -108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, -101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0, -0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1, -1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0, -15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97, -116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105, -0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0, -1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105, +3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12, +118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1, +9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59, +121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18, +118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0, +52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0, +17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,3,2,0,10,1,111,110,101,0,2,58,118,101,99,49, +0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2, +25,1,0,2,11,118,0,0,0,1,3,2,0,11,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48, +0,0,0,17,49,0,48,0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,12, +118,0,0,0,1,3,2,0,12,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49, +0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2, +13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52, +0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9, +18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97, +0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2, +10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1, +9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12, +118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0, +59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, +1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122, +0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118, +0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57, +51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, +9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18, +109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16, +10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, +52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, +0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, +118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, +1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, +122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, +120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, +1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, +0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, +0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, +0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, +109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, +1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, +0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, +0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, +11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, +118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, +0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, +24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, +0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, +118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, +60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, +1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, +0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, +1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, +18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, +0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, +0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, +1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, +4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, +32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, +39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, +114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, 0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, -0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, -0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 9b694589e9c47a777ce9f7fab6e4ef90d3c94c80 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 21 Dec 2006 18:12:03 -0700 Subject: chmod a-x --- src/mesa/shader/slang/library/gc_to_bin.c | 0 src/mesa/shader/slang/library/slang_120_core.gc | 0 src/mesa/shader/slang/library/slang_builtin_120_common.gc | 0 src/mesa/shader/slang/library/slang_builtin_120_fragment.gc | 0 src/mesa/shader/slang/library/slang_builtin_vec4.gc | 0 src/mesa/shader/slang/library/slang_common_builtin.gc | 0 src/mesa/shader/slang/library/slang_core.gc | 0 src/mesa/shader/slang/library/slang_fragment_builtin.gc | 0 src/mesa/shader/slang/library/slang_vertex_builtin.gc | 0 9 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/mesa/shader/slang/library/gc_to_bin.c mode change 100755 => 100644 src/mesa/shader/slang/library/slang_120_core.gc mode change 100755 => 100644 src/mesa/shader/slang/library/slang_builtin_120_common.gc mode change 100755 => 100644 src/mesa/shader/slang/library/slang_builtin_120_fragment.gc mode change 100755 => 100644 src/mesa/shader/slang/library/slang_builtin_vec4.gc mode change 100755 => 100644 src/mesa/shader/slang/library/slang_common_builtin.gc mode change 100755 => 100644 src/mesa/shader/slang/library/slang_core.gc mode change 100755 => 100644 src/mesa/shader/slang/library/slang_fragment_builtin.gc mode change 100755 => 100644 src/mesa/shader/slang/library/slang_vertex_builtin.gc (limited to 'src') diff --git a/src/mesa/shader/slang/library/gc_to_bin.c b/src/mesa/shader/slang/library/gc_to_bin.c old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_120_core.gc b/src/mesa/shader/slang/library/slang_120_core.gc old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_builtin_120_common.gc b/src/mesa/shader/slang/library/slang_builtin_120_common.gc old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_builtin_120_fragment.gc b/src/mesa/shader/slang/library/slang_builtin_120_fragment.gc old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_builtin_vec4.gc b/src/mesa/shader/slang/library/slang_builtin_vec4.gc old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/src/mesa/shader/slang/library/slang_fragment_builtin.gc old mode 100755 new mode 100644 diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin.gc b/src/mesa/shader/slang/library/slang_vertex_builtin.gc old mode 100755 new mode 100644 -- cgit v1.2.3 From aa710c3e6b17a4af54f2243de8888da4844d5c75 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 22 Dec 2006 10:18:50 -0700 Subject: implement unary +, - --- src/mesa/shader/slang/slang_codegen.c | 13 +++++++++++-- src/mesa/shader/slang/slang_emit.c | 27 ++++++++------------------- 2 files changed, 19 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 0f7a5a4cb6..3fca45ce12 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -84,7 +84,7 @@ static slang_asm_info AsmInfo[] = { { "vec4_floor", IR_FLOOR, 1, 1 }, { "vec4_frac", IR_FRAC, 1, 1 }, { "vec4_abs", IR_ABS, 1, 1 }, - { "vec4_neg", IR_NEG, 1, 1 }, + { "vec4_negate", IR_NEG, 1, 1 }, /* float binary op */ { "float_add", IR_ADD, 1, 2 }, { "float_subtract", IR_SUB, 1, 2 }, @@ -1426,7 +1426,16 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) n = _slang_gen_function_call_name(A, "/", oper, NULL); return n; } - + case slang_oper_minus: + { + slang_ir_node *n; + assert(oper->num_children == 1); + n = _slang_gen_function_call_name(A, "-", oper, NULL); + return n; + } + case slang_oper_plus: + /* +expr --> do nothing */ + return _slang_gen_operation(A, &oper->children[0]); case slang_oper_variable_decl: return _slang_gen_declaration(A, oper); case slang_oper_assign: diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 2b631a3b72..8b0999dfcc 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -78,7 +78,7 @@ static slang_ir_info IrInfo[] = { { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, - { IR_NEG, "IR_NEG", OPCODE_NOP, 4, 1 }, /* XXX fix!!!! */ + { IR_NEG, "IR_NEG", 0/*spec case*/, 4, 1 }, { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, /* other */ @@ -921,7 +921,6 @@ emit_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) emit(gc, n->Children[0], prog); inst = new_instruction(prog, info->InstOpcode); - /*slang_resolve_storage(gc, n, prog);*/ if (!n->Store) slang_alloc_temp_storage(gc, n, info->ResultSize); @@ -940,34 +939,24 @@ emit_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * emit_negation(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { -#if 0 + /* Implement as MOV dst, -src; */ + /* XXX we could look at the previous instruction and in some circumstances + * modify it to accomplish the negation. + */ struct prog_instruction *inst; - const slang_ir_info *info = slang_find_ir_info(n->Opcode); - assert(info); - - assert(info->NumParams == 1); emit(gc, n->Children[0], prog); - inst = new_instruction(prog, info->InstOpcode); - /*slang_resolve_storage(gc, n, prog);*/ - if (!n->Store) - slang_alloc_temp_storage(gc, n, info->ResultSize); + slang_alloc_temp_storage(gc, n, n->Children[0]->Store->Size); + inst = new_instruction(prog, OPCODE_MOV); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, n->Children[0]->Swizzle); - + inst->SrcReg[0].NegateBase = NEGATE_XYZW; inst->Comment = n->Comment; - return inst; -#else - /* XXX this is something we can optimize for, with a bit of work.*/ - abort(); - return NULL; -#endif } -- cgit v1.2.3 From d8babcfc570ef97b284f88f01151f00eb188a2fd Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 22 Dec 2006 10:26:22 -0700 Subject: fix typos --- src/mesa/shader/slang/slang_ir.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 7c5e044861..405d799315 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -24,7 +24,7 @@ /** * \file slang_ir.h - * Mesa GLSL Itermediate Representation tree types and constants. + * Mesa GLSL Intermediate Representation tree types and constants. * \author Brian Paul */ @@ -69,7 +69,7 @@ typedef enum IR_EXP2, /* 2^x */ IR_LOG2, /* log base 2 */ IR_RSQ, /* 1/sqrt() */ - IR_RCP, /* recipricol */ + IR_RCP, /* reciprocol */ IR_FLOOR, IR_FRAC, IR_ABS, /* absolute value */ -- cgit v1.2.3 From 439758353aea3ede1f6d7fc1be14777df8697db5 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 08:21:09 -0700 Subject: Fix some incorrect GL error values. Reorganize _mesa_compile_shader() code. --- src/mesa/shader/shader_api.c | 49 +++++---------- src/mesa/shader/slang/library/slang_core.gc | 1 - src/mesa/shader/slang/slang_compile.c | 94 ++++++++++++++++++++--------- src/mesa/shader/slang/slang_compile.h | 2 +- 4 files changed, 81 insertions(+), 65 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 1e282e7373..5af236cfff 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -240,7 +240,7 @@ _mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader) GLuint i; if (!shProg || !sh) { - _mesa_error(ctx, GL_INVALID_OPERATION, + _mesa_error(ctx, GL_INVALID_VALUE, "glAttachShader(bad program or shader name)"); return; } @@ -277,7 +277,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, = _mesa_lookup_shader_program(ctx, program); if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocation(program)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocation(program)"); return; } @@ -348,7 +348,7 @@ _mesa_delete_program2(GLcontext *ctx, GLuint name) shProg = _mesa_lookup_shader_program(ctx, name); if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glDeleteProgram(name)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteProgram(name)"); return; } @@ -390,7 +390,7 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) GLuint i, j; if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, + _mesa_error(ctx, GL_INVALID_VALUE, "glDetachShader(bad program or shader name)"); return; } @@ -424,7 +424,7 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) } /* not found */ - _mesa_error(ctx, GL_INVALID_OPERATION, + _mesa_error(ctx, GL_INVALID_VALUE, "glDetachShader(shader not found)"); } @@ -442,7 +442,7 @@ _mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, GLint sz; if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform"); return; } @@ -477,7 +477,7 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, GLint sz; if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetActiveUniform"); + _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform"); return; } @@ -514,7 +514,7 @@ _mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, *count = i; } else { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttachedShaders"); + _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttachedShaders"); } } @@ -527,7 +527,7 @@ _mesa_get_attrib_location(GLcontext *ctx, GLuint program, = _mesa_lookup_shader_program(ctx, program); if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetAttribLocation"); + _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocation"); return -1; } @@ -720,7 +720,7 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, } } else { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(program)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glGetUniformfv(program)"); } } @@ -796,34 +796,13 @@ void _mesa_compile_shader(GLcontext *ctx, GLuint shaderObj) { struct gl_shader *sh = _mesa_lookup_shader(ctx, shaderObj); - slang_info_log info_log; - slang_code_object obj; - slang_unit_type type; if (!sh) { _mesa_error(ctx, GL_INVALID_VALUE, "glCompileShader(shaderObj)"); return; } - slang_info_log_construct(&info_log); - _slang_code_object_ctr(&obj); - - if (sh->Type == GL_VERTEX_SHADER) { - type = slang_unit_vertex_shader; - } - else { - assert(sh->Type == GL_FRAGMENT_SHADER); - type = slang_unit_fragment_shader; - } - - if (_slang_compile(sh->Source, &obj, type, &info_log, sh)) { - sh->CompileStatus = GL_TRUE; - } - else { - sh->CompileStatus = GL_FALSE; - /* XXX temporary */ - _mesa_problem(ctx, "Program did not compile!"); - } + sh->CompileStatus = _slang_compile(ctx, sh); } @@ -837,7 +816,7 @@ _mesa_link_program(GLcontext *ctx, GLuint program) shProg = _mesa_lookup_shader_program(ctx, program); if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glLinkProgram(program)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glLinkProgram(program)"); return; } @@ -865,7 +844,7 @@ _mesa_use_program(GLcontext *ctx, GLuint program) struct gl_shader_program *shProg; shProg = _mesa_lookup_shader_program(ctx, program); if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, + _mesa_error(ctx, GL_INVALID_VALUE, "glUseProgramObjectARB(programObj)"); return; } @@ -975,7 +954,7 @@ _mesa_validate_program(GLcontext *ctx, GLuint program) struct gl_shader_program *shProg; shProg = _mesa_lookup_shader_program(ctx, program); if (!shProg) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glValidateProgram(program)"); + _mesa_error(ctx, GL_INVALID_VALUE, "glValidateProgram(program)"); return; } /* XXX temporary */ diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 30fea370e3..f8ee17eeda 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -452,7 +452,6 @@ ivec4 __operator / (const ivec4 v, const ivec4 u) float __operator + (const float a, const float b) { -// __asm float_add __retVal, a, b; __asm vec4_add __retVal.x, a, b; } diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 286e25d54b..da77de709c 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -682,7 +682,7 @@ parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O, stru = slang_struct_scope_find(O->structs, a_name, 1); if (stru == NULL) { - slang_info_log_error(C->L, "%s: undeclared type name.", + slang_info_log_error(C->L, "undeclared type name '%s'", slang_atom_pool_id(C->atoms, a_name)); return 0; } @@ -714,7 +714,9 @@ parse_fully_specified_type(slang_parse_ctx * C, slang_output_ctx * O, { if (!parse_type_qualifier(C, &type->qualifier)) return 0; - return parse_type_specifier(C, O, &type->specifier); + if (!parse_type_specifier(C, O, &type->specifier)) + return 0; + return 1; } /* operation */ @@ -2241,35 +2243,21 @@ slang_create_uniforms(const slang_export_data_table *exports, #endif -GLboolean -_slang_compile(const char *source, slang_code_object * object, +static GLboolean +compile_shader(GLcontext *ctx, slang_code_object * object, slang_unit_type type, slang_info_log * infolog, struct gl_shader *shader) { - GET_CURRENT_CONTEXT(ctx); - struct gl_program *program; + struct gl_program *program = shader->Programs[0]; GLboolean success; grammar id = 0; - /* XXX temporary hack */ - if (!shader->Programs) { - GLenum progTarget; - if (shader->Type == GL_VERTEX_SHADER) - progTarget = GL_VERTEX_PROGRAM_ARB; - else - progTarget = GL_FRAGMENT_PROGRAM_ARB; - shader->Programs - = (struct gl_program **) malloc(sizeof(struct gl_program*)); - shader->Programs[0] = _mesa_new_program(ctx, progTarget, 1); - shader->NumPrograms = 1; - } - program = shader->Programs[0]; assert(program); _slang_code_object_dtr(object); _slang_code_object_ctr(object); - success = compile_object(&id, source, object, type, infolog, program); + success = compile_object(&id, shader->Source, object, type, infolog, program); if (id != 0) grammar_destroy(id); if (!success) @@ -2283,22 +2271,72 @@ _slang_compile(const char *source, slang_code_object * object, #if NEW_SLANG { - GET_CURRENT_CONTEXT(ctx); slang_create_uniforms(&object->expdata, shader); _mesa_print_program(program); _mesa_print_program_parameters(ctx, program); } #endif + return GL_TRUE; +} -#if defined(USE_X86_ASM) || defined(SLANG_X86) - /* XXX: lookup the @main label */ - if (!_slang_x86_codegen - (&object->machine, &object->assembly, - object->expcode.entries[0].address)) - return GL_FALSE; + + +GLboolean +_slang_compile(GLcontext *ctx, struct gl_shader *shader) +{ + GLboolean success; + slang_info_log info_log; + slang_code_object obj; + slang_unit_type type; + + if (shader->Type == GL_VERTEX_SHADER) { + type = slang_unit_vertex_shader; + } + else { + assert(shader->Type == GL_FRAGMENT_SHADER); + type = slang_unit_fragment_shader; + } + + /* XXX temporary hack */ + if (!shader->Programs) { + GLenum progTarget; + if (shader->Type == GL_VERTEX_SHADER) + progTarget = GL_VERTEX_PROGRAM_ARB; + else + progTarget = GL_FRAGMENT_PROGRAM_ARB; + shader->Programs + = (struct gl_program **) malloc(sizeof(struct gl_program*)); + shader->Programs[0] = _mesa_new_program(ctx, progTarget, 1); + shader->NumPrograms = 1; + } + + slang_info_log_construct(&info_log); + _slang_code_object_ctr(&obj); + + success = compile_shader(ctx, &obj, type, &info_log, shader); + + if (success) { +#if 0 + slang_create_uniforms(&object->expdata, shader); + _mesa_print_program(program); + _mesa_print_program_parameters(ctx, program); #endif + } + else { + /* XXX more work on info log needed here */ + if (info_log.text) { + if (shader->InfoLog) { + free(shader->InfoLog); + shader->InfoLog = NULL; + } + shader->InfoLog = strdup(info_log.text); + } + } - return GL_TRUE; + slang_info_log_destruct(&info_log); + _slang_code_object_dtr(&obj); + + return success; } diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 8a72f43486..ba129df8e3 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -109,7 +109,7 @@ int slang_info_log_warning (slang_info_log *, const char *, ...); void slang_info_log_memory (slang_info_log *); extern GLboolean -_slang_compile (const char *, slang_code_object *, slang_unit_type, slang_info_log *, struct gl_shader *shader); +_slang_compile (GLcontext *ctx, struct gl_shader *shader); #ifdef __cplusplus } -- cgit v1.2.3 From 602045fd7bfb80a7a06c1fda5ffe66d9e4cc02b0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 14:33:42 -0700 Subject: update_texture_state() updated for new shaders --- src/mesa/main/texstate.c | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index e089de9310..97cc0cf4fb 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2920,13 +2920,6 @@ update_texture_state( GLcontext *ctx ) { GLuint unit; -#if 0 /** XXX NEW_SLANG */ -#if FEATURE_ARB_fragment_shader - struct gl2_program_intf **prog = ctx->ShaderObjects.CurrentProgram; - GLbitfield progteximageusage[MAX_TEXTURE_IMAGE_UNITS]; -#endif -#endif - ctx->NewState |= _NEW_TEXTURE; /* TODO: only set this if there are * actual changes. */ @@ -2936,19 +2929,6 @@ update_texture_state( GLcontext *ctx ) ctx->Texture._TexMatEnabled = 0; ctx->Texture._TexGenEnabled = 0; -#if 00 /* XXX NEW_SLANG */ -#if FEATURE_ARB_fragment_shader - /* - * Grab texture image usage state from shader program. It must be - * grabbed every time uniform sampler changes, so maybe there is a - * better place to perform these rather expensive computations. - */ - if (ctx->ShaderObjects._FragmentShaderPresent) { - (**prog).GetTextureImageUsage (prog, progteximageusage); - } -#endif /* FEATURE_ARB_fragment_shader */ -#endif - /* * Update texture unit state. */ @@ -2960,16 +2940,17 @@ update_texture_state( GLcontext *ctx ) texUnit->_ReallyEnabled = 0; texUnit->_GenFlags = 0; - /* Get the bitmask of texture enables */ -#if 000 /* XXX NEW_SLANG */ -#if FEATURE_ARB_fragment_shader - if (ctx->ShaderObjects._FragmentShaderPresent) { - enableBits = progteximageusage[unit]; + /* Get the bitmask of texture enables. + * enableBits will be a mask of the TEXTURE_*_BIT flags indicating + * which texture targets are enabled (fixed function) or referenced + * by a fragment shader/program. When multiple flags are set, we'll + * settle on the one with highest priority (see texture_override below). + */ + if (ctx->Shader.CurrentProgram && + ctx->Shader.CurrentProgram->LinkStatus) { + enableBits = ctx->Shader.CurrentProgram->FragmentProgram->TexturesUsed[unit]; } - else -#endif -#endif - if (ctx->FragmentProgram._Enabled) { + else if (ctx->FragmentProgram._Enabled) { enableBits = ctx->FragmentProgram.Current->TexturesUsed[unit]; } else { -- cgit v1.2.3 From 89dc48569a361f59ec8a610ec779b0ff3e7c7ac2 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 14:35:44 -0700 Subject: finish some loose ends in _mesa_uniform() --- src/mesa/shader/shader_api.c | 57 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 5af236cfff..d6dacdd679 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -866,6 +866,7 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, const GLvoid *values, GLenum type) { struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; + GLfloat *uniformVal; if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); @@ -879,20 +880,50 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, FLUSH_VERTICES(ctx, _NEW_PROGRAM); - { - GLfloat *v = shProg->Uniforms->ParameterValues[location]; + uniformVal = shProg->Uniforms->ParameterValues[location]; + + if (type == GL_INT || + type == GL_INT_VEC2 || + type == GL_INT_VEC3 || + type == GL_INT_VEC4) { + const GLint *iValues = (const GLint *) values; + switch (type) { + case GL_INT_VEC4: + uniformVal[3] = (GLfloat) iValues[3]; + /* fall-through */ + case GL_INT_VEC3: + uniformVal[2] = (GLfloat) iValues[2]; + /* fall-through */ + case GL_INT_VEC2: + uniformVal[1] = (GLfloat) iValues[1]; + /* fall-through */ + case GL_INT: + uniformVal[0] = (GLfloat) iValues[0]; + break; + default: + _mesa_problem(ctx, "Invalid type in _mesa_uniform"); + return; + } + } + else { const GLfloat *fValues = (const GLfloat *) values; /* XXX */ - GLint i; - if (type == GL_FLOAT_VEC4) - count *= 4; - else if (type == GL_FLOAT_VEC3) - count *= 3; - else - abort(); - - for (i = 0; i < count; i++) - v[i] = fValues[i]; - return; + switch (type) { + case GL_FLOAT_VEC4: + uniformVal[3] = fValues[3]; + /* fall-through */ + case GL_FLOAT_VEC3: + uniformVal[2] = fValues[2]; + /* fall-through */ + case GL_FLOAT_VEC2: + uniformVal[1] = fValues[1]; + /* fall-through */ + case GL_FLOAT: + uniformVal[0] = fValues[0]; + break; + default: + _mesa_problem(ctx, "Invalid type in _mesa_uniform"); + return; + } } } -- cgit v1.2.3 From 6a92d98d1a04629c09fae59585d94203580434c4 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 14:38:45 -0700 Subject: temporary disable some memory deallocations to work around a memory corruption bug --- src/mesa/shader/slang/slang_compile_operation.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 28d9fdff7b..c16ec7f807 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -60,8 +60,11 @@ slang_operation_destruct(slang_operation * oper) for (i = 0; i < oper->num_children; i++) slang_operation_destruct(oper->children + i); slang_alloc_free(oper->children); +#ifdef FREE_MEMORY + /* XXX revisit and fix memory coruption here ! */ slang_variable_scope_destruct(oper->locals); slang_alloc_free(oper->locals); +#endif oper->children = NULL; oper->num_children = 0; oper->locals = NULL; -- cgit v1.2.3 From e64030060292cdab97096ee3924ef18b1f71111f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 14:40:02 -0700 Subject: initial code to get texture sampling limping along --- .../shader/slang/library/slang_common_builtin.gc | 7 +- .../shader/slang/library/slang_common_builtin_gc.h | 175 ++++++++++----------- src/mesa/shader/slang/slang_assemble.h | 1 + src/mesa/shader/slang/slang_codegen.c | 14 +- src/mesa/shader/slang/slang_emit.c | 78 ++++++++- src/mesa/shader/slang/slang_ir.h | 7 +- 6 files changed, 177 insertions(+), 105 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 0e94979d92..44e059f5a0 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1629,10 +1629,9 @@ vec4 texture1DProj (sampler1D sampler, vec4 coord) { return texture1D (sampler, coord.s / coord.q); } -vec4 texture2D (sampler2D sampler, vec2 coord) { - vec4 texel; - __asm vec4_tex2d texel, sampler, coord, 0.0; - return texel; +vec4 texture2D(const sampler2D sampler, const vec2 coord) +{ + __asm vec4_tex2d __retVal, coord; // XXX sampler } vec4 texture2DProj (sampler2D sampler, vec3 coord) { diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 3442b06283..69c1960c73 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -679,92 +679,91 @@ 111,114,100,0,59,116,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0, 0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117, 114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111, -114,100,0,59,113,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112, -108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101, -99,52,95,116,101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99, -111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117, -114,101,50,68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100, -0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99, -50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,111,111,114,100, -0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50, -68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8, +114,100,0,59,113,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, +108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,50,100,0,18,95, +95,114,101,116,86,97,108,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50, +68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,8, 58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99, -111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0, -18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0, -18,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101, -108,0,0,0,4,118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108, -101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0, -116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0, -12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101, -114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0, -18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59, -112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117, -98,101,0,1,0,0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1, -116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0, -0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120, -101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0, -0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97, -100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, -0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114, -111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104, -97,100,111,119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100, -0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0, -18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21, -115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108, -0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108, -101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0, -115,104,97,100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99, -111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58, -118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111, -111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18, -99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1, -3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97, -0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97, -116,95,110,111,105,115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101, -49,0,1,0,0,11,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18, -97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1, -97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0, -10,0,110,111,105,115,101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0, -18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0, -110,111,105,115,101,50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18, -120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0, -54,54,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101, -99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, -99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0, -110,111,105,115,101,50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18, -120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0, -54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101, -51,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0, -17,53,0,52,55,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118, -101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110, -111,105,115,101,51,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120, -0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54, -54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17, -53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111, -105,115,101,51,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0, -0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0, -0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0, -0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58, -110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0, -46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49, -0,18,120,0,17,50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0, -0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115, -101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0, -46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110, -111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49, -57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0, -0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49, -49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0, -0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0, -55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0, -17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115, -101,49,0,18,120,0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57, -49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 +111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0, +18,99,111,111,114,100,0,59,112,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114, +111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101, +120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114, +100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111, +111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97, +109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4, +118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0, +18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120, +116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111, +114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118, +101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111, +114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99, +111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0, +0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101, +108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109, +112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1, +0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111, +114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18, +116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0, +0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20, +115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49, +68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99, +111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111, +114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112, +108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101, +99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18, +99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100, +111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100, +0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0, +18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59, +116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100, +0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0, +4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110, +111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105, +115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0, +0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8, +18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111, +97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115, +101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58, +110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101, +50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0, +0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111, +105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0, +51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101, +50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51, +0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0, +0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0, +18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0, +0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111, +105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0, +51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0, +17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0, +0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, +115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, +0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49, +55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0, +12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115, +101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0, +0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0, +52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0, +1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101, +49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111, +105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51, +0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99, +52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, +50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58, +118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12, +0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0, +18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17, +55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, +51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105, +115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0, +57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101, +99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, +99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0, +0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0, +0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0, +58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0, +52,56,0,0,0,0,46,0,0,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 1225ee4411..8aafeb012f 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -245,6 +245,7 @@ typedef struct slang_assembly_name_space_ typedef struct { GLboolean TempUsed[MAX_PROGRAM_TEMPS]; + GLuint NumSamplers; } slang_gen_context; diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 3fca45ce12..3b96ec0a88 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -91,6 +91,9 @@ static slang_asm_info AsmInfo[] = { { "float_multiply", IR_MUL, 1, 2 }, { "float_divide", IR_DIV, 1, 2 }, { "float_power", IR_POW, 1, 2 }, + /* texture / sampler */ + { "vec4_tex2d", IR_TEX, 1, 1 }, + { "vec4_texb2d", IR_TEXB, 1, 3 }, /* unary op */ { "int_to_float", IR_I_TO_F, 1, 1 }, { "float_exp", IR_EXP, 1, 1 }, @@ -791,10 +794,15 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, n0 = _slang_gen_operation(A, dest_oper); assert(n0->Var); assert(n0->Store); - free(n0); n->Store = n0->Store; n->Writemask = writemask; + + free(n0); + } + + if (info->Opcode == IR_TEX || info->Opcode == IR_TEXB) { + n->TexTarget = TEXTURE_2D_INDEX; } return n; @@ -1571,7 +1579,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) CurFunction = fun; if (!CurFunction->end_label) - CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunction_Main"); + CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); n = _slang_gen_operation(A, fun->body); @@ -1583,7 +1591,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) CurFunction = NULL; -#if 0 +#if 1 printf("************* New body for %s *****\n", (char*)fun->header.a_name); slang_print_function(fun, 1); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 8b0999dfcc..462cc71938 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -92,6 +92,8 @@ static slang_ir_info IrInfo[] = { { IR_NOT, "IR_NOT", 0, 1, 1 }, { IR_VAR, "IR_VAR", 0, 0, 0 }, { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, + { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, + { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 2 }, { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, { IR_FIELD, "IR_FIELD", 0, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } @@ -192,7 +194,10 @@ storage_string(const slang_ir_storage *st) sprintf(s, "%s[%d..%d]", files[st->File], st->Index, st->Index + st->Size - 1); #endif - sprintf(s, "%s[%d]", files[st->File], st->Index); + if (st->File == 1000) + sprintf(s, "sampler"); + else + sprintf(s, "%s[%d]", files[st->File], st->Index); return s; } @@ -247,8 +252,7 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) case slang_spec_samplerCube: case slang_spec_sampler1DShadow: case slang_spec_sampler2DShadow: - abort(); - return 0; + return 1; /* special case */ case slang_spec_struct: return sizeof_struct(spec->_struct); case slang_spec_array: @@ -261,7 +265,6 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) } - static GLuint sizeof_type(const slang_fully_specified_type *t) { @@ -269,6 +272,23 @@ sizeof_type(const slang_fully_specified_type *t) } +static GLboolean +is_sampler_type(const slang_fully_specified_type *t) +{ + switch (t->specifier.type) { + case slang_spec_sampler1D: + case slang_spec_sampler2D: + case slang_spec_sampler3D: + case slang_spec_samplerCube: + case slang_spec_sampler1DShadow: + case slang_spec_sampler2DShadow: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + #define IND 0 void slang_print_ir(const slang_ir_node *n, int indent) @@ -370,6 +390,15 @@ alloc_temporary(slang_gen_context *gc, GLint size) } +static GLint +alloc_sampler(slang_gen_context *gc) +{ + GLint sampler = gc->NumSamplers; + gc->NumSamplers++; + return sampler; +} + + static GLboolean is_temporary(const slang_gen_context *gc, const slang_ir_storage *st) { @@ -637,9 +666,6 @@ slang_alloc_temp_storage(slang_gen_context *gc, slang_ir_node *n, GLint size) * 2. Allocate storage for user-declared variables. * 3. Allocate intermediate/unnamed storage for complex expressions. * 4. other? - * - * If gc or prog is NULL, we may only be able to determine the Store->File - * but not an Index (register). */ void slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, @@ -666,7 +692,14 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (n->Opcode == IR_VAR_DECL) { /* storage declaration */ assert(n->Var); - if (n->Store->Index < 0) { /* XXX assert this? */ + if (is_sampler_type(&n->Var->type)) { + /* i.e. "uniform sampler2D tex;" */ +#define PROGRAM_SAMPLER 1000 + n->Store->File = PROGRAM_SAMPLER; + n->Store->Size = 1; /* never used */ + n->Store->Index = alloc_sampler(gc); + } + else if (n->Store->Index < 0) { /* XXX assert this? */ assert(gc); n->Store->File = PROGRAM_TEMPORARY; n->Store->Size = sizeof_type(&n->Var->type); @@ -994,6 +1027,32 @@ emit_jump(const char *target, struct gl_program *prog) } +static struct prog_instruction * +emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +{ + struct gl_fragment_program *fProg = (struct gl_fragment_program *) prog; + struct prog_instruction *inst; + if (n->Opcode == IR_TEX) { + inst = new_instruction(prog, OPCODE_TEX); + } + else { + assert(n->Opcode == IR_TEXB); + inst = new_instruction(prog, OPCODE_TXB); + } + + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, + n->Children[0]->Swizzle); + + inst->TexSrcTarget = n->TexTarget; + inst->TexSrcUnit = 0; /* XXX temp */ + + fProg->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + + return inst; +} + static struct prog_instruction * emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) @@ -1108,6 +1167,9 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_SIN: case IR_COS: return emit_unop(gc, n, prog); + case IR_TEX: + case IR_TEXB: + return emit_tex(gc, n, prog); case IR_NEG: return emit_negation(gc, n, prog); case IR_LABEL: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 405d799315..b43ff1db61 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -79,6 +79,8 @@ typedef enum IR_NOT, /* logical not */ IR_VAR, /* variable reference */ IR_VAR_DECL,/* var declaration */ + IR_TEX, /* texture lookup */ + IR_TEXB, /* texture lookup with LOD bias */ IR_FLOAT, IR_FIELD, IR_I_TO_F @@ -106,10 +108,11 @@ typedef struct slang_ir_node_ const char *Comment; const char *Target; GLuint Swizzle; - GLuint Writemask; /**< If Op == IR_MOVE */ - GLfloat Value[4]; /**< If Op == IR_FLOAT */ + GLuint Writemask; /**< If Opcode == IR_MOVE */ + GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; slang_ir_storage *Store; + GLuint TexTarget; /**< If Opcode == IR_TEX or IR_TEXB */ } slang_ir_node; -- cgit v1.2.3 From de03fe4a3f21aac730ad8b7b24bcaa897d4c182b Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 15:06:50 -0700 Subject: added texture attribs in slang_find_input() --- src/mesa/shader/slang/slang_emit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 462cc71938..ac92bdcece 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -434,9 +434,13 @@ slang_find_input(GLenum target, const char *name, GLint index) { "gl_Normal", VERT_ATTRIB_NORMAL }, { "gl_Color", VERT_ATTRIB_COLOR0 }, { "gl_SecondaryColor", VERT_ATTRIB_COLOR1 }, + { "gl_MultiTexCoord0", VERT_ATTRIB_TEX0 }, + { "gl_MultiTexCoord1", VERT_ATTRIB_TEX1 }, + { "gl_MultiTexCoord2", VERT_ATTRIB_TEX2 }, { NULL, 0 } }; static const struct input_info fragInputs[] = { + { "gl_TexCoord", FRAG_ATTRIB_TEX0 }, { NULL, 0 } }; const struct input_info *inputs; -- cgit v1.2.3 From ff81f074fb4165122b4599f602f89ecff6f611ff Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 15:25:29 -0700 Subject: minor formatting fix --- src/mesa/shader/prog_print.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 07b383dc56..416d7b4fa6 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -272,7 +272,6 @@ _mesa_print_instruction(const struct prog_instruction *inst) _mesa_printf("%s", _mesa_opcode_string(inst->Opcode)); if (inst->SaturateMode == SATURATE_ZERO_ONE) _mesa_printf("_SAT"); - _mesa_printf(" "); print_dst_reg(&inst->DstReg); _mesa_printf(", "); print_src_reg(&inst->SrcReg[0]); -- cgit v1.2.3 From 7edd2ecb55d4cdc4067303867453d7e534bfad38 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 16:19:54 -0700 Subject: simplify update_texture_state() a bit, compute _EnabledCoordUnits for shaders --- src/mesa/main/texstate.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 97cc0cf4fb..76ee4458dc 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2919,6 +2919,18 @@ static void update_texture_state( GLcontext *ctx ) { GLuint unit; + struct gl_fragment_program *fprog; + + if (ctx->Shader.CurrentProgram && + ctx->Shader.CurrentProgram->LinkStatus) { + fprog = ctx->Shader.CurrentProgram->FragmentProgram; + } + else if (ctx->FragmentProgram._Enabled) { + fprog = ctx->FragmentProgram.Current; + } + else { + fprog = NULL; + } ctx->NewState |= _NEW_TEXTURE; /* TODO: only set this if there are * actual changes. @@ -2946,12 +2958,8 @@ update_texture_state( GLcontext *ctx ) * by a fragment shader/program. When multiple flags are set, we'll * settle on the one with highest priority (see texture_override below). */ - if (ctx->Shader.CurrentProgram && - ctx->Shader.CurrentProgram->LinkStatus) { - enableBits = ctx->Shader.CurrentProgram->FragmentProgram->TexturesUsed[unit]; - } - else if (ctx->FragmentProgram._Enabled) { - enableBits = ctx->FragmentProgram.Current->TexturesUsed[unit]; + if (fprog) { + enableBits = fprog->TexturesUsed[unit]; } else { if (!texUnit->Enabled) @@ -3068,24 +3076,25 @@ update_texture_state( GLcontext *ctx ) ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit); } + /* XXX maybe move this below as an else-clause */ ctx->Texture._EnabledCoordUnits = ctx->Texture._EnabledUnits; + /* Fragment programs may need texture coordinates but not the * corresponding texture images. */ -#if 0 /* XXX NEW_SLANG */ - if (ctx->ShaderObjects.CurrentProgram != NULL) { - ctx->Texture._EnabledCoordUnits |= (1 << ctx->Const.MaxTextureCoordUnits) - 1; - } - else -#endif - if (ctx->FragmentProgram._Enabled) { - ctx->Texture._EnabledCoordUnits |= - (ctx->FragmentProgram._Current->Base.InputsRead >> FRAG_ATTRIB_TEX0); + if (fprog) { + const GLuint coordMask = (1 << MAX_TEXTURE_UNITS) - 1; + ctx->Texture._EnabledCoordUnits + |= (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask; } } -void _mesa_update_texture( GLcontext *ctx, GLuint new_state ) +/** + * Update texture-related derived state. + */ +void +_mesa_update_texture( GLcontext *ctx, GLuint new_state ) { if (new_state & _NEW_TEXTURE_MATRIX) update_texture_matrices( ctx ); -- cgit v1.2.3 From c9db223f902ce9d7e9f3038e6baac6da7f231b34 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 17:22:19 -0700 Subject: move TexturesUsed[] into gl_program since vertex programs/shaders can use textures nowadays --- src/mesa/main/mtypes.h | 2 +- src/mesa/main/texstate.c | 2 +- src/mesa/shader/arbprogparse.c | 2 +- src/mesa/shader/nvfragparse.c | 2 +- src/mesa/shader/program.c | 3 ++- src/mesa/shader/slang/slang_emit.c | 3 +-- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index e73c625a82..5156eea99a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1853,6 +1853,7 @@ struct gl_program GLbitfield InputsRead; /* Bitmask of which input regs are read */ GLbitfield OutputsWritten; /* Bitmask of which output regs are written to */ + GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */ /** Named parameters, constants, etc. from program text */ struct gl_program_parameter_list *Parameters; @@ -1895,7 +1896,6 @@ struct gl_vertex_program struct gl_fragment_program { struct gl_program Base; /**< base class */ - GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */ GLuint NumAluInstructions; /**< GL_ARB_fragment_program */ GLuint NumTexInstructions; GLuint NumTexIndirections; diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 76ee4458dc..7be3a44d59 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2959,7 +2959,7 @@ update_texture_state( GLcontext *ctx ) * settle on the one with highest priority (see texture_override below). */ if (fprog) { - enableBits = fprog->TexturesUsed[unit]; + enableBits = fprog->Base.TexturesUsed[unit]; } else { if (!texUnit->Enabled) diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 7a87bf015f..80e342e40a 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -4038,7 +4038,7 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, program->Base.InputsRead = ap.Base.InputsRead; program->Base.OutputsWritten = ap.Base.OutputsWritten; for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) - program->TexturesUsed[i] = ap.TexturesUsed[i]; + program->Base.TexturesUsed[i] = ap.TexturesUsed[i]; program->FogOption = ap.FogOption; if (program->Base.Instructions) diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 0b48d408f9..b4e19ce74d 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -1563,7 +1563,7 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget, program->Base.InputsRead = parseState.inputsRead; program->Base.OutputsWritten = parseState.outputsWritten; for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) - program->TexturesUsed[u] = parseState.texturesUsed[u]; + program->Base.TexturesUsed[u] = parseState.texturesUsed[u]; /* save program parameters */ program->Base.Parameters = parseState.parameters; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 351427365c..a50f7cff05 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -358,6 +358,8 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) prog->NumInstructions * sizeof(struct prog_instruction)); clone->InputsRead = prog->InputsRead; clone->OutputsWritten = prog->OutputsWritten; + memcpy(clone->TexturesUsed, prog->TexturesUsed, sizeof(prog->TexturesUsed)); + if (prog->Parameters) clone->Parameters = _mesa_clone_parameter_list(prog->Parameters); memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); @@ -389,7 +391,6 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) const struct gl_fragment_program *fp = (const struct gl_fragment_program *) prog; struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone; - memcpy(fpc->TexturesUsed, fp->TexturesUsed, sizeof(fp->TexturesUsed)); fpc->NumAluInstructions = fp->NumAluInstructions; fpc->NumTexInstructions = fp->NumTexInstructions; fpc->NumTexIndirections = fp->NumTexIndirections; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index ac92bdcece..4e1606be31 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1034,7 +1034,6 @@ emit_jump(const char *target, struct gl_program *prog) static struct prog_instruction * emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { - struct gl_fragment_program *fProg = (struct gl_fragment_program *) prog; struct prog_instruction *inst; if (n->Opcode == IR_TEX) { inst = new_instruction(prog, OPCODE_TEX); @@ -1052,7 +1051,7 @@ emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) inst->TexSrcTarget = n->TexTarget; inst->TexSrcUnit = 0; /* XXX temp */ - fProg->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); return inst; } -- cgit v1.2.3 From 64f78dd6a8596700a3cb5e657164775ebbc2e8db Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 17:30:30 -0700 Subject: compute InputsRead/OutputsWritten with slang_update_inputs_outputs() --- src/mesa/shader/slang/slang_emit.c | 20 -------------------- src/mesa/shader/slang/slang_link2.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 4e1606be31..c5be169969 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -625,24 +625,6 @@ static GLint slang_alloc_varying(struct gl_program *prog, const char *name) { GLint i = _mesa_add_varying(prog->Varying, name, 4); /* XXX fix size */ -#if 0 - if (prog->Target == GL_VERTEX_PROGRAM_ARB) { -#ifdef OLD_LINK - i += VERT_RESULT_VAR0; - prog->OutputsWritten |= (1 << i); -#else - prog->OutputsWritten |= (1 << (i + VERT_RESULT_VAR0)); -#endif - } - else { -#ifdef OLD_LINK - i += FRAG_ATTRIB_VAR0; - prog->InputsRead |= (1 << i); -#else - prog->InputsRead |= (1 << (i + FRAG_ATTRIB_VAR0)); -#endif - } -#endif return i; } @@ -746,7 +728,6 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, n->Store->File = PROGRAM_INPUT; n->Store->Index = i; assert(n->Store->Size > 0); - prog->InputsRead |= (1 << i); return; } @@ -754,7 +735,6 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (i >= 0) { n->Store->File = PROGRAM_OUTPUT; n->Store->Index = i; - prog->OutputsWritten |= (1 << i); return; } diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 81a1875548..f68eaca167 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -293,6 +293,34 @@ slang_resolve_branches(struct gl_program *prog) } +/** + * Scan program instructions to update the program's InputsRead and + * OutputsWritten fields. + */ +static void +slang_update_inputs_outputs(struct gl_program *prog) +{ + GLuint i, j; + + prog->InputsRead = 0x0; + prog->OutputsWritten = 0x0; + + for (i = 0; i < prog->NumInstructions; i++) { + const struct prog_instruction *inst = prog->Instructions + i; + const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); + for (j = 0; j < numSrc; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT) { + prog->InputsRead |= 1 << inst->SrcReg[j].Index; + } + } + if (inst->DstReg.File == PROGRAM_OUTPUT) { + prog->OutputsWritten |= 1 << inst->DstReg.Index; + } + } +} + + + /** cast wrapper */ static struct gl_vertex_program * vertex_program(struct gl_program *prog) @@ -390,6 +418,9 @@ _slang_link2(GLcontext *ctx, slang_resolve_branches(&shProg->VertexProgram->Base); slang_resolve_branches(&shProg->FragmentProgram->Base); + slang_update_inputs_outputs(&shProg->VertexProgram->Base); + slang_update_inputs_outputs(&shProg->FragmentProgram->Base); + #if 1 printf("************** original fragment program\n"); _mesa_print_program(&fragProg->Base); -- cgit v1.2.3 From 4428e8f20f8b6f5db086d8bd8b68ea3da9e9b0f0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 17:43:53 -0700 Subject: update TexturesUsed[] in slang_update_inputs_outputs() --- src/mesa/shader/slang/slang_link2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index f68eaca167..33813fecc4 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -296,6 +296,7 @@ slang_resolve_branches(struct gl_program *prog) /** * Scan program instructions to update the program's InputsRead and * OutputsWritten fields. + * Also, update the program's TexturesUsed[] array. */ static void slang_update_inputs_outputs(struct gl_program *prog) @@ -305,6 +306,9 @@ slang_update_inputs_outputs(struct gl_program *prog) prog->InputsRead = 0x0; prog->OutputsWritten = 0x0; + for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) + prog->TexturesUsed[i] = 0; + for (i = 0; i < prog->NumInstructions; i++) { const struct prog_instruction *inst = prog->Instructions + i; const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); @@ -316,6 +320,12 @@ slang_update_inputs_outputs(struct gl_program *prog) if (inst->DstReg.File == PROGRAM_OUTPUT) { prog->OutputsWritten |= 1 << inst->DstReg.Index; } + + if (inst->Opcode == OPCODE_TEX || + inst->Opcode == OPCODE_TXB || + inst->Opcode == OPCODE_TXP) { + prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + } } } -- cgit v1.2.3 From 4cc90ee0b0fa30a71c275abe4cad68b7e99d025a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 4 Jan 2007 17:44:04 -0700 Subject: update TexturesUsed[] in slang_update_inputs_outputs() --- src/mesa/shader/slang/slang_emit.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c5be169969..a3d970694f 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1031,8 +1031,6 @@ emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) inst->TexSrcTarget = n->TexTarget; inst->TexSrcUnit = 0; /* XXX temp */ - prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); - return inst; } -- cgit v1.2.3 From 9805e7674424182b17ca355da2cb3b14fab8a41c Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 16:00:57 -0700 Subject: added _mesa_add_sampler() --- src/mesa/shader/prog_parameter.c | 17 +++++++++++++++++ src/mesa/shader/prog_parameter.h | 15 ++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index cdc8a20001..d09cc65937 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -222,6 +222,23 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList, } +GLint +_mesa_add_sampler(struct gl_program_parameter_list *paramList, + const char *name) +{ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_SAMPLER) { + /* already in list */ + return i; + } + else { + const GLint size = 1; + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_SAMPLER); + return i; + } +} + + GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size) diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index 6ce96c7972..0db2bcd314 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -35,10 +35,11 @@ /** - * Named program parameters - * Used for NV_fragment_program "DEFINE"d constants and "DECLARE"d parameters, - * and ARB_fragment_program global state references. For the later, Name - * might be "state.light[0].diffuse", for example. + * Program parameter. + * Used for NV_fragment_program for "DEFINE"d constants and "DECLARE"d + * parameters. + * Also used by ARB_vertex/fragment_programs for state variables, etc. + * Used by shaders for uniforms, constants, varying vars, etc. */ struct gl_program_parameter { @@ -53,7 +54,7 @@ struct gl_program_parameter /** - * A list of the above program_parameter instances. + * List of gl_program_parameter instances. */ struct gl_program_parameter_list { @@ -98,6 +99,10 @@ extern GLint _mesa_add_uniform(struct gl_program_parameter_list *paramList, const char *name, GLuint size); +extern GLint +_mesa_add_sampler(struct gl_program_parameter_list *paramList, + const char *name); + extern GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size); -- cgit v1.2.3 From 288c5396e6aa484d88819bd28a7cd49a3873f283 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 16:01:11 -0700 Subject: added PROGRAM_SAMPLER --- src/mesa/main/mtypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 5156eea99a..f43113a0af 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1827,7 +1827,8 @@ enum register_file PROGRAM_VARYING = 9, /**< machine->Inputs[]/Outputs[] */ PROGRAM_WRITE_ONLY = 10, /**< A dummy, write-only register */ PROGRAM_ADDRESS = 11, /**< machine->AddressReg */ - PROGRAM_UNDEFINED = 12, /**< Invalid value */ + PROGRAM_SAMPLER = 12, /**< for shader samplers, compile-time only */ + PROGRAM_UNDEFINED = 13, /**< Invalid value */ PROGRAM_FILE_MAX }; -- cgit v1.2.3 From eef70ff79a3231780a4255befe652727364a638b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 16:01:26 -0700 Subject: added Sampler field to prog_instruction struct --- src/mesa/shader/prog_instruction.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index bda6a2c322..d825e6e0a3 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -379,6 +379,12 @@ struct prog_instruction */ GLuint BranchTarget; + /** + * For TEX instructions in shaders, the sampler to use for the + * texture lookup. + */ + GLint Sampler; + const char *Comment; }; -- cgit v1.2.3 From b2ab693d68f2ba1358b9c3f8bab53b9ebfb586fe Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 16:01:43 -0700 Subject: added PROGRAM_SAMPLER --- src/mesa/shader/prog_print.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 416d7b4fa6..04b7c7d22a 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -68,6 +68,8 @@ program_file_string(enum register_file f) return "WRITE_ONLY"; case PROGRAM_ADDRESS: return "ADDR"; + case PROGRAM_SAMPLER: + return "SAMPLER"; default: return "Unknown program file!"; } -- cgit v1.2.3 From 5cf7326132a37f11357b5cb31bcc9238fef5b54c Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 5 Jan 2007 16:02:45 -0700 Subject: Checkpoint glsl compiler work: sampler uniforms now implemented, linked properly. --- src/mesa/shader/shader_api.c | 9 +- .../shader/slang/library/slang_common_builtin.gc | 43 ++--- .../shader/slang/library/slang_common_builtin_gc.h | 179 ++++++++++----------- .../shader/slang/library/slang_fragment_builtin.gc | 26 +-- .../slang/library/slang_fragment_builtin_gc.h | 99 +++++------- src/mesa/shader/slang/slang_codegen.c | 92 ++++++++++- src/mesa/shader/slang/slang_codegen.h | 3 + src/mesa/shader/slang/slang_compile.c | 67 +------- src/mesa/shader/slang/slang_emit.c | 42 +++-- src/mesa/shader/slang/slang_ir.h | 1 - src/mesa/shader/slang/slang_link.h | 5 + src/mesa/shader/slang/slang_link2.c | 77 ++++++--- 12 files changed, 359 insertions(+), 284 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index d6dacdd679..bd258f8737 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -741,7 +741,8 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) * We need to handle things like "e.c[0].b" as seen in the * GLSL orange book, page 189. */ - if (u->Type == PROGRAM_UNIFORM && !strcmp(u->Name, name)) { + if ((u->Type == PROGRAM_UNIFORM || + u->Type == PROGRAM_SAMPLER) && !strcmp(u->Name, name)) { return loc; } } @@ -925,6 +926,12 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, return; } } + + if (shProg->Uniforms->Parameters[location].Type == PROGRAM_SAMPLER) { + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); + _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + } } diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 44e059f5a0..52f5b96d88 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1611,36 +1611,43 @@ bvec4 not (const bvec4 v) -// -// 8.7 Texture Lookup Functions -// +//// Texture Lookup Functions (for both fragment and vertex shaders) -vec4 texture1D (sampler1D sampler, float coord) { - vec4 texel; - __asm vec4_tex1d texel, sampler, coord, 0.0; - return texel; +vec4 texture1D(const sampler1D sampler, const float coord) +{ + __asm vec4_tex1d __retVal, coord; // XXX sampler } -vec4 texture1DProj (sampler1D sampler, vec2 coord) { - return texture1D (sampler, coord.s / coord.t); +vec4 texture1DProj(const sampler1D sampler, const vec2 coord) +{ + float pcoord = coord.s / coord.t; + __asm vec4_tex1d __retVal, pcoord; // XXX sampler } -vec4 texture1DProj (sampler1D sampler, vec4 coord) { - return texture1D (sampler, coord.s / coord.q); +vec4 texture1DProj(const sampler1D sampler, const vec4 coord) +{ + float pcoord = coord.s / coord.q; + __asm vec4_tex1d __retVal, pcoord; // XXX sampler } + vec4 texture2D(const sampler2D sampler, const vec2 coord) { - __asm vec4_tex2d __retVal, coord; // XXX sampler + __asm vec4_tex2d __retVal, sampler, coord; // XXX sampler } -vec4 texture2DProj (sampler2D sampler, vec3 coord) { - return texture2D (sampler, vec2 (coord.s / coord.p, coord.t / coord.p)); -} +//vec4 texture2DProj(const sampler2D sampler, const vec3 coord) +//{ +// vec2 pcoord = coord.st / coord.p; +// __asm vec4_tex2d __retVal, pcoord; // XXX sampler +//} + +//vec4 texture2DProj(const sampler2D sampler, const vec4 coord) +//{ +// vec2 pcoord = coord.st / coord.q; +// __asm vec4_tex2d __retVal, pcoord; // XXX sampler +//} -vec4 texture2DProj (sampler2D sampler, vec4 coord) { - return texture2D (sampler, vec2 (coord.s / coord.q, coord.t / coord.q)); -} vec4 texture3D (sampler3D sampler, vec3 coord) { vec4 texel; diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 69c1960c73..e418f53213 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -670,100 +670,93 @@ 111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, 120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0,110,111,116,0,1,1,0,4,118,0,0,0,1,4,118, 101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, -12,0,116,101,120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99,111, -111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0, -18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48, -0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0, -1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116, -117,114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111, -111,114,100,0,59,116,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0, -0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117, -114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111, -114,100,0,59,113,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, -108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,50,100,0,18,95, -95,114,101,116,86,97,108,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50, -68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,8, -58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99, -111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0, -18,99,111,111,114,100,0,59,112,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114, -111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101, -120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114, -100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111, -111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97, -109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4, -118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120, -116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111, -114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118, -101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111, -114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99, -111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0, -0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101, -108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1, -0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111, -114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18, -116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0, -0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20, -115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49, -68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99, -111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111, -114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112, -108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101, -99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18, -99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100, -111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100, -0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0, +12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99,111, +111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18, +99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,16, +115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,3,2,0,9,1,112,99,111,111,114, +100,0,2,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,116,0,49,0,0,4,118,101,99,52, +95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0, +12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1, +1,0,12,99,111,111,114,100,0,0,0,1,3,2,0,9,1,112,99,111,111,114,100,0,2,18,99,111,111,114,100,0,59, +115,0,18,99,111,111,114,100,0,59,113,0,49,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114, +101,116,86,97,108,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68, +0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, +116,101,120,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99, +111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97,109,112,108, +101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99, +52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, +111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114, +101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0, +0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0, 18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59, 116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100, -0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0, -4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110, -111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105, -115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0, -0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8, -18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111, -97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115, -101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58, -110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101, -50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0, -0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111, -105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0, -51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101, -50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51, -0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0, -0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0, -0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111, +0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0,0,19,115,97,109, +112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118, +101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114, +0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104, +97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1, +3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101, +108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116, +101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109, +112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115, +97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114, +100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59, +113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,108,101,114,0, +0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115, +104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114, +100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80, +114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115, +104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114, +100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111, +111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0, +0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97, +116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101, +49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,50,0,18, +97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0,0,0,1,3,2,0,9,1, +97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0, +9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110, +111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0, +9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115, +101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,10, +120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, +49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,0,0,0,1,0, +10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49, +0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17, +55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,12, +120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, +49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17, +50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0,0,0,1,8,58,118, +101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49, +57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,0,0,0,1,0, +11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49, +0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17, +55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55, +0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,11,120,0,0,0, +1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0, +17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,12,120,0,0,0,1,8, +58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0, +58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0, +0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49, +55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111, +105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0, +0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0, +18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51,0,53,52,0,0,46,0, +0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111, 105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0, 51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0, -17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0, -0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, -0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49, -55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0, -12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115, -101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0, -0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0, -52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0, -1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101, -49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111, -105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51, -0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99, -52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, -50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58, -118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12, -0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0, -18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17, -55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, -51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0, -57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101, -99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, -99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0, -0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0, -0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0, -58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0, -52,56,0,0,0,0,46,0,0,0,0,0,0,0 +17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105, +115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, +17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52, +55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46, +0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111, +105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0, +51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105, +115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48, +52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0, +17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0, +0,0,0,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/src/mesa/shader/slang/library/slang_fragment_builtin.gc index 373b42de1d..474535bfb1 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin.gc +++ b/src/mesa/shader/slang/library/slang_fragment_builtin.gc @@ -60,19 +60,19 @@ vec4 texture1DProj (sampler1D sampler, vec4 coord, float bias) { return texture1D (sampler, coord.s / coord.q, bias); } -vec4 texture2D (sampler2D sampler, vec2 coord, float bias) { - vec4 texel; - __asm vec4_tex2d texel, sampler, coord, bias; - return texel; -} - -vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias) { - return texture2D (sampler, vec2 (coord.s / coord.p, coord.t / coord.p), bias); -} - -vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias) { - return texture2D (sampler, vec2 (coord.s / coord.q, coord.t / coord.q), bias); -} +//vec4 texture2D (sampler2D sampler, vec2 coord, float bias) { +// vec4 texel; +// __asm vec4_tex2d texel, sampler, coord, bias; +// return texel; +//} + +//vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias) { +// return texture2D (sampler, vec2 (coord.s / coord.p, coord.t / coord.p), bias); +//} + +//vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias) { +// return texture2D (sampler, vec2 (coord.s / coord.q, coord.t / coord.q), bias); +//} vec4 texture3D (sampler3D sampler, vec3 coord, float bias) { vec4 texel; diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h index b7f1d3816c..69b90fb9da 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h @@ -20,60 +20,47 @@ 1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0, 0,1,8,58,116,101,120,116,117,114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114, 100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101, -120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0, +120,116,117,114,101,51,68,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0, 0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101, -120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, -0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68, -80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9, -98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0, -58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99, -111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1, -0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0, -1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,50, -68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99, -111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0, -49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97, -109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1, -116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120, -101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112, -108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116, -117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0, -59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114, -100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18, -98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0,0,19,115,97,109, -112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116, -101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120, -101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0, -0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4, -118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115, -104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111, -111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115,97,109, -112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59, -113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0, -0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,108, -101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120, -101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0, -0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1, -0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18, -115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111, -114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18, -99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0, -1,0,9,0,100,70,100,120,0,1,0,0,9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,120,0, -1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,120,0,1, -0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,120,0,1,0, -0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,100,70,100,121,0,1,0,0, -9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,121,0,1,0,0,10,112,0,0,0,1,8,58,118, -101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,121,0,1,0,0,11,112,0,0,0,1,8,58,118, -101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,121,0,1,0,0,12,112,0,0,0,1,8,58,118, -101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,0,0,9,112,0,0,0,1,8, -58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0, -0,0,0,46,0,0,1,0,10,0,102,119,105,100,116,104,0,1,0,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70, -100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102, -119,105,100,116,104,0,1,0,0,11,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0, -58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,0, -0,12,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70, -100,121,0,18,112,0,0,0,0,0,46,0,0,0 +120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, +0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68, +80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9, +98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0, +58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99, +111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0, +18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117, +114,101,67,117,98,101,0,1,0,0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1, +0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,99, +117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, +0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1, +0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0, +1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120, +101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8, +18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115, +97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115, +104,97,100,111,119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114, +100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59, +112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,115,104,97,100, +111,119,50,68,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98, +105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0, +18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105, +97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0, +1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0, +0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99, +111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0, +18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59, +113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,9,0,100,70,100,120,0,1,0,0,9,112,0,0,0,1,8,17,48,0, +48,48,49,0,0,0,0,1,0,10,0,100,70,100,120,0,1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48,0,48,48, +49,0,0,0,0,0,0,1,0,11,0,100,70,100,120,0,1,0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0,48,48, +49,0,0,0,0,0,0,1,0,12,0,100,70,100,120,0,1,0,0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0,48,48, +49,0,0,0,0,0,0,1,0,9,0,100,70,100,121,0,1,0,0,9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0, +100,70,100,121,0,1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0, +100,70,100,121,0,1,0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0, +100,70,100,121,0,1,0,0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0, +102,119,105,100,116,104,0,1,0,0,9,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0, +0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,10,0,102,119,105,100,116,104,0,1, +0,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70, +100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,119,105,100,116,104,0,1,0,0,11,112,0,0,0,1,8,58,97, +98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0, +46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,0,0,12,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120, +0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 3b96ec0a88..90d17122b6 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -92,7 +92,9 @@ static slang_asm_info AsmInfo[] = { { "float_divide", IR_DIV, 1, 2 }, { "float_power", IR_POW, 1, 2 }, /* texture / sampler */ - { "vec4_tex2d", IR_TEX, 1, 1 }, + { "vec4_tex1d", IR_TEX, 1, 1 }, + { "vec4_texb1d", IR_TEXB, 1, 3 }, + { "vec4_tex2d", IR_TEX, 1, 2 }, { "vec4_texb2d", IR_TEXB, 1, 3 }, /* unary op */ { "int_to_float", IR_I_TO_F, 1, 1 }, @@ -196,7 +198,7 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, oper->var = v; n->Swizzle = swizzle; n->Var = v; - slang_resolve_storage(A->codegen/**NULL**/, n, A->program); + slang_resolve_storage(A->codegen, n, A->program); return n; } @@ -801,10 +803,6 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, free(n0); } - if (info->Opcode == IR_TEX || info->Opcode == IR_TEXB) { - n->TexTarget = TEXTURE_2D_INDEX; - } - return n; } @@ -1568,8 +1566,10 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) slang_print_function(fun, 1); #endif - A->program->Parameters = _mesa_new_parameter_list(); - A->program->Varying = _mesa_new_parameter_list(); + /* should have been allocated earlier: */ + assert(A->program->Parameters ); + assert(A->program->Varying); + A->codegen = _slang_new_codegen_context(); /*printf("** Begin Simplify\n");*/ @@ -1608,3 +1608,79 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) } +static GLint +sampler_to_texture_index(const slang_type_specifier_type type) +{ + switch (type) { + case slang_spec_sampler1D: + return TEXTURE_1D_INDEX; + case slang_spec_sampler2D: + return TEXTURE_2D_INDEX; + case slang_spec_sampler3D: + return TEXTURE_3D_INDEX; + case slang_spec_samplerCube: + return TEXTURE_CUBE_INDEX; + case slang_spec_sampler1DShadow: + return TEXTURE_1D_INDEX; /* XXX fix */ + case slang_spec_sampler2DShadow: + return TEXTURE_2D_INDEX; /* XXX fix */ + default: + return -1; + } +} + + + +static GLint +slang_alloc_sampler(struct gl_program *prog, const char *name) +{ + GLint i = _mesa_add_sampler(prog->Parameters, name); + return i; +} + + +/** + * Called by compiler when a global variable has been parsed/compiled. + * Here we examine the variable's type to determine what kind of register + * storage will be used. + * + * A uniform such as "gl_Position" will become the register specification + * (PROGRAM_OUTPUT, VERT_RESULT_HPOS). Or, uniform "gl_FogFragCoord" + * will be (PROGRAM_INPUT, FRAG_ATTRIB_FOGC). + * + * Samplers are interesting. For "uniform sampler2D tex;" we'll specify + * (PROGRAM_SAMPLER, index) where index is resolved at link-time to an + * actual texture unit (as specified by the user calling glUniform1i()). + */ +void +_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog) +{ + GLint texIndex; + slang_ir_storage *store = NULL; + + texIndex = sampler_to_texture_index(var->type.specifier.type); + + if (texIndex != -1) { + /* Texture sampler: + * store->File = PROGRAM_SAMPLER + * store->Index = sampler uniform location + * store->Size = texture type index (1D, 2D, 3D, cube, etc) + */ + GLint samplerUniform = slang_alloc_sampler(prog, (char *) var->a_name); + store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); + printf("SAMPLER "); + } + else if (var->type.qualifier == slang_qual_uniform) { + printf("UNIFORM "); + } + + printf("CODEGEN VAR %s\n", (char*) var->a_name); + + assert(!var->aux); +#if 1 + var->aux = store; +#endif + /** + XXX allocate variable storage (aux), at least the register file. + */ +} diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h index 042737b2b5..ef2ccd4ebf 100644 --- a/src/mesa/shader/slang/slang_codegen.h +++ b/src/mesa/shader/slang/slang_codegen.h @@ -35,5 +35,8 @@ extern struct slang_ir_node_ * _slang_codegen_function(slang_assemble_ctx *A , struct slang_function_ *fun); +extern void +_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog); + #endif /* SLANG_CODEGEN_H */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index da77de709c..711849d72f 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -803,25 +803,7 @@ parse_child_operation(slang_parse_ctx * C, slang_output_ctx * O, slang_operation *ch; /* grow child array */ -#if 000 - oper->children = (slang_operation *) - slang_alloc_realloc(oper->children, - oper->num_children * sizeof(slang_operation), - (oper->num_children + 1) * sizeof(slang_operation)); - if (oper->children == NULL) { - slang_info_log_memory(C->L); - return 0; - } - - ch = &oper->children[oper->num_children]; - if (!slang_operation_construct(ch)) { - slang_info_log_memory(C->L); - return 0; - } - oper->num_children++; -#else ch = slang_operation_grow(&oper->num_children, &oper->children); -#endif if (statement) return parse_statement(C, O, ch); return parse_expression(C, O, ch); @@ -860,44 +842,6 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, /* local variable declaration, individual declarators are stored as * children identifiers */ -#if 000 - oper->type = slang_oper_variable_decl; - { - const unsigned int first_var = O->vars->num_variables; - - /* parse the declaration, note that there can be zero or more - * than one declarators - */ - if (!parse_declaration(C, O)) - return 0; - if (first_var < O->vars->num_variables) { - const unsigned int num_vars = O->vars->num_variables - first_var; - unsigned int i; - - oper->children = (slang_operation *) - slang_alloc_malloc(num_vars * sizeof(slang_operation)); - if (oper->children == NULL) { - slang_info_log_memory(C->L); - return 0; - } - for (oper->num_children = 0; oper->num_children < num_vars; - oper->num_children++) { - if (!slang_operation_construct - (&oper->children[oper->num_children])) { - slang_info_log_memory(C->L); - return 0; - } - } - for (i = first_var; i < O->vars->num_variables; i++) { - slang_operation *o = &oper->children[i - first_var]; - o->type = slang_oper_identifier; - o->locals->outer_scope = O->vars; - o->a_id = O->vars->variables[i].a_name; - } - } - } -#else - oper->type = slang_oper_block_no_new_scope; { const unsigned int first_var = O->vars->num_variables; @@ -925,9 +869,6 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, } } } - - -#endif break; case OP_ASM: /* the __asm statement, parse the mnemonic and all its arguments @@ -1776,6 +1717,11 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, return 0; } +#if 1 + if (C->global_scope && O->program) + _slang_codegen_global_variable(var, O->program); +#endif + /* allocate global address space for a variable with a known size */ if (C->global_scope && !(var->type.specifier.type == slang_spec_array @@ -2309,6 +2255,9 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) = (struct gl_program **) malloc(sizeof(struct gl_program*)); shader->Programs[0] = _mesa_new_program(ctx, progTarget, 1); shader->NumPrograms = 1; + + shader->Programs[0]->Parameters = _mesa_new_parameter_list(); + shader->Programs[0]->Varying = _mesa_new_parameter_list(); } slang_info_log_construct(&info_log); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index a3d970694f..3f1f1373c6 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -184,6 +184,7 @@ storage_string(const slang_ir_storage *st) "UNIFORM", "WRITE_ONLY", "ADDRESS", + "SAMPLER", "UNDEFINED" }; static char s[100]; @@ -194,10 +195,8 @@ storage_string(const slang_ir_storage *st) sprintf(s, "%s[%d..%d]", files[st->File], st->Index, st->Index + st->Size - 1); #endif - if (st->File == 1000) - sprintf(s, "sampler"); - else - sprintf(s, "%s[%d]", files[st->File], st->Index); + assert(st->File < sizeof(files) / sizeof(files[0])); + sprintf(s, "%s[%d]", files[st->File], st->Index); return s; } @@ -680,10 +679,12 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, assert(n->Var); if (is_sampler_type(&n->Var->type)) { /* i.e. "uniform sampler2D tex;" */ -#define PROGRAM_SAMPLER 1000 n->Store->File = PROGRAM_SAMPLER; n->Store->Size = 1; /* never used */ n->Store->Index = alloc_sampler(gc); + n->Store->Index = slang_alloc_uniform(prog, (char *) n->Var->a_name, 1); + printf("********** Alloc sampler uniform %d\n", n->Store->Index); + abort(); /* this is a locally-declared sampler */ } else if (n->Store->Index < 0) { /* XXX assert this? */ assert(gc); @@ -701,12 +702,18 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, return; } + /* + assert(!is_sampler_type(&n->Var->type)); + */ + if (n->Opcode == IR_VAR && n->Store->File == PROGRAM_UNDEFINED) { /* try to determine the storage for this variable */ GLint i; assert(n->Var); + /*if (is_sampler(*/ + if (n->Store->Size < 0) { /* determine var/storage size now */ n->Store->Size = sizeof_type(&n->Var->type); @@ -766,14 +773,7 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, else if (n->Var->type.qualifier == slang_qual_varying) { i = slang_alloc_varying(prog, (char *) n->Var->a_name); if (i >= 0) { -#ifdef OLD_LINK - if (prog->Target == GL_VERTEX_PROGRAM_ARB) - n->Store->File = PROGRAM_OUTPUT; - else - n->Store->File = PROGRAM_INPUT; -#else n->Store->File = PROGRAM_VARYING; -#endif n->Store->Index = i; return; } @@ -1023,14 +1023,24 @@ emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, OPCODE_TXB); } + if (!n->Store) + slang_alloc_temp_storage(gc, n, 4); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - n->Children[0]->Swizzle); + /* Child[1] is the coord */ + storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, + n->Children[1]->Swizzle); - inst->TexSrcTarget = n->TexTarget; - inst->TexSrcUnit = 0; /* XXX temp */ + /* Child[0] is the sampler (a uniform which'll indicate the texture unit) */ + assert(n->Children[0]->Store); + assert(n->Children[0]->Store->Size >= TEXTURE_1D_INDEX); + inst->Sampler = n->Children[0]->Store->Index; /* i.e. uniform's index */ + inst->TexSrcTarget = n->Children[0]->Store->Size; + inst->TexSrcUnit = 27; /* Dummy value; the TexSrcUnit will be computed at + * link time, using the sampler uniform's value. + */ return inst; } diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index b43ff1db61..0613121b98 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -112,7 +112,6 @@ typedef struct slang_ir_node_ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; slang_ir_storage *Store; - GLuint TexTarget; /**< If Opcode == IR_TEX or IR_TEXB */ } slang_ir_node; diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index f56d717873..2fc5525000 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -353,6 +353,11 @@ extern void _slang_link2(GLcontext *ctx, GLhandleARB h, struct gl_shader_program *shProg); +extern void +_slang_resolve_samplers(struct gl_shader_program *shProg, + struct gl_program *prog); + + #ifdef __cplusplus } #endif diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 33813fecc4..8b59d7f76a 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -138,6 +138,7 @@ is_uniform(enum register_file file) file == PROGRAM_STATE_VAR || file == PROGRAM_NAMED_PARAM || file == PROGRAM_CONSTANT || + file == PROGRAM_SAMPLER || file == PROGRAM_UNIFORM); } @@ -148,7 +149,8 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) GLuint *map, i; #if 0 - _mesa_print_parameter_list(prog->Parameters); + printf("================ pre link uniforms ===============\n"); + _mesa_print_parameter_list(shProg->Uniforms); #endif map = (GLuint *) malloc(prog->Parameters->NumParameters * sizeof(GLuint)); @@ -201,6 +203,9 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) case PROGRAM_UNIFORM: j = _mesa_add_uniform(shProg->Uniforms, p->Name, p->Size); break; + case PROGRAM_SAMPLER: + j = _mesa_add_sampler(shProg->Uniforms, p->Name); + break; default: abort(); } @@ -218,6 +223,11 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) } +#if 0 + printf("================ post link uniforms ===============\n"); + _mesa_print_parameter_list(shProg->Uniforms); +#endif + #if 0 { GLuint i; @@ -244,7 +254,14 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ]; } } - /* XXX update program OutputsWritten, InputsRead */ + + if (inst->Opcode == OPCODE_TEX || + inst->Opcode == OPCODE_TXB || + inst->Opcode == OPCODE_TXB) { + printf("====== remap sampler from %d to %d\n", + inst->Sampler, map[ inst->Sampler ]); + inst->Sampler = map[ inst->Sampler ]; + } } free(map); @@ -257,7 +274,7 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) * XXX Temporary */ static void -slang_resolve_branches(struct gl_program *prog) +_slang_resolve_branches(struct gl_program *prog) { struct target { const char *Name; @@ -293,22 +310,47 @@ slang_resolve_branches(struct gl_program *prog) } +/** + * Scan program for texture instructions, lookup sampler/uniform's value + * to determine which texture unit to use. + * Also, update the program's TexturesUsed[] array. + */ +void +_slang_resolve_samplers(struct gl_shader_program *shProg, + struct gl_program *prog) +{ + GLuint i; + + for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) + prog->TexturesUsed[i] = 0; + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_TEX || + inst->Opcode == OPCODE_TXB || + inst->Opcode == OPCODE_TXB) { + GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; + assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); + inst->TexSrcUnit = sampleUnit; + + prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + } + } +} + + /** * Scan program instructions to update the program's InputsRead and * OutputsWritten fields. - * Also, update the program's TexturesUsed[] array. */ static void -slang_update_inputs_outputs(struct gl_program *prog) +_slang_update_inputs_outputs(struct gl_program *prog) { GLuint i, j; prog->InputsRead = 0x0; prog->OutputsWritten = 0x0; - for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) - prog->TexturesUsed[i] = 0; - for (i = 0; i < prog->NumInstructions; i++) { const struct prog_instruction *inst = prog->Instructions + i; const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); @@ -320,12 +362,6 @@ slang_update_inputs_outputs(struct gl_program *prog) if (inst->DstReg.File == PROGRAM_OUTPUT) { prog->OutputsWritten |= 1 << inst->DstReg.Index; } - - if (inst->Opcode == OPCODE_TEX || - inst->Opcode == OPCODE_TXB || - inst->Opcode == OPCODE_TXP) { - prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); - } } } @@ -425,11 +461,14 @@ _slang_link2(GLcontext *ctx, shProg->VertexProgram->Base.Parameters = shProg->Uniforms; shProg->FragmentProgram->Base.Parameters = shProg->Uniforms; - slang_resolve_branches(&shProg->VertexProgram->Base); - slang_resolve_branches(&shProg->FragmentProgram->Base); - - slang_update_inputs_outputs(&shProg->VertexProgram->Base); - slang_update_inputs_outputs(&shProg->FragmentProgram->Base); + _slang_resolve_branches(&shProg->VertexProgram->Base); + _slang_resolve_branches(&shProg->FragmentProgram->Base); +#if 1 + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); + _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); +#endif + _slang_update_inputs_outputs(&shProg->VertexProgram->Base); + _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); #if 1 printf("************** original fragment program\n"); -- cgit v1.2.3 From cf4d4342c905c9989abb2dcc5e38968db8aeaf57 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 13:09:47 -0700 Subject: Checkpoint: re-org of (global) variable allocation code. More to come... --- src/mesa/shader/slang/slang_codegen.c | 176 ++++++++++++++++++++++++++++++++-- src/mesa/shader/slang/slang_codegen.h | 3 +- src/mesa/shader/slang/slang_compile.c | 6 +- src/mesa/shader/slang/slang_emit.c | 139 ++------------------------- 4 files changed, 184 insertions(+), 140 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 90d17122b6..73ad20a73d 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1630,12 +1630,89 @@ sampler_to_texture_index(const slang_type_specifier_type type) } +/** + * XXX return size too + */ +static GLint +_slang_input_index(const char *name, GLenum target) +{ + struct input_info { + const char *Name; + GLuint Attrib; + }; + static const struct input_info vertInputs[] = { + { "gl_Vertex", VERT_ATTRIB_POS }, + { "gl_Normal", VERT_ATTRIB_NORMAL }, + { "gl_Color", VERT_ATTRIB_COLOR0 }, + { "gl_SecondaryColor", VERT_ATTRIB_COLOR1 }, + { "gl_FogCoord", VERT_ATTRIB_FOG }, + { "gl_MultiTexCoord0", VERT_ATTRIB_TEX0 }, + { "gl_MultiTexCoord1", VERT_ATTRIB_TEX1 }, + { "gl_MultiTexCoord2", VERT_ATTRIB_TEX2 }, + { "gl_MultiTexCoord3", VERT_ATTRIB_TEX3 }, + { "gl_MultiTexCoord4", VERT_ATTRIB_TEX4 }, + { "gl_MultiTexCoord5", VERT_ATTRIB_TEX5 }, + { "gl_MultiTexCoord6", VERT_ATTRIB_TEX6 }, + { "gl_MultiTexCoord7", VERT_ATTRIB_TEX7 }, + { NULL, 0 } + }; + static const struct input_info fragInputs[] = { + { "gl_FragCoord", FRAG_ATTRIB_WPOS }, + { "gl_Color", FRAG_ATTRIB_COL0 }, + { "gl_SecondaryColor", FRAG_ATTRIB_COL1 }, + { "gl_FogFragCoord", FRAG_ATTRIB_FOGC }, + { "gl_TexCoord", FRAG_ATTRIB_TEX0 }, + { NULL, 0 } + }; + GLuint i; + const struct input_info *inputs + = (target == GL_VERTEX_PROGRAM_ARB) ? vertInputs : fragInputs; + + for (i = 0; inputs[i].Name; i++) { + if (strcmp(inputs[i].Name, name) == 0) { + /* found */ + return inputs[i].Attrib; + } + } + return -1; +} + + static GLint -slang_alloc_sampler(struct gl_program *prog, const char *name) +_slang_output_index(const char *name, GLenum target) { - GLint i = _mesa_add_sampler(prog->Parameters, name); - return i; + struct output_info { + const char *Name; + GLuint Attrib; + }; + static const struct output_info vertOutputs[] = { + { "gl_Position", VERT_RESULT_HPOS }, + { "gl_FrontColor", VERT_RESULT_COL0 }, + { "gl_BackColor", VERT_RESULT_BFC0 }, + { "gl_FrontSecondaryColor", VERT_RESULT_COL1 }, + { "gl_BackSecondaryColor", VERT_RESULT_BFC1 }, + { "gl_TexCoord", VERT_RESULT_TEX0 }, /* XXX indexed */ + { "gl_FogFragCoord", VERT_RESULT_FOGC }, + { "gl_PointSize", VERT_RESULT_PSIZ }, + { NULL, 0 } + }; + static const struct output_info fragOutputs[] = { + { "gl_FragColor", FRAG_RESULT_COLR }, + { "gl_FragDepth", FRAG_RESULT_DEPR }, + { NULL, 0 } + }; + GLuint i; + const struct output_info *outputs + = (target == GL_VERTEX_PROGRAM_ARB) ? vertOutputs : fragOutputs; + + for (i = 0; outputs[i].Name; i++) { + if (strcmp(outputs[i].Name, name) == 0) { + /* found */ + return outputs[i].Attrib; + } + } + return -1; } @@ -1653,8 +1730,10 @@ slang_alloc_sampler(struct gl_program *prog, const char *name) * actual texture unit (as specified by the user calling glUniform1i()). */ void -_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog) +_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, + slang_unit_type type) { + const char *varName = (char *) var->a_name; GLint texIndex; slang_ir_storage *store = NULL; @@ -1666,15 +1745,98 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog) * store->Index = sampler uniform location * store->Size = texture type index (1D, 2D, 3D, cube, etc) */ - GLint samplerUniform = slang_alloc_sampler(prog, (char *) var->a_name); + GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName); store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); printf("SAMPLER "); } else if (var->type.qualifier == slang_qual_uniform) { + /* Uniform variable */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + if (prog) { + /* user-defined uniform */ + GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, size); + store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); + } + else { + /* pre-defined uniform, like gl_ModelviewMatrix */ + /* We know it's a uniform, but don't allocate storage unless + * it's really used. + */ + + store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); + + } printf("UNIFORM "); } - - printf("CODEGEN VAR %s\n", (char*) var->a_name); + else if (var->type.qualifier == slang_qual_varying) { + const GLint size = 4; /* XXX fix */ + if (prog) { + /* user-defined varying */ + GLint varyingLoc = _mesa_add_varying(prog->Varying, varName, size); + store = _slang_new_ir_storage(PROGRAM_VARYING, varyingLoc, size); + } + else { + /* pre-defined varying, like gl_Color or gl_TexCoord */ + if (type == slang_unit_fragment_builtin) { + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + assert(index < FRAG_ATTRIB_MAX); + } + else { + GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); + assert(index >= 0); + assert(type == slang_unit_vertex_builtin); + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + assert(index < VERT_RESULT_MAX); + } + printf("V/F "); + } + printf("VARYING "); + } + else if (var->type.qualifier == slang_qual_const) { + if (prog) { + abort(); + } + else { + /* pre-defined global constant, like gl_MaxLights */ + GLint size = -1; + store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); + } + printf("CONST "); + } + else if (var->type.qualifier == slang_qual_attribute) { + /* Vertex attribute */ + GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + printf("ATTRIB "); + } + else if (var->type.qualifier == slang_qual_fixedinput) { + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + printf("INPUT "); + } + else if (var->type.qualifier == slang_qual_fixedoutput) { + if (type == slang_unit_vertex_builtin) { + GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + } + else { + assert(type == slang_unit_fragment_builtin); + GLint index = _slang_output_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + } + printf("OUTPUT "); + } + else { + printf("other "); + } + printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store?store->Index:-2); assert(!var->aux); #if 1 diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h index ef2ccd4ebf..ad8e2a4fd8 100644 --- a/src/mesa/shader/slang/slang_codegen.h +++ b/src/mesa/shader/slang/slang_codegen.h @@ -36,7 +36,8 @@ extern struct slang_ir_node_ * _slang_codegen_function(slang_assemble_ctx *A , struct slang_function_ *fun); extern void -_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog); +_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, + slang_unit_type type); #endif /* SLANG_CODEGEN_H */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 711849d72f..efb23255f9 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -233,6 +233,7 @@ typedef struct slang_parse_ctx_ int parsing_builtin; GLboolean global_scope; /**< Is object being declared a global? */ slang_atom_pool *atoms; + slang_unit_type type; /**< Vertex vs. Fragment */ } slang_parse_ctx; /* slang_output_ctx */ @@ -1718,8 +1719,8 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, } #if 1 - if (C->global_scope && O->program) - _slang_codegen_global_variable(var, O->program); + if (C->global_scope /*&& O->program*/) + _slang_codegen_global_variable(var, O->program, C->type); #endif /* allocate global address space for a variable with a known size */ @@ -1992,6 +1993,7 @@ compile_binary(const byte * prod, slang_code_unit * unit, C.parsing_builtin = (builtin == NULL); C.global_scope = GL_TRUE; C.atoms = &unit->object->atompool; + C.type = type; if (!check_revision(&C)) return GL_FALSE; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 3f1f1373c6..4c952e2e0a 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -420,91 +420,6 @@ free_temporary(slang_gen_context *gc, GLuint r, GLint size) } - -static GLint -slang_find_input(GLenum target, const char *name, GLint index) -{ - struct input_info { - const char *Name; - GLuint Attrib; - }; - static const struct input_info vertInputs[] = { - { "gl_Vertex", VERT_ATTRIB_POS }, - { "gl_Normal", VERT_ATTRIB_NORMAL }, - { "gl_Color", VERT_ATTRIB_COLOR0 }, - { "gl_SecondaryColor", VERT_ATTRIB_COLOR1 }, - { "gl_MultiTexCoord0", VERT_ATTRIB_TEX0 }, - { "gl_MultiTexCoord1", VERT_ATTRIB_TEX1 }, - { "gl_MultiTexCoord2", VERT_ATTRIB_TEX2 }, - { NULL, 0 } - }; - static const struct input_info fragInputs[] = { - { "gl_TexCoord", FRAG_ATTRIB_TEX0 }, - { NULL, 0 } - }; - const struct input_info *inputs; - GLuint i; - - if (target == GL_VERTEX_PROGRAM_ARB) { - inputs = vertInputs; - } - else { - assert(target == GL_FRAGMENT_PROGRAM_ARB); - inputs = fragInputs; - } - - for (i = 0; inputs[i].Name; i++) { - if (strcmp(inputs[i].Name, name) == 0) { - /* found */ - return inputs[i].Attrib; - } - } - return -1; -} - - -static GLint -slang_find_output(GLenum target, const char *name, GLint index) -{ - struct output_info { - const char *Name; - GLuint Attrib; - }; - static const struct output_info vertOutputs[] = { - { "gl_Position", VERT_RESULT_HPOS }, - { "gl_FrontColor", VERT_RESULT_COL0 }, - { "gl_BackColor", VERT_RESULT_BFC0 }, - { "gl_FrontSecondaryColor", VERT_RESULT_COL1 }, - { "gl_BackSecondaryColor", VERT_RESULT_BFC1 }, - { "gl_TexCoord", VERT_RESULT_TEX0 }, /* XXX indexed */ - { "gl_FogFragCoord", VERT_RESULT_FOGC }, - { NULL, 0 } - }; - static const struct output_info fragOutputs[] = { - { "gl_FragColor", FRAG_RESULT_COLR }, - { NULL, 0 } - }; - const struct output_info *outputs; - GLuint i; - - if (target == GL_VERTEX_PROGRAM_ARB) { - outputs = vertOutputs; - } - else { - assert(target == GL_FRAGMENT_PROGRAM_ARB); - outputs = fragOutputs; - } - - for (i = 0; outputs[i].Name; i++) { - if (strcmp(outputs[i].Name, name) == 0) { - /* found */ - return outputs[i].Attrib; - } - } - return -1; -} - - /** * Lookup a named constant and allocate storage for the parameter in * the given parameter list. @@ -620,13 +535,6 @@ slang_alloc_uniform(struct gl_program *prog, const char *name, GLuint size) } -static GLint -slang_alloc_varying(struct gl_program *prog, const char *name) -{ - GLint i = _mesa_add_varying(prog->Varying, name, 4); /* XXX fix size */ - return i; -} - /** * Allocate temporary storage for an intermediate result (such as for @@ -705,14 +613,17 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, /* assert(!is_sampler_type(&n->Var->type)); */ + assert(n->Opcode == IR_VAR); + + assert(n->Store->File != PROGRAM_UNDEFINED); - if (n->Opcode == IR_VAR && n->Store->File == PROGRAM_UNDEFINED) { + if (n->Opcode == IR_VAR && (n->Store->File == PROGRAM_UNDEFINED + || n->Store->Index < 0)) { /* try to determine the storage for this variable */ GLint i; assert(n->Var); - - /*if (is_sampler(*/ + assert(n->Store->Size > 0); if (n->Store->Size < 0) { /* determine var/storage size now */ @@ -730,23 +641,10 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, n->Var->type.qualifier == slang_qual_const); #endif - i = slang_find_input(prog->Target, (char *) n->Var->a_name, 0); - if (i >= 0) { - n->Store->File = PROGRAM_INPUT; - n->Store->Index = i; - assert(n->Store->Size > 0); - return; - } - - i = slang_find_output(prog->Target, (char *) n->Var->a_name, 0); - if (i >= 0) { - n->Store->File = PROGRAM_OUTPUT; - n->Store->Index = i; - return; - } - i = slang_lookup_statevar((char *) n->Var->a_name, 0, prog->Parameters); if (i >= 0) { + assert(n->Store->File == PROGRAM_STATE_VAR /*|| + n->Store->File == PROGRAM_UNIFORM*/); n->Store->File = PROGRAM_STATE_VAR; n->Store->Index = i; return; @@ -754,31 +652,12 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, i = slang_lookup_constant((char *) n->Var->a_name, 0, prog->Parameters); if (i >= 0) { + assert(n->Store->File == PROGRAM_CONSTANT); n->Store->File = PROGRAM_CONSTANT; n->Store->Index = i; return; } - /* probably a uniform or varying */ - if (n->Var->type.qualifier == slang_qual_uniform) { - GLint size = n->Store->Size; - assert(size > 0); - i = slang_alloc_uniform(prog, (char *) n->Var->a_name, size); - if (i >= 0) { - n->Store->File = PROGRAM_UNIFORM; - n->Store->Index = i; - return; - } - } - else if (n->Var->type.qualifier == slang_qual_varying) { - i = slang_alloc_varying(prog, (char *) n->Var->a_name); - if (i >= 0) { - n->Store->File = PROGRAM_VARYING; - n->Store->Index = i; - return; - } - } - if (n->Store->File == PROGRAM_UNDEFINED && n->Store->Index < 0) { /* ordinary local var */ assert(n->Store->Size > 0); -- cgit v1.2.3 From 27cc9068ce49ede4cb56d52b32c96e568e5fcbb5 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 13:36:53 -0700 Subject: checkpoint: more work on variable/storage allocation --- src/mesa/shader/slang/slang_emit.c | 84 ++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 4c952e2e0a..3ee583625d 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -457,6 +457,7 @@ slang_lookup_constant(const char *name, GLint index, GLint pos; _mesa_GetFloatv(info[i].Token, &value); ASSERT(value >= 0.0); /* sanity check that glGetFloatv worked */ + /* XXX named constant! */ pos = _mesa_add_unnamed_constant(paramList, &value, 1, &swizzle); return pos; } @@ -585,16 +586,10 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (n->Opcode == IR_VAR_DECL) { /* storage declaration */ assert(n->Var); - if (is_sampler_type(&n->Var->type)) { - /* i.e. "uniform sampler2D tex;" */ - n->Store->File = PROGRAM_SAMPLER; - n->Store->Size = 1; /* never used */ - n->Store->Index = alloc_sampler(gc); - n->Store->Index = slang_alloc_uniform(prog, (char *) n->Var->a_name, 1); - printf("********** Alloc sampler uniform %d\n", n->Store->Index); - abort(); /* this is a locally-declared sampler */ - } - else if (n->Store->Index < 0) { /* XXX assert this? */ + assert(!is_sampler_type(&n->Var->type)); + assert(n->Store->Index < 0); + + if (n->Store->Index < 0) { /* XXX assert this? */ assert(gc); n->Store->File = PROGRAM_TEMPORARY; n->Store->Size = sizeof_type(&n->Var->type); @@ -614,12 +609,10 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, assert(!is_sampler_type(&n->Var->type)); */ assert(n->Opcode == IR_VAR); - assert(n->Store->File != PROGRAM_UNDEFINED); - if (n->Opcode == IR_VAR && (n->Store->File == PROGRAM_UNDEFINED - || n->Store->Index < 0)) { - /* try to determine the storage for this variable */ + if (n->Store->Index < 0) { + /* determine storage location for this var */ GLint i; assert(n->Var); @@ -627,42 +620,35 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, if (n->Store->Size < 0) { /* determine var/storage size now */ + abort(); n->Store->Size = sizeof_type(&n->Var->type); assert(n->Store->Size > 0); } -#if 0 - assert(n->Var->declared || - n->Var->type.qualifier == slang_qual_uniform || - n->Var->type.qualifier == slang_qual_varying || - n->Var->type.qualifier == slang_qual_fixedoutput || - n->Var->type.qualifier == slang_qual_attribute || - n->Var->type.qualifier == slang_qual_out || - n->Var->type.qualifier == slang_qual_const); -#endif - - i = slang_lookup_statevar((char *) n->Var->a_name, 0, prog->Parameters); - if (i >= 0) { - assert(n->Store->File == PROGRAM_STATE_VAR /*|| - n->Store->File == PROGRAM_UNIFORM*/); - n->Store->File = PROGRAM_STATE_VAR; - n->Store->Index = i; - return; + if (n->Store->File == PROGRAM_STATE_VAR) { + i = slang_lookup_statevar((char *) n->Var->a_name, 0, prog->Parameters); + assert(i >= 0); + if (i >= 0) { + assert(n->Store->File == PROGRAM_STATE_VAR /*|| + n->Store->File == PROGRAM_UNIFORM*/); + n->Store->File = PROGRAM_STATE_VAR; + n->Store->Index = i; + return; + } } - - i = slang_lookup_constant((char *) n->Var->a_name, 0, prog->Parameters); - if (i >= 0) { - assert(n->Store->File == PROGRAM_CONSTANT); - n->Store->File = PROGRAM_CONSTANT; - n->Store->Index = i; - return; + else if (n->Store->File == PROGRAM_CONSTANT) { + i = slang_lookup_constant((char *) n->Var->a_name, 0, + prog->Parameters); + assert(i >= 0); + if (i >= 0) { + n->Store->File = PROGRAM_CONSTANT; + n->Store->Index = i; + return; + } } - - if (n->Store->File == PROGRAM_UNDEFINED && n->Store->Index < 0) { - /* ordinary local var */ - assert(n->Store->Size > 0); - n->Store->File = PROGRAM_TEMPORARY; - n->Store->Index = alloc_temporary(gc, n->Store->Size); + else { + /* what's this??? */ + abort(); } } } @@ -941,17 +927,26 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) return inst; break; case IR_VAR_DECL: +#if 0000 slang_resolve_storage(gc, n, prog); +#endif + /* Storage should have already been resolved/allocated */ + assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Index >= 0); assert(n->Store->Size > 0); break; case IR_VAR: /*printf("Gen: var ref\n");*/ { + assert(n->Store); + assert(n->Store->File != PROGRAM_UNDEFINED); + assert(n->Store->Index >= 0); +#if 00 int b = !n->Store || n->Store->Index < 0; if (b) slang_resolve_storage(gc, n, prog); /*assert(n->Store->Index >= 0);*/ +#endif assert(n->Store->Size > 0); } break; @@ -1004,6 +999,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, n->Children[1]->Swizzle); } + /* XXX is this test correct? */ if (n->Children[1]->Store->File == PROGRAM_TEMPORARY) { free_temporary(gc, n->Children[1]->Store->Index, n->Children[1]->Store->Size); -- cgit v1.2.3 From d3fe7398e31d76f5d2fd36856bec7d4483b5efe7 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 14:06:00 -0700 Subject: Move storage allocation functions from slang_emit.c to slang_codegen.c --- src/mesa/shader/slang/slang_codegen.c | 281 +++++++++++++++++++++++++++ src/mesa/shader/slang/slang_emit.c | 345 +--------------------------------- src/mesa/shader/slang/slang_emit.h | 9 +- 3 files changed, 288 insertions(+), 347 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 73ad20a73d..df361fbb3d 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -29,6 +29,7 @@ */ #include "imports.h" +#include "get.h" #include "macros.h" #include "slang_assemble.h" #include "slang_codegen.h" @@ -42,6 +43,7 @@ #include "program.h" #include "prog_instruction.h" #include "prog_parameter.h" +#include "prog_statevars.h" #include "slang_print.h" @@ -57,6 +59,285 @@ static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); + + +/** + * Lookup a named constant and allocate storage for the parameter in + * the given parameter list. + * \return position of the constant in the paramList. + */ +static GLint +slang_lookup_constant(const char *name, GLint index, + struct gl_program_parameter_list *paramList) +{ + struct constant_info { + const char *Name; + const GLenum Token; + }; + static const struct constant_info info[] = { + { "gl_MaxLights", GL_MAX_LIGHTS }, + { "gl_MaxClipPlanes", GL_MAX_CLIP_PLANES }, + { "gl_MaxTextureUnits", GL_MAX_TEXTURE_UNITS }, + { "gl_MaxTextureCoords", GL_MAX_TEXTURE_COORDS }, + { "gl_MaxVertexAttribs", GL_MAX_VERTEX_ATTRIBS }, + { "gl_MaxVertexUniformComponents", GL_MAX_VERTEX_UNIFORM_COMPONENTS }, + { "gl_MaxVaryingFloats", GL_MAX_VARYING_FLOATS }, + { "gl_MaxVertexTextureImageUnits", GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS }, + { "gl_MaxTextureImageUnits", GL_MAX_TEXTURE_IMAGE_UNITS }, + { "gl_MaxFragmentUniformComponents", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS }, + { "gl_MaxCombinedTextureImageUnits", GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS }, + { NULL, 0 } + }; + GLuint i; + GLuint swizzle; /* XXX use this */ + + for (i = 0; info[i].Name; i++) { + if (strcmp(info[i].Name, name) == 0) { + /* found */ + GLfloat value = -1.0; + GLint pos; + _mesa_GetFloatv(info[i].Token, &value); + ASSERT(value >= 0.0); /* sanity check that glGetFloatv worked */ + /* XXX named constant! */ + pos = _mesa_add_unnamed_constant(paramList, &value, 1, &swizzle); + return pos; + } + } + return -1; +} + + +/** + * Determine if 'name' is a state variable. If so, create a new program + * parameter for it, and return the param's index. Else, return -1. + */ +static GLint +slang_lookup_statevar(const char *name, GLint index, + struct gl_program_parameter_list *paramList) +{ + struct state_info { + const char *Name; + const GLuint NumRows; /** for matrices */ + const GLuint Swizzle; + const GLint Indexes[6]; + }; + static const struct state_info state[] = { + { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, + { "gl_NormalMatrix", 3, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, + { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, 0 } }, + { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MVP, 0, 0, 0, 0 } }, + { "gl_TextureMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, 0 } }, + { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } + }; + GLuint i; + + for (i = 0; state[i].Name; i++) { + if (strcmp(state[i].Name, name) == 0) { + /* found */ + if (paramList) { + if (state[i].NumRows > 1) { + /* a matrix */ + GLuint j; + GLint pos[4], indexesCopy[6]; + /* make copy of state tokens */ + for (j = 0; j < 6; j++) + indexesCopy[j] = state[i].Indexes[j]; + /* load rows */ + for (j = 0; j < state[i].NumRows; j++) { + indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ + pos[j] = _mesa_add_state_reference(paramList, indexesCopy); + assert(pos[j] >= 0); + } + return pos[0]; + } + else { + /* non-matrix state */ + GLint pos + = _mesa_add_state_reference(paramList, state[i].Indexes); + assert(pos >= 0); + return pos; + } + } + } + } + return -1; +} + + +static GLboolean +is_sampler_type(const slang_fully_specified_type *t) +{ + switch (t->specifier.type) { + case slang_spec_sampler1D: + case slang_spec_sampler2D: + case slang_spec_sampler3D: + case slang_spec_samplerCube: + case slang_spec_sampler1DShadow: + case slang_spec_sampler2DShadow: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +static GLuint +_slang_sizeof_struct(const slang_struct *s) +{ + return 0; +} + + +static GLuint +_slang_sizeof_type_specifier(const slang_type_specifier *spec) +{ + switch (spec->type) { + case slang_spec_void: + abort(); + return 0; + case slang_spec_bool: + return 1; + case slang_spec_bvec2: + return 2; + case slang_spec_bvec3: + return 3; + case slang_spec_bvec4: + return 4; + case slang_spec_int: + return 1; + case slang_spec_ivec2: + return 2; + case slang_spec_ivec3: + return 3; + case slang_spec_ivec4: + return 4; + case slang_spec_float: + return 1; + case slang_spec_vec2: + return 2; + case slang_spec_vec3: + return 3; + case slang_spec_vec4: + return 4; + case slang_spec_mat2: + return 2 * 2; + case slang_spec_mat3: + return 3 * 3; + case slang_spec_mat4: + return 4 * 4; + case slang_spec_sampler1D: + case slang_spec_sampler2D: + case slang_spec_sampler3D: + case slang_spec_samplerCube: + case slang_spec_sampler1DShadow: + case slang_spec_sampler2DShadow: + return 1; /* special case */ + case slang_spec_struct: + return _slang_sizeof_struct(spec->_struct); + case slang_spec_array: + return 1; /* XXX */ + default: + abort(); + return 0; + } + return 0; +} + + +/** + * Allocate storage info for an IR node (n->Store). + * We may do any of the following: + * 1. Compute Store->File/Index for program inputs/outputs/uniforms/etc. + * 2. Allocate storage for user-declared variables. + * 3. Allocate intermediate/unnamed storage for complex expressions. + * 4. other? + */ +static void +slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, + struct gl_program *prog) +{ + assert(gc); + assert(n); + assert(n->Opcode == IR_VAR_DECL || n->Opcode == IR_VAR); + assert(prog); + + if (!n->Store) { + /* allocate storage info for this node */ + if (n->Var && n->Var->aux) { + /* node storage info = var storage info */ + n->Store = (slang_ir_storage *) n->Var->aux; + } + else { + /* alloc new storage info */ + n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -5); + if (n->Var) + n->Var->aux = n->Store; + } + } + + if (n->Opcode == IR_VAR_DECL) { + /* variable declaration */ + assert(n->Var); + assert(!is_sampler_type(&n->Var->type)); + assert(n->Store->Index < 0); + + n->Store->File = PROGRAM_TEMPORARY; + n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); + assert(n->Store->Size > 0); + n->Store->Index = _slang_alloc_temporary(gc, n->Store->Size); + printf("alloc var %s storage at %d (size %d)\n", + (char *) n->Var->a_name, + n->Store->Index, + n->Store->Size); + assert(n->Store->Size > 0); + n->Var->declared = GL_TRUE; + return; + } + + assert(n->Store->File != PROGRAM_UNDEFINED); + + if (n->Store->Index < 0) { + /* determine storage location for this var */ + + assert(n->Var); + assert(n->Store->Size > 0); + + if (n->Store->File == PROGRAM_STATE_VAR) { + GLint i = slang_lookup_statevar((char *) n->Var->a_name, 0, + prog->Parameters); + assert(i >= 0); + if (i >= 0) { + assert(n->Store->File == PROGRAM_STATE_VAR /*|| + n->Store->File == PROGRAM_UNIFORM*/); + n->Store->File = PROGRAM_STATE_VAR; + n->Store->Index = i; + return; + } + } + else if (n->Store->File == PROGRAM_CONSTANT) { + GLint i = slang_lookup_constant((char *) n->Var->a_name, 0, + prog->Parameters); + assert(i >= 0); + if (i >= 0) { + n->Store->File = PROGRAM_CONSTANT; + n->Store->Index = i; + return; + } + } + else { + /* what's this??? */ + abort(); + } + } +} + + + /** * Map "_asm foo" to IR_FOO, etc. */ diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 3ee583625d..65a356050f 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -30,12 +30,10 @@ #include "imports.h" #include "context.h" -#include "get.h" #include "macros.h" #include "program.h" #include "prog_instruction.h" #include "prog_parameter.h" -#include "prog_statevars.h" #include "slang_emit.h" @@ -201,93 +199,6 @@ storage_string(const slang_ir_storage *st) } -static GLuint -sizeof_struct(const slang_struct *s) -{ - return 0; -} - - -GLuint -_slang_sizeof_type_specifier(const slang_type_specifier *spec) -{ - switch (spec->type) { - case slang_spec_void: - abort(); - return 0; - case slang_spec_bool: - return 1; - case slang_spec_bvec2: - return 2; - case slang_spec_bvec3: - return 3; - case slang_spec_bvec4: - return 4; - case slang_spec_int: - return 1; - case slang_spec_ivec2: - return 2; - case slang_spec_ivec3: - return 3; - case slang_spec_ivec4: - return 4; - case slang_spec_float: - return 1; - case slang_spec_vec2: - return 2; - case slang_spec_vec3: - return 3; - case slang_spec_vec4: - return 4; - case slang_spec_mat2: - return 2 * 2; - case slang_spec_mat3: - return 3 * 3; - case slang_spec_mat4: - return 4 * 4; - case slang_spec_sampler1D: - case slang_spec_sampler2D: - case slang_spec_sampler3D: - case slang_spec_samplerCube: - case slang_spec_sampler1DShadow: - case slang_spec_sampler2DShadow: - return 1; /* special case */ - case slang_spec_struct: - return sizeof_struct(spec->_struct); - case slang_spec_array: - return 1; /* XXX */ - default: - abort(); - return 0; - } - return 0; -} - - -static GLuint -sizeof_type(const slang_fully_specified_type *t) -{ - return _slang_sizeof_type_specifier(&t->specifier); -} - - -static GLboolean -is_sampler_type(const slang_fully_specified_type *t) -{ - switch (t->specifier.type) { - case slang_spec_sampler1D: - case slang_spec_sampler2D: - case slang_spec_sampler3D: - case slang_spec_samplerCube: - case slang_spec_sampler1DShadow: - case slang_spec_sampler2DShadow: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - #define IND 0 void slang_print_ir(const slang_ir_node *n, int indent) @@ -365,8 +276,8 @@ slang_print_ir(const slang_ir_node *n, int indent) } -static GLint -alloc_temporary(slang_gen_context *gc, GLint size) +GLint +_slang_alloc_temporary(slang_gen_context *gc, GLint size) { const GLuint sz4 = (size + 3) / 4; GLuint i, j; @@ -389,14 +300,6 @@ alloc_temporary(slang_gen_context *gc, GLint size) } -static GLint -alloc_sampler(slang_gen_context *gc) -{ - GLint sampler = gc->NumSamplers; - gc->NumSamplers++; - return sampler; -} - static GLboolean is_temporary(const slang_gen_context *gc, const slang_ir_storage *st) @@ -420,123 +323,6 @@ free_temporary(slang_gen_context *gc, GLuint r, GLint size) } -/** - * Lookup a named constant and allocate storage for the parameter in - * the given parameter list. - * \return position of the constant in the paramList. - */ -static GLint -slang_lookup_constant(const char *name, GLint index, - struct gl_program_parameter_list *paramList) -{ - struct constant_info { - const char *Name; - const GLenum Token; - }; - static const struct constant_info info[] = { - { "gl_MaxLights", GL_MAX_LIGHTS }, - { "gl_MaxClipPlanes", GL_MAX_CLIP_PLANES }, - { "gl_MaxTextureUnits", GL_MAX_TEXTURE_UNITS }, - { "gl_MaxTextureCoords", GL_MAX_TEXTURE_COORDS }, - { "gl_MaxVertexAttribs", GL_MAX_VERTEX_ATTRIBS }, - { "gl_MaxVertexUniformComponents", GL_MAX_VERTEX_UNIFORM_COMPONENTS }, - { "gl_MaxVaryingFloats", GL_MAX_VARYING_FLOATS }, - { "gl_MaxVertexTextureImageUnits", GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS }, - { "gl_MaxTextureImageUnits", GL_MAX_TEXTURE_IMAGE_UNITS }, - { "gl_MaxFragmentUniformComponents", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS }, - { "gl_MaxCombinedTextureImageUnits", GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS }, - { NULL, 0 } - }; - GLuint i; - GLuint swizzle; /* XXX use this */ - - for (i = 0; info[i].Name; i++) { - if (strcmp(info[i].Name, name) == 0) { - /* found */ - GLfloat value = -1.0; - GLint pos; - _mesa_GetFloatv(info[i].Token, &value); - ASSERT(value >= 0.0); /* sanity check that glGetFloatv worked */ - /* XXX named constant! */ - pos = _mesa_add_unnamed_constant(paramList, &value, 1, &swizzle); - return pos; - } - } - return -1; -} - - -/** - * Determine if 'name' is a state variable. If so, create a new program - * parameter for it, and return the param's index. Else, return -1. - */ -static GLint -slang_lookup_statevar(const char *name, GLint index, - struct gl_program_parameter_list *paramList) -{ - struct state_info { - const char *Name; - const GLuint NumRows; /** for matrices */ - const GLuint Swizzle; - const GLint Indexes[6]; - }; - static const struct state_info state[] = { - { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, - { "gl_NormalMatrix", 3, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, - { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, 0 } }, - { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MVP, 0, 0, 0, 0 } }, - { "gl_TextureMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, 0 } }, - { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } - }; - GLuint i; - - for (i = 0; state[i].Name; i++) { - if (strcmp(state[i].Name, name) == 0) { - /* found */ - if (paramList) { - if (state[i].NumRows > 1) { - /* a matrix */ - GLuint j; - GLint pos[4], indexesCopy[6]; - /* make copy of state tokens */ - for (j = 0; j < 6; j++) - indexesCopy[j] = state[i].Indexes[j]; - /* load rows */ - for (j = 0; j < state[i].NumRows; j++) { - indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ - pos[j] = _mesa_add_state_reference(paramList, indexesCopy); - assert(pos[j] >= 0); - } - return pos[0]; - } - else { - /* non-matrix state */ - GLint pos - = _mesa_add_state_reference(paramList, state[i].Indexes); - assert(pos >= 0); - return pos; - } - } - } - } - return -1; -} - - -static GLint -slang_alloc_uniform(struct gl_program *prog, const char *name, GLuint size) -{ - GLint i = _mesa_add_uniform(prog->Parameters, name, size); - return i; -} - - - /** * Allocate temporary storage for an intermediate result (such as for * a multiply or add, etc. @@ -548,112 +334,11 @@ slang_alloc_temp_storage(slang_gen_context *gc, slang_ir_node *n, GLint size) assert(!n->Var); assert(!n->Store); assert(size > 0); - indx = alloc_temporary(gc, size); + indx = _slang_alloc_temporary(gc, size); n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, indx, size); } -/** - * Allocate storage info for an IR node (n->Store). - * We may do any of the following: - * 1. Compute Store->File/Index for program inputs/outputs/uniforms/etc. - * 2. Allocate storage for user-declared variables. - * 3. Allocate intermediate/unnamed storage for complex expressions. - * 4. other? - */ -void -slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, - struct gl_program *prog) -{ - assert(gc); - assert(n); - assert(prog); - - if (!n->Store) { - /* allocate storage info for this node */ - if (n->Var && n->Var->aux) { - /* node storage info = var storage info */ - n->Store = (slang_ir_storage *) n->Var->aux; - } - else { - /* alloc new storage info */ - n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -5); - if (n->Var) - n->Var->aux = n->Store; - } - } - - if (n->Opcode == IR_VAR_DECL) { - /* storage declaration */ - assert(n->Var); - assert(!is_sampler_type(&n->Var->type)); - assert(n->Store->Index < 0); - - if (n->Store->Index < 0) { /* XXX assert this? */ - assert(gc); - n->Store->File = PROGRAM_TEMPORARY; - n->Store->Size = sizeof_type(&n->Var->type); - n->Store->Index = alloc_temporary(gc, n->Store->Size); - printf("alloc var %s storage at %d (size %d)\n", - (char *) n->Var->a_name, - n->Store->Index, - n->Store->Size); - assert(n->Store->Size > 0); - n->Var->declared = GL_TRUE; - } - assert(n->Store->Size > 0); - return; - } - - /* - assert(!is_sampler_type(&n->Var->type)); - */ - assert(n->Opcode == IR_VAR); - assert(n->Store->File != PROGRAM_UNDEFINED); - - if (n->Store->Index < 0) { - /* determine storage location for this var */ - GLint i; - - assert(n->Var); - assert(n->Store->Size > 0); - - if (n->Store->Size < 0) { - /* determine var/storage size now */ - abort(); - n->Store->Size = sizeof_type(&n->Var->type); - assert(n->Store->Size > 0); - } - - if (n->Store->File == PROGRAM_STATE_VAR) { - i = slang_lookup_statevar((char *) n->Var->a_name, 0, prog->Parameters); - assert(i >= 0); - if (i >= 0) { - assert(n->Store->File == PROGRAM_STATE_VAR /*|| - n->Store->File == PROGRAM_UNIFORM*/); - n->Store->File = PROGRAM_STATE_VAR; - n->Store->Index = i; - return; - } - } - else if (n->Store->File == PROGRAM_CONSTANT) { - i = slang_lookup_constant((char *) n->Var->a_name, 0, - prog->Parameters); - assert(i >= 0); - if (i >= 0) { - n->Store->File = PROGRAM_CONSTANT; - n->Store->Index = i; - return; - } - } - else { - /* what's this??? */ - abort(); - } - } -} - - static slang_ir_storage * alloc_constant(const GLfloat v[], GLuint size, struct gl_program *prog) { @@ -775,11 +460,7 @@ emit_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, info->InstOpcode); /* alloc temp storage for the result: */ if (!n->Store || n->Store->File == PROGRAM_UNDEFINED) { -#if 1 slang_alloc_temp_storage(gc, n, info->ResultSize); -#else - slang_resolve_storage(gc, n, prog); -#endif } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, @@ -927,29 +608,13 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) return inst; break; case IR_VAR_DECL: -#if 0000 - slang_resolve_storage(gc, n, prog); -#endif + case IR_VAR: /* Storage should have already been resolved/allocated */ + assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Index >= 0); assert(n->Store->Size > 0); break; - case IR_VAR: - /*printf("Gen: var ref\n");*/ - { - assert(n->Store); - assert(n->Store->File != PROGRAM_UNDEFINED); - assert(n->Store->Index >= 0); -#if 00 - int b = !n->Store || n->Store->Index < 0; - if (b) - slang_resolve_storage(gc, n, prog); - /*assert(n->Store->Index >= 0);*/ -#endif - assert(n->Store->Size > 0); - } - break; case IR_MOVE: /* rhs */ assert(n->Children[1]); diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 8ac17e6c82..50585a4a03 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -48,13 +48,8 @@ extern slang_ir_storage * _slang_clone_ir_storage(slang_ir_storage *store); -extern GLuint -_slang_sizeof_type_specifier(const slang_type_specifier *spec); - - -extern void -slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, - struct gl_program *prog); +extern GLint +_slang_alloc_temporary(slang_gen_context *gc, GLint size); extern GLboolean _slang_emit_code(slang_ir_node *n, slang_gen_context *gc, -- cgit v1.2.3 From 483ca39bca3c4a125e725e4711abde3f86a84b9e Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 14:11:54 -0700 Subject: Move some code around, add some comments. --- src/mesa/shader/slang/slang_codegen.c | 498 +++++++++++++++++----------------- 1 file changed, 256 insertions(+), 242 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index df361fbb3d..239f6a5e75 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -258,7 +258,7 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) * 4. other? */ static void -slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, +slang_allocate_storage(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) { assert(gc); @@ -337,6 +337,259 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, } +/** + * Return the TEXTURE_*_INDEX value that corresponds to a sampler type, + * or -1 if the type is not a sampler. + */ +static GLint +sampler_to_texture_index(const slang_type_specifier_type type) +{ + switch (type) { + case slang_spec_sampler1D: + return TEXTURE_1D_INDEX; + case slang_spec_sampler2D: + return TEXTURE_2D_INDEX; + case slang_spec_sampler3D: + return TEXTURE_3D_INDEX; + case slang_spec_samplerCube: + return TEXTURE_CUBE_INDEX; + case slang_spec_sampler1DShadow: + return TEXTURE_1D_INDEX; /* XXX fix */ + case slang_spec_sampler2DShadow: + return TEXTURE_2D_INDEX; /* XXX fix */ + default: + return -1; + } +} + + +/** + * Return the VERT_ATTRIB_* or FRAG_ATTRIB_* value that corresponds to + * a vertex or fragment program input variable. Return -1 if the input + * name is invalid. + * XXX return size too + */ +static GLint +_slang_input_index(const char *name, GLenum target) +{ + struct input_info { + const char *Name; + GLuint Attrib; + }; + static const struct input_info vertInputs[] = { + { "gl_Vertex", VERT_ATTRIB_POS }, + { "gl_Normal", VERT_ATTRIB_NORMAL }, + { "gl_Color", VERT_ATTRIB_COLOR0 }, + { "gl_SecondaryColor", VERT_ATTRIB_COLOR1 }, + { "gl_FogCoord", VERT_ATTRIB_FOG }, + { "gl_MultiTexCoord0", VERT_ATTRIB_TEX0 }, + { "gl_MultiTexCoord1", VERT_ATTRIB_TEX1 }, + { "gl_MultiTexCoord2", VERT_ATTRIB_TEX2 }, + { "gl_MultiTexCoord3", VERT_ATTRIB_TEX3 }, + { "gl_MultiTexCoord4", VERT_ATTRIB_TEX4 }, + { "gl_MultiTexCoord5", VERT_ATTRIB_TEX5 }, + { "gl_MultiTexCoord6", VERT_ATTRIB_TEX6 }, + { "gl_MultiTexCoord7", VERT_ATTRIB_TEX7 }, + { NULL, 0 } + }; + static const struct input_info fragInputs[] = { + { "gl_FragCoord", FRAG_ATTRIB_WPOS }, + { "gl_Color", FRAG_ATTRIB_COL0 }, + { "gl_SecondaryColor", FRAG_ATTRIB_COL1 }, + { "gl_FogFragCoord", FRAG_ATTRIB_FOGC }, + { "gl_TexCoord", FRAG_ATTRIB_TEX0 }, + { NULL, 0 } + }; + GLuint i; + const struct input_info *inputs + = (target == GL_VERTEX_PROGRAM_ARB) ? vertInputs : fragInputs; + + for (i = 0; inputs[i].Name; i++) { + if (strcmp(inputs[i].Name, name) == 0) { + /* found */ + return inputs[i].Attrib; + } + } + return -1; +} + + +/** + * Return the VERT_RESULT_* or FRAG_RESULT_* value that corresponds to + * a vertex or fragment program output variable. Return -1 for an invalid + * output name. + */ +static GLint +_slang_output_index(const char *name, GLenum target) +{ + struct output_info { + const char *Name; + GLuint Attrib; + }; + static const struct output_info vertOutputs[] = { + { "gl_Position", VERT_RESULT_HPOS }, + { "gl_FrontColor", VERT_RESULT_COL0 }, + { "gl_BackColor", VERT_RESULT_BFC0 }, + { "gl_FrontSecondaryColor", VERT_RESULT_COL1 }, + { "gl_BackSecondaryColor", VERT_RESULT_BFC1 }, + { "gl_TexCoord", VERT_RESULT_TEX0 }, /* XXX indexed */ + { "gl_FogFragCoord", VERT_RESULT_FOGC }, + { "gl_PointSize", VERT_RESULT_PSIZ }, + { NULL, 0 } + }; + static const struct output_info fragOutputs[] = { + { "gl_FragColor", FRAG_RESULT_COLR }, + { "gl_FragDepth", FRAG_RESULT_DEPR }, + { NULL, 0 } + }; + GLuint i; + const struct output_info *outputs + = (target == GL_VERTEX_PROGRAM_ARB) ? vertOutputs : fragOutputs; + + for (i = 0; outputs[i].Name; i++) { + if (strcmp(outputs[i].Name, name) == 0) { + /* found */ + return outputs[i].Attrib; + } + } + return -1; +} + + +/** + * Called by compiler when a global variable has been parsed/compiled. + * Here we examine the variable's type to determine what kind of register + * storage will be used. + * + * A uniform such as "gl_Position" will become the register specification + * (PROGRAM_OUTPUT, VERT_RESULT_HPOS). Or, uniform "gl_FogFragCoord" + * will be (PROGRAM_INPUT, FRAG_ATTRIB_FOGC). + * + * Samplers are interesting. For "uniform sampler2D tex;" we'll specify + * (PROGRAM_SAMPLER, index) where index is resolved at link-time to an + * actual texture unit (as specified by the user calling glUniform1i()). + */ +void +_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, + slang_unit_type type) +{ + const char *varName = (char *) var->a_name; + GLint texIndex; + slang_ir_storage *store = NULL; + + texIndex = sampler_to_texture_index(var->type.specifier.type); + + if (texIndex != -1) { + /* Texture sampler: + * store->File = PROGRAM_SAMPLER + * store->Index = sampler uniform location + * store->Size = texture type index (1D, 2D, 3D, cube, etc) + */ + GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName); + store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); + printf("SAMPLER "); + } + else if (var->type.qualifier == slang_qual_uniform) { + /* Uniform variable */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + if (prog) { + /* user-defined uniform */ + GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, size); + store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); + } + else { + /* pre-defined uniform, like gl_ModelviewMatrix */ + /* We know it's a uniform, but don't allocate storage unless + * it's really used. + */ + + store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); + + } + printf("UNIFORM "); + } + else if (var->type.qualifier == slang_qual_varying) { + const GLint size = 4; /* XXX fix */ + if (prog) { + /* user-defined varying */ + GLint varyingLoc = _mesa_add_varying(prog->Varying, varName, size); + store = _slang_new_ir_storage(PROGRAM_VARYING, varyingLoc, size); + } + else { + /* pre-defined varying, like gl_Color or gl_TexCoord */ + if (type == slang_unit_fragment_builtin) { + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + assert(index < FRAG_ATTRIB_MAX); + } + else { + GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); + assert(index >= 0); + assert(type == slang_unit_vertex_builtin); + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + assert(index < VERT_RESULT_MAX); + } + printf("V/F "); + } + printf("VARYING "); + } + else if (var->type.qualifier == slang_qual_const) { + if (prog) { + abort(); + } + else { + /* pre-defined global constant, like gl_MaxLights */ + GLint size = -1; + store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); + } + printf("CONST "); + } + else if (var->type.qualifier == slang_qual_attribute) { + /* Vertex attribute */ + GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + printf("ATTRIB "); + } + else if (var->type.qualifier == slang_qual_fixedinput) { + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + printf("INPUT "); + } + else if (var->type.qualifier == slang_qual_fixedoutput) { + if (type == slang_unit_vertex_builtin) { + GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + } + else { + assert(type == slang_unit_fragment_builtin); + GLint index = _slang_output_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + } + printf("OUTPUT "); + } + else { + printf("other "); + } + printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store?store->Index:-2); + + assert(!var->aux); +#if 1 + var->aux = store; +#endif + /** + XXX allocate variable storage (aux), at least the register file. + */ +} + + +/**********************************************************************/ + /** * Map "_asm foo" to IR_FOO, etc. @@ -479,7 +732,7 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, oper->var = v; n->Swizzle = swizzle; n->Var = v; - slang_resolve_storage(A->codegen, n, A->program); + slang_allocate_storage(A->codegen, n, A->program); return n; } @@ -1408,7 +1661,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) varDecl->Var = v; v->declared = GL_TRUE; - slang_resolve_storage(A->codegen, varDecl, A->program); + slang_allocate_storage(A->codegen, varDecl, A->program); if (oper->num_children > 0) { /* child is initializer */ @@ -1888,242 +2141,3 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) return n; } - -static GLint -sampler_to_texture_index(const slang_type_specifier_type type) -{ - switch (type) { - case slang_spec_sampler1D: - return TEXTURE_1D_INDEX; - case slang_spec_sampler2D: - return TEXTURE_2D_INDEX; - case slang_spec_sampler3D: - return TEXTURE_3D_INDEX; - case slang_spec_samplerCube: - return TEXTURE_CUBE_INDEX; - case slang_spec_sampler1DShadow: - return TEXTURE_1D_INDEX; /* XXX fix */ - case slang_spec_sampler2DShadow: - return TEXTURE_2D_INDEX; /* XXX fix */ - default: - return -1; - } -} - - -/** - * XXX return size too - */ -static GLint -_slang_input_index(const char *name, GLenum target) -{ - struct input_info { - const char *Name; - GLuint Attrib; - }; - static const struct input_info vertInputs[] = { - { "gl_Vertex", VERT_ATTRIB_POS }, - { "gl_Normal", VERT_ATTRIB_NORMAL }, - { "gl_Color", VERT_ATTRIB_COLOR0 }, - { "gl_SecondaryColor", VERT_ATTRIB_COLOR1 }, - { "gl_FogCoord", VERT_ATTRIB_FOG }, - { "gl_MultiTexCoord0", VERT_ATTRIB_TEX0 }, - { "gl_MultiTexCoord1", VERT_ATTRIB_TEX1 }, - { "gl_MultiTexCoord2", VERT_ATTRIB_TEX2 }, - { "gl_MultiTexCoord3", VERT_ATTRIB_TEX3 }, - { "gl_MultiTexCoord4", VERT_ATTRIB_TEX4 }, - { "gl_MultiTexCoord5", VERT_ATTRIB_TEX5 }, - { "gl_MultiTexCoord6", VERT_ATTRIB_TEX6 }, - { "gl_MultiTexCoord7", VERT_ATTRIB_TEX7 }, - { NULL, 0 } - }; - static const struct input_info fragInputs[] = { - { "gl_FragCoord", FRAG_ATTRIB_WPOS }, - { "gl_Color", FRAG_ATTRIB_COL0 }, - { "gl_SecondaryColor", FRAG_ATTRIB_COL1 }, - { "gl_FogFragCoord", FRAG_ATTRIB_FOGC }, - { "gl_TexCoord", FRAG_ATTRIB_TEX0 }, - { NULL, 0 } - }; - GLuint i; - const struct input_info *inputs - = (target == GL_VERTEX_PROGRAM_ARB) ? vertInputs : fragInputs; - - for (i = 0; inputs[i].Name; i++) { - if (strcmp(inputs[i].Name, name) == 0) { - /* found */ - return inputs[i].Attrib; - } - } - return -1; -} - - - -static GLint -_slang_output_index(const char *name, GLenum target) -{ - struct output_info { - const char *Name; - GLuint Attrib; - }; - static const struct output_info vertOutputs[] = { - { "gl_Position", VERT_RESULT_HPOS }, - { "gl_FrontColor", VERT_RESULT_COL0 }, - { "gl_BackColor", VERT_RESULT_BFC0 }, - { "gl_FrontSecondaryColor", VERT_RESULT_COL1 }, - { "gl_BackSecondaryColor", VERT_RESULT_BFC1 }, - { "gl_TexCoord", VERT_RESULT_TEX0 }, /* XXX indexed */ - { "gl_FogFragCoord", VERT_RESULT_FOGC }, - { "gl_PointSize", VERT_RESULT_PSIZ }, - { NULL, 0 } - }; - static const struct output_info fragOutputs[] = { - { "gl_FragColor", FRAG_RESULT_COLR }, - { "gl_FragDepth", FRAG_RESULT_DEPR }, - { NULL, 0 } - }; - GLuint i; - const struct output_info *outputs - = (target == GL_VERTEX_PROGRAM_ARB) ? vertOutputs : fragOutputs; - - for (i = 0; outputs[i].Name; i++) { - if (strcmp(outputs[i].Name, name) == 0) { - /* found */ - return outputs[i].Attrib; - } - } - return -1; -} - - -/** - * Called by compiler when a global variable has been parsed/compiled. - * Here we examine the variable's type to determine what kind of register - * storage will be used. - * - * A uniform such as "gl_Position" will become the register specification - * (PROGRAM_OUTPUT, VERT_RESULT_HPOS). Or, uniform "gl_FogFragCoord" - * will be (PROGRAM_INPUT, FRAG_ATTRIB_FOGC). - * - * Samplers are interesting. For "uniform sampler2D tex;" we'll specify - * (PROGRAM_SAMPLER, index) where index is resolved at link-time to an - * actual texture unit (as specified by the user calling glUniform1i()). - */ -void -_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, - slang_unit_type type) -{ - const char *varName = (char *) var->a_name; - GLint texIndex; - slang_ir_storage *store = NULL; - - texIndex = sampler_to_texture_index(var->type.specifier.type); - - if (texIndex != -1) { - /* Texture sampler: - * store->File = PROGRAM_SAMPLER - * store->Index = sampler uniform location - * store->Size = texture type index (1D, 2D, 3D, cube, etc) - */ - GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName); - store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); - printf("SAMPLER "); - } - else if (var->type.qualifier == slang_qual_uniform) { - /* Uniform variable */ - const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - if (prog) { - /* user-defined uniform */ - GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, size); - store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); - } - else { - /* pre-defined uniform, like gl_ModelviewMatrix */ - /* We know it's a uniform, but don't allocate storage unless - * it's really used. - */ - - store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); - - } - printf("UNIFORM "); - } - else if (var->type.qualifier == slang_qual_varying) { - const GLint size = 4; /* XXX fix */ - if (prog) { - /* user-defined varying */ - GLint varyingLoc = _mesa_add_varying(prog->Varying, varName, size); - store = _slang_new_ir_storage(PROGRAM_VARYING, varyingLoc, size); - } - else { - /* pre-defined varying, like gl_Color or gl_TexCoord */ - if (type == slang_unit_fragment_builtin) { - GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); - assert(index >= 0); - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - assert(index < FRAG_ATTRIB_MAX); - } - else { - GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); - assert(index >= 0); - assert(type == slang_unit_vertex_builtin); - store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); - assert(index < VERT_RESULT_MAX); - } - printf("V/F "); - } - printf("VARYING "); - } - else if (var->type.qualifier == slang_qual_const) { - if (prog) { - abort(); - } - else { - /* pre-defined global constant, like gl_MaxLights */ - GLint size = -1; - store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); - } - printf("CONST "); - } - else if (var->type.qualifier == slang_qual_attribute) { - /* Vertex attribute */ - GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - assert(index >= 0); - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - printf("ATTRIB "); - } - else if (var->type.qualifier == slang_qual_fixedinput) { - GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - printf("INPUT "); - } - else if (var->type.qualifier == slang_qual_fixedoutput) { - if (type == slang_unit_vertex_builtin) { - GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); - } - else { - assert(type == slang_unit_fragment_builtin); - GLint index = _slang_output_index(varName, GL_FRAGMENT_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); - } - printf("OUTPUT "); - } - else { - printf("other "); - } - printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store?store->Index:-2); - - assert(!var->aux); -#if 1 - var->aux = store; -#endif - /** - XXX allocate variable storage (aux), at least the register file. - */ -} -- cgit v1.2.3 From 42153d7858686cfd88e919c0889a56d3a13a603e Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 15:58:14 -0700 Subject: Implement projective texture sampling, 3D textures. Disable some debug output. --- .../shader/slang/library/slang_common_builtin.gc | 46 +++--- .../shader/slang/library/slang_common_builtin_gc.h | 158 +++++++++++---------- src/mesa/shader/slang/slang_assemble.c | 4 + src/mesa/shader/slang/slang_codegen.c | 40 +++--- src/mesa/shader/slang/slang_emit.c | 9 +- src/mesa/shader/slang/slang_ir.h | 1 + src/mesa/shader/slang/slang_link2.c | 4 +- 7 files changed, 143 insertions(+), 119 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 52f5b96d88..184a92ce34 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1633,38 +1633,42 @@ vec4 texture1DProj(const sampler1D sampler, const vec4 coord) vec4 texture2D(const sampler2D sampler, const vec2 coord) { - __asm vec4_tex2d __retVal, sampler, coord; // XXX sampler + __asm vec4_tex2d __retVal, sampler, coord; } -//vec4 texture2DProj(const sampler2D sampler, const vec3 coord) -//{ -// vec2 pcoord = coord.st / coord.p; -// __asm vec4_tex2d __retVal, pcoord; // XXX sampler -//} +vec4 texture2DProj(const sampler2D sampler, const vec3 coord) +{ + // new coord with .z moved to .w + vec4 coord4; + coord4.xy = coord.xy; + coord4.w = coord.z; + __asm vec4_texp2d __retVal, sampler, coord4; +} -//vec4 texture2DProj(const sampler2D sampler, const vec4 coord) -//{ -// vec2 pcoord = coord.st / coord.q; -// __asm vec4_tex2d __retVal, pcoord; // XXX sampler -//} +vec4 texture2DProj(const sampler2D sampler, const vec4 coord) +{ + __asm vec4_texp2d __retVal, coord; +} -vec4 texture3D (sampler3D sampler, vec3 coord) { - vec4 texel; - __asm vec4_tex3d texel, sampler, coord, 0.0; - return texel; +vec4 texture3D(const sampler3D sampler, const vec3 coord) +{ + __asm vec4_tex3d __retVal, sampler, coord; } -vec4 texture3DProj (sampler3D sampler, vec4 coord) { - return texture3D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q)); +vec4 texture3DProj(const sampler3D sampler, const vec4 coord) +{ + __asm vec4_texp3d __retVal, sampler, coord; } -vec4 textureCube (samplerCube sampler, vec3 coord) { - vec4 texel; - __asm vec4_texcube texel, sampler, coord, 0.0; - return texel; + +vec4 textureCube(const samplerCube sampler, const vec3 coord) +{ + __asm vec4_texcube __retVal, sampler, coord; } + + vec4 shadow1D (sampler1DShadow sampler, vec3 coord) { vec4 texel; __asm vec4_shad1d texel, sampler, coord, 0.0; diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index e418f53213..3a089e5838 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -682,81 +682,85 @@ 101,116,86,97,108,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68, 0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, 116,101,120,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99, -111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97,109,112,108, -101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99, -52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114, -101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0, -0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0, -18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59, -116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100, -0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0,0,19,115,97,109, +111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115, +97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0, +0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,20,0,9,18,99, +111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,122,0,20,0,4,118,101,99,52,95,116,101,120, +112,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111, +114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109, +112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,50,100, +0,18,95,95,114,101,116,86,97,108,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117, +114,101,51,68,0,1,1,0,18,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118, +101,99,52,95,116,101,120,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, +0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1, +0,18,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101, +120,112,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, +111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112, +108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0, +18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0, +1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, +111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100, +0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0, +48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1, +0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111, +119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0, +18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111, +111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109, 112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118, -101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104, -97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1, -3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101, -108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116, -101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109, -112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115, -97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114, -100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59, -113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,108,101,114,0, -0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115, -104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114, -100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80, -114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115, -104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114, -100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111, -111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0, -0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97, -116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101, -49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,50,0,18, -97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0,0,0,1,3,2,0,9,1, -97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0, -9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110, -111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0, -9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115, -101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,10, -120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, -49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,0,0,0,1,0, -10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49, -0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17, -55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,12, -120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, -49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17, -50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0,0,0,1,8,58,118, -101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49, -57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,0,0,0,1,0, -11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49, -0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17, -55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55, -0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,11,120,0,0,0, -1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0, -58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0, -17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,12,120,0,0,0,1,8, -58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0, -58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0, -0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49, -55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111, -105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0, -0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51,0,53,52,0,0,46,0, -0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111, -105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0, -51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0, -17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105, -115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, -58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, -17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52, -55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46, -0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111, -105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0, -51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48, -52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0, -17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0, -0,0,0,0,0,0 +101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0, +18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97, +100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114, +100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51, +0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0, +59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114, +100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0, +0,0,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0, +110,111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111, +105,115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11, +120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0, +0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102, +108,111,97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111, +105,115,101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0, +0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, +115,101,50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, +0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58, +110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17, +49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, +115,101,50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, +17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9, +120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, +49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0, +46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110, +111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49, +57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, +50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0, +1,0,0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111, +105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50, +51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17, +49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0, +0,12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, +115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, +0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53, +0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0, +0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, +101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17, +50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118, +101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115, +101,49,0,18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0, +0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, +101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0, +0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17, +51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58, +118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58, +118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0, +0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0, +56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0, +17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 617249487f..89f5df1e05 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -746,7 +746,11 @@ static const struct {"int_to_float", slang_asm_int_to_float, slang_asm_float_copy}, {"vec4_tex1d", slang_asm_vec4_tex1d, slang_asm_none}, {"vec4_tex2d", slang_asm_vec4_tex2d, slang_asm_none}, + {"vec4_texb2d", slang_asm_vec4_tex2d, slang_asm_none}, + {"vec4_texp2d", slang_asm_vec4_tex2d, slang_asm_none}, {"vec4_tex3d", slang_asm_vec4_tex3d, slang_asm_none}, + {"vec4_texb3d", slang_asm_vec4_tex3d, slang_asm_none}, + {"vec4_texp3d", slang_asm_vec4_tex3d, slang_asm_none}, {"vec4_texcube", slang_asm_vec4_texcube, slang_asm_none}, {"vec4_shad1d", slang_asm_vec4_shad1d, slang_asm_none}, {"vec4_shad2d", slang_asm_vec4_shad2d, slang_asm_none}, diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 239f6a5e75..fee317b61f 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -189,6 +189,7 @@ is_sampler_type(const slang_fully_specified_type *t) static GLuint _slang_sizeof_struct(const slang_struct *s) { + /* XXX TBD */ return 0; } @@ -404,6 +405,8 @@ _slang_input_index(const char *name, GLenum target) const struct input_info *inputs = (target == GL_VERTEX_PROGRAM_ARB) ? vertInputs : fragInputs; + ASSERT(MAX_TEXTURE_UNITS == 8); /* if this fails, fix vertInputs above */ + for (i = 0; inputs[i].Name; i++) { if (strcmp(inputs[i].Name, name) == 0) { /* found */ @@ -476,6 +479,7 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, const char *varName = (char *) var->a_name; GLint texIndex; slang_ir_storage *store = NULL; + int dbg = 0; texIndex = sampler_to_texture_index(var->type.specifier.type); @@ -487,7 +491,7 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, */ GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName); store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); - printf("SAMPLER "); + if (dbg) printf("SAMPLER "); } else if (var->type.qualifier == slang_qual_uniform) { /* Uniform variable */ @@ -506,7 +510,7 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); } - printf("UNIFORM "); + if (dbg) printf("UNIFORM "); } else if (var->type.qualifier == slang_qual_varying) { const GLint size = 4; /* XXX fix */ @@ -530,9 +534,9 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); assert(index < VERT_RESULT_MAX); } - printf("V/F "); + if (dbg) printf("V/F "); } - printf("VARYING "); + if (dbg) printf("VARYING "); } else if (var->type.qualifier == slang_qual_const) { if (prog) { @@ -543,7 +547,7 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, GLint size = -1; store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); } - printf("CONST "); + if (dbg) printf("CONST "); } else if (var->type.qualifier == slang_qual_attribute) { /* Vertex attribute */ @@ -551,13 +555,13 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, GLint size = 4; /* XXX? */ assert(index >= 0); store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - printf("ATTRIB "); + if (dbg) printf("ATTRIB "); } else if (var->type.qualifier == slang_qual_fixedinput) { GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); GLint size = 4; /* XXX? */ store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - printf("INPUT "); + if (dbg) printf("INPUT "); } else if (var->type.qualifier == slang_qual_fixedoutput) { if (type == slang_unit_vertex_builtin) { @@ -571,20 +575,16 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, GLint size = 4; /* XXX? */ store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); } - printf("OUTPUT "); + if (dbg) printf("OUTPUT "); } else { - printf("other "); + if (dbg) printf("other "); } - printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store?store->Index:-2); + if (dbg) printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store?store->Index:-2); assert(!var->aux); -#if 1 + var->aux = store; -#endif - /** - XXX allocate variable storage (aux), at least the register file. - */ } @@ -627,9 +627,15 @@ static slang_asm_info AsmInfo[] = { { "float_power", IR_POW, 1, 2 }, /* texture / sampler */ { "vec4_tex1d", IR_TEX, 1, 1 }, - { "vec4_texb1d", IR_TEXB, 1, 3 }, + { "vec4_texb1d", IR_TEXB, 1, 3 }, /* 1d w/ bias */ + { "vec4_texp1d", IR_TEXP, 1, 2 }, /* 1d w/ projection */ { "vec4_tex2d", IR_TEX, 1, 2 }, - { "vec4_texb2d", IR_TEXB, 1, 3 }, + { "vec4_texb2d", IR_TEXB, 1, 3 }, /* 2d w/ bias */ + { "vec4_texp2d", IR_TEXP, 1, 2 }, /* 2d w/ projection */ + { "vec4_tex3d", IR_TEX, 1, 2 }, + { "vec4_texb3d", IR_TEXB, 1, 3 }, /* 3d w/ bias */ + { "vec4_texp3d", IR_TEXP, 1, 2 }, /* 3d w/ projection */ + /* unary op */ { "int_to_float", IR_I_TO_F, 1, 1 }, { "float_exp", IR_EXP, 1, 1 }, diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 65a356050f..aee3fb2ceb 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -92,6 +92,7 @@ static slang_ir_info IrInfo[] = { { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 2 }, + { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 2 }, { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, { IR_FIELD, "IR_FIELD", 0, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } @@ -564,10 +565,13 @@ emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) if (n->Opcode == IR_TEX) { inst = new_instruction(prog, OPCODE_TEX); } - else { - assert(n->Opcode == IR_TEXB); + else if (n->Opcode == IR_TEXB) { inst = new_instruction(prog, OPCODE_TXB); } + else { + assert(n->Opcode == IR_TEXP); + inst = new_instruction(prog, OPCODE_TXP); + } if (!n->Store) slang_alloc_temp_storage(gc, n, 4); @@ -700,6 +704,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) return emit_unop(gc, n, prog); case IR_TEX: case IR_TEXB: + case IR_TEXP: return emit_tex(gc, n, prog); case IR_NEG: return emit_negation(gc, n, prog); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 0613121b98..273964a8f0 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -81,6 +81,7 @@ typedef enum IR_VAR_DECL,/* var declaration */ IR_TEX, /* texture lookup */ IR_TEXB, /* texture lookup with LOD bias */ + IR_TEXP, /* texture lookup with projection */ IR_FLOAT, IR_FIELD, IR_I_TO_F diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 8b59d7f76a..3a5bce0099 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -257,7 +257,7 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) if (inst->Opcode == OPCODE_TEX || inst->Opcode == OPCODE_TXB || - inst->Opcode == OPCODE_TXB) { + inst->Opcode == OPCODE_TXP) { printf("====== remap sampler from %d to %d\n", inst->Sampler, map[ inst->Sampler ]); inst->Sampler = map[ inst->Sampler ]; @@ -328,7 +328,7 @@ _slang_resolve_samplers(struct gl_shader_program *shProg, struct prog_instruction *inst = prog->Instructions + i; if (inst->Opcode == OPCODE_TEX || inst->Opcode == OPCODE_TXB || - inst->Opcode == OPCODE_TXB) { + inst->Opcode == OPCODE_TXP) { GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); inst->TexSrcUnit = sampleUnit; -- cgit v1.2.3 From 85e0634b54c8cbe65c66f2a4b118ca77cfc1b8ac Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 16:02:40 -0700 Subject: update texture1D functions --- .../shader/slang/library/slang_common_builtin.gc | 12 +- .../shader/slang/library/slang_common_builtin_gc.h | 182 ++++++++++----------- 2 files changed, 98 insertions(+), 96 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 184a92ce34..b4720a12e0 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1615,19 +1615,21 @@ bvec4 not (const bvec4 v) vec4 texture1D(const sampler1D sampler, const float coord) { - __asm vec4_tex1d __retVal, coord; // XXX sampler + __asm vec4_tex1d __retVal, sampler, coord; } vec4 texture1DProj(const sampler1D sampler, const vec2 coord) { - float pcoord = coord.s / coord.t; - __asm vec4_tex1d __retVal, pcoord; // XXX sampler + // new coord with .z moved to .w + vec4 coord4; + coord4.x = coord.x; + coord4.w = coord.y; + __asm vec4_texp1d __retVal, sampler, coord4; } vec4 texture1DProj(const sampler1D sampler, const vec4 coord) { - float pcoord = coord.s / coord.q; - __asm vec4_tex1d __retVal, pcoord; // XXX sampler + __asm vec4_texp1d __retVal, sampler, coord; } diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 3a089e5838..4491d9dbd2 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -672,95 +672,95 @@ 101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, 12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99,111, 111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18, -99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,16, -115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,3,2,0,9,1,112,99,111,111,114, -100,0,2,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,116,0,49,0,0,4,118,101,99,52, -95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0, -12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1, -1,0,12,99,111,111,114,100,0,0,0,1,3,2,0,9,1,112,99,111,111,114,100,0,2,18,99,111,111,114,100,0,59, -115,0,18,99,111,111,114,100,0,59,113,0,49,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114, -101,116,86,97,108,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68, -0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, -116,101,120,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99, -111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115, -97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0, -0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,20,0,9,18,99, -111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,122,0,20,0,4,118,101,99,52,95,116,101,120, -112,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111, -114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109, -112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,50,100, -0,18,95,95,114,101,116,86,97,108,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117, -114,101,51,68,0,1,1,0,18,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118, -101,99,52,95,116,101,120,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1, -0,18,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101, -120,112,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112, -108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0, -18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0, -1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, -111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100, +115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101, +49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1, +3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100, +0,59,120,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,121,0,20,0,4,118, +101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, +114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106, +0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, +116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, +99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, +108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,50,100,0,18,95, +95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0, +12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1, +1,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100, +52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0, +18,99,111,111,114,100,0,59,122,0,20,0,4,118,101,99,52,95,116,101,120,112,50,100,0,18,95,95,114,101, +116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116, +101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,12,99, +111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,50,100,0,18,95,95,114,101,116,86,97,108, +0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,1,0,18,115,97,109, +112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,51,100,0,18, +95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1, +0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,18,115,97,109,112,108,101,114,0,0, +1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,51,100,0,18,95,95,114,101, +116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101, +120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111, +114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0, +18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49, +68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116, +101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115, +97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0, +0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0, +1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115,97,109,112,108,101, +114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0, +17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0, +1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, +111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100, 0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0, -48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1, -0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111, -119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0, -18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111, -111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109, -112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118, -101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97, -100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114, -100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51, -0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0, -59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114, -100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0, -0,0,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0, -110,111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111, -105,115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11, -120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0, -0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102, -108,111,97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111, -105,115,101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0, -0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, -115,101,50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, -58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, -0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58, -110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17, -49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, -115,101,50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, -58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, -17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9, -120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, -49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0, -46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110, -111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49, -57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, -50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0, -1,0,0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111, -105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50, -51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17, -49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0, -0,12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, -0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53, -0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0, -0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, -101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17, -50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118, -101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115, -101,49,0,18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0, -0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, -101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0, -0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17, -51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58, -118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58, -118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0, -0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0, -56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0, -17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 +48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1, +0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111, +119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0, +18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59, +113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,9, +0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111, +105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,10, +120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,50,0,18,97,0,0,18,120,0, +0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102, +108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111, +105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115, +101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,9,120,0,0,0, +1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,10,120,0,0,0,1,8, +58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0, +58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111, +105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0, +0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0, +0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,12,120,0,0,0,1,8, +58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0, +58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0, +0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,51,0,58, +110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0, +46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111, +105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0, +0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0, +0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49, +55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,11,120,0,0,0,1,8,58,118, +101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111, +105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0, +48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,12,120,0,0,0,1,8,58,118,101, +99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, +99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0, +0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0, +0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52, +0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111, +105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53, +0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0, +12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49, +0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17, +55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55, +0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17, +50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0, +0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, +115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, +0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49, +55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, +99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0, +12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49, +0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17, +55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49, +51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,50,51,0,53, +52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 -- cgit v1.2.3 From 9a78ef980d89c0d18f859036d5a0cdf82acd303c Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 16:10:34 -0700 Subject: Remove if (tObj) conditional so that texture units without a texture image return black (0,0,0,1) when sampled. --- src/mesa/swrast/s_context.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 749e278ffa..6e3475b130 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -499,9 +499,10 @@ _swrast_update_texture_samplers(GLcontext *ctx) for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) { const struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current; - if (tObj) - swrast->TextureSample[u] = - _swrast_choose_texture_sample_func(ctx, tObj); + /* Note: If tObj is NULL, the sample function will be a simple + * function that just returns opaque black (0,0,0,1). + */ + swrast->TextureSample[u] = _swrast_choose_texture_sample_func(ctx, tObj); } } -- cgit v1.2.3 From 8cad795a80077f661d70121f271ab59c68f8bff3 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 16:10:55 -0700 Subject: added 1D texture functions --- src/mesa/shader/slang/slang_assemble.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 89f5df1e05..3995f0f31f 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -745,6 +745,8 @@ static const struct {"float_noise4", slang_asm_float_noise4, slang_asm_float_copy}, {"int_to_float", slang_asm_int_to_float, slang_asm_float_copy}, {"vec4_tex1d", slang_asm_vec4_tex1d, slang_asm_none}, + {"vec4_texb1d", slang_asm_vec4_tex1d, slang_asm_none}, + {"vec4_texp1d", slang_asm_vec4_tex1d, slang_asm_none}, {"vec4_tex2d", slang_asm_vec4_tex2d, slang_asm_none}, {"vec4_texb2d", slang_asm_vec4_tex2d, slang_asm_none}, {"vec4_texp2d", slang_asm_vec4_tex2d, slang_asm_none}, -- cgit v1.2.3 From 41a4e828d9e06e42bba78166975cb283674c0d9f Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 16:49:43 -0700 Subject: check if _Current == NULL for TXB --- src/mesa/swrast/s_fragprog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index c59e24debe..517b63c91b 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -1358,6 +1358,8 @@ execute_program( GLcontext *ctx, case OPCODE_TXB: /* GL_ARB_fragment_program only */ /* Texel lookup with LOD bias */ { + const struct gl_texture_unit *texUnit + = &ctx->Texture.Unit[inst->TexSrcUnit]; GLfloat coord[4], color[4], lambda, bias; if (inst->SrcReg[0].File == PROGRAM_INPUT && inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) @@ -1366,9 +1368,9 @@ execute_program( GLcontext *ctx, lambda = 0.0; fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); /* coord[3] is the bias to add to lambda */ - bias = ctx->Texture.Unit[inst->TexSrcUnit].LodBias - + ctx->Texture.Unit[inst->TexSrcUnit]._Current->LodBias - + coord[3]; + bias = texUnit->LodBias + coord[3]; + if (texUnit->_Current) + bias += texUnit->_Current->LodBias; fetch_texel(ctx, coord, lambda + bias, inst->TexSrcUnit, color); store_vector4( inst, machine, color ); } -- cgit v1.2.3 From 20aec24ac7b4fba169dc6889b093f4dcc2c62bb6 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 8 Jan 2007 16:56:52 -0700 Subject: implement biased texture functions --- .../shader/slang/library/slang_common_builtin.gc | 4 +- .../shader/slang/library/slang_common_builtin_gc.h | 147 +++++++++++---------- .../shader/slang/library/slang_fragment_builtin.gc | 124 +++++++++++------ .../slang/library/slang_fragment_builtin_gc.h | 129 ++++++++++-------- src/mesa/shader/slang/slang_codegen.c | 8 +- src/mesa/shader/slang/slang_emit.c | 4 +- 6 files changed, 238 insertions(+), 178 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index b4720a12e0..822cc3e989 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1635,7 +1635,7 @@ vec4 texture1DProj(const sampler1D sampler, const vec4 coord) vec4 texture2D(const sampler2D sampler, const vec2 coord) { - __asm vec4_tex2d __retVal, sampler, coord; + __asm vec4_tex2d __retVal, sampler, coord; } vec4 texture2DProj(const sampler2D sampler, const vec3 coord) @@ -1649,7 +1649,7 @@ vec4 texture2DProj(const sampler2D sampler, const vec3 coord) vec4 texture2DProj(const sampler2D sampler, const vec4 coord) { - __asm vec4_texp2d __retVal, coord; + __asm vec4_texp2d __retVal, sampler, coord; } diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 4491d9dbd2..dce92b2ef5 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -690,77 +690,78 @@ 116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116, 101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,12,99, 111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,50,100,0,18,95,95,114,101,116,86,97,108, -0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,1,0,18,115,97,109, -112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,51,100,0,18, -95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1, -0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,18,115,97,109,112,108,101,114,0,0, -1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,51,100,0,18,95,95,114,101, -116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101, -120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111, -114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0, -18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49, -68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116, -101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115, -97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0, -0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0, -1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115,97,109,112,108,101, -114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0, -17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0, -1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, -111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100, +0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117, +114,101,51,68,0,1,1,0,18,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118, +101,99,52,95,116,101,120,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, +0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1, +0,18,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101, +120,112,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, +111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112, +108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0, +18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0, +1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, +111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100, 0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0, -48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1, -0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111, -119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0, -18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59, -113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,9, -0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111, -105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,10, -120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,50,0,18,97,0,0,18,120,0, -0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102, -108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111, -105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115, -101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,9,120,0,0,0, -1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,10,120,0,0,0,1,8, -58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0, -58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111, -105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0, -0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0, -0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,12,120,0,0,0,1,8, -58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0, -58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0, -0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,51,0,58, -110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0, -46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111, -105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0, -0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0, -0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49, -55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,11,120,0,0,0,1,8,58,118, -101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111, -105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0, -48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,12,120,0,0,0,1,8,58,118,101, -99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, -99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0, -0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0, -0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52, -0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111, -105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53, -0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0, -12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49, -0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17, -55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55, -0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17, -50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0, -0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, -0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49, -55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, -99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0, -12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49, -0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17, -55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49, -51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,50,51,0,53, -52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 +48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1, +0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111, +119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0, +18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111, +111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109, +112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118, +101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0, +18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97, +100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114, +100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51, +0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0, +59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114, +100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0, +0,0,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0, +110,111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111, +105,115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11, +120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0, +0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102, +108,111,97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111, +105,115,101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0, +0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, +115,101,50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, +0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58, +110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17, +49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, +115,101,50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, +17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9, +120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, +49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0, +46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110, +111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49, +57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, +50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0, +1,0,0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111, +105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50, +51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17, +49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0, +0,12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, +115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, +0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53, +0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0, +0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, +101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17, +50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118, +101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, +120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115, +101,49,0,18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0, +0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, +101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0, +0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110, +111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17, +51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58, +118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58, +118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0, +0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0, +56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0, +17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/src/mesa/shader/slang/library/slang_fragment_builtin.gc index 474535bfb1..1c099a673b 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin.gc +++ b/src/mesa/shader/slang/library/slang_fragment_builtin.gc @@ -42,74 +42,112 @@ varying vec4 gl_SecondaryColor; varying vec4 gl_TexCoord[gl_MaxTextureCoords]; varying float gl_FogFragCoord; -// -// 8.7 Texture Lookup Functions -// -vec4 texture1D (sampler1D sampler, float coord, float bias) { - vec4 texel; - __asm vec4_tex1d texel, sampler, coord, bias; - return texel; + +//// 8.7 Texture Lookup Functions (with bias) + +vec4 texture1D(const sampler1D sampler, const float coord, const float bias) +{ + vec4 coord4; + coord4.x = coord; + coord4.w = bias; + __asm vec4_texb1d __retVal, sampler, coord4; } -vec4 texture1DProj (sampler1D sampler, vec2 coord, float bias) { - return texture1D (sampler, coord.s / coord.t, bias); +vec4 texture1DProj(const sampler1D sampler, const vec2 coord, const float bias) +{ + // do projection here (there's no vec4_texbp1d instruction) + vec4 pcoord; + pcoord.x = coord.x / coord.y; + pcoord.w = bias; + __asm vec4_texb1d __retVal, sampler, pcoord; } -vec4 texture1DProj (sampler1D sampler, vec4 coord, float bias) { - return texture1D (sampler, coord.s / coord.q, bias); +vec4 texture1DProj(const sampler1D sampler, const vec4 coord, const float bias) +{ + // do projection here (there's no vec4_texbp1d instruction) + vec4 pcoord; + pcoord.x = coord.x / coord.z; + pcoord.w = bias; + __asm vec4_texb1d __retVal, sampler, pcoord; } -//vec4 texture2D (sampler2D sampler, vec2 coord, float bias) { -// vec4 texel; -// __asm vec4_tex2d texel, sampler, coord, bias; -// return texel; -//} -//vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias) { -// return texture2D (sampler, vec2 (coord.s / coord.p, coord.t / coord.p), bias); -//} +vec4 texture2D(const sampler2D sampler, const vec2 coord, const float bias) +{ + vec4 coord4; + coord4.xy = coord.xy; + coord4.w = bias; + __asm vec4_texb2d __retVal, sampler, coord4; +} -//vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias) { -// return texture2D (sampler, vec2 (coord.s / coord.q, coord.t / coord.q), bias); -//} +vec4 texture2DProj(const sampler2D sampler, const vec3 coord, const float bias) +{ + // do projection here (there's no vec4_texbp2d instruction) + vec4 pcoord; + pcoord.xy = coord.xy / coord.z; + pcoord.w = bias; + __asm vec4_texb2d __retVal, sampler, pcoord; +} -vec4 texture3D (sampler3D sampler, vec3 coord, float bias) { - vec4 texel; - __asm vec4_tex3d texel, sampler, coord, bias; - return texel; +vec4 texture2DProj(const sampler2D sampler, const vec4 coord, const float bias) +{ + // do projection here (there's no vec4_texbp2d instruction) + vec4 pcoord; + pcoord.xy = coord.xy / coord.w; + pcoord.w = bias; + __asm vec4_texb2d __retVal, sampler, pcoord; } -vec4 texture3DProj (sampler3D sampler, vec4 coord, float bias) { - return texture3D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), bias); + +vec4 texture3D(const sampler3D sampler, const vec3 coord, const float bias) +{ + vec4 coord4; + coord4.xyz = coord.xyz; + coord4.w = bias; + __asm vec4_texb3d __retVal, sampler, coord4; } -vec4 textureCube (samplerCube sampler, vec3 coord, float bias) { - vec4 texel; - __asm vec4_texcube texel, sampler, coord, bias; - return texel; +vec4 texture3DProj(const sampler3D sampler, const vec4 coord, const float bias) +{ + // do projection here (there's no vec4_texbp3d instruction) + vec4 pcoord; + pcoord.xyz = coord.xyz / coord.w; + pcoord.w = bias; + __asm vec4_texb3d __retVal, sampler, pcoord; } -vec4 shadow1D (sampler1DShadow sampler, vec3 coord, float bias) { - vec4 texel; - __asm vec4_shad1d texel, sampler, coord, bias; - return texel; + +vec4 textureCube(const samplerCube sampler, const vec3 coord, const float bias) +{ + __asm vec4_texcube __retVal, sampler, coord, bias; } -vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord, float bias) { + +vec4 shadow1D(const sampler1DShadow sampler, const vec3 coord, const float bias) +{ + __asm vec4_shad1d __retVal, sampler, coord, bias; +} + +vec4 shadow1DProj(const sampler1DShadow sampler, const vec4 coord, const float bias) +{ return shadow1D (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), bias); } -vec4 shadow2D (sampler2DShadow sampler, vec3 coord, float bias) { - vec4 texel; - __asm vec4_shad2d texel, sampler, coord, bias; - return texel; +vec4 shadow2D(const sampler2DShadow sampler, const vec3 coord, const float bias) +{ + __asm vec4_shad2d __retVal, sampler, coord, bias; } -vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord, float bias) { - return shadow2D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), bias); +vec4 shadow2DProj(const sampler2DShadow sampler, const vec4 coord, const float bias) +{ + return shadow2D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), bias); } + + + + // // 8.8 Fragment Processing Functions // diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h index 69b90fb9da..a7249ea561 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h @@ -9,58 +9,79 @@ 108,95,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108, 111,114,0,0,0,2,2,3,12,1,103,108,95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84, 101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,3,9,1,103,108,95,70,111,103,70,114,97,103, -67,111,111,114,100,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108, -101,114,0,0,1,0,0,9,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120, -101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112, -108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1, -0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,97,109,112,108,101,114,0,0, -1,0,0,10,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,49, -68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59, -116,0,49,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0, -1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0, -0,1,8,58,116,101,120,116,117,114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114, -100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101, -120,116,117,114,101,51,68,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0, -0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101, -120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, -0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68, -80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9, -98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0, -58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99, -111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0, -18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117, -114,101,67,117,98,101,0,1,0,0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1, -0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,99, -117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, -0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1, -0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0, -1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120, -101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8, -18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115, -97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115, -104,97,100,111,119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114, -100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59, -112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,115,104,97,100, -111,119,50,68,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98, -105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0, -18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105, -97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0, -1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0, -0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99, -111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0, -18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59, -113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,9,0,100,70,100,120,0,1,0,0,9,112,0,0,0,1,8,17,48,0, -48,48,49,0,0,0,0,1,0,10,0,100,70,100,120,0,1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48,0,48,48, -49,0,0,0,0,0,0,1,0,11,0,100,70,100,120,0,1,0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0,48,48, -49,0,0,0,0,0,0,1,0,12,0,100,70,100,120,0,1,0,0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0,48,48, -49,0,0,0,0,0,0,1,0,9,0,100,70,100,121,0,1,0,0,9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0, -100,70,100,121,0,1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0, -100,70,100,121,0,1,0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0, -100,70,100,121,0,1,0,0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0, -102,119,105,100,116,104,0,1,0,0,9,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0, -0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,10,0,102,119,105,100,116,104,0,1, -0,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70, -100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,119,105,100,116,104,0,1,0,0,11,112,0,0,0,1,8,58,97, +67,111,111,114,100,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108, +101,114,0,0,1,1,0,9,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,99,111,111,114, +100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111, +114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95, +114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0, +12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1, +1,0,10,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0, +0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0, +59,121,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95, +116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, +112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0, +16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3, +2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100, +0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98, +105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18, +115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114, +101,50,68,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,1,1,0,9,98,105, +97,115,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18, +99,111,111,114,100,0,59,120,121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20, +0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112, +108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114, +111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,98,105, +97,115,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0, +18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111, +114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114, +101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0, +116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0, +12,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9, +18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114, +100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99, +52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0, +18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,1,0,18,115,97,109, +112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,99, +111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,59, +120,121,122,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52, +95,116,101,120,98,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, +99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,18, +115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0, +12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,111,111,114, +100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59, +119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,98,51,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101, +120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111, +114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95, +114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97, +115,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0, +11,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,4,118,101,99,52,95,115,104,97,100,49,100,0, +18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18, +98,105,97,115,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,1,0,20,115,97,109, +112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97, +100,111,119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0, +59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0, +18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,115,104,97,100,111, +119,50,68,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,98,105, +97,115,0,0,0,1,4,118,101,99,52,95,115,104,97,100,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18, +115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,0,1,0,12,0,115,104, +97,100,111,119,50,68,80,114,111,106,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111, +114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112, +108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113, +0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114, +100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,9,0,100,70, +100,120,0,1,0,0,9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,120,0,1,0,0,10,112,0, +0,0,1,8,58,118,101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,120,0,1,0,0,11,112,0,0, +0,1,8,58,118,101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,120,0,1,0,0,12,112,0,0,0, +1,8,58,118,101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,100,70,100,121,0,1,0,0,9,112,0,0,0,1,8, +17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,121,0,1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48, +0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,121,0,1,0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0, +48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,121,0,1,0,0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0, +48,48,49,0,0,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,0,0,9,112,0,0,0,1,8,58,97,98,115,0,58,100, +70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,10,0, +102,119,105,100,116,104,0,1,0,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0, +0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,119,105,100,116,104,0,1, +0,0,11,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70, +100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,0,0,12,112,0,0,0,1,8,58,97, 98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0, -46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,0,0,12,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120, -0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,0 +46,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index fee317b61f..968fdcdd16 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -626,14 +626,14 @@ static slang_asm_info AsmInfo[] = { { "float_divide", IR_DIV, 1, 2 }, { "float_power", IR_POW, 1, 2 }, /* texture / sampler */ - { "vec4_tex1d", IR_TEX, 1, 1 }, - { "vec4_texb1d", IR_TEXB, 1, 3 }, /* 1d w/ bias */ + { "vec4_tex1d", IR_TEX, 1, 2 }, + { "vec4_texb1d", IR_TEXB, 1, 2 }, /* 1d w/ bias */ { "vec4_texp1d", IR_TEXP, 1, 2 }, /* 1d w/ projection */ { "vec4_tex2d", IR_TEX, 1, 2 }, - { "vec4_texb2d", IR_TEXB, 1, 3 }, /* 2d w/ bias */ + { "vec4_texb2d", IR_TEXB, 1, 2 }, /* 2d w/ bias */ { "vec4_texp2d", IR_TEXP, 1, 2 }, /* 2d w/ projection */ { "vec4_tex3d", IR_TEX, 1, 2 }, - { "vec4_texb3d", IR_TEXB, 1, 3 }, /* 3d w/ bias */ + { "vec4_texb3d", IR_TEXB, 1, 2 }, /* 3d w/ bias */ { "vec4_texp3d", IR_TEXP, 1, 2 }, /* 3d w/ projection */ /* unary op */ diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index aee3fb2ceb..c62a07d97a 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -91,8 +91,8 @@ static slang_ir_info IrInfo[] = { { IR_VAR, "IR_VAR", 0, 0, 0 }, { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, - { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 2 }, - { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 2 }, + { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 1 }, + { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 1 }, { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, { IR_FIELD, "IR_FIELD", 0, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } -- cgit v1.2.3 From 855ebb26d1868d4c1e61a90c1533154b97bd41ff Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 09:14:32 -0700 Subject: Implement shadow samplers and dFdx(), dFdy() code generation. --- .../shader/slang/library/slang_fragment_builtin.gc | 102 +++++++++++++-------- .../slang/library/slang_fragment_builtin_gc.h | 78 +++++++++------- src/mesa/shader/slang/slang_assemble.c | 2 + src/mesa/shader/slang/slang_codegen.c | 2 + src/mesa/shader/slang/slang_emit.c | 4 + src/mesa/shader/slang/slang_ir.h | 2 + 6 files changed, 120 insertions(+), 70 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/src/mesa/shader/slang/library/slang_fragment_builtin.gc index 1c099a673b..034672370a 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin.gc +++ b/src/mesa/shader/slang/library/slang_fragment_builtin.gc @@ -120,28 +120,48 @@ vec4 texture3DProj(const sampler3D sampler, const vec4 coord, const float bias) vec4 textureCube(const samplerCube sampler, const vec3 coord, const float bias) { - __asm vec4_texcube __retVal, sampler, coord, bias; + vec4 coord4; + coord4.xyz = coord; + coord4.w = bias; + __asm vec4_texcube __retVal, sampler, coord4; } +// For shadow textures, we use the regular tex instructions since they should +// do the depth comparison step. + vec4 shadow1D(const sampler1DShadow sampler, const vec3 coord, const float bias) { - __asm vec4_shad1d __retVal, sampler, coord, bias; + vec4 coord4; + coord4.xyz = coord; + coord4.w = bias; + __asm vec4_texb1d __retVal, sampler, coord4; } vec4 shadow1DProj(const sampler1DShadow sampler, const vec4 coord, const float bias) { - return shadow1D (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), bias); + vec4 pcoord; + pcoord.x = coord.x / coord.w; + pcoord.z = coord.z; + pcoord.w = bias; + __asm vec4_texb1d __retVal, sampler, pcoord; } vec4 shadow2D(const sampler2DShadow sampler, const vec3 coord, const float bias) { - __asm vec4_shad2d __retVal, sampler, coord, bias; + vec4 coord4; + coord4.xyz = coord; + coord4.w = bias; + __asm vec4_texb2d __retVal, sampler, coord4; } vec4 shadow2DProj(const sampler2DShadow sampler, const vec4 coord, const float bias) { - return shadow2D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), bias); + vec4 pcoord; + pcoord.xy = coord.xy / coord.w; + pcoord.z = coord.z; + pcoord.w = bias; + __asm vec4_texb2d __retVal, sampler, pcoord; } @@ -152,59 +172,67 @@ vec4 shadow2DProj(const sampler2DShadow sampler, const vec4 coord, const float b // 8.8 Fragment Processing Functions // -float dFdx (float p) { - // XXX: - return 0.001; +float dFdx(const float p) +{ + __asm vec4_ddx __retVal.x, p.xxxx; } -vec2 dFdx (vec2 p) { - // XXX: - return vec2 (0.001); +vec2 dFdx(const vec2 p) +{ + __asm vec4_ddx __retVal.xy, p.xyyy; } -vec3 dFdx (vec3 p) { - // XXX: - return vec3 (0.001); +vec3 dFdx(const vec3 p) +{ + __asm vec4_ddx __retVal.xyz, p.xyzz; } -vec4 dFdx (vec4 p) { - // XXX: - return vec4 (0.001); +vec4 dFdx(const vec4 p) +{ + __asm vec4_ddx __retVal, p; } -float dFdy (float p) { - // XXX: - return 0.001; +float dFdy(const float p) +{ + __asm vec4_ddy __retVal.x, p.xxxx; } -vec2 dFdy (vec2 p) { - // XXX: - return vec2 (0.001); +vec2 dFdy(const vec2 p) +{ + __asm vec4_ddy __retVal.xy, p.xyyy; } -vec3 dFdy (vec3 p) { - // XXX: - return vec3 (0.001); +vec3 dFdy(const vec3 p) +{ + __asm vec4_ddy __retVal.xyz, p.xyzz; } -vec4 dFdy (vec4 p) { - // XXX: - return vec4 (0.001); +vec4 dFdy(const vec4 p) +{ + __asm vec4_ddy __retVal, p; } -float fwidth (float p) { - return abs (dFdx (p)) + abs (dFdy (p)); +float fwidth (const float p) +{ + // XXX hand-write with __asm + return abs(dFdx(p)) + abs(dFdy(p)); } -vec2 fwidth (vec2 p) { - return abs (dFdx (p)) + abs (dFdy (p)); +vec2 fwidth(const vec2 p) +{ + // XXX hand-write with __asm + return abs(dFdx(p)) + abs(dFdy(p)); } -vec3 fwidth (vec3 p) { - return abs (dFdx (p)) + abs (dFdy (p)); +vec3 fwidth(const vec3 p) +{ + // XXX hand-write with __asm + return abs(dFdx(p)) + abs(dFdy(p)); } -vec4 fwidth (vec4 p) { - return abs (dFdx (p)) + abs (dFdy (p)); +vec4 fwidth(const vec4 p) +{ + // XXX hand-write with __asm + return abs(dFdx(p)) + abs(dFdy(p)); } diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h index a7249ea561..8b8202ea2f 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h @@ -52,36 +52,48 @@ 119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,98,51,100,0,18,95,95,114,101,116,86, 97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101, 120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111, -114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97, -115,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0, -11,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,4,118,101,99,52,95,115,104,97,100,49,100,0, -18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18, -98,105,97,115,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,1,0,20,115,97,109, -112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97, -100,111,119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0, -59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0, -18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,115,104,97,100,111, -119,50,68,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,98,105, -97,115,0,0,0,1,4,118,101,99,52,95,115,104,97,100,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,0,1,0,12,0,115,104, -97,100,111,119,50,68,80,114,111,106,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111, -114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112, -108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113, -0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114, -100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,9,0,100,70, -100,120,0,1,0,0,9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,120,0,1,0,0,10,112,0, -0,0,1,8,58,118,101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,120,0,1,0,0,11,112,0,0, -0,1,8,58,118,101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,120,0,1,0,0,12,112,0,0,0, -1,8,58,118,101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,100,70,100,121,0,1,0,0,9,112,0,0,0,1,8, -17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,121,0,1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48, -0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,121,0,1,0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0, -48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,121,0,1,0,0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0, -48,48,49,0,0,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,0,0,9,112,0,0,0,1,8,58,97,98,115,0,58,100, -70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,10,0, -102,119,105,100,116,104,0,1,0,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0, -0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,119,105,100,116,104,0,1, -0,0,11,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70, -100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,0,0,12,112,0,0,0,1,8,58,97, -98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0, -46,0,0,0 +114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111, +114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0, +18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95,114,101,116,86,97, +108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100, +111,119,49,68,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,98, +105,97,115,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121, +122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4, +118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108, +101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106, +0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0, +0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111, +114,100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0, +18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20, +0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112, +108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,1,0,21, +115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0, +12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114, +100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116, +101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, +111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,1,0,21,115,97,109, +112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,112, +99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120, +121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111, +111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118, +101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, +114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,9,0,100,70,100,120,0,1,1,0,9,112,0,0,0,1,4,118,101, +99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0, +0,0,1,0,10,0,100,70,100,120,0,1,1,0,10,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,112,0,59,120,121,121,121,0,0,0,0,1,0,11,0,100,70,100,120,0,1, +1,0,11,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,0,18,112,0,59,120,121,122,122,0,0,0,0,1,0,12,0,100,70,100,120,0,1,1,0,12,112,0,0,0,1,4,118, +101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,0,9,0,100,70,100, +121,0,1,1,0,9,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120, +0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,0,10,0,100,70,100,121,0,1,1,0,10,112,0,0,0,1,4,118,101, +99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,59,120,121,121,121, +0,0,0,0,1,0,11,0,100,70,100,121,0,1,1,0,11,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,59,120,121,122,122,0,0,0,0,1,0,12,0,100,70,100, +121,0,1,1,0,12,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,0,18, +112,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,1,0,9,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100, +120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,10,0,102,119, +105,100,116,104,0,1,1,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97, +98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,119,105,100,116,104,0,1,1,0,11, +112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121, +0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,1,0,12,112,0,0,0,1,8,58,97,98,115,0, +58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,0 diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 3995f0f31f..05574d0e56 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -756,6 +756,8 @@ static const struct {"vec4_texcube", slang_asm_vec4_texcube, slang_asm_none}, {"vec4_shad1d", slang_asm_vec4_shad1d, slang_asm_none}, {"vec4_shad2d", slang_asm_vec4_shad2d, slang_asm_none}, + {"vec4_ddx", 0, slang_asm_none}, + {"vec4_ddy", 0, slang_asm_none}, /* GL_MESA_shader_debug */ {"float_print", slang_asm_float_deref, slang_asm_float_print}, {"int_print", slang_asm_int_deref, slang_asm_int_print}, diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 968fdcdd16..79261ee29a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -619,6 +619,8 @@ static slang_asm_info AsmInfo[] = { { "vec4_frac", IR_FRAC, 1, 1 }, { "vec4_abs", IR_ABS, 1, 1 }, { "vec4_negate", IR_NEG, 1, 1 }, + { "vec4_ddx", IR_DDX, 1, 1 }, + { "vec4_ddy", IR_DDY, 1, 1 }, /* float binary op */ { "float_add", IR_ADD, 1, 2 }, { "float_subtract", IR_SUB, 1, 2 }, diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c62a07d97a..87a3f3f337 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -77,6 +77,8 @@ static slang_ir_info IrInfo[] = { { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, { IR_NEG, "IR_NEG", 0/*spec case*/, 4, 1 }, + { IR_DDX, "IR_DDX", OPCODE_DDX, 4, 1 }, + { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, /* other */ @@ -701,6 +703,8 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_ABS: case IR_SIN: case IR_COS: + case IR_DDX: + case IR_DDY: return emit_unop(gc, n, prog); case IR_TEX: case IR_TEXB: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 273964a8f0..b106e85dbb 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -74,6 +74,8 @@ typedef enum IR_FRAC, IR_ABS, /* absolute value */ IR_NEG, /* negate */ + IR_DDX, /* derivative w.r.t. X */ + IR_DDY, /* derivative w.r.t. Y */ IR_SIN, /* sine */ IR_COS, /* cosine */ IR_NOT, /* logical not */ -- cgit v1.2.3 From 829da4c3457c4690c53bc93e4e16eb3cb16780cb Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 09:31:30 -0700 Subject: Vertex program texture samplers done, but untested (need to add TEX/TXB to the T&L vertex program interpreter). --- .../shader/slang/library/slang_vertex_builtin.gc | 139 +++++++++++++++------ .../shader/slang/library/slang_vertex_builtin_gc.h | 129 ++++++++++--------- 2 files changed, 171 insertions(+), 97 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin.gc b/src/mesa/shader/slang/library/slang_vertex_builtin.gc index 8afb723ee2..84f747075f 100644 --- a/src/mesa/shader/slang/library/slang_vertex_builtin.gc +++ b/src/mesa/shader/slang/library/slang_vertex_builtin.gc @@ -55,74 +55,133 @@ varying float gl_FogFragCoord; // Geometric Functions // -vec4 ftransform () { - return gl_ModelViewProjectionMatrix * gl_Vertex; +vec4 ftransform() +{ + __retVal = gl_ModelViewProjectionMatrix * gl_Vertex; } + + // // 8.7 Texture Lookup Functions +// These are pretty much identical to the ones in slang_fragment_builtin.gc +// When used in a vertex program, the texture sample instructions should not +// be using a LOD term so it's effectively zero. Adding 'lod' to that does +// what we want. // -vec4 texture1DLod (sampler1D sampler, float coord, float lod) { - vec4 texel; - __asm vec4_tex1d texel, sampler, coord, lod; - return texel; +vec4 texture1DLod(const sampler1D sampler, const float coord, const float lod) +{ + vec4 coord4; + coord4.x = coord; + coord4.w = lod; + __asm vec4_texb1d __retVal, sampler, coord4; } -vec4 texture1DProjLod (sampler1D sampler, vec2 coord, float lod) { - return texture1DLod (sampler, coord.s / coord.t, lod); +vec4 texture1DProjLod(const sampler1D sampler, const vec2 coord, const float lod) +{ + vec4 pcoord; + pcoord.x = coord.x / coord.y; + pcoord.w = lod; + __asm vec4_texb1d __retVal, sampler, pcoord; } -vec4 texture1DProjLod (sampler1D sampler, vec4 coord, float lod) { - return texture1DLod (sampler, coord.s / coord.q, lod); +vec4 texture1DProjLod(const sampler1D sampler, const vec4 coord, const float lod) +{ + vec4 pcoord; + pcoord.x = coord.x / coord.z; + pcoord.w = lod; + __asm vec4_texb1d __retVal, sampler, pcoord; } -vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod) { - vec4 texel; - __asm vec4_tex2d texel, sampler, coord, lod; - return texel; + + +vec4 texture2DLod(const sampler2D sampler, const vec2 coord, const float lod) +{ + vec4 coord4; + coord4.xy = coord.xy; + coord4.w = lod; + __asm vec4_texb2d __retVal, sampler, coord4; } -vec4 texture2DProjLod (sampler2D sampler, vec3 coord, float lod) { - return texture2DLod (sampler, vec2 (coord.s / coord.p, coord.t / coord.p), lod); +vec4 texture2DProjLod(const sampler2D sampler, const vec3 coord, const float lod) +{ + vec4 pcoord; + pcoord.xy = coord.xy / coord.z; + pcoord.w = lod; + __asm vec4_texb2d __retVal, sampler, pcoord; } -vec4 texture2DProjLod (sampler2D sampler, vec4 coord, float lod) { - return texture2DLod (sampler, vec2 (coord.s / coord.q, coord.t / coord.q), lod); +vec4 texture2DProjLod(const sampler2D sampler, const vec4 coord, const float lod) +{ + vec4 pcoord; + pcoord.xy = coord.xy / coord.z; + pcoord.w = lod; + __asm vec4_texb2d __retVal, sampler, pcoord; } -vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod) { - vec4 texel; - __asm vec4_tex3d texel, sampler, coord, lod; - return texel; + +vec4 texture3DLod(const sampler3D sampler, const vec3 coord, const float lod) +{ + vec4 coord4; + coord4.xyz = coord.xyz; + coord4.w = lod; + __asm vec4_texb3d __retVal, sampler, coord4; } -vec4 texture3DProjLod (sampler3D sampler, vec4 coord, float lod) { - return texture3DLod (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), lod); + +vec4 texture3DProjLod(const sampler3D sampler, const vec4 coord, const float lod) +{ + // do projection here (there's no vec4_texbp3d instruction) + vec4 pcoord; + pcoord.xyz = coord.xyz / coord.w; + pcoord.w = lod; + __asm vec4_texb3d __retVal, sampler, pcoord; } -vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod) { - vec4 texel; - __asm vec4_texcube texel, sampler, coord, lod; - return texel; + +vec4 textureCubeLod(const samplerCube sampler, const vec3 coord, const float lod) +{ + vec4 coord4; + coord4.xyz = coord; + coord4.w = lod; + __asm vec4_texcube __retVal, sampler, coord4; } -vec4 shadow1DLod (sampler1DShadow sampler, vec3 coord, float lod) { - vec4 texel; - __asm vec4_shad1d texel, sampler, coord, lod; - return texel; + +vec4 shadow1DLod(const sampler1DShadow sampler, const vec3 coord, const float lod) +{ + vec4 coord4; + coord4.xyz = coord; + coord4.w = lod; + __asm vec4_texb1d __retVal, sampler, coord4; } -vec4 shadow1DProjLod (sampler1DShadow sampler, vec4 coord, float lod) { - return shadow1DLod (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), lod); +vec4 shadow1DProjLod(const sampler1DShadow sampler, const vec4 coord, + const float lod) +{ + vec4 pcoord; + pcoord.x = coord.x / coord.w; + pcoord.z = coord.z; + pcoord.w = lod; + __asm vec4_texb1d __retVal, sampler, pcoord; } -vec4 shadow2DLod (sampler2DShadow sampler, vec3 coord, float lod) { - vec4 texel; - __asm vec4_shad2d texel, sampler, coord, lod; - return texel; + +vec4 shadow2DLod(const sampler2DShadow sampler, const vec3 coord, const float lod) +{ + vec4 coord4; + coord4.xyz = coord; + coord4.w = lod; + __asm vec4_texb2d __retVal, sampler, coord4; } -vec4 shadow2DProjLod (sampler2DShadow sampler, vec4 coord, float lod) { - return shadow2DLod (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), lod); +vec4 shadow2DProjLod(const sampler2DShadow sampler, const vec4 coord, + const float lod) +{ + vec4 pcoord; + pcoord.xy = coord.xy / coord.w; + pcoord.z = coord.z; + pcoord.w = lod; + __asm vec4_texb2d __retVal, sampler, pcoord; } diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h index b47c2717c5..d23d7c2ddf 100644 --- a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h @@ -19,60 +19,75 @@ 107,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,84,101,120,67, 111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0, 0,2,2,3,9,1,103,108,95,70,111,103,70,114,97,103,67,111,111,114,100,0,0,0,1,0,12,0,102,116,114,97, -110,115,102,111,114,109,0,0,1,8,18,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101, -99,116,105,111,110,77,97,116,114,105,120,0,18,103,108,95,86,101,114,116,101,120,0,48,0,0,1,0,12,0, -116,101,120,116,117,114,101,49,68,76,111,100,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99, -111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99, -52,95,116,101,120,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117, -114,101,49,68,80,114,111,106,76,111,100,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111, -111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,68,76,111,100,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,116,0, -49,0,18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100, -0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0, -0,1,8,58,116,101,120,116,117,114,101,49,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,18,99, -111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,108,111,100,0,0,0,0,0,1,0,12,0, -116,101,120,116,117,114,101,50,68,76,111,100,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,10,99, -111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99, -52,95,116,101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117, -114,101,50,68,80,114,111,106,76,111,100,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, -111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,76,111,100,0,18, -115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111, -114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0, -18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,76,111,100,0,1, -0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1, -8,58,116,101,120,116,117,114,101,50,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,58,118,101, -99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114, -100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,12,0,116,101, -120,116,117,114,101,51,68,76,111,100,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111, -114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95, -116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111, -114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114, -101,51,68,80,114,111,106,76,111,100,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111, -114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,76,111,100,0,18,115, -97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114, -100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99, -111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,108,111,100,0,0,0,0,0,1,0, -12,0,116,101,120,116,117,114,101,67,117,98,101,76,111,100,0,1,0,0,19,115,97,109,112,108,101,114,0, -0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0, -4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108, -101,114,0,0,18,99,111,111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0, -115,104,97,100,111,119,49,68,76,111,100,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, -111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52, -95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111, -119,49,68,80,114,111,106,76,111,100,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111, -114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,76,111,100,0,18,115,97, -109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100, -0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0, -49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,76,111,100,0,1,0,0,21,115, -97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1, -116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101, -108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,76,111,100,0,1,0,0,21,115,97,109, -112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,115,104,97, -100,111,119,50,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111, -114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99, -111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0, -49,0,0,0,18,108,111,100,0,0,0,0,0,0 +110,115,102,111,114,109,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,103,108,95,77,111,100,101,108, +86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,18,103,108,95,86,101, +114,116,101,120,0,48,20,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,76,111,100,0,1,1,0,16,115, +97,109,112,108,101,114,0,0,1,1,0,9,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1, +99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0,20,0,9, +18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100, +0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0, +0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0,16,115,97,109, +112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99, +111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18, +99,111,111,114,100,0,59,121,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0, +4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112, +108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80, +114,111,106,76,111,100,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1, +1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59, +120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111, +111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95, +114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0, +12,0,116,101,120,116,117,114,101,50,68,76,111,100,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0, +10,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18, +99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,20,0,9,18,99,111,111,114, +100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114, +101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0, +116,101,120,116,117,114,101,50,68,80,114,111,106,76,111,100,0,1,1,0,17,115,97,109,112,108,101,114, +0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100, +0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111, +111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118, +101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, +114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111, +106,76,111,100,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9, +108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120, +121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99, +111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95, +95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1, +0,12,0,116,101,120,116,117,114,101,51,68,76,111,100,0,1,1,0,18,115,97,109,112,108,101,114,0,0,1,1, +0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9, +18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99, +111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,51,100,0,18, +95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0, +1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,76,111,100,0,1,1,0,18,115,97,109,112,108, +101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111, +114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121, +122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111, +100,0,20,0,4,118,101,99,52,95,116,101,120,98,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97, +109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67, +117,98,101,76,111,100,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1, +1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59, +120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0, +20,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97, +109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,76, +111,100,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111, +100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0, +18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101, +99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, +0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,76,111, +100,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100, +0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111, +111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59, +122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100, +0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, +112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,76,111, +100,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100, +0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99, +111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52, +95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, +99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,76,111,100,0,1, +1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1, +3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111, +114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59, +122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100, +0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, +112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,0 -- cgit v1.2.3 From ae80d13f6df1de6628c23635a98f4fcf1c5d34c8 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 10:10:59 -0700 Subject: remove old comment --- src/mesa/shader/slang/library/slang_fragment_builtin.gc | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/src/mesa/shader/slang/library/slang_fragment_builtin.gc index 034672370a..40b1207ca8 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin.gc +++ b/src/mesa/shader/slang/library/slang_fragment_builtin.gc @@ -22,11 +22,6 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -// -// TODO: -// - implement dFdx, dFdy, -// - // // From Shader Spec, ver. 1.10, rev. 59 // -- cgit v1.2.3 From 21f99792a916a62fcfae7c208f50f192d4ce5926 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 11:00:21 -0700 Subject: Moved NumTexInstructions, NumTexIndirections, etc. into gl_program since they can now apply to vertex programs. --- src/mesa/main/mtypes.h | 12 ++++++------ src/mesa/main/texenvprogram.c | 18 +++++++++--------- src/mesa/shader/arbprogparse.c | 12 ++++++------ src/mesa/shader/arbprogram.c | 12 ++++++------ src/mesa/shader/program.c | 12 ++++++------ 5 files changed, 33 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index f43113a0af..b6c72055e1 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1871,6 +1871,9 @@ struct gl_program GLuint NumParameters; GLuint NumAttributes; GLuint NumAddressRegs; + GLuint NumAluInstructions; + GLuint NumTexInstructions; + GLuint NumTexIndirections; /*@}*/ /** Native, actual h/w counts */ /*@{*/ @@ -1879,6 +1882,9 @@ struct gl_program GLuint NumNativeParameters; GLuint NumNativeAttributes; GLuint NumNativeAddressRegs; + GLuint NumNativeAluInstructions; + GLuint NumNativeTexInstructions; + GLuint NumNativeTexIndirections; /*@}*/ }; @@ -1897,12 +1903,6 @@ struct gl_vertex_program struct gl_fragment_program { struct gl_program Base; /**< base class */ - GLuint NumAluInstructions; /**< GL_ARB_fragment_program */ - GLuint NumTexInstructions; - GLuint NumTexIndirections; - GLuint NumNativeAluInstructions; /**< GL_ARB_fragment_program */ - GLuint NumNativeTexInstructions; - GLuint NumNativeTexIndirections; GLenum FogOption; GLboolean UsesKill; }; diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index d318a43ebe..3cb2adbde2 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -524,7 +524,7 @@ static struct ureg emit_arith( struct texenv_fragment_program *p, if (dest.file == PROGRAM_TEMPORARY) p->alu_temps |= 1 << dest.idx; - p->program->NumAluInstructions++; + p->program->Base.NumAluInstructions++; return dest; } @@ -546,7 +546,7 @@ static struct ureg emit_texld( struct texenv_fragment_program *p, inst->TexSrcTarget = tex_idx; inst->TexSrcUnit = tex_unit; - p->program->NumTexInstructions++; + p->program->Base.NumTexInstructions++; /* Is this a texture indirection? */ @@ -554,7 +554,7 @@ static struct ureg emit_texld( struct texenv_fragment_program *p, (p->temps_output & (1<alu_temps & (1<program->NumTexIndirections++; + p->program->Base.NumTexIndirections++; p->temps_output = 1<alu_temps = 0; assert(0); /* KW: texture env crossbar */ @@ -1013,9 +1013,9 @@ create_new_program(GLcontext *ctx, struct state_key *key, */ p.program->Base.Instructions = instBuffer; p.program->Base.Target = GL_FRAGMENT_PROGRAM_ARB; - p.program->NumTexIndirections = 1; /* correct? */ - p.program->NumTexInstructions = 0; - p.program->NumAluInstructions = 0; + p.program->Base.NumTexIndirections = 1; /* correct? */ + p.program->Base.NumTexInstructions = 0; + p.program->Base.NumAluInstructions = 0; p.program->Base.String = 0; p.program->Base.NumInstructions = p.program->Base.NumTemporaries = @@ -1086,13 +1086,13 @@ create_new_program(GLcontext *ctx, struct state_key *key, } else p.program->FogOption = GL_NONE; - if (p.program->NumTexIndirections > ctx->Const.FragmentProgram.MaxTexIndirections) + if (p.program->Base.NumTexIndirections > ctx->Const.FragmentProgram.MaxTexIndirections) program_error(&p, "Exceeded max nr indirect texture lookups"); - if (p.program->NumTexInstructions > ctx->Const.FragmentProgram.MaxTexInstructions) + if (p.program->Base.NumTexInstructions > ctx->Const.FragmentProgram.MaxTexInstructions) program_error(&p, "Exceeded max TEX instructions"); - if (p.program->NumAluInstructions > ctx->Const.FragmentProgram.MaxAluInstructions) + if (p.program->Base.NumAluInstructions > ctx->Const.FragmentProgram.MaxAluInstructions) program_error(&p, "Exceeded max ALU instructions"); ASSERT(p.program->Base.NumInstructions <= MAX_INSTRUCTIONS); diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 80e342e40a..2f74a5dc58 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -4029,12 +4029,12 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, program->Base.NumNativeParameters = ap.Base.NumNativeParameters; program->Base.NumNativeAttributes = ap.Base.NumNativeAttributes; program->Base.NumNativeAddressRegs = ap.Base.NumNativeAddressRegs; - program->NumAluInstructions = ap.NumAluInstructions; - program->NumTexInstructions = ap.NumTexInstructions; - program->NumTexIndirections = ap.NumTexIndirections; - program->NumNativeAluInstructions = ap.NumAluInstructions; - program->NumNativeTexInstructions = ap.NumTexInstructions; - program->NumNativeTexIndirections = ap.NumTexIndirections; + program->Base.NumAluInstructions = ap.Base.NumAluInstructions; + program->Base.NumTexInstructions = ap.Base.NumTexInstructions; + program->Base.NumTexIndirections = ap.Base.NumTexIndirections; + program->Base.NumNativeAluInstructions = ap.Base.NumAluInstructions; + program->Base.NumNativeTexInstructions = ap.Base.NumTexInstructions; + program->Base.NumNativeTexIndirections = ap.Base.NumTexIndirections; program->Base.InputsRead = ap.Base.InputsRead; program->Base.OutputsWritten = ap.Base.OutputsWritten; for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index bff80d7ee3..f3b25da394 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -720,22 +720,22 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params) const struct gl_fragment_program *fp = ctx->FragmentProgram.Current; switch (pname) { case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: - *params = fp->NumNativeAluInstructions; + *params = fp->Base.NumNativeAluInstructions; return; case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: - *params = fp->NumAluInstructions; + *params = fp->Base.NumAluInstructions; return; case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: - *params = fp->NumTexInstructions; + *params = fp->Base.NumTexInstructions; return; case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: - *params = fp->NumNativeTexInstructions; + *params = fp->Base.NumNativeTexInstructions; return; case GL_PROGRAM_TEX_INDIRECTIONS_ARB: - *params = fp->NumTexIndirections; + *params = fp->Base.NumTexIndirections; return; case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: - *params = fp->NumNativeTexIndirections; + *params = fp->Base.NumNativeTexIndirections; return; case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: *params = limits->MaxAluInstructions; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index a50f7cff05..1b26b6c932 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -376,6 +376,12 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) clone->NumNativeParameters = prog->NumNativeParameters; clone->NumNativeAttributes = prog->NumNativeAttributes; clone->NumNativeAddressRegs = prog->NumNativeAddressRegs; + clone->NumAluInstructions = prog->NumAluInstructions; + clone->NumTexInstructions = prog->NumTexInstructions; + clone->NumTexIndirections = prog->NumTexIndirections; + clone->NumNativeAluInstructions = prog->NumNativeAluInstructions; + clone->NumNativeTexInstructions = prog->NumNativeTexInstructions; + clone->NumNativeTexIndirections = prog->NumNativeTexIndirections; switch (prog->Target) { case GL_VERTEX_PROGRAM_ARB: @@ -391,12 +397,6 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) const struct gl_fragment_program *fp = (const struct gl_fragment_program *) prog; struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone; - fpc->NumAluInstructions = fp->NumAluInstructions; - fpc->NumTexInstructions = fp->NumTexInstructions; - fpc->NumTexIndirections = fp->NumTexIndirections; - fpc->NumNativeAluInstructions = fp->NumNativeAluInstructions; - fpc->NumNativeTexInstructions = fp->NumNativeTexInstructions; - fpc->NumNativeTexIndirections = fp->NumNativeTexIndirections; fpc->FogOption = fp->FogOption; fpc->UsesKill = fp->UsesKill; } -- cgit v1.2.3 From 048412473bda3db3e58b9840de5ef82d2ecce3c0 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 11:00:47 -0700 Subject: added _mesa_count_texture_indirections(), _mesa_count_texture_instructions() --- src/mesa/shader/programopt.c | 86 ++++++++++++++++++++++++++++++++++++++++++-- src/mesa/shader/programopt.h | 10 ++++-- 2 files changed, 92 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index bccb0a3ad7..a33e6b49ac 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -305,3 +305,85 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) fprog->Base.InputsRead |= FRAG_BIT_FOGC; /* XXX do this? fprog->FogOption = GL_NONE; */ } + + + +static GLboolean +is_texture_instruction(const struct prog_instruction *inst) +{ + switch (inst->Opcode) { + case OPCODE_TEX: + case OPCODE_TXB: + case OPCODE_TXD: + case OPCODE_TXL: + case OPCODE_TXP: + case OPCODE_TXP_NV: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Count the number of texure indirections in the given program. + * The program's NumTexIndirections field will be updated. + * See the GL_ARB_fragment_program spec (issue 24) for details. + * XXX we count texture indirections in texenvprogram.c (maybe use this code + * instead and elsewhere). + */ +void +_mesa_count_texture_indirections(struct gl_program *prog) +{ + GLuint indirections = 1; + GLbitfield tempsOutput = 0x0; + GLbitfield aluTemps = 0x0; + GLuint i; + + for (i = 0; i < prog->NumInstructions; i++) { + const struct prog_instruction *inst = prog->Instructions + i; + + if (is_texture_instruction(inst)) { + if (((inst->SrcReg[0].File == PROGRAM_TEMPORARY) && + (tempsOutput & (1 << inst->SrcReg[0].Index))) || + ((inst->Opcode != OPCODE_KIL) && + (inst->DstReg.File == PROGRAM_TEMPORARY) && + (aluTemps & (1 << inst->DstReg.Index)))) + { + indirections++; + tempsOutput = 0x0; + aluTemps = 0x0; + } + } + else { + GLuint j; + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_TEMPORARY) + aluTemps |= (1 << inst->SrcReg[j].Index); + } + if (inst->DstReg.File == PROGRAM_TEMPORARY) + aluTemps |= (1 << inst->DstReg.Index); + } + + if ((inst->Opcode != OPCODE_KIL) && (inst->DstReg.File == PROGRAM_TEMPORARY)) + tempsOutput |= (1 << inst->DstReg.Index); + } + + prog->NumTexIndirections = indirections; +} + + +/** + * Count number of texture instructions in given program and update the + * program's NumTexInstructions field. + */ +void +_mesa_count_texture_instructions(struct gl_program *prog) +{ + GLuint i; + prog->NumTexInstructions = 0; + for (i = 0; i < prog->NumInstructions; i++) { + prog->NumTexInstructions += is_texture_instruction(prog->Instructions + i); + } +} + diff --git a/src/mesa/shader/programopt.h b/src/mesa/shader/programopt.h index efaf29b937..ce63644bbf 100644 --- a/src/mesa/shader/programopt.h +++ b/src/mesa/shader/programopt.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -33,5 +33,11 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog); extern void _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog); +extern void +_mesa_count_texture_indirections(struct gl_program *prog); + +extern void +_mesa_count_texture_instructions(struct gl_program *prog); + #endif /* PROGRAMOPT_H */ -- cgit v1.2.3 From e8673143ea3d0edf1be7ba8e0723ddba61d8f3f8 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 17:46:45 -0700 Subject: add code for generic attributes 16..31 --- src/mesa/tnl/t_save_api.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c index dbbd095fe4..616b599218 100644 --- a/src/mesa/tnl/t_save_api.c +++ b/src/mesa/tnl/t_save_api.c @@ -677,12 +677,30 @@ ATTRS( 13 ) ATTRS( 14 ) ATTRS( 15 ) +ATTRS( 16 ) +ATTRS( 17 ) +ATTRS( 18 ) +ATTRS( 19 ) +ATTRS( 20 ) +ATTRS( 21 ) +ATTRS( 22 ) +ATTRS( 23 ) +ATTRS( 24 ) +ATTRS( 25 ) +ATTRS( 26 ) +ATTRS( 27 ) +ATTRS( 28 ) +ATTRS( 29 ) +ATTRS( 30 ) +ATTRS( 31 ) + static void _save_reset_vertex( GLcontext *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint i; + /* conventional attributes */ save_init_0( tnl ); save_init_1( tnl ); save_init_2( tnl ); @@ -699,6 +717,24 @@ static void _save_reset_vertex( GLcontext *ctx ) save_init_13( tnl ); save_init_14( tnl ); save_init_15( tnl ); + + /* generic attributes */ + save_init_16( tnl ); + save_init_17( tnl ); + save_init_18( tnl ); + save_init_19( tnl ); + save_init_20( tnl ); + save_init_21( tnl ); + save_init_22( tnl ); + save_init_23( tnl ); + save_init_24( tnl ); + save_init_25( tnl ); + save_init_26( tnl ); + save_init_27( tnl ); + save_init_28( tnl ); + save_init_29( tnl ); + save_init_30( tnl ); + save_init_31( tnl ); for (i = 0 ; i < _TNL_ATTRIB_MAX ; i++) tnl->save.attrsz[i] = 0; @@ -1024,7 +1060,7 @@ static void GLAPIENTRY _save_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ) { if (index < MAX_VERTEX_ATTRIBS) - DISPATCH_ATTR2F( index, x, y ); + DISPATCH_ATTR2F( VERT_ATTRIB_GENERIC0 + index, x, y ); else enum_error(); } -- cgit v1.2.3 From 5e75db12d7b17f0295e8099bd357220df97d5013 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 17:47:13 -0700 Subject: more debug code (disabled) --- src/mesa/swrast/s_fragprog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 517b63c91b..83a50c7451 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -1601,12 +1601,16 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, /*ASSERT(ctx->Texture._EnabledCoordUnits & (1 << u));*/ COPY_4V(tex, span->array->texcoords[u][col]); /*ASSERT(tex[0] != 0 || tex[1] != 0 || tex[2] != 0);*/ +#if 0 + printf("Texcoord %d: %g %g %g %g\n", u, + tex[0], tex[1], tex[2], tex[3]); +#endif } } for (v = 0; v < ctx->Const.MaxVarying; v++) { if (inputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { #if 0 - printf("Frag Var %d: %f %f %f\n", col, + printf("Frag Var %d at y=%d: %f %f %f\n", v, col, span->array->varying[col][v][0], span->array->varying[col][v][1], span->array->varying[col][v][2]); -- cgit v1.2.3 From 3209c3ed0d82c158eed1020759aacf51ba1c1ad5 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 17:49:24 -0700 Subject: Implement vertex attribute binding. Users can set explicit binding with glBindAttribLocation(), otherwise the linker will allocate generic attribute slots. --- src/mesa/main/mtypes.h | 12 +-- src/mesa/shader/prog_parameter.c | 28 +++++++ src/mesa/shader/prog_parameter.h | 4 + src/mesa/shader/prog_statevars.h | 2 + src/mesa/shader/program.c | 2 + src/mesa/shader/shader_api.c | 39 ++++++---- src/mesa/shader/slang/slang_codegen.c | 24 ++++-- src/mesa/shader/slang/slang_compile.c | 1 + src/mesa/shader/slang/slang_link.h | 3 + src/mesa/shader/slang/slang_link2.c | 138 +++++++++++++++++++++++++++++----- 10 files changed, 209 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b6c72055e1..cbb1fd47eb 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1844,16 +1844,16 @@ struct gl_program_parameter_list; struct gl_program { GLuint Id; - GLubyte *String; /**< Null-terminated program text */ + GLubyte *String; /**< Null-terminated program text */ GLint RefCount; - GLenum Target; - GLenum Format; /**< String encoding format */ + GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_PROGRAM_NV */ + GLenum Format; /**< String encoding format */ GLboolean Resident; struct prog_instruction *Instructions; - GLbitfield InputsRead; /* Bitmask of which input regs are read */ - GLbitfield OutputsWritten; /* Bitmask of which output regs are written to */ + GLbitfield InputsRead; /**< Bitmask of which input regs are read */ + GLbitfield OutputsWritten; /**< Bitmask of which output regs are written to */ GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */ /** Named parameters, constants, etc. from program text */ @@ -1863,6 +1863,8 @@ struct gl_program /** Vertex/fragment shader varying vars */ struct gl_program_parameter_list *Varying; + /** Vertex program user-defined attributes */ + struct gl_program_parameter_list *Attributes; /** Logical counts */ /*@{*/ diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index d09cc65937..e543871ab7 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -239,6 +239,9 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList, } +/** + * Add parameter representing a varying variable. + */ GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size) @@ -256,6 +259,31 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, } +/** + * Add parameter representing a vertex program attribute. + */ +GLint +_mesa_add_attribute(struct gl_program_parameter_list *paramList, + const char *name, GLint attrib) +{ + GLint size = 4; /* XXX ok? */ + GLint i = _mesa_lookup_parameter_index(paramList, -1, name); + if (i >= 0) { + /* replace */ + ASSERT(paramList->Parameters[i].StateIndexes[0] == STATE_USER_ATTRIB); + paramList->Parameters[i].StateIndexes[1] = attrib; + } + else { + /* add */ + i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_INPUT); + if (i >= 0) { + paramList->Parameters[i].StateIndexes[0] = STATE_USER_ATTRIB; + paramList->Parameters[i].StateIndexes[1] = attrib; + } + } + return i; +} + #if 0 /* not used yet */ diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index 0db2bcd314..ab4d730018 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -107,6 +107,10 @@ extern GLint _mesa_add_varying(struct gl_program_parameter_list *paramList, const char *name, GLuint size); +extern GLint +_mesa_add_attribute(struct gl_program_parameter_list *paramList, + const char *name, GLint attrib); + extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, const GLint *stateTokens); diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 17e38054bb..da672c9ec8 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -96,6 +96,8 @@ typedef enum gl_state_index_ { STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_POSITION_NORMALIZED, /* normalized light position */ + STATE_USER_ATTRIB, /** shader vertex attrib: user-specified */ + STATE_AUTO_ATTRIB, /** shader vertex attrib: linker-specified */ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ } gl_state_index; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 1b26b6c932..7a31949673 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -365,6 +365,8 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); if (prog->Varying) clone->Varying = _mesa_clone_parameter_list(prog->Varying); + if (prog->Attributes) + clone->Attributes = _mesa_clone_parameter_list(prog->Attributes); memcpy(clone->LocalParams, prog->LocalParams, sizeof(clone->LocalParams)); clone->NumInstructions = prog->NumInstructions; clone->NumTemporaries = prog->NumTemporaries; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index bd258f8737..d1b0e21b94 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -40,6 +40,8 @@ #include "hash.h" #include "program.h" #include "prog_parameter.h" +#include "prog_print.h" +#include "prog_statevars.h" #include "shader_api.h" #include "slang_compile.h" @@ -59,6 +61,7 @@ _mesa_new_shader_program(GLcontext *ctx, GLuint name) shProg->Type = GL_SHADER_PROGRAM; shProg->Name = name; shProg->RefCount = 1; + shProg->Attributes = _mesa_new_parameter_list(); } return shProg; } @@ -275,6 +278,8 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, { struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); + GLint i; + GLint oldIndex; if (!shProg) { _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocation(program)"); @@ -290,15 +295,21 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, return; } -#if 0 /* XXXX */ - if (name == NULL || index >= MAX_VERTEX_ATTRIBS) - _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocationARB"); - else if (IS_NAME_WITH_GL_PREFIX(name)) - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindAttribLocationARB"); - else - (**pro).OverrideAttribBinding(pro, index, name); - RELEASE_PROGRAM(pro); -#endif + oldIndex = _mesa_get_attrib_location(ctx, program, name); + + /* this will replace the current value if it's already in the list */ + i = _mesa_add_attribute(shProg->Attributes, name, index); + if (i < 0) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation"); + } + + if (shProg->VertexProgram && oldIndex >= 0) { + _slang_remap_attribute(&shProg->VertexProgram->Base, oldIndex, index); + } + + printf("===== post BindAttrib:\n"); + _mesa_print_program(&shProg->VertexProgram->Base); + } @@ -541,11 +552,9 @@ _mesa_get_attrib_location(GLcontext *ctx, GLuint program, return -1; if (shProg->Attributes) { - GLuint i; - for (i = 0; i < shProg->Attributes->NumParameters; i++) { - if (!strcmp(shProg->Attributes->Parameters[i].Name, name)) { - return i; - } + GLint i = _mesa_lookup_parameter_index(shProg->Attributes, -1, name); + if (i >= 0) { + return shProg->Attributes->Parameters[i].StateIndexes[1]; } } return -1; @@ -605,7 +614,7 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program, *params = shProg->NumShaders; break; case GL_ACTIVE_ATTRIBUTES: - *params = shProg->Uniforms ? shProg->Uniforms->NumParameters : 0; + *params = shProg->Attributes ? shProg->Attributes->NumParameters : 0; break; case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: *params = _mesa_parameter_longest_name(shProg->Attributes); diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 79261ee29a..cc70d1de2a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -540,7 +540,8 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, } else if (var->type.qualifier == slang_qual_const) { if (prog) { - abort(); + /* user-defined constant */ + abort(); /* XXX fix */ } else { /* pre-defined global constant, like gl_MaxLights */ @@ -550,11 +551,22 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, if (dbg) printf("CONST "); } else if (var->type.qualifier == slang_qual_attribute) { - /* Vertex attribute */ - GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - assert(index >= 0); - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + if (prog) { + /* user-defined vertex attribute */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + GLint index = _mesa_add_parameter(prog->Attributes, varName, + NULL, size, PROGRAM_INPUT); + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, + VERT_ATTRIB_GENERIC0 + index, size); + } + else { + /* pre-defined vertex attrib */ + GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + } if (dbg) printf("ATTRIB "); } else if (var->type.qualifier == slang_qual_fixedinput) { diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index efb23255f9..314c32f707 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2260,6 +2260,7 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) shader->Programs[0]->Parameters = _mesa_new_parameter_list(); shader->Programs[0]->Varying = _mesa_new_parameter_list(); + shader->Programs[0]->Attributes = _mesa_new_parameter_list(); } slang_info_log_construct(&info_log); diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index 2fc5525000..d9819289ca 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -357,6 +357,9 @@ extern void _slang_resolve_samplers(struct gl_shader_program *shProg, struct gl_program *prog); +extern void +_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttrib); + #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 3a5bce0099..0965f3e4c4 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -36,6 +36,7 @@ #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" +#include "prog_statevars.h" #include "shader_api.h" #include "slang_link.h" @@ -311,31 +312,71 @@ _slang_resolve_branches(struct gl_program *prog) /** - * Scan program for texture instructions, lookup sampler/uniform's value - * to determine which texture unit to use. - * Also, update the program's TexturesUsed[] array. + * Resolve binding of generic vertex attributes. + * For example, if the vertex shader declared "attribute vec4 foobar" we'll + * allocate a generic vertex attribute for "foobar" and plug that value into + * the vertex program instructions. */ -void -_slang_resolve_samplers(struct gl_shader_program *shProg, - struct gl_program *prog) +static GLboolean +_slang_resolve_attributes(struct gl_shader_program *shProg, + struct gl_program *prog) { - GLuint i; + GLuint i, j; + GLbitfield usedAttributes; - for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) - prog->TexturesUsed[i] = 0; + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + + /* Build a bitmask indicating which attribute indexes have been + * explicitly bound by the user with glBindAttributeLocation(). + */ + usedAttributes = 0x0; + for (i = 0; i < shProg->Attributes->NumParameters; i++) { + GLint attr = shProg->Attributes->Parameters[i].StateIndexes[1]; + usedAttributes |= attr; + } + + if (!shProg->Attributes) + shProg->Attributes = _mesa_new_parameter_list(); + /* + * Scan program for generic attribute references + */ for (i = 0; i < prog->NumInstructions; i++) { struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_TEX || - inst->Opcode == OPCODE_TXB || - inst->Opcode == OPCODE_TXP) { - GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; - assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); - inst->TexSrcUnit = sampleUnit; + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT && + inst->SrcReg[j].Index >= VERT_ATTRIB_GENERIC0) { + /* this is a generic attrib */ + const GLint k = inst->SrcReg[j].Index - VERT_ATTRIB_GENERIC0; + const char *name = prog->Attributes->Parameters[k].Name; + /* See if this attrib name is in the program's attribute list + * (i.e. was bound by the user). + */ + GLint index = _mesa_lookup_parameter_index(shProg->Attributes, + -1, name); + GLint attr; + if (index >= 0) { + /* found, user must have specified a binding */ + attr = shProg->Attributes->Parameters[index].StateIndexes[1]; + } + else { + /* not found, choose our own attribute number */ + for (attr = 0; attr < MAX_VERTEX_ATTRIBS; attr++) { + if (((1 << attr) & usedAttributes) == 0) + break; + } + if (attr == MAX_VERTEX_ATTRIBS) { + /* too many! XXX record error log */ + return GL_FALSE; + } + _mesa_add_attribute(shProg->Attributes, name, attr); + } - prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + attr; + } } } + return GL_TRUE; } @@ -366,6 +407,65 @@ _slang_update_inputs_outputs(struct gl_program *prog) } +/** + * Scan a vertex program looking for instances of + * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + oldAttrib) and replace with + * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + newAttrib). + * This is used when the user calls glBindAttribLocation on an already linked + * shader program. + */ +void +_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttrib) +{ + GLuint i, j; + + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT) { + if (inst->SrcReg[j].Index == VERT_ATTRIB_GENERIC0 + oldAttrib) { + inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + newAttrib; + } + } + } + } + + _slang_update_inputs_outputs(prog); +} + + + +/** + * Scan program for texture instructions, lookup sampler/uniform's value + * to determine which texture unit to use. + * Also, update the program's TexturesUsed[] array. + */ +void +_slang_resolve_samplers(struct gl_shader_program *shProg, + struct gl_program *prog) +{ + GLuint i; + + for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) + prog->TexturesUsed[i] = 0; + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_TEX || + inst->Opcode == OPCODE_TXB || + inst->Opcode == OPCODE_TXP) { + GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; + assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); + inst->TexSrcUnit = sampleUnit; + + prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + } + } +} + + /** cast wrapper */ static struct gl_vertex_program * @@ -463,10 +563,12 @@ _slang_link2(GLcontext *ctx, _slang_resolve_branches(&shProg->VertexProgram->Base); _slang_resolve_branches(&shProg->FragmentProgram->Base); -#if 1 + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); -#endif + + _slang_resolve_attributes(shProg, &shProg->VertexProgram->Base); + _slang_update_inputs_outputs(&shProg->VertexProgram->Base); _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); -- cgit v1.2.3 From b7978af6936d186112727cb9858fe7740eef1a7c Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 19:17:17 -0700 Subject: clean up a bunch of program parameter stuff --- src/mesa/shader/arbprogparse.c | 6 +-- src/mesa/shader/prog_parameter.c | 77 +++++++++++++++++++++++------------ src/mesa/shader/prog_parameter.h | 16 ++++---- src/mesa/shader/prog_statevars.c | 6 +-- src/mesa/shader/prog_statevars.h | 11 ++++- src/mesa/shader/shader_api.c | 6 +-- src/mesa/shader/slang/slang_codegen.c | 11 ++--- src/mesa/shader/slang/slang_link2.c | 3 +- 8 files changed, 85 insertions(+), 51 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 2f74a5dc58..991378f6d4 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1719,7 +1719,7 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst, { GLint idx; GLuint err = 0; - GLint state_tokens[6]; + GLint state_tokens[STATE_LENGTH]; GLfloat const_values[4]; switch (*(*inst)++) { diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index e543871ab7..8945f2d854 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -71,16 +71,18 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) * store all the values (in blocks of 4). * * \param paramList the list to add the parameter to + * \param type type of parameter, such as * \param name the parameter name, will be duplicated/copied! - * \param values initial parameter value, up to 4 GLfloats * \param size number of elements in 'values' vector (1..4, or more) - * \param type type of parameter, such as + * \param values initial parameter value, up to 4 GLfloats, or NULL + * \param state state indexes, or NULL * \return index of new parameter in the list, or -1 if error (out of mem) */ GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat *values, GLuint size, - enum register_file type) + enum register_file type, const char *name, + GLuint size, const GLfloat *values, + const gl_state_index state[STATE_LENGTH]) { const GLuint oldNum = paramList->NumParameters; const GLuint sz4 = (size + 3) / 4; /* no. of new param slots needed */ @@ -131,6 +133,12 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, } size -= 4; } + + if (state) { + for (i = 0; i < STATE_LENGTH; i++) + paramList->Parameters[oldNum].StateIndexes[i] = state[i]; + } + return (GLint) oldNum; } } @@ -144,7 +152,9 @@ GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, const char *name, const GLfloat values[4]) { - return _mesa_add_parameter(paramList, name, values, 4, PROGRAM_NAMED_PARAM); + return _mesa_add_parameter(paramList, PROGRAM_NAMED_PARAM, name, + 4, values, NULL); + } @@ -173,7 +183,9 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, } #endif size = 4; /** XXX fix */ - return _mesa_add_parameter(paramList, name, values, size, PROGRAM_CONSTANT); + return _mesa_add_parameter(paramList, PROGRAM_CONSTANT, name, + size, values, NULL); + } @@ -202,7 +214,9 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, size, &pos, &swizzle)) { return pos; } - return _mesa_add_parameter(paramList, NULL, values, size, PROGRAM_CONSTANT); + return _mesa_add_parameter(paramList, PROGRAM_CONSTANT, NULL, + size, values, NULL); + } @@ -216,7 +230,9 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList, return i; } else { - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_UNIFORM); + i = _mesa_add_parameter(paramList, PROGRAM_UNIFORM, name, + size, NULL, NULL); + return i; } } @@ -233,7 +249,8 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList, } else { const GLint size = 1; - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_SAMPLER); + i = _mesa_add_parameter(paramList, PROGRAM_SAMPLER, name, + size, NULL, NULL); return i; } } @@ -253,7 +270,8 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, } else { assert(size == 4); - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_VARYING); + i = _mesa_add_parameter(paramList, PROGRAM_VARYING, name, + size, NULL, NULL); return i; } } @@ -261,25 +279,28 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, /** * Add parameter representing a vertex program attribute. + * \param size size of attribute (in floats), may be -1 if unknown + * \param attrib the attribute index, or -1 if unknown */ GLint _mesa_add_attribute(struct gl_program_parameter_list *paramList, - const char *name, GLint attrib) + const char *name, GLint size, GLint attrib) { - GLint size = 4; /* XXX ok? */ GLint i = _mesa_lookup_parameter_index(paramList, -1, name); if (i >= 0) { /* replace */ ASSERT(paramList->Parameters[i].StateIndexes[0] == STATE_USER_ATTRIB); + if (attrib < 0) + attrib = i; paramList->Parameters[i].StateIndexes[1] = attrib; } else { /* add */ - i = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_INPUT); - if (i >= 0) { - paramList->Parameters[i].StateIndexes[0] = STATE_USER_ATTRIB; - paramList->Parameters[i].StateIndexes[1] = attrib; - } + gl_state_index state[STATE_LENGTH]; + state[0] = STATE_USER_ATTRIB; + state[1] = attrib; + i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name, + size, NULL, state); } return i; } @@ -315,12 +336,12 @@ sizeof_state_reference(const GLint *stateTokens) * PARAM ambient = state.material.front.ambient; * * \param paramList the parameter list - * \param state an array of 6 state tokens + * \param state an array of 6 (STATE_LENGTH) state tokens * \return index of the new parameter. */ GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint *stateTokens) + const GLint stateTokens[STATE_LENGTH]) { const GLuint size = 4; /* XXX fix */ const char *name; @@ -337,17 +358,19 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, break; } } - if (match == 6) { + if (match == STATE_LENGTH) { /* this state reference is already in the parameter list */ return index; } } name = _mesa_program_state_string(stateTokens); - index = _mesa_add_parameter(paramList, name, NULL, size, PROGRAM_STATE_VAR); + index = _mesa_add_parameter(paramList, PROGRAM_STATE_VAR, name, + size, NULL, NULL); + if (index >= 0) { GLuint i; - for (i = 0; i < 6; i++) { + for (i = 0; i < STATE_LENGTH; i++) { paramList->Parameters[index].StateIndexes[i] = (gl_state_index) stateTokens[i]; } @@ -487,14 +510,14 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list) for (i = 0; i < list->NumParameters; i++) { struct gl_program_parameter *p = list->Parameters + i; GLuint size = MIN2(p->Size, 4); - GLint j = _mesa_add_parameter(clone, p->Name, list->ParameterValues[i], - size, p->Type); + GLint j = _mesa_add_parameter(clone, p->Type, p->Name, + size, list->ParameterValues[i], NULL); ASSERT(j >= 0); /* copy state indexes */ if (p->Type == PROGRAM_STATE_VAR) { GLint k; struct gl_program_parameter *q = clone->Parameters + j; - for (k = 0; k < 6; k++) { + for (k = 0; k < STATE_LENGTH; k++) { q->StateIndexes[k] = p->StateIndexes[k]; } } diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index ab4d730018..bfae071be0 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,6 +32,7 @@ #define PROG_PARAMETER_H #include "mtypes.h" +#include "prog_statevars.h" /** @@ -49,7 +50,7 @@ struct gl_program_parameter /** * A sequence of STATE_* tokens and integers to identify GL state. */ - GLuint StateIndexes[6]; + GLuint StateIndexes[STATE_LENGTH]; }; @@ -78,8 +79,9 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list); extern GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - const char *name, const GLfloat *values, GLuint size, - enum register_file type); + enum register_file type, const char *name, + GLuint size, const GLfloat *values, + const gl_state_index state[STATE_LENGTH]); extern GLint _mesa_add_named_parameter(struct gl_program_parameter_list *paramList, @@ -109,11 +111,11 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList, extern GLint _mesa_add_attribute(struct gl_program_parameter_list *paramList, - const char *name, GLint attrib); + const char *name, GLint size, GLint attrib); extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint *stateTokens); + const GLint stateTokens[STATE_LENGTH]); extern GLfloat * _mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 7377c7d821..a0a00cfb95 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -418,7 +418,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], * some GL state has changed. */ GLbitfield -_mesa_program_state_flags(const GLint state[]) +_mesa_program_state_flags(const GLint state[STATE_LENGTH]) { switch (state[0]) { case STATE_MATERIAL: @@ -661,7 +661,7 @@ append_index(char *dst, GLint index) * Use _mesa_free() to deallocate the string. */ const char * -_mesa_program_state_string(const GLint state[6]) +_mesa_program_state_string(const GLint state[STATE_LENGTH]) { char str[1000] = ""; char tmp[30]; diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index da672c9ec8..47ef615f9b 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -28,6 +28,13 @@ #include "mtypes.h" +/** + * Number of STATE_* values we need to address any GL state. + * Used to dimension arrays. + */ +#define STATE_LENGTH 6 + + /** * Used for describing GL state referenced from inside ARB vertex and * fragment programs. @@ -109,11 +116,11 @@ _mesa_load_state_parameters(GLcontext *ctx, extern GLbitfield -_mesa_program_state_flags(const GLint state[]); +_mesa_program_state_flags(const GLint state[STATE_LENGTH]); extern const char * -_mesa_program_state_string(const GLint state[6]); +_mesa_program_state_string(const GLint state[STATE_LENGTH]); #endif /* PROG_STATEVARS_H */ diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index d1b0e21b94..397ce916ea 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -278,8 +278,8 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, { struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); - GLint i; - GLint oldIndex; + const GLint size = -1; /* unknown size */ + GLint i, oldIndex; if (!shProg) { _mesa_error(ctx, GL_INVALID_VALUE, "glBindAttribLocation(program)"); @@ -298,7 +298,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, oldIndex = _mesa_get_attrib_location(ctx, program, name); /* this will replace the current value if it's already in the list */ - i = _mesa_add_attribute(shProg->Attributes, name, index); + i = _mesa_add_attribute(shProg->Attributes, name, size, index); if (i < 0) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation"); } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index cc70d1de2a..91e117367e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -119,7 +119,7 @@ slang_lookup_statevar(const char *name, GLint index, const char *Name; const GLuint NumRows; /** for matrices */ const GLuint Swizzle; - const GLint Indexes[6]; + const GLint Indexes[STATE_LENGTH]; }; static const struct state_info state[] = { { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, @@ -143,9 +143,9 @@ slang_lookup_statevar(const char *name, GLint index, if (state[i].NumRows > 1) { /* a matrix */ GLuint j; - GLint pos[4], indexesCopy[6]; + GLint pos[4], indexesCopy[STATE_LENGTH]; /* make copy of state tokens */ - for (j = 0; j < 6; j++) + for (j = 0; j < STATE_LENGTH; j++) indexesCopy[j] = state[i].Indexes[j]; /* load rows */ for (j = 0; j < state[i].NumRows; j++) { @@ -554,8 +554,9 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, if (prog) { /* user-defined vertex attribute */ const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - GLint index = _mesa_add_parameter(prog->Attributes, varName, - NULL, size, PROGRAM_INPUT); + const GLint attr = -1; /* unknown */ + GLint index = _mesa_add_attribute(prog->Attributes, varName, + size, attr); assert(index >= 0); store = _slang_new_ir_storage(PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + index, size); diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 0965f3e4c4..da5ba5c292 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -323,6 +323,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, { GLuint i, j; GLbitfield usedAttributes; + GLint size = 4; /* XXX fix */ assert(prog->Target == GL_VERTEX_PROGRAM_ARB); @@ -369,7 +370,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, /* too many! XXX record error log */ return GL_FALSE; } - _mesa_add_attribute(shProg->Attributes, name, attr); + _mesa_add_attribute(shProg->Attributes, name, size, attr); } inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + attr; -- cgit v1.2.3 From 01a91eb65753c9090e1a05d728cf5c23ef49d5d4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Jan 2007 19:26:22 -0700 Subject: get rid of STATE_USER_ATTRIB/STATE_AUTO_ATTRIB --- src/mesa/shader/prog_parameter.c | 6 ++---- src/mesa/shader/prog_statevars.h | 2 -- src/mesa/shader/shader_api.c | 2 +- src/mesa/shader/slang/slang_link2.c | 8 +++++--- 4 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 8945f2d854..900fb7e1a5 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -289,16 +289,14 @@ _mesa_add_attribute(struct gl_program_parameter_list *paramList, GLint i = _mesa_lookup_parameter_index(paramList, -1, name); if (i >= 0) { /* replace */ - ASSERT(paramList->Parameters[i].StateIndexes[0] == STATE_USER_ATTRIB); if (attrib < 0) attrib = i; - paramList->Parameters[i].StateIndexes[1] = attrib; + paramList->Parameters[i].StateIndexes[0] = attrib; } else { /* add */ gl_state_index state[STATE_LENGTH]; - state[0] = STATE_USER_ATTRIB; - state[1] = attrib; + state[0] = attrib; i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name, size, NULL, state); } diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 47ef615f9b..95e38ca7b6 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -103,8 +103,6 @@ typedef enum gl_state_index_ { STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_POSITION_NORMALIZED, /* normalized light position */ - STATE_USER_ATTRIB, /** shader vertex attrib: user-specified */ - STATE_AUTO_ATTRIB, /** shader vertex attrib: linker-specified */ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ } gl_state_index; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 397ce916ea..101c6f1e7e 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -554,7 +554,7 @@ _mesa_get_attrib_location(GLcontext *ctx, GLuint program, if (shProg->Attributes) { GLint i = _mesa_lookup_parameter_index(shProg->Attributes, -1, name); if (i >= 0) { - return shProg->Attributes->Parameters[i].StateIndexes[1]; + return shProg->Attributes->Parameters[i].StateIndexes[0]; } } return -1; diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index da5ba5c292..7dfdd288e1 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -332,7 +332,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, */ usedAttributes = 0x0; for (i = 0; i < shProg->Attributes->NumParameters; i++) { - GLint attr = shProg->Attributes->Parameters[i].StateIndexes[1]; + GLint attr = shProg->Attributes->Parameters[i].StateIndexes[0]; usedAttributes |= attr; } @@ -358,7 +358,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, GLint attr; if (index >= 0) { /* found, user must have specified a binding */ - attr = shProg->Attributes->Parameters[index].StateIndexes[1]; + attr = shProg->Attributes->Parameters[index].StateIndexes[0]; } else { /* not found, choose our own attribute number */ @@ -568,7 +568,9 @@ _slang_link2(GLcontext *ctx, _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); - _slang_resolve_attributes(shProg, &shProg->VertexProgram->Base); + if (!_slang_resolve_attributes(shProg, &shProg->VertexProgram->Base)) { + /*goto cleanup;*/ + } _slang_update_inputs_outputs(&shProg->VertexProgram->Base); _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); -- cgit v1.2.3 From 88f721231248854e441ccdaeabe1c471e64ddc0a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 10 Jan 2007 08:15:35 -0700 Subject: Update _save_VertexAttrib() functions for non-aliasing behaviour. --- src/mesa/tnl/t_save_api.c | 129 +++++++++++++++++++++++++++++++++------------- 1 file changed, 93 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c index 616b599218..b08f05374e 100644 --- a/src/mesa/tnl/t_save_api.c +++ b/src/mesa/tnl/t_save_api.c @@ -971,141 +971,198 @@ static void GLAPIENTRY _save_MultiTexCoord4fv( GLenum target, const GLfloat *v ) DISPATCH_ATTR4FV( attr, v ); } -static void GLAPIENTRY _save_VertexAttrib1fNV( GLuint index, GLfloat x ) + + +static void GLAPIENTRY +_save_VertexAttrib1fNV(GLuint index, GLfloat x) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR1F( index, x ); + } else enum_error(); } -static void GLAPIENTRY _save_VertexAttrib1fvNV( GLuint index, const GLfloat *v ) +static void GLAPIENTRY +_save_VertexAttrib1fvNV(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR1FV( index, v ); + } else enum_error(); } -static void GLAPIENTRY _save_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ) +static void GLAPIENTRY +_save_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR2F( index, x, y ); + } else enum_error(); } -static void GLAPIENTRY _save_VertexAttrib2fvNV( GLuint index, const GLfloat *v ) +static void GLAPIENTRY +_save_VertexAttrib2fvNV(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR2FV( index, v ); + } else enum_error(); } -static void GLAPIENTRY _save_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y, - GLfloat z ) +static void GLAPIENTRY +_save_VertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR3F( index, x, y, z ); + } else enum_error(); } -static void GLAPIENTRY _save_VertexAttrib3fvNV( GLuint index, const GLfloat *v ) +static void GLAPIENTRY +_save_VertexAttrib3fvNV(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR3FV( index, v ); + } else enum_error(); } -static void GLAPIENTRY _save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y, - GLfloat z, GLfloat w ) +static void GLAPIENTRY +_save_VertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR4F( index, x, y, z, w ); + } else enum_error(); } -static void GLAPIENTRY _save_VertexAttrib4fvNV( GLuint index, const GLfloat *v ) +static void GLAPIENTRY +_save_VertexAttrib4fvNV(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_PROGRAM_ATTRIBS) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR4FV( index, v ); + } else enum_error(); } - static void GLAPIENTRY -_save_VertexAttrib1fARB( GLuint index, GLfloat x ) +_save_VertexAttrib1fARB(GLuint index, GLfloat x) { - if (index < MAX_VERTEX_ATTRIBS) + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR1F( index, x ); + } else enum_error(); } static void GLAPIENTRY -_save_VertexAttrib1fvARB( GLuint index, const GLfloat *v ) +_save_VertexAttrib1fvARB(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_ATTRIBS) + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR1FV( index, v ); + } else enum_error(); } static void GLAPIENTRY -_save_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ) +_save_VertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y) { - if (index < MAX_VERTEX_ATTRIBS) - DISPATCH_ATTR2F( VERT_ATTRIB_GENERIC0 + index, x, y ); + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; + DISPATCH_ATTR2F( index, x, y ); + } else enum_error(); } static void GLAPIENTRY -_save_VertexAttrib2fvARB( GLuint index, const GLfloat *v ) +_save_VertexAttrib2fvARB(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_ATTRIBS) + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR2FV( index, v ); + } else enum_error(); } static void GLAPIENTRY -_save_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z ) +_save_VertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z) { - if (index < MAX_VERTEX_ATTRIBS) + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR3F( index, x, y, z ); + } else enum_error(); } static void GLAPIENTRY -_save_VertexAttrib3fvARB( GLuint index, const GLfloat *v ) +_save_VertexAttrib3fvARB(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_ATTRIBS) + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR3FV( index, v ); + } else enum_error(); } static void GLAPIENTRY -_save_VertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +_save_VertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, + GLfloat z, GLfloat w) { - if (index < MAX_VERTEX_ATTRIBS) + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR4F( index, x, y, z, w ); + } else enum_error(); } static void GLAPIENTRY -_save_VertexAttrib4fvARB( GLuint index, const GLfloat *v ) +_save_VertexAttrib4fvARB(GLuint index, const GLfloat *v) { - if (index < MAX_VERTEX_ATTRIBS) + if (index < MAX_VERTEX_ATTRIBS) { + if (index > 0) + index += VERT_ATTRIB_GENERIC0; DISPATCH_ATTR4FV( index, v ); + } else enum_error(); } -- cgit v1.2.3 From 29bff4e12defa0037167ceb0940be632cc87b578 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 10 Jan 2007 08:37:59 -0700 Subject: simplify _mesa_add_state_reference() --- src/mesa/shader/prog_parameter.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 900fb7e1a5..fbc3839899 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -364,16 +364,8 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, name = _mesa_program_state_string(stateTokens); index = _mesa_add_parameter(paramList, PROGRAM_STATE_VAR, name, - size, NULL, NULL); - - if (index >= 0) { - GLuint i; - for (i = 0; i < STATE_LENGTH; i++) { - paramList->Parameters[index].StateIndexes[i] - = (gl_state_index) stateTokens[i]; - } - paramList->StateFlags |= _mesa_program_state_flags(stateTokens); - } + size, NULL, (gl_state_index *) stateTokens); + paramList->StateFlags |= _mesa_program_state_flags(stateTokens); /* free name string here since we duplicated it in add_parameter() */ _mesa_free((void *) name); -- cgit v1.2.3 From ee11842bfcdb928be269848835c5eb88b6d967ee Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 10 Jan 2007 12:18:33 -0700 Subject: fix size bug in _mesa_add_attribute() --- src/mesa/shader/prog_parameter.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index fbc3839899..676f1722e5 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -297,6 +297,8 @@ _mesa_add_attribute(struct gl_program_parameter_list *paramList, /* add */ gl_state_index state[STATE_LENGTH]; state[0] = attrib; + if (size < 0) + size = 4; i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name, size, NULL, state); } -- cgit v1.2.3 From 8a48f3557424cfa67269ae5e4dca100ae2a0ddda Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 10 Jan 2007 12:18:50 -0700 Subject: assorted code clean-ups --- src/mesa/shader/shader_api.c | 3 +-- src/mesa/shader/slang/slang_codegen.c | 33 +++++++++++++++++++++++---------- src/mesa/shader/slang/slang_emit.c | 27 +++++++++++---------------- 3 files changed, 35 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 101c6f1e7e..69314b225a 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -849,7 +849,6 @@ _mesa_use_program(GLcontext *ctx, GLuint program) ctx->Shader.CurrentProgram = NULL; } - /* XXXX need to handle reference counting here! */ if (program) { struct gl_shader_program *shProg; shProg = _mesa_lookup_shader_program(ctx, program); @@ -916,7 +915,7 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, } } else { - const GLfloat *fValues = (const GLfloat *) values; /* XXX */ + const GLfloat *fValues = (const GLfloat *) values; switch (type) { case GL_FLOAT_VEC4: uniformVal[3] = fValues[3]; diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 91e117367e..07ca8107c0 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -541,6 +541,11 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, else if (var->type.qualifier == slang_qual_const) { if (prog) { /* user-defined constant */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + /* + const GLint index = _mesa_add_named_constant(prog->Parameters); + */ + printf("Global user constant\n"); abort(); /* XXX fix */ } else { @@ -591,7 +596,10 @@ _slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, if (dbg) printf("OUTPUT "); } else { + /* ordinary variable */ + assert(prog); /* shouldn't be any pre-defined, unqualified vars */ if (dbg) printf("other "); + abort(); } if (dbg) printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store?store->Index:-2); @@ -2104,20 +2112,24 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) /** * Produce an IR tree from a function AST. - * Then call the code emitter to convert the IR tree into a gl_program. + * Then call the code emitter to convert the IR tree into gl_program + * instructions. */ struct slang_ir_node_ * _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) { slang_ir_node *n, *endLabel; + GLboolean success; - if (_mesa_strcmp((char *) fun->header.a_name, "main") != 0 && - _mesa_strcmp((char *) fun->header.a_name, "foo") != 0 && - _mesa_strcmp((char *) fun->header.a_name, "bar") != 0) + if (_mesa_strcmp((char *) fun->header.a_name, "main") != 0) { + /* we only really generate code for main, all other functions get + * inlined. + */ return 0; + } - printf("\n*********** Assemble function2(%s)\n", (char*)fun->header.a_name); #if 1 + printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name); slang_print_function(fun, 1); #endif @@ -2133,6 +2145,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) CurFunction = fun; + /* Create an end-of-function label */ if (!CurFunction->end_label) CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); @@ -2147,17 +2160,17 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) #if 1 - printf("************* New body for %s *****\n", (char*)fun->header.a_name); + printf("************* New AST for %s *****\n", (char*)fun->header.a_name); slang_print_function(fun, 1); - printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); printf("************* End assemble function2 ************\n\n"); #endif - if (_mesa_strcmp((char*) fun->header.a_name, "main") == 0) { - _slang_emit_code(n, A->codegen, A->program); - } + success = _slang_emit_code(n, A->codegen, A->program); + + /* free codegen context */ + _mesa_free(A->codegen); return n; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 87a3f3f337..6c80c1e015 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -751,7 +751,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_CJUMP: return emit_cjump(n->Target, prog); default: - printf("emit: ?\n"); + _mesa_problem(NULL, "Unexpected IR opcode in emit()\n"); abort(); } return NULL; @@ -771,29 +771,24 @@ GLboolean _slang_emit_code(slang_ir_node *n, slang_gen_context *gc, struct gl_program *prog) { - /*GET_CURRENT_CONTEXT(ctx);*/ + GLboolean success; - /* - gc = _slang_new_codegen_context(); - */ - - printf("************ Begin generate code\n"); - - (void) emit(gc, n, prog); - - { + if (emit(gc, n, prog)) { + /* finish up by addeing the END opcode to program */ struct prog_instruction *inst; inst = new_instruction(prog, OPCODE_END); + success = GL_TRUE; + } + else { + /* record an error? */ + success = GL_FALSE; } - - printf("************ End generate code (%u inst):\n", prog->NumInstructions); #if 0 + printf("*********** End generate code (%u inst):\n", prog->NumInstructions); _mesa_print_program(prog); _mesa_print_program_parameters(ctx,prog); #endif - _mesa_free(gc); - - return GL_FALSE; + return success; } -- cgit v1.2.3 From 88e2dbfd10129eab2c7f4a935358a6ab2a18bf65 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 10 Jan 2007 13:33:38 -0700 Subject: checkpoint: codegen for global vars w/ initializers --- src/mesa/shader/shader_api.c | 3 +- src/mesa/shader/slang/slang_codegen.c | 365 +++++++++++++++++++--------------- src/mesa/shader/slang/slang_codegen.h | 7 +- src/mesa/shader/slang/slang_compile.c | 20 +- 4 files changed, 228 insertions(+), 167 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 69314b225a..c18bbcec4b 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -307,9 +307,10 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, _slang_remap_attribute(&shProg->VertexProgram->Base, oldIndex, index); } +#if 0 printf("===== post BindAttrib:\n"); _mesa_print_program(&shProg->VertexProgram->Base); - +#endif } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 07ca8107c0..12e9588579 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -291,10 +291,12 @@ slang_allocate_storage(slang_gen_context *gc, slang_ir_node *n, n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); assert(n->Store->Size > 0); n->Store->Index = _slang_alloc_temporary(gc, n->Store->Size); + /* printf("alloc var %s storage at %d (size %d)\n", (char *) n->Var->a_name, n->Store->Index, n->Store->Size); + */ assert(n->Store->Size > 0); n->Var->declared = GL_TRUE; return; @@ -459,155 +461,6 @@ _slang_output_index(const char *name, GLenum target) } -/** - * Called by compiler when a global variable has been parsed/compiled. - * Here we examine the variable's type to determine what kind of register - * storage will be used. - * - * A uniform such as "gl_Position" will become the register specification - * (PROGRAM_OUTPUT, VERT_RESULT_HPOS). Or, uniform "gl_FogFragCoord" - * will be (PROGRAM_INPUT, FRAG_ATTRIB_FOGC). - * - * Samplers are interesting. For "uniform sampler2D tex;" we'll specify - * (PROGRAM_SAMPLER, index) where index is resolved at link-time to an - * actual texture unit (as specified by the user calling glUniform1i()). - */ -void -_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, - slang_unit_type type) -{ - const char *varName = (char *) var->a_name; - GLint texIndex; - slang_ir_storage *store = NULL; - int dbg = 0; - - texIndex = sampler_to_texture_index(var->type.specifier.type); - - if (texIndex != -1) { - /* Texture sampler: - * store->File = PROGRAM_SAMPLER - * store->Index = sampler uniform location - * store->Size = texture type index (1D, 2D, 3D, cube, etc) - */ - GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName); - store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); - if (dbg) printf("SAMPLER "); - } - else if (var->type.qualifier == slang_qual_uniform) { - /* Uniform variable */ - const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - if (prog) { - /* user-defined uniform */ - GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, size); - store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); - } - else { - /* pre-defined uniform, like gl_ModelviewMatrix */ - /* We know it's a uniform, but don't allocate storage unless - * it's really used. - */ - - store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); - - } - if (dbg) printf("UNIFORM "); - } - else if (var->type.qualifier == slang_qual_varying) { - const GLint size = 4; /* XXX fix */ - if (prog) { - /* user-defined varying */ - GLint varyingLoc = _mesa_add_varying(prog->Varying, varName, size); - store = _slang_new_ir_storage(PROGRAM_VARYING, varyingLoc, size); - } - else { - /* pre-defined varying, like gl_Color or gl_TexCoord */ - if (type == slang_unit_fragment_builtin) { - GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); - assert(index >= 0); - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - assert(index < FRAG_ATTRIB_MAX); - } - else { - GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); - assert(index >= 0); - assert(type == slang_unit_vertex_builtin); - store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); - assert(index < VERT_RESULT_MAX); - } - if (dbg) printf("V/F "); - } - if (dbg) printf("VARYING "); - } - else if (var->type.qualifier == slang_qual_const) { - if (prog) { - /* user-defined constant */ - const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - /* - const GLint index = _mesa_add_named_constant(prog->Parameters); - */ - printf("Global user constant\n"); - abort(); /* XXX fix */ - } - else { - /* pre-defined global constant, like gl_MaxLights */ - GLint size = -1; - store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); - } - if (dbg) printf("CONST "); - } - else if (var->type.qualifier == slang_qual_attribute) { - if (prog) { - /* user-defined vertex attribute */ - const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - const GLint attr = -1; /* unknown */ - GLint index = _mesa_add_attribute(prog->Attributes, varName, - size, attr); - assert(index >= 0); - store = _slang_new_ir_storage(PROGRAM_INPUT, - VERT_ATTRIB_GENERIC0 + index, size); - } - else { - /* pre-defined vertex attrib */ - GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - assert(index >= 0); - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - } - if (dbg) printf("ATTRIB "); - } - else if (var->type.qualifier == slang_qual_fixedinput) { - GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); - if (dbg) printf("INPUT "); - } - else if (var->type.qualifier == slang_qual_fixedoutput) { - if (type == slang_unit_vertex_builtin) { - GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); - } - else { - assert(type == slang_unit_fragment_builtin); - GLint index = _slang_output_index(varName, GL_FRAGMENT_PROGRAM_ARB); - GLint size = 4; /* XXX? */ - store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); - } - if (dbg) printf("OUTPUT "); - } - else { - /* ordinary variable */ - assert(prog); /* shouldn't be any pre-defined, unqualified vars */ - if (dbg) printf("other "); - abort(); - } - if (dbg) printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store?store->Index:-2); - - assert(!var->aux); - - var->aux = store; -} - /**********************************************************************/ @@ -1023,10 +876,9 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, /* allocate the return var */ resultVar = slang_variable_scope_grow(commaSeq->locals); /* - printf("ALLOC __retVal from scope %p\n", (void*) commaSeq->locals); - */ printf("Alloc __resultTemp in scope %p for retval of calling %s\n", (void*)commaSeq->locals, (char *) fun->header.a_name); + */ resultVar->a_name = slang_atom_pool_atom(A->atoms, "__resultTmp"); resultVar->type = fun->header.type; /* XXX copy? */ @@ -1071,9 +923,11 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, substCount = 0; for (i = 0; i < totalArgs; i++) { slang_variable *p = &fun->parameters->variables[i]; + /* printf("Param %d: %s %s \n", i, slang_type_qual_string(p->type.qualifier), (char *) p->a_name); + */ if (p->type.qualifier == slang_qual_inout || p->type.qualifier == slang_qual_out) { /* an output param */ @@ -2110,12 +1964,197 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) } + +/** + * Called by compiler when a global variable has been parsed/compiled. + * Here we examine the variable's type to determine what kind of register + * storage will be used. + * + * A uniform such as "gl_Position" will become the register specification + * (PROGRAM_OUTPUT, VERT_RESULT_HPOS). Or, uniform "gl_FogFragCoord" + * will be (PROGRAM_INPUT, FRAG_ATTRIB_FOGC). + * + * Samplers are interesting. For "uniform sampler2D tex;" we'll specify + * (PROGRAM_SAMPLER, index) where index is resolved at link-time to an + * actual texture unit (as specified by the user calling glUniform1i()). + */ +GLboolean +_slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, + slang_unit_type type) +{ + struct gl_program *prog = A->program; + const char *varName = (char *) var->a_name; + GLint texIndex; + slang_ir_storage *store = NULL; + int dbg = 0; + GLboolean codegen = GL_FALSE; /* generate code for this global? */ + + texIndex = sampler_to_texture_index(var->type.specifier.type); + + if (texIndex != -1) { + /* Texture sampler: + * store->File = PROGRAM_SAMPLER + * store->Index = sampler uniform location + * store->Size = texture type index (1D, 2D, 3D, cube, etc) + */ + GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName); + store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); + if (dbg) printf("SAMPLER "); + } + else if (var->type.qualifier == slang_qual_uniform) { + /* Uniform variable */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + if (prog) { + /* user-defined uniform */ + GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, size); + store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); + } + else { + /* pre-defined uniform, like gl_ModelviewMatrix */ + /* We know it's a uniform, but don't allocate storage unless + * it's really used. + */ + + store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); + + } + if (dbg) printf("UNIFORM "); + } + else if (var->type.qualifier == slang_qual_varying) { + const GLint size = 4; /* XXX fix */ + if (prog) { + /* user-defined varying */ + GLint varyingLoc = _mesa_add_varying(prog->Varying, varName, size); + store = _slang_new_ir_storage(PROGRAM_VARYING, varyingLoc, size); + } + else { + /* pre-defined varying, like gl_Color or gl_TexCoord */ + if (type == slang_unit_fragment_builtin) { + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + assert(index < FRAG_ATTRIB_MAX); + } + else { + GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); + assert(index >= 0); + assert(type == slang_unit_vertex_builtin); + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + assert(index < VERT_RESULT_MAX); + } + if (dbg) printf("V/F "); + } + if (dbg) printf("VARYING "); + } + else if (var->type.qualifier == slang_qual_const) { + if (prog) { + /* user-defined constant */ + /* + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + const GLint index = _mesa_add_named_constant(prog->Parameters); + */ + printf("Global user constant\n"); + abort(); /* XXX fix */ + } + else { + /* pre-defined global constant, like gl_MaxLights */ + GLint size = -1; + store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); + } + if (dbg) printf("CONST "); + } + else if (var->type.qualifier == slang_qual_attribute) { + if (prog) { + /* user-defined vertex attribute */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + const GLint attr = -1; /* unknown */ + GLint index = _mesa_add_attribute(prog->Attributes, varName, + size, attr); + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, + VERT_ATTRIB_GENERIC0 + index, size); + } + else { + /* pre-defined vertex attrib */ + GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + assert(index >= 0); + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + } + if (dbg) printf("ATTRIB "); + } + else if (var->type.qualifier == slang_qual_fixedinput) { + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + if (dbg) printf("INPUT "); + } + else if (var->type.qualifier == slang_qual_fixedoutput) { + if (type == slang_unit_vertex_builtin) { + GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + } + else { + assert(type == slang_unit_fragment_builtin); + GLint index = _slang_output_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLint size = 4; /* XXX? */ + store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); + } + if (dbg) printf("OUTPUT "); + } + else { + /* ordinary variable */ + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + const GLint index = -1; + store = _slang_new_ir_storage(PROGRAM_TEMPORARY, index, size); + codegen = GL_TRUE; + assert(prog); /* shouldn't be any pre-defined, unqualified vars */ + } + if (dbg) printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, + store ? store->Index : -2); + + assert(!var->aux); + var->aux = store; /* save var's storage info */ + + if (codegen) { + slang_ir_node *n; + + n = new_node(IR_VAR_DECL, NULL, NULL); + if (!n) + return GL_FALSE; + n->Var = var; + var->declared = GL_TRUE; + slang_allocate_storage(A->codegen, n, A->program); + + if (var->initializer) { + slang_ir_node *lhs, *rhs, *init; + + /* Generate IR_MOVE instruction to initialize the variable */ + lhs = new_node(IR_VAR, NULL, NULL); + lhs->Var = var; + lhs->Swizzle = SWIZZLE_NOOP; + lhs->Store = store; + + rhs = _slang_gen_operation(A, var->initializer); + init = new_node(IR_MOVE, lhs, rhs); + n = new_seq(n, init); + } + + /* emit code (n) */ + + } + + return GL_TRUE; +} + + /** - * Produce an IR tree from a function AST. + * Produce an IR tree from a function AST (fun->body). * Then call the code emitter to convert the IR tree into gl_program * instructions. */ -struct slang_ir_node_ * +GLboolean _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) { slang_ir_node *n, *endLabel; @@ -2125,11 +2164,13 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* we only really generate code for main, all other functions get * inlined. */ - return 0; + return GL_TRUE; /* not an error */ } #if 1 printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name); +#endif +#if 0 slang_print_function(fun, 1); #endif @@ -2137,11 +2178,11 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) assert(A->program->Parameters ); assert(A->program->Varying); - A->codegen = _slang_new_codegen_context(); + assert(A->codegen); + /* A->codegen = _slang_new_codegen_context();*/ - /*printf("** Begin Simplify\n");*/ + /* fold constant expressions, etc. */ slang_simplify(fun->body, &A->space, A->atoms); - /*printf("** End Simplify\n");*/ CurFunction = fun; @@ -2159,19 +2200,23 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) CurFunction = NULL; -#if 1 +#if 0 printf("************* New AST for %s *****\n", (char*)fun->header.a_name); slang_print_function(fun, 1); +#endif +#if 1 printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); - printf("************* End assemble function2 ************\n\n"); + printf("************* End codegen function ************\n\n"); #endif success = _slang_emit_code(n, A->codegen, A->program); /* free codegen context */ + /* _mesa_free(A->codegen); + */ - return n; + return GL_TRUE; } diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h index ad8e2a4fd8..76d364237a 100644 --- a/src/mesa/shader/slang/slang_codegen.h +++ b/src/mesa/shader/slang/slang_codegen.h @@ -29,14 +29,13 @@ #include "imports.h" #include "slang_compile.h" -#include "slang_ir.h" -extern struct slang_ir_node_ * +extern GLboolean _slang_codegen_function(slang_assemble_ctx *A , struct slang_function_ *fun); -extern void -_slang_codegen_global_variable(slang_variable *var, struct gl_program *prog, +extern GLboolean +_slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, slang_unit_type type); diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 314c32f707..bb1da27152 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -38,6 +38,7 @@ #include "slang_preprocess.h" #include "slang_storage.h" #include "slang_error.h" +#include "slang_emit.h" #include "slang_print.h" @@ -247,6 +248,7 @@ typedef struct slang_output_ctx_ slang_var_pool *global_pool; slang_machine *machine; struct gl_program *program; + slang_gen_context *codegen; } slang_output_ctx; /* _slang_compile() */ @@ -1719,8 +1721,20 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, } #if 1 - if (C->global_scope /*&& O->program*/) - _slang_codegen_global_variable(var, O->program, C->type); + if (C->global_scope) { + slang_assemble_ctx A; + + A.file = O->assembly; + A.mach = O->machine; + A.atoms = C->atoms; + A.space.funcs = O->funs; + A.space.structs = O->structs; + A.space.vars = O->vars; + A.codegen = O->codegen; + A.program = O->program; + + _slang_codegen_global_variable(&A, var, C->type); + } #endif /* allocate global address space for a variable with a known size */ @@ -1880,6 +1894,7 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, A.space.structs = O->structs; A.space.vars = O->vars; A.program = O->program; + A.codegen = O->codegen; _slang_reset_error(); @@ -1953,6 +1968,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, o.global_pool = &unit->object->varpool; o.machine = &unit->object->machine; o.program = program; + o.codegen = _slang_new_codegen_context(); /* parse individual functions and declarations */ while (*C->I != EXTERNAL_NULL) { -- cgit v1.2.3 From c0c31024a31a2e3225742f447af65614e1ff2ea3 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 10 Jan 2007 13:51:48 -0700 Subject: checkpoint: codegen for global vars/constants now working --- src/mesa/shader/slang/slang_codegen.c | 89 ++++++++++++++++++++--------------- src/mesa/shader/slang/slang_emit.c | 8 ++-- src/mesa/shader/slang/slang_emit.h | 2 +- 3 files changed, 56 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 12e9588579..9f21573415 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -525,6 +525,19 @@ static slang_asm_info AsmInfo[] = { }; +/** + * Recursively free an IR tree. + */ +static void +_slang_free_ir_tree(slang_ir_node *n) +{ + if (!n) + return; + _slang_free_ir_tree(n->Children[0]); + _slang_free_ir_tree(n->Children[1]); + free(n); +} + static slang_ir_node * new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) @@ -1984,10 +1997,10 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, { struct gl_program *prog = A->program; const char *varName = (char *) var->a_name; + GLboolean success = GL_TRUE; GLint texIndex; slang_ir_storage *store = NULL; int dbg = 0; - GLboolean codegen = GL_FALSE; /* generate code for this global? */ texIndex = sampler_to_texture_index(var->type.specifier.type); @@ -2046,23 +2059,6 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } if (dbg) printf("VARYING "); } - else if (var->type.qualifier == slang_qual_const) { - if (prog) { - /* user-defined constant */ - /* - const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - const GLint index = _mesa_add_named_constant(prog->Parameters); - */ - printf("Global user constant\n"); - abort(); /* XXX fix */ - } - else { - /* pre-defined global constant, like gl_MaxLights */ - GLint size = -1; - store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); - } - if (dbg) printf("CONST "); - } else if (var->type.qualifier == slang_qual_attribute) { if (prog) { /* user-defined vertex attribute */ @@ -2103,30 +2099,29 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } if (dbg) printf("OUTPUT "); } + else if (var->type.qualifier == slang_qual_const && !prog) { + /* pre-defined global constant, like gl_MaxLights */ + GLint size = -1; + store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); + if (dbg) printf("CONST "); + } else { - /* ordinary variable */ + /* ordinary variable (may be const) */ const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); const GLint index = -1; - store = _slang_new_ir_storage(PROGRAM_TEMPORARY, index, size); - codegen = GL_TRUE; - assert(prog); /* shouldn't be any pre-defined, unqualified vars */ - } - if (dbg) printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, - store ? store->Index : -2); - - assert(!var->aux); - var->aux = store; /* save var's storage info */ - - if (codegen) { slang_ir_node *n; + /* IR node to declare the variable */ n = new_node(IR_VAR_DECL, NULL, NULL); if (!n) return GL_FALSE; n->Var = var; var->declared = GL_TRUE; + store = _slang_new_ir_storage(PROGRAM_TEMPORARY, index, size); + var->aux = store; /* save var's storage info */ slang_allocate_storage(A->codegen, n, A->program); + /* IR code for the var's initializer, if present */ if (var->initializer) { slang_ir_node *lhs, *rhs, *init; @@ -2136,16 +2131,26 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, lhs->Swizzle = SWIZZLE_NOOP; lhs->Store = store; + /* constant folding, etc */ + slang_simplify(var->initializer, &A->space, A->atoms); + rhs = _slang_gen_operation(A, var->initializer); init = new_node(IR_MOVE, lhs, rhs); n = new_seq(n, init); } - /* emit code (n) */ + success = _slang_emit_code(n, A->codegen, A->program, GL_FALSE); + _slang_free_ir_tree(n); } - return GL_TRUE; + if (dbg) printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, + store ? store->Index : -2); + + + var->aux = store; /* save var's storage info */ + + return success; } @@ -2158,7 +2163,7 @@ GLboolean _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) { slang_ir_node *n, *endLabel; - GLboolean success; + GLboolean success = GL_TRUE; if (_mesa_strcmp((char *) fun->header.a_name, "main") != 0) { /* we only really generate code for main, all other functions get @@ -2190,15 +2195,19 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) if (!CurFunction->end_label) CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); + /* Generate IR tree for the function body code */ n = _slang_gen_operation(A, fun->body); - if (n) { - endLabel = new_label(fun->end_label); - n = new_seq(n, endLabel); + if (!n) { + /* XXX record error */ + return GL_FALSE; } - CurFunction = NULL; + /* append an end-of-function-label to IR tree */ + endLabel = new_label(fun->end_label); + n = new_seq(n, endLabel); + CurFunction = NULL; #if 0 printf("************* New AST for %s *****\n", (char*)fun->header.a_name); @@ -2210,13 +2219,15 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) printf("************* End codegen function ************\n\n"); #endif - success = _slang_emit_code(n, A->codegen, A->program); + /* Emit program instructions */ + success = _slang_emit_code(n, A->codegen, A->program, GL_TRUE); + _slang_free_ir_tree(n); /* free codegen context */ /* _mesa_free(A->codegen); */ - return GL_TRUE; + return success; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6c80c1e015..909948968a 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -769,14 +769,16 @@ _slang_new_codegen_context(void) GLboolean _slang_emit_code(slang_ir_node *n, slang_gen_context *gc, - struct gl_program *prog) + struct gl_program *prog, GLboolean withEnd) { GLboolean success; if (emit(gc, n, prog)) { /* finish up by addeing the END opcode to program */ - struct prog_instruction *inst; - inst = new_instruction(prog, OPCODE_END); + if (withEnd) { + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_END); + } success = GL_TRUE; } else { diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 50585a4a03..cd3352604f 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -53,7 +53,7 @@ _slang_alloc_temporary(slang_gen_context *gc, GLint size); extern GLboolean _slang_emit_code(slang_ir_node *n, slang_gen_context *gc, - struct gl_program *prog); + struct gl_program *prog, GLboolean withEnd); #endif /* SLANG_EMIT_H */ -- cgit v1.2.3 From c8e148e38ce335089817a8ecbc52df8cc57c880a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 11 Jan 2007 11:19:11 -0700 Subject: tweak output --- src/mesa/shader/slang/slang_print.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index 2ac06291bc..020f30a940 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -226,7 +226,7 @@ slang_print_tree(const slang_operation *op, int indent) case slang_oper_block_no_new_scope: spaces(indent); - printf("{ locals %p\n", (void*)op->locals); + printf("{ locals %p outer %p\n", (void*)op->locals, (void*)op->locals->outer_scope); print_generic(op, NULL, indent+3); spaces(indent); printf("}\n"); @@ -1108,15 +1108,16 @@ _slang_print_var_scope(const slang_variable_scope *vars, int indent) GLuint i; spaces(indent); - printf("Var scope %p %d vars\n", (void *) vars, vars->num_variables); + printf("Var scope %p %d vars:\n", (void *) vars, vars->num_variables); for (i = 0; i < vars->num_variables; i++) { spaces(indent + 3); printf("%s\n", (char *) vars->variables[i].a_name); } + spaces(indent + 3); + printf("outer_scope = %p\n", (void*) vars->outer_scope); if (vars->outer_scope) { spaces(indent + 3); - printf("outer_scope = %p\n", (void*) vars->outer_scope); _slang_print_var_scope(vars->outer_scope, indent + 3); } } -- cgit v1.2.3 From 749ed66549fe194ff94824baf862722830de1297 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 11 Jan 2007 11:20:23 -0700 Subject: new vec3 constructor, replace float_add w/ vec4_add --- src/mesa/shader/slang/library/slang_core.gc | 20 +- src/mesa/shader/slang/library/slang_core_gc.h | 1363 +++++++++++++------------ 2 files changed, 699 insertions(+), 684 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index f8ee17eeda..31a567fea5 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -168,8 +168,12 @@ vec2 __constructor (const bool b) { return vec2 (b ? 1.0 : 0.0); } -vec3 __constructor (const float f) { - return vec3 (f, f, f); +vec3 __constructor(const float f) +{ +// return vec3 (f, f, f); + __retVal.x = f; + __retVal.y = f; + __retVal.z = f; } vec3 __constructor (const int i) { @@ -182,6 +186,14 @@ vec3 __constructor (const bool b) { return vec3 (b ? 1.0 : 0.0); } +vec3 __constructor(const vec4 v) +{ + __retVal.xyz = v.xyz; +} + + + + //bp: TODO replace with asm == f.xxxx vec4 __constructor (const float f) { return vec4 (f, f, f, f); @@ -339,7 +351,7 @@ int __operator + (const int a, const int b) int c; __asm int_to_float x, a; __asm int_to_float y, b; - __asm float_add x, x, y; + __asm vec4_add x.x, x.x, y.x; __asm float_to_int c, x; return c; } @@ -351,7 +363,7 @@ int __operator - (const int a, const int b) __asm int_to_float x, a; __asm int_to_float y, b; __asm float_negate y, y; - __asm float_add x, x, y; + __asm vec4_add x.x, x.x, y.x; __asm float_to_int c, x; return c; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 297cf36a23..219c0de10e 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -15,696 +15,699 @@ 0,1,8,18,102,0,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,50,0,18,102,0,0,18,102,0,0,0,0,0,1, 0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, 120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118, -101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,8,58,118, -101,99,51,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0, -0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18, -120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0, -0,31,0,0,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,52,0,18,102,0,0,18,102,0,0,18,102,0,0,18, -102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0, -0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,6,1,1,1,0,5,105,0,0, -0,1,8,58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118, -101,99,50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99, -50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18, -105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105, -110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116, -0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0, -18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0, -18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0, -0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1, -1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5, -105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0, -0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58, -98,118,101,99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98, -118,101,99,51,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118, -101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118, -101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101, -99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0, -18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9, -1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97, -116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0, -17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48, -0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95, -102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0, -1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0, -9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18, -102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0, -15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97, -116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12, -114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0, -0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, -110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100, -100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0, -0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1, -121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0, -0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0, -18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8, -18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1, -99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95, -116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105, -112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, -18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, -0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18, -97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97, -116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116, -111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0, -0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, -59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118, -0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0, -6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18, -118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, -49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120, -0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59, -122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, -59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117, -0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18, -118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0, -18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51, -0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59, -122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101, -99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, -59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8, -118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, -118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0, -18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, -0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59, -122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118, -0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, -59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117, -0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0, -18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1, -0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97, -116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, -0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118, -0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120, -0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, -52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0, -59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, -119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12, -117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12, -2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0, -0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0, -1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1, -0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0, -10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1, -0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0, -10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0, -1,1,0,10,117,0,0,0,1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105, -110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, -85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0, -0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110, -118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0, -59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100, -100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59, -120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0, -18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, -115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120, -121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, +102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,102,0,20,0,0,1,0,11,1,1,1,0,5,105,0,0,0, +1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8, +58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,51,0,18,98,0,17,49, +0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99, +52,0,18,102,0,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120, +0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52, +0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0, +48,0,0,31,0,0,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0, +1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1, +1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5, +105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0, +0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8, +58,105,118,101,99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105, +118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58, +105,118,101,99,52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118, +101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50, +0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108, +0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18, +105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0, +0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0, +1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4, +1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1, +1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0, +5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9, +102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0, +13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97, +116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97, +116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0, +17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0, +0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18, +120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0, +0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0, +48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48, +0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0, +0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95, +102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0, +1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0, +12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +114,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2, +0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118, +101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108, +111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97, +0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111, +95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118, +101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108, +111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97, +0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111, +95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0, +0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0, +0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0, +4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111, +95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0, +18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18, +120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18, +118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1, +1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47, +0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8, +58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121, +0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59, +120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118, +0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0, +59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7, +118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, +118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1, +1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48, +0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2, +22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120, +0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0, +8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18, +118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0, +47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8, +2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18, +118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, +49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9, +2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97, +108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, +52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0, +0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112, +108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1, +0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0, +0,18,97,0,0,18,98,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1, +1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0, +10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, +119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11, +117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2, +0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12, +2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101, +99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1, +1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0, +18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9, +97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0, +9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0, +1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120, +0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18, +117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1, +0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0, +0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0, +1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0, +11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121, +122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98, +0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120, +120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118, 101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97, -0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121, -122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122, -0,0,18,105,110,118,66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18, -117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97, -0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86, -97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118, -0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120, -120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120, -120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118, -85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120, -120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, -18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, -98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, -18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, -98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, -18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, -98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0, -18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18, -98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, -18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, -98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, -18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, -98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, -18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, -98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0, -18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18, -98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, -18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, -98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, -18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, -98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, -18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, -98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0, -18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18, -98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116, -95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97, -116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18, -120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0, -54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, -59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8, -58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118, -0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101, -99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, -121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12, -118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118, -0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20, -0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0, -15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, -18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, -0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, -97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, -1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, -97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, -54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, -5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, -0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, -117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, -117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, -0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, -0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, -1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, -18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, -0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, -1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0, -0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0, -59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0, -0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1, -9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1, -1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, -11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118, -0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0, -18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100, -100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, -12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9, -18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, -5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6, -118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0, -0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, -0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0, -0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97, -0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0, -59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0, -0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0, -24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18, -118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1, -0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1, -9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0, -9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10, -118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0, -0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0, -0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, +18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117, +0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, +59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0, +0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117, +0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11, +2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118, +66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12, +2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0, +59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, +52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120, +120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0, +0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22, +1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, +59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0, +12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, +114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1, +0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0, +0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2, +27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0, +0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, +54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, +59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2, +27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1, +0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52, +95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13, +109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0, +57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, +51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0, +1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48, +18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0, +0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, +0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18, +97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0, +0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5, +97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0, +58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20, +0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118, +0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0, +2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0, +0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0, +1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0, +18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0, +1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0, +0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0, +59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97, +0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0, +0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18, +119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1, +9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3, +1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121, +0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18, +117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, +11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, +0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0, +18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120, +0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0, +0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0, +18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0, +1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0, +2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117, +0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9, +18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18, +118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5, +97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7, +118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18, +118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7, +118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18, +118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8, +118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120, +120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0, +1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, +97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0, +18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0, +59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0, +2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120, +120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1, +0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0, +0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18, +97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0, +59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1, +0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18, +118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, +0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, 116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0, -2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118, -0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, -0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118, -0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105, -110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120, -121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0, -1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, -120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59, -120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26, -1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, -8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47, -20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109, -82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109, -82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, -48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, -100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, -49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0, -0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1, -1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1, -109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48, -0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49, -0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109, -82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18, -109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121, -0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119, -50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16, -10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, -0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, -18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0, -18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, -0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1, +1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2, +21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, +0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0, -15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1, -1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0, -12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119, -51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119, -48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16, -10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9, -18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, -121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109, -82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18, -109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122, -0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119, -51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10, -49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18, -109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0, -18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2, +26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0, +0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, +9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, +120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, +59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, +111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109, +0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, +0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0, 20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, 49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, 100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, 97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111, -119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122, -0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82, -111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, -119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51, -0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26, -1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110, -0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49, -0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13, -109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, -20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0, -13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13, -2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14, -109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0, -14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97, -0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0, -16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0, -57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0, -1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0, -15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, +100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0, +0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, +10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, +47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51, +0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0, +1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111, +119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0, +16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, +9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, +120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, +59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, +111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, +20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50, +0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109, +82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18, +109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, +0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49, +0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58, +100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, +100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111, +119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119, +0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1, +0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, +109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0, +13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, 57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2, -27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0, -15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0, -0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, -110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, -10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, -48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114, +46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1, +0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0, +13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9, +97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, +48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0, +14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, +110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2, +22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49, +20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9, +97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, +48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1, +1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, +0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, +21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111, +116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, +111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0, +0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, +20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0, +16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0, +14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, +109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, +0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, +111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0, +0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8, +48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59, +122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, +20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0, +16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50, +0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59, +122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0, +18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, +118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, +0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114, 101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0, -10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0, -59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, -0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, -0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, -114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11, -2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9, -18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49, -0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59, -120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0, -16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50, -0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18, -95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0, -1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48, -0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16, -10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109, -0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0, -18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2, -0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0, -16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48, -0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59, -120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18, -109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18, -114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0, -57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122, -0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0, -9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10, -49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59, -119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, -101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0, -0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0, -2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0, -0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9, -18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, -1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9, -18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16, -10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1, -0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51, -0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0, -2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18, -97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, -18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, -8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0, -0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, -10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, -16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, -1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, -57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, -0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, -0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, -0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, -49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, -10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, -0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2, -3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12, -118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1, -9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59, -121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18, -118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0, -52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0, -17,49,0,48,0,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,3,2,0,10,1,111,110,101,0,2,58,118,101,99,49, -0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2, -25,1,0,2,11,118,0,0,0,1,3,2,0,11,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48, -0,0,0,17,49,0,48,0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,12, -118,0,0,0,1,3,2,0,12,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49, -0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2, -13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52, -0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9, -18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97, -0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2, -10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1, -9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12, -118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0, -59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0, -1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122, -0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118, -0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57, -51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, -9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18, -109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16, -10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0, -52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97, -0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0, -2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18, -118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0, -1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59, -122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59, -120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25, -1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49, -0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48, -0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0, -0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18, -109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0, -1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0, -0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5, -0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2, -11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18, -118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118, -0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, -24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, -0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, -118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, -60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, -1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, -108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, -1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, -0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, -18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, -18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, -0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, -0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, -1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, -4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, -32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, -39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, -105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, -114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, +114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0, +20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1, +114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59, +120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, +114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, +57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59, +122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, +20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, +114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0, +0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, +118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0, +0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, +1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, +0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, +0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, +0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, +0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, +10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, +1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, +18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, +57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, +0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, +50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, +10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0, +13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, +0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, +118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0, +2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7, +118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, +25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, +9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2, +25,1,0,2,10,118,0,0,0,1,3,2,0,10,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48, +0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,3,2,0, +11,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,9, +18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,3,2,0,12,1,111,110, +101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,0,0, +0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8, +48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0, +0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18, +109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2, +24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59, +120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9, +18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59, +120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24, +1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0, +0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2, +8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118, +0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49, +0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, +51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, +9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9, +2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0, +5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1, +0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59, +121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120, +0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0, +0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, +118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18, +118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58, +105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0, +8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59, +121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0, +5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14, +2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16, +10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8, +58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, +61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2, +18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0, +2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118, +101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0, +5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, +0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0, +18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118, +0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1, +0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0, +59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118, +101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0, +60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, +116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0, +1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18, +109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15, +1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, +0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, +97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9, +98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97, +0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0, +0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0, +1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0, +0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101, +0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0, +1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108, +111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0, +1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, +116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0, +1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116, +0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110, 116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, 0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, 58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, -57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112, +114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4, +105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 063f3f7fc49e1fd5cf99cffd241e16af5e2d1823 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 11 Jan 2007 11:21:38 -0700 Subject: disable some code that'll eventually go away --- src/mesa/shader/slang/slang_assemble.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 05574d0e56..c318a0b79b 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -1329,8 +1329,10 @@ _slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, A->ref = slang_ref_forbid; break; case slang_oper_literal_float: +#if 0 if (ref == slang_ref_force) RETURN_NIL(); +#endif if (!PLIT(A->file, slang_asm_float_push, op->literal[0])) RETURN_OUT_OF_MEMORY(); A->ref = slang_ref_forbid; -- cgit v1.2.3 From 95a441112efbe14407f53d035e368b9632d06f06 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 11 Jan 2007 11:22:26 -0700 Subject: Fix a problem with inlined "return" statements. Make some attempt to free temporaries. --- src/mesa/shader/slang/slang_codegen.c | 165 +++++++++++++++++++++++-- src/mesa/shader/slang/slang_compile.c | 2 + src/mesa/shader/slang/slang_compile_variable.c | 3 + src/mesa/shader/slang/slang_emit.c | 16 +-- src/mesa/shader/slang/slang_emit.h | 4 + src/mesa/shader/slang/slang_error.c | 1 + 6 files changed, 174 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 9f21573415..46a5ecd5d5 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -285,12 +285,16 @@ slang_allocate_storage(slang_gen_context *gc, slang_ir_node *n, /* variable declaration */ assert(n->Var); assert(!is_sampler_type(&n->Var->type)); + printf("Alloc storage for %p %s:\n", (void*) n->Var, (char*) n->Var->a_name); + /* assert(n->Store->Index < 0); - + */ n->Store->File = PROGRAM_TEMPORARY; n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); assert(n->Store->Size > 0); + if (n->Store->Index < 0) n->Store->Index = _slang_alloc_temporary(gc, n->Store->Size); + printf(" Location = %d\n", n->Store->Index); /* printf("alloc var %s storage at %d (size %d)\n", (char *) n->Var->a_name, @@ -302,7 +306,11 @@ slang_allocate_storage(slang_gen_context *gc, slang_ir_node *n, return; } - assert(n->Store->File != PROGRAM_UNDEFINED); + if (n->Store->File == PROGRAM_UNDEFINED) { + printf("*** Var %s size %d\n", (char*) n->Var->a_name, n->Store->Size); + + assert(n->Store->File != PROGRAM_UNDEFINED); + } if (n->Store->Index < 0) { /* determine storage location for this var */ @@ -479,6 +487,7 @@ typedef struct static slang_asm_info AsmInfo[] = { /* vec4 binary op */ { "vec4_add", IR_ADD, 1, 2 }, + { "vec4_subtract", IR_SUB, 1, 2 }, { "vec4_multiply", IR_MUL, 1, 2 }, { "vec4_dot", IR_DOT4, 1, 2 }, { "vec3_dot", IR_DOT3, 1, 2 }, @@ -497,7 +506,6 @@ static slang_asm_info AsmInfo[] = { { "vec4_ddy", IR_DDY, 1, 1 }, /* float binary op */ { "float_add", IR_ADD, 1, 2 }, - { "float_subtract", IR_SUB, 1, 2 }, { "float_multiply", IR_MUL, 1, 2 }, { "float_divide", IR_DIV, 1, 2 }, { "float_power", IR_POW, 1, 2 }, @@ -525,6 +533,54 @@ static slang_asm_info AsmInfo[] = { }; +#if 000 /* prototype for future symbol table scheme */ + +#define MAX_DEPTH 100 +static slang_variable_scope *Stack[MAX_DEPTH]; +static int CurDepth; + +static void +_slang_push_scope(slang_variable_scope *scope) +{ + Stack[CurDepth++] = scope; + assert(CurDepth < MAX_DEPTH); +} + +static void +_slang_pop_scope(void) +{ + CurDepth--; + assert(CurDepth >= 0); +} + +static slang_variable_scope * +_slang_current_scope(void) +{ + if (CurDepth > 0) + return Stack[CurDepth - 1]; + else + return NULL; +} + +static slang_variable * +_slang_find_variable(slang_atom name) +{ + int i; + for (i = CurDepth - 1; i >= 0; i--) { + int j; + for (j = 0; j < Stack[i]->num_variables; j++) { + if (Stack[i]->variables[j].a_name == name) { + return Stack[i]->variables + j; + } + } + } + return NULL; +} + +#endif + + + /** * Recursively free an IR tree. */ @@ -767,6 +823,9 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, v = _slang_locate_variable(oper->locals, id, GL_TRUE); if (!v) { printf("var %s not found!\n", (char *) oper->a_id); + _slang_print_var_scope(oper->locals, 6); + + abort(); break; } @@ -776,7 +835,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, /* OK, replace this slang_oper_identifier with a new expr */ assert(substNew[i]->type == slang_oper_identifier || substNew[i]->type == slang_oper_literal_float); -#if 0 /* DEBUG only */ +#if 1 /* DEBUG only */ if (substNew[i]->type == slang_oper_identifier) { assert(substNew[i]->var); assert(substNew[i]->var->a_name); @@ -795,13 +854,46 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, } } break; -#if 0 /* XXX rely on default case below */ +#if 1 /* XXX rely on default case below */ case slang_oper_return: /* do return replacement here too */ assert(oper->num_children == 0 || oper->num_children == 1); if (oper->num_children == 1) { - slang_substitute(A, &oper->children[0], + /* replace: + * return expr; + * with: + * __retVal = expr; + * return; + * then do substitutions on the assignment. + */ + slang_operation *blockOper, *assignOper, *returnOper; + blockOper = slang_operation_new(1); + blockOper->type = slang_oper_block_no_new_scope; + blockOper->num_children = 2; + blockOper->children = slang_operation_new(2); + assignOper = blockOper->children + 0; + returnOper = blockOper->children + 1; + + assignOper->type = slang_oper_assign; + assignOper->num_children = 2; + assignOper->children = slang_operation_new(2); + assignOper->children[0].type = slang_oper_identifier; + assignOper->children[0].a_id = slang_atom_pool_atom(A->atoms, "__retVal"); + assignOper->children[0].locals->outer_scope = oper->locals; + assignOper->locals = oper->locals; + slang_operation_copy(&assignOper->children[1], + &oper->children[0]); + + returnOper->type = slang_oper_return; + assert(returnOper->num_children == 0); + + /* do substitutions on the "__retVal = expr" sub-tree */ + slang_substitute(A, assignOper, substCount, substOld, substNew, GL_FALSE); + + /* install new code */ + slang_operation_copy(oper, blockOper); + slang_operation_destruct(blockOper); } break; #endif @@ -936,11 +1028,11 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, substCount = 0; for (i = 0; i < totalArgs; i++) { slang_variable *p = &fun->parameters->variables[i]; - /* + printf("Param %d: %s %s \n", i, slang_type_qual_string(p->type.qualifier), (char *) p->a_name); - */ + if (p->type.qualifier == slang_qual_inout || p->type.qualifier == slang_qual_out) { /* an output param */ @@ -1072,6 +1164,9 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, (char *) fun->header.a_name, fun->parameters->num_variables, numArgs); + /* + slang_print_tree(top, 0); + */ return top; } @@ -1123,6 +1218,8 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, /* assemble what we just made XXX here??? */ n = _slang_gen_operation(A, oper); + CurFunction->end_label = NULL; + CurFunction = prevFunc; return n; @@ -1187,7 +1284,11 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, assert(oper->type == slang_oper_asm); info = slang_find_asm_info((char *) oper->a_id); - assert(info); + if (!info) { + _mesa_problem(NULL, "undefined __asm function %s\n", + (char *) oper->a_id); + assert(info); + } assert(info->NumParams <= 2); if (info->NumParams == oper->num_children) { @@ -1258,6 +1359,21 @@ _slang_gen_cond(slang_ir_node *n) } +static void print_funcs(struct slang_function_scope_ *scope) +{ + int i; + for (i = 0; i < scope->num_functions; i++) { + slang_function *f = &scope->functions[i]; + printf("func %s\n", (char *) f->header.a_name); + if (strcmp("vec3", (char*) f->header.a_name) == 0) + printf("VEC3!\n"); + + } + if (scope->outer_scope) + print_funcs(scope->outer_scope); +} + + /** * Assemble a function call, given a particular function name. * \param name the function's name (operators like '*' are possible). @@ -1278,6 +1394,11 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, fun = _slang_locate_function(A->space.funcs, atom, params, param_count, &A->space, A->atoms); if (!fun) { + print_funcs(A->space.funcs); + + fun = _slang_locate_function(A->space.funcs, atom, params, param_count, + &A->space, A->atoms); + RETURN_ERROR2("Undefined function", name, 0); } @@ -1569,6 +1690,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); */ rhs = _slang_gen_operation(A, &oper->children[0]); + assert(rhs); init = new_node(IR_MOVE, var, rhs); /*assert(rhs->Opcode != IR_SEQ);*/ n = new_seq(varDecl, init); @@ -1581,6 +1703,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); */ rhs = _slang_gen_operation(A, v->initializer); + assert(rhs); init = new_node(IR_MOVE, var, rhs); /* assert(rhs->Opcode != IR_SEQ); @@ -1641,6 +1764,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) c0 = _slang_gen_operation(A, lhs); c1 = _slang_gen_operation(A, &oper->children[1]); + assert(c1); n = new_node(IR_MOVE, c0, c1); /* assert(c1->Opcode != IR_SEQ); @@ -1777,6 +1901,26 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return NULL; /* error must have occured */ tree = tree ? new_seq(tree, n) : n; } + + if (oper->locals->num_variables > 0) { + int i; + /* + printf("\n****** Deallocate vars in scope!\n"); + */ + for (i = 0; i < oper->locals->num_variables; i++) { + slang_variable *v = oper->locals->variables + i; + if (v->aux) { + slang_ir_storage *store = (slang_ir_storage *) v->aux; + /* + printf(" Deallocate var %s\n", (char*) v->a_name); + */ + assert(store->File == PROGRAM_TEMPORARY); + assert(store->Index >= 0); + _slang_free_temporary(A->codegen, store->Index, store->Size); + } + } + } + return tree; } break; @@ -2135,6 +2279,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, slang_simplify(var->initializer, &A->space, A->atoms); rhs = _slang_gen_operation(A, var->initializer); + assert(rhs); init = new_node(IR_MOVE, lhs, rhs); n = new_seq(n, init); } @@ -2213,7 +2358,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) printf("************* New AST for %s *****\n", (char*)fun->header.a_name); slang_print_function(fun, 1); #endif -#if 1 +#if 0 printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); printf("************* End codegen function ************\n\n"); diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index bb1da27152..9a77c5a3d6 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1622,8 +1622,10 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) return GL_FALSE; /* execute the expression */ +#if 0 if (!_slang_execute2(A->file, &mach)) return GL_FALSE; +#endif /* restore the old assembly */ if (!slang_assembly_file_restore_point_load(A->file, &point)) diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index f9f02066a3..046db2cefc 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -364,6 +364,9 @@ build_quant(slang_export_data_quant * q, const slang_variable * var) q->size = var->size; if (spec->type == slang_spec_array) { q->array_len = var->array_len; +#if 1 + if (var->array_len > 0) +#endif q->size /= var->array_len; spec = spec->_array; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 909948968a..2670134025 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -285,6 +285,7 @@ _slang_alloc_temporary(slang_gen_context *gc, GLint size) const GLuint sz4 = (size + 3) / 4; GLuint i, j; ASSERT(size > 0); /* number of floats */ + for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { GLuint found = 0; for (j = 0; j < sz4; j++) { @@ -314,8 +315,8 @@ is_temporary(const slang_gen_context *gc, const slang_ir_storage *st) } -static void -free_temporary(slang_gen_context *gc, GLuint r, GLint size) +void +_slang_free_temporary(slang_gen_context *gc, GLuint r, GLint size) { const GLuint sz4 = (size + 3) / 4; GLuint i; @@ -337,6 +338,7 @@ slang_alloc_temp_storage(slang_gen_context *gc, slang_ir_node *n, GLint size) assert(!n->Var); assert(!n->Store); assert(size > 0); + printf("Allocate binop temp:\n"); indx = _slang_alloc_temporary(gc, size); n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, indx, size); } @@ -634,8 +636,8 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) * Just modify the RHS to put its result into the dest of this * MOVE operation. Then, this MOVE is a no-op. */ - free_temporary(gc, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); + _slang_free_temporary(gc, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); @@ -672,8 +674,8 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) } /* XXX is this test correct? */ if (n->Children[1]->Store->File == PROGRAM_TEMPORARY) { - free_temporary(gc, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); + _slang_free_temporary(gc, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); } /*inst->Comment = _mesa_strdup("IR_MOVE");*/ n->Store = n->Children[0]->Store; /*XXX new */ @@ -741,7 +743,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, n->Children[0]->Swizzle); - free_temporary(gc, n->Store->Index, n->Store->Size); + _slang_free_temporary(gc, n->Store->Index, n->Store->Size); return inst; /* XXX or null? */ } } diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index cd3352604f..73ae0827c0 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -51,6 +51,10 @@ _slang_clone_ir_storage(slang_ir_storage *store); extern GLint _slang_alloc_temporary(slang_gen_context *gc, GLint size); +extern void +_slang_free_temporary(slang_gen_context *gc, GLuint r, GLint size); + + extern GLboolean _slang_emit_code(slang_ir_node *n, slang_gen_context *gc, struct gl_program *prog, GLboolean withEnd); diff --git a/src/mesa/shader/slang/slang_error.c b/src/mesa/shader/slang/slang_error.c index 2767163178..bfa8e80a05 100644 --- a/src/mesa/shader/slang/slang_error.c +++ b/src/mesa/shader/slang/slang_error.c @@ -55,6 +55,7 @@ _slang_record_error(const char *msg1, const char *msg2, msg1, msg2, pos, file, line); #endif } + abort(); } -- cgit v1.2.3 From 97c7937c65ddcab2437e6b201d24bf0503a01f1b Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 13 Jan 2007 14:46:12 -0700 Subject: added another vec4 constructor, updated += operator --- src/mesa/shader/slang/library/slang_core.gc | 10 +- src/mesa/shader/slang/library/slang_core_gc.h | 966 +++++++++++++------------- 2 files changed, 493 insertions(+), 483 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 31a567fea5..75f54a8cee 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -209,6 +209,14 @@ vec4 __constructor (const bool b) { return vec4 (b ? 1.0 : 0.0); } +vec4 __constructor(const vec3 v3, const float f) +{ + __retVal.xyz = v3; + __retVal.w = f; +} + + + ivec2 __constructor (const int i) { return ivec2 (i, i); } @@ -1035,7 +1043,7 @@ void __operator /= (inout ivec4 v, const ivec4 u) { void __operator += (inout float a, const float b) { - __asm vec4_add a.x, a, b; + __asm vec4_add a.x, a.x, b; } void __operator -= (inout float a, const float b) diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 219c0de10e..4a7a58499f 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -25,493 +25,495 @@ 52,0,18,102,0,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120, 0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52, 0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0, -48,0,0,31,0,0,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0, -1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1, -1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5, -105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0, -0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8, -58,105,118,101,99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105, -118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58, -105,118,101,99,52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118, -101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50, -0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108, -0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18, -105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0, -0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0, -1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4, -1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1, -1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0, -5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9, -102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0, -13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97, -116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97, -116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0, -0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18, -120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0, -0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0, -48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48, -0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95, -102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0, -1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0, -12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -114,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2, -0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118, -101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108, -111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97, -0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111, -95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118, -101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108, -111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97, -0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111, -95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0, -0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0, -0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0, -4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111, -95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0, -18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18, -120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18, -118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1, -1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47, -0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8, -58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121, -0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59, -120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118, -0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0, -59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7, -118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18, -118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1, -1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48, -0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2, -22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120, -0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0, -8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18, -118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0, -47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8, -2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18, -118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0, -49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9, -2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0, -0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1, -0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0, -0,18,97,0,0,18,98,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1, -1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0, -10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, -119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2, -0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12, -2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1, -1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0, -18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9, -97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0, -9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, -118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4, -118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, -18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0, -1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120, -0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18, -117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1, -0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0, -0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0, -1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0, -11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121, -122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, -97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98, -0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120, -120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117, -0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117, -0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11, -2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118, -66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12, -2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0, -59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120, -120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0, -0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22, -1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0, -12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, -114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1, -0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0, -0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2, -27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0, -0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, -54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, -59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2, -27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116, -101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1, -0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52, -95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0, -1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48, -18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0, -0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, -0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18, -97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0, -0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5, -97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0, -58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20, -0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118, -0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0, -2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0, -0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0, -1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0, -18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0, -1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0, -0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0, -59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97, -0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0, -0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18, -119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1, -9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3, -1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121, -0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18, -117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, -11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, -0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0, -18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120, -0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0, -0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0, -18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0, -1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0, -2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117, -0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9, -18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, -18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18, -118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5, -97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7, -118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18, -118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7, -118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18, -118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8, -118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120, -120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0, -1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, -97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, -18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0, -18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0, -59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0, -2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120, -120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1, -0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0, -0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18, -97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0, -59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1, -0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18, -118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, -0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1, -1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +48,0,0,31,0,0,0,0,1,0,12,1,1,1,0,11,118,51,0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0, +0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9, +102,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0, +0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58, +105,118,101,99,51,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105, +118,101,99,51,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101, +99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0, +18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99, +52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58, +105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18, +98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0, +0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0, +0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1, +1,0,9,102,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5, +105,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0, +0,0,1,8,58,98,118,101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0, +0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1, +8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58, +109,97,116,50,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105, +0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0, +0,8,58,109,97,116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0, +17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102, +0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0, +0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116, +95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1, +0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1, +0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48, +0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0, +48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, +0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8, +58,109,97,116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1, +1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1, +1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0, +0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97, +100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95, +116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98, +0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, +97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, +0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95, +97,100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95, +116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98, +0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, +97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, +0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0, +4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1, +1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116, +95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111, +97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18, +120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18, +99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0, +18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1, +1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59, +121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1, +0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, +59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7, +117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18, +117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1, +0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121, +0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0, +1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59, +121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118, +0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, +59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8, +118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18, +118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0, +18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, +0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, +122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118, +0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0, +59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117, +0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18, +118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0, +18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97, +0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1, +0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95, +114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4, +102,108,111,97,116,95,100,105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98, +0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1, +0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108, +0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2, +26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0, +0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, +0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, +12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1, +3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117, +0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59, +120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18, +98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117, +98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18, +117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0, +18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0, +0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, +121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,105, +110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59, +120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0, +0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1, +0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, +66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1, +1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11, +118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0, +1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1, +1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0, +1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120, +121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0, +18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110, +118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0, +0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1, +1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118,66,0,59,120,120,120,0,0, +0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, +115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0, +18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, +0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, +12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1, +0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, +59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0, +0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,119,0,0,18,117, +0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0, +0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6, +117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0, +5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0, +6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1, +0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1, +0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1, +1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1, +1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0, +1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0, +1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0, +0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0, +0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118, +0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97, +0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5, +97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5, +97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0, +18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4, +102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1, +0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7, +2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18, +118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120, +0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0, +0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0, +0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103, +97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, +50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0, +1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111, +116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0, +18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99, +51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116, +0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110, +116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0, +2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5, +98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0, +58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1, +0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0, +18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117, +0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1, +0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, +59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120, +0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0, +59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120, +0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0, +0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0, +0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118, +0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8, +118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0, +22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59, +119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0, +1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1, +0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0, +0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1, +0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0, +0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18, +118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2, +10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18, +117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, +59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117, +0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0, +0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, +118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117, +0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0, +9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1, +1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117, +0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, +99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4, +1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121, +0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0, +59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18, +118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118, +0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0, +0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0, +0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0, +59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0, +22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0, +1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59, +122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0, +9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1, +0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0, +0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, +0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0, +0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120, +120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0, +9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0, +0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120, +121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120, +0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0, +1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0, +0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1, +4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0, +0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, +0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0, +1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0, +0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9, +1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121, +122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118, +0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18, +97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2, +4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13, +109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109, +82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18, +109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, +20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, +119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, +0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0, +0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20, +0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82, +111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57, +59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82, +111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50, +0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49, +0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, +0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0, +18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, +0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0, +18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0, +14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2, -21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, -0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, -59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, +0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82, +111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59, +120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57, +59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82, +111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49, +0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48, +0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109, +82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18, +109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0, +20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51, +0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10, +51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, +109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, 48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, 95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2, -26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0, -0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, -16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, -9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, -120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, -59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, -111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109, -0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, -0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, -49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, -100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, -50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, -100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0, -0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, -47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51, -0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0, -1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111, -119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0, -16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, -9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, -120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, -59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, -111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, -20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50, -0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109, -82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18, -109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, -0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49, -0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58, -100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, -50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, -100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111, -119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119, -0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1, -0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0, -13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1, -0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0, -13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0, -14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, -110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116, +0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18, +110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111, +116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0, +18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100, +111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0, +0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100, +111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0, +1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110, +0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, +51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0, +1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, +0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1, +0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, +48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1, +0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1, +1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0, +0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, +10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97, +0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, +0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14, +2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0, +49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, +110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16, +10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, +10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, 1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, 114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2, -22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49, -20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, -110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9, -97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1, -1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, -0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, +116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9, +98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0, +1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0, +15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, 21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111, 116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, 111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0, -- cgit v1.2.3 From 5daa99d2a40fa12d51043c4e326bf62f66ef727d Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 13 Jan 2007 14:47:48 -0700 Subject: slang_variable_scope now stores array of pointers to slang_variables. --- src/mesa/shader/slang/slang_assemble.c | 18 ++++---- src/mesa/shader/slang/slang_assemble.h | 9 +--- src/mesa/shader/slang/slang_compile_function.c | 4 +- src/mesa/shader/slang/slang_compile_struct.c | 4 +- src/mesa/shader/slang/slang_compile_variable.c | 61 +++++++++++++++++++------- src/mesa/shader/slang/slang_compile_variable.h | 6 +-- 6 files changed, 63 insertions(+), 39 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index c318a0b79b..a9d2baedb9 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -218,7 +218,7 @@ sizeof_variables(slang_assemble_ctx * A, slang_variable_scope * vars, GLuint i; for (i = start; i < stop; i++) - if (!sizeof_variable2(A, &vars->variables[i], size)) + if (!sizeof_variable2(A, vars->variables[i], size)) return GL_FALSE; return GL_TRUE; } @@ -270,7 +270,7 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, return NULL; } if (!slang_type_specifier_equal(&ti.spec, - &f->parameters->variables[j/* + haveRetValue*/].type.specifier)) { + &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { slang_assembly_typeinfo_destruct(&ti); break; } @@ -278,8 +278,8 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ if (!ti.can_be_referenced && - (f->parameters->variables[j/* + haveRetValue*/].type.qualifier == slang_qual_out || - f->parameters->variables[j/* + haveRetValue*/].type.qualifier == slang_qual_inout)) + (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out || + f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout)) break; } if (j == num_args) @@ -599,8 +599,8 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, /* push the actual parameters on the stack */ for (i = 0; i < param_count; i++) { - if (fun->parameters->variables[i /*+ haveRetValue*/].type.qualifier == slang_qual_inout || - fun->parameters->variables[i /*+ haveRetValue*/].type.qualifier == slang_qual_out) { + if (fun->parameters->variables[i /*+ haveRetValue*/]->type.qualifier == slang_qual_inout || + fun->parameters->variables[i /*+ haveRetValue*/]->type.qualifier == slang_qual_out) { if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) return GL_FALSE; /* TODO: optimize the "out" parameter case */ @@ -644,8 +644,8 @@ _slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, A->swz = p_swz[j]; A->ref = p_ref[j]; - if (fun->parameters->variables[j /*+ haveRetValue*/].type.qualifier == slang_qual_inout || - fun->parameters->variables[j/* + haveRetValue*/].type.qualifier == slang_qual_out) { + if (fun->parameters->variables[j /*+ haveRetValue*/]->type.qualifier == slang_qual_inout || + fun->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out) { /* for output parameter copy the contents of the formal parameter * back to the original actual parameter */ @@ -1088,7 +1088,7 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, slang_storage_aggregate agg; GLuint size; - field = &tib->spec._struct->fields->variables[i]; + field = tib->spec._struct->fields->variables[i]; if (!slang_storage_aggregate_construct(&agg)) RETURN_NIL(); if (!_slang_aggregate_variable(&agg, &field->type.specifier, diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 8aafeb012f..e801ea249d 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -28,6 +28,7 @@ #include "imports.h" #include "mtypes.h" #include "slang_utility.h" +#include "slang_vartable.h" #if defined __cplusplus extern "C" { @@ -243,12 +244,6 @@ typedef struct slang_assembly_name_space_ } slang_assembly_name_space; -typedef struct { - GLboolean TempUsed[MAX_PROGRAM_TEMPS]; - GLuint NumSamplers; -} slang_gen_context; - - typedef struct slang_assemble_ctx_ { slang_assembly_file *file; @@ -260,7 +255,7 @@ typedef struct slang_assemble_ctx_ slang_ref_type ref; slang_swizzle swz; struct gl_program *program; - slang_gen_context *codegen; + slang_var_table *vartable; } slang_assemble_ctx; extern struct slang_function_ * diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index 58a453d4c2..3642b12e92 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -196,8 +196,8 @@ slang_function_scope_find(slang_function_scope * funcs, slang_function * fun, continue; for (j = haveRetValue; j < fun->param_count; j++) { if (!slang_type_specifier_equal - (&fun->parameters->variables[j].type.specifier, - &f->parameters->variables[j].type.specifier)) + (&fun->parameters->variables[j]->type.specifier, + &f->parameters->variables[j]->type.specifier)) break; } if (j == fun->param_count) { diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c index 15585a62af..5033a6cb10 100644 --- a/src/mesa/shader/slang/slang_compile_struct.c +++ b/src/mesa/shader/slang/slang_compile_struct.c @@ -153,8 +153,8 @@ int slang_struct_equal (const slang_struct *x, const slang_struct *y) return 0; for (i = 0; i < x->fields->num_variables; i++) { - slang_variable *varx = &x->fields->variables[i]; - slang_variable *vary = &y->fields->variables[i]; + slang_variable *varx = x->fields->variables[i]; + slang_variable *vary = y->fields->variables[i]; if (varx->a_name != vary->a_name) return 0; diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 046db2cefc..b19615b085 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -123,6 +123,29 @@ slang_fully_specified_type_copy(slang_fully_specified_type * x, return 1; } + +static slang_variable * +slang_variable_new(void) +{ + slang_variable *v = (slang_variable *) malloc(sizeof(slang_variable)); + if (v) { + if (!slang_variable_construct(v)) { + free(v); + v = NULL; + } + } + return v; +} + + +static void +slang_variable_delete(slang_variable * var) +{ + slang_variable_destruct(var); + free(var); +} + + /* * slang_variable_scope */ @@ -152,8 +175,10 @@ slang_variable_scope_destruct(slang_variable_scope * scope) if (!scope) return; - for (i = 0; i < scope->num_variables; i++) - slang_variable_destruct(scope->variables + i); + for (i = 0; i < scope->num_variables; i++) { + if (scope->variables[i]) + slang_variable_delete(scope->variables[i]); + } slang_alloc_free(scope->variables); /* do not free scope->outer_scope */ } @@ -166,21 +191,22 @@ slang_variable_scope_copy(slang_variable_scope * x, unsigned int i; _slang_variable_scope_ctr(&z); - z.variables = (slang_variable *) - slang_alloc_malloc(y->num_variables * sizeof(slang_variable)); + z.variables = (slang_variable **) + _mesa_calloc(y->num_variables * sizeof(slang_variable *)); if (z.variables == NULL) { slang_variable_scope_destruct(&z); return 0; } for (z.num_variables = 0; z.num_variables < y->num_variables; z.num_variables++) { - if (!slang_variable_construct(&z.variables[z.num_variables])) { + z.variables[z.num_variables] = slang_variable_new(); + if (!z.variables[z.num_variables]) { slang_variable_scope_destruct(&z); return 0; } } for (i = 0; i < z.num_variables; i++) { - if (!slang_variable_copy(&z.variables[i], &y->variables[i])) { + if (!slang_variable_copy(z.variables[i], y->variables[i])) { slang_variable_scope_destruct(&z); return 0; } @@ -200,19 +226,20 @@ slang_variable * slang_variable_scope_grow(slang_variable_scope *scope) { const int n = scope->num_variables; - scope->variables = (slang_variable *) + scope->variables = (slang_variable **) slang_alloc_realloc(scope->variables, - n * sizeof(slang_variable), - (n + 1) * sizeof(slang_variable)); + n * sizeof(slang_variable *), + (n + 1) * sizeof(slang_variable *)); if (!scope->variables) return NULL; scope->num_variables++; - if (!slang_variable_construct(scope->variables + n)) + scope->variables[n] = slang_variable_new(); + if (!scope->variables[n]) return NULL; - return scope->variables + n; + return scope->variables[n]; } @@ -230,12 +257,13 @@ slang_variable_construct(slang_variable * var) var->address = ~0; var->size = 0; var->global = GL_FALSE; - var->declared = GL_FALSE; + var->isTemp = GL_FALSE; var->used = GL_FALSE; var->aux = NULL; return 1; } + void slang_variable_destruct(slang_variable * var) { @@ -246,6 +274,7 @@ slang_variable_destruct(slang_variable * var) } } + int slang_variable_copy(slang_variable * x, const slang_variable * y) { @@ -291,8 +320,8 @@ _slang_locate_variable(const slang_variable_scope * scope, GLuint i; for (i = 0; i < scope->num_variables; i++) - if (a_name == scope->variables[i].a_name) - return &scope->variables[i]; + if (a_name == scope->variables[i]->a_name) + return scope->variables[i]; if (all && scope->outer_scope != NULL) return _slang_locate_variable(scope->outer_scope, a_name, 1); return NULL; @@ -384,7 +413,7 @@ build_quant(slang_export_data_quant * q, const slang_variable * var) slang_export_data_quant_ctr(&q->structure[i]); for (i = 0; i < q->u.field_count; i++) { if (!build_quant(&q->structure[i], - &spec->_struct->fields->variables[i])) + spec->_struct->fields->variables[i])) return GL_FALSE; } } @@ -400,7 +429,7 @@ _slang_build_export_data_table(slang_export_data_table * tbl, GLuint i; for (i = 0; i < vars->num_variables; i++) { - const slang_variable *var = &vars->variables[i]; + const slang_variable *var = vars->variables[i]; slang_export_data_entry *e; e = slang_export_data_table_add(tbl); diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index d52e2660dc..82800b32b5 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -81,7 +81,7 @@ typedef struct slang_variable_ GLuint size; /**< Variable's size in bytes */ GLboolean global; /**< A global var? */ GLboolean used; /**< Ever referenced by code? */ - GLboolean declared; /**< Declared by slang_variable_decl? */ + GLboolean isTemp; /**< a named temporary (__resultTmp) */ void *aux; /**< Used during code gen */ } slang_variable; @@ -91,7 +91,7 @@ typedef struct slang_variable_ */ typedef struct slang_variable_scope_ { - slang_variable *variables; /**< Array [num_variables] */ + slang_variable **variables; /**< Array [num_variables] of ptrs to vars */ GLuint num_variables; struct slang_variable_scope_ *outer_scope; } slang_variable_scope; @@ -110,7 +110,7 @@ extern int slang_variable_scope_copy(slang_variable_scope *, const slang_variable_scope *); -slang_variable * +extern slang_variable * slang_variable_scope_grow(slang_variable_scope *); extern int -- cgit v1.2.3 From 691ed5e54b0dc305c9a117a6a9804435041a86f0 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 13 Jan 2007 14:49:52 -0700 Subject: Rework code related to temp register allocation, both for user variables and expression temporarires. Much better register utilization now. Lots of other fixes. The OpenGL GLSL "orange book" brick shader demo works now. --- src/mesa/shader/slang/slang_codegen.c | 239 ++++++++++++++------------------- src/mesa/shader/slang/slang_compile.c | 56 +++++--- src/mesa/shader/slang/slang_emit.c | 206 ++++++++++++++-------------- src/mesa/shader/slang/slang_emit.h | 13 +- src/mesa/shader/slang/slang_ir.h | 1 + src/mesa/shader/slang/slang_link2.c | 2 + src/mesa/shader/slang/slang_print.c | 207 ++-------------------------- src/mesa/shader/slang/slang_print.h | 4 - src/mesa/shader/slang/slang_storage.c | 4 +- src/mesa/shader/slang/slang_vartable.c | 202 ++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_vartable.h | 38 ++++++ src/mesa/sources | 1 + 12 files changed, 496 insertions(+), 477 deletions(-) create mode 100644 src/mesa/shader/slang/slang_vartable.c create mode 100644 src/mesa/shader/slang/slang_vartable.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 46a5ecd5d5..aff108dace 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -38,6 +38,7 @@ #include "slang_error.h" #include "slang_simplify.h" #include "slang_emit.h" +#include "slang_vartable.h" #include "slang_ir.h" #include "mtypes.h" #include "program.h" @@ -259,10 +260,10 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) * 4. other? */ static void -slang_allocate_storage(slang_gen_context *gc, slang_ir_node *n, - struct gl_program *prog) +slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) { - assert(gc); + struct gl_program *prog = A->program; + assert(A->vartable); assert(n); assert(n->Opcode == IR_VAR_DECL || n->Opcode == IR_VAR); assert(prog); @@ -285,33 +286,22 @@ slang_allocate_storage(slang_gen_context *gc, slang_ir_node *n, /* variable declaration */ assert(n->Var); assert(!is_sampler_type(&n->Var->type)); - printf("Alloc storage for %p %s:\n", (void*) n->Var, (char*) n->Var->a_name); - /* - assert(n->Store->Index < 0); - */ n->Store->File = PROGRAM_TEMPORARY; n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); assert(n->Store->Size > 0); - if (n->Store->Index < 0) - n->Store->Index = _slang_alloc_temporary(gc, n->Store->Size); - printf(" Location = %d\n", n->Store->Index); - /* - printf("alloc var %s storage at %d (size %d)\n", - (char *) n->Var->a_name, - n->Store->Index, - n->Store->Size); - */ - assert(n->Store->Size > 0); - n->Var->declared = GL_TRUE; return; } +#if 00 if (n->Store->File == PROGRAM_UNDEFINED) { printf("*** Var %s size %d\n", (char*) n->Var->a_name, n->Store->Size); - assert(n->Store->File != PROGRAM_UNDEFINED); } +#endif + /** + ** XXX this all has to be redone + **/ if (n->Store->Index < 0) { /* determine storage location for this var */ @@ -342,7 +332,6 @@ slang_allocate_storage(slang_gen_context *gc, slang_ir_node *n, } else { /* what's this??? */ - abort(); } } } @@ -533,54 +522,6 @@ static slang_asm_info AsmInfo[] = { }; -#if 000 /* prototype for future symbol table scheme */ - -#define MAX_DEPTH 100 -static slang_variable_scope *Stack[MAX_DEPTH]; -static int CurDepth; - -static void -_slang_push_scope(slang_variable_scope *scope) -{ - Stack[CurDepth++] = scope; - assert(CurDepth < MAX_DEPTH); -} - -static void -_slang_pop_scope(void) -{ - CurDepth--; - assert(CurDepth >= 0); -} - -static slang_variable_scope * -_slang_current_scope(void) -{ - if (CurDepth > 0) - return Stack[CurDepth - 1]; - else - return NULL; -} - -static slang_variable * -_slang_find_variable(slang_atom name) -{ - int i; - for (i = CurDepth - 1; i >= 0; i--) { - int j; - for (j = 0; j < Stack[i]->num_variables; j++) { - if (Stack[i]->variables[j].a_name == name) { - return Stack[i]->variables + j; - } - } - } - return NULL; -} - -#endif - - - /** * Recursively free an IR tree. */ @@ -675,15 +616,14 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, printf("VAR NOT FOUND %s\n", (char *) name); assert(v); } - /** - assert(v->declared); - **/ assert(!oper->var || oper->var == v); v->used = GL_TRUE; - oper->var = v; + n->Swizzle = swizzle; n->Var = v; - slang_allocate_storage(A->codegen, n, A->program); + + slang_allocate_storage(A, n); + return n; } @@ -725,7 +665,7 @@ slang_is_writemask(const char *field, GLuint *mask) /** - * Check if the given function is really just a wrapper for an + * Check if the given function is really just a wrapper for a * basic assembly instruction. */ static GLboolean @@ -753,7 +693,7 @@ slang_inline_asm_function(slang_assemble_ctx *A, slang_operation *inlined = slang_operation_new(1); /*assert(oper->type == slang_oper_call); or vec4_add, etc */ - + printf("Inline asm %s\n", (char*) fun->header.a_name); inlined->type = fun->body->children[0].type; inlined->a_id = fun->body->children[0].a_id; inlined->num_children = numArgs; @@ -833,9 +773,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, for (i = 0; i < substCount; i++) { if (v == substOld[i]) { /* OK, replace this slang_oper_identifier with a new expr */ - assert(substNew[i]->type == slang_oper_identifier || - substNew[i]->type == slang_oper_literal_float); -#if 1 /* DEBUG only */ +#if 0 /* DEBUG only */ if (substNew[i]->type == slang_oper_identifier) { assert(substNew[i]->var); assert(substNew[i]->var->a_name); @@ -843,7 +781,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, (char*)v->a_name, (char*) substNew[i]->var->a_name, (void*) oper); } - else + else { printf("Substitute %s with %f in id node %p\n", (char*)v->a_name, substNew[i]->literal[0], (void*) oper); @@ -958,15 +896,15 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, substNew = (slang_operation **) _mesa_calloc(totalArgs * sizeof(slang_operation *)); - printf("\nInline call to %s (total vars=%d nparams=%d)\n", + printf("Inline call to %s (total vars=%d nparams=%d)\n", (char *) fun->header.a_name, fun->parameters->num_variables, numArgs); - if (haveRetValue && !returnOper) { - /* Create comma sequence for inlined code, the left child will be the - * function body and the right child will be a variable (__retVal) - * that will get the return value. + /* Create 3-child comma sequence for inlined code: + * child[0]: declare __resultTmp + * child[1]: inlined function body + * child[2]: __resultTmp */ slang_operation *commaSeq; slang_operation *declOper = NULL; @@ -981,13 +919,13 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, /* allocate the return var */ resultVar = slang_variable_scope_grow(commaSeq->locals); /* - printf("Alloc __resultTemp in scope %p for retval of calling %s\n", + printf("Alloc __resultTmp in scope %p for retval of calling %s\n", (void*)commaSeq->locals, (char *) fun->header.a_name); */ resultVar->a_name = slang_atom_pool_atom(A->atoms, "__resultTmp"); resultVar->type = fun->header.type; /* XXX copy? */ - /*resultVar->type.qualifier = slang_qual_out;*/ + resultVar->isTemp = GL_TRUE; /* child[0] = __resultTmp declaration */ declOper = &commaSeq->children[0]; @@ -1027,12 +965,12 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, */ substCount = 0; for (i = 0; i < totalArgs; i++) { - slang_variable *p = &fun->parameters->variables[i]; - + slang_variable *p = fun->parameters->variables[i]; + /* printf("Param %d: %s %s \n", i, slang_type_qual_string(p->type.qualifier), (char *) p->a_name); - + */ if (p->type.qualifier == slang_qual_inout || p->type.qualifier == slang_qual_out) { /* an output param */ @@ -1042,9 +980,10 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, else arg = returnOper; paramMode[i] = SUBST; - assert(arg->type == slang_oper_identifier - /*||arg->type == slang_oper_variable_decl*/); - slang_resolve_variable(arg); + + if (arg->type == slang_oper_identifier) + slang_resolve_variable(arg); + /* replace parameter 'p' with argument 'arg' */ substOld[substCount] = p; substNew[substCount] = arg; /* will get copied */ @@ -1073,15 +1012,14 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, assert(paramMode[i]); } -#if 00 - printf("ABOUT to inline body %p with checksum %d\n", - (char *) fun->body, slang_checksum_tree(fun->body)); -#endif - /* actual code inlining: */ slang_operation_copy(inlined, fun->body); -#if 000 + /*** XXX review this */ + assert(inlined->type = slang_oper_block_no_new_scope); + inlined->type = slang_oper_block_new_scope; + +#if 0 printf("======================= orig body code ======================\n"); printf("=== params scope = %p\n", (void*) fun->parameters); slang_print_tree(fun->body, 8); @@ -1092,7 +1030,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, /* do parameter substitution in inlined code: */ slang_substitute(A, inlined, substCount, substOld, substNew, GL_FALSE); -#if 000 +#if 0 printf("======================= subst code ==========================\n"); slang_print_tree(inlined, 8); printf("=============================================================\n"); @@ -1104,7 +1042,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, numCopyIn = 0; for (i = 0; i < numArgs; i++) { if (paramMode[i] == COPY_IN) { - slang_variable *p = &fun->parameters->variables[i]; + slang_variable *p = fun->parameters->variables[i]; /* declare parameter 'p' */ slang_operation *decl = slang_operation_insert(&inlined->num_children, &inlined->children, @@ -1138,7 +1076,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, for (i = 0; i < totalArgs; i++) { if (paramMode[i] == COPY_OUT) { - const slang_variable *p = &fun->parameters->variables[i]; + const slang_variable *p = fun->parameters->variables[i]; /* actualCallVar = outParam */ /*if (i > 0 || !haveRetValue)*/ slang_operation *ass = slang_operation_insert(&inlined->num_children, @@ -1215,7 +1153,6 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, printf("\n"); #endif - /* assemble what we just made XXX here??? */ n = _slang_gen_operation(A, oper); CurFunction->end_label = NULL; @@ -1323,7 +1260,6 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, dest_oper = &dest_oper->children[0]; } - assert(dest_oper->type == slang_oper_identifier); n0 = _slang_gen_operation(A, dest_oper); assert(n0->Var); assert(n0->Store); @@ -1676,9 +1612,8 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) return NULL; varDecl->Var = v; - v->declared = GL_TRUE; - slang_allocate_storage(A->codegen, varDecl, A->program); + slang_allocate_storage(A, varDecl); if (oper->num_children > 0) { /* child is initializer */ @@ -1728,7 +1663,9 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) */ slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; slang_ir_node *n = new_var(A, oper, aVar, SWIZZLE_NOOP); + /* assert(oper->var); + */ return n; } @@ -1856,7 +1793,7 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) /* new storage info since we don't want to change the original */ base->Store = _slang_clone_ir_storage(base->Store); if (_slang_type_is_vector(array_ti.spec.type)) { - /* scalar element (float) of a basic vector (vec3) */ + /* scalar element (float) of a basic vector (ex: vec3) */ const GLuint max = _slang_type_dim(array_ti.spec.type); if (index >= max) { RETURN_ERROR("array index out of bounds", 0); @@ -1888,39 +1825,60 @@ static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { switch (oper->type) { - case slang_oper_block_no_new_scope: case slang_oper_block_new_scope: + { + slang_ir_node *n; + + A->vartable = _slang_push_var_table(A->vartable); + + oper->type = slang_oper_block_no_new_scope; /* temp change */ + n = _slang_gen_operation(A, oper); + oper->type = slang_oper_block_new_scope; /* restore */ + + A->vartable = _slang_pop_var_table(A->vartable); + + if (n) + n = new_node(IR_SCOPE, n, NULL); + return n; + } + break; + + case slang_oper_block_no_new_scope: /* list of operations */ assert(oper->num_children > 0); { slang_ir_node *n, *tree = NULL; GLuint i; + for (i = 0; i < oper->num_children; i++) { n = _slang_gen_operation(A, &oper->children[i]); - if (!n) + if (!n) { + _slang_free_ir_tree(tree); return NULL; /* error must have occured */ + } tree = tree ? new_seq(tree, n) : n; } - if (oper->locals->num_variables > 0) { - int i; - /* - printf("\n****** Deallocate vars in scope!\n"); - */ - for (i = 0; i < oper->locals->num_variables; i++) { - slang_variable *v = oper->locals->variables + i; - if (v->aux) { - slang_ir_storage *store = (slang_ir_storage *) v->aux; - /* - printf(" Deallocate var %s\n", (char*) v->a_name); - */ - assert(store->File == PROGRAM_TEMPORARY); - assert(store->Index >= 0); - _slang_free_temporary(A->codegen, store->Index, store->Size); +#if 00 + if (oper->locals->num_variables > 0) { + int i; + /* + printf("\n****** Deallocate vars in scope!\n"); + */ + for (i = 0; i < oper->locals->num_variables; i++) { + slang_variable *v = oper->locals->variables + i; + if (v->aux) { + slang_ir_storage *store = (slang_ir_storage *) v->aux; + /* + printf(" Deallocate var %s\n", (char*) v->a_name); + */ + assert(store->File == PROGRAM_TEMPORARY); + assert(store->Index >= 0); + _slang_free_temp(A->vartable, store->Index, store->Size); + } } } - } - +#endif return tree; } break; @@ -2022,12 +1980,10 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return _slang_gen_assignment(A, oper); case slang_oper_addassign: { + /* XXX this is broken */ slang_ir_node *n; assert(oper->num_children == 2); - n = _slang_gen_function_call_name(A, "+=", oper, NULL); - /* The result of this operation should be stored back into child[0] */ - assert(n->Children[0]->Store); - n->Store = n->Children[0]->Store; + n = _slang_gen_function_call_name(A, "+=", oper, &oper->children[0]); return n; } case slang_oper_subassign: @@ -2171,9 +2127,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, /* We know it's a uniform, but don't allocate storage unless * it's really used. */ - store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); - } if (dbg) printf("UNIFORM "); } @@ -2260,10 +2214,12 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, if (!n) return GL_FALSE; n->Var = var; - var->declared = GL_TRUE; store = _slang_new_ir_storage(PROGRAM_TEMPORARY, index, size); var->aux = store; /* save var's storage info */ - slang_allocate_storage(A->codegen, n, A->program); + + slang_allocate_storage(A, n); + + _slang_add_variable(A->vartable, var); /* IR code for the var's initializer, if present */ if (var->initializer) { @@ -2284,7 +2240,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, n = new_seq(n, init); } - success = _slang_emit_code(n, A->codegen, A->program, GL_FALSE); + success = _slang_emit_code(n, A->vartable, A->program, GL_FALSE); _slang_free_ir_tree(n); } @@ -2328,8 +2284,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) assert(A->program->Parameters ); assert(A->program->Varying); - assert(A->codegen); - /* A->codegen = _slang_new_codegen_context();*/ + assert(A->vartable); /* fold constant expressions, etc. */ slang_simplify(fun->body, &A->space, A->atoms); @@ -2340,8 +2295,16 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) if (!CurFunction->end_label) CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); + /* push new vartable scope */ + A->vartable = _slang_push_var_table(A->vartable); + /* Generate IR tree for the function body code */ n = _slang_gen_operation(A, fun->body); + if (n) + n = new_node(IR_SCOPE, n, NULL); + + /* pop vartable, restore previous */ + A->vartable = _slang_pop_var_table(A->vartable); if (!n) { /* XXX record error */ @@ -2361,11 +2324,13 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) #if 0 printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); +#endif +#if 1 printf("************* End codegen function ************\n\n"); #endif /* Emit program instructions */ - success = _slang_emit_code(n, A->codegen, A->program, GL_TRUE); + success = _slang_emit_code(n, A->vartable, A->program, GL_TRUE); _slang_free_ir_tree(n); /* free codegen context */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 9a77c5a3d6..c459eb29e7 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -39,6 +39,7 @@ #include "slang_storage.h" #include "slang_error.h" #include "slang_emit.h" +#include "slang_vartable.h" #include "slang_print.h" @@ -98,7 +99,9 @@ _slang_code_object_ctr(slang_code_object * self) for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) _slang_code_unit_ctr(&self->builtin[i], self); _slang_code_unit_ctr(&self->unit, self); +#if 01 _slang_assembly_file_ctr(&self->assembly); +#endif slang_machine_ctr(&self->machine); self->varpool.next_addr = 0; slang_atom_pool_construct(&self->atompool); @@ -116,7 +119,9 @@ _slang_code_object_dtr(slang_code_object * self) for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) _slang_code_unit_dtr(&self->builtin[i]); _slang_code_unit_dtr(&self->unit); +#if 01 slang_assembly_file_destruct(&self->assembly); +#endif slang_machine_dtr(&self->machine); slang_atom_pool_destruct(&self->atompool); slang_export_data_table_dtr(&self->expdata); @@ -248,7 +253,7 @@ typedef struct slang_output_ctx_ slang_var_pool *global_pool; slang_machine *machine; struct gl_program *program; - slang_gen_context *codegen; + slang_var_table *vartable; } slang_output_ctx; /* _slang_compile() */ @@ -868,7 +873,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, slang_operation *o = &oper->children[i - first_var]; o->type = slang_oper_variable_decl; o->locals->outer_scope = O->vars; - o->a_id = O->vars->variables[i].a_name; + o->a_id = O->vars->variables[i]->a_name; } } } @@ -879,9 +884,6 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, */ oper->type = slang_oper_asm; oper->a_id = parse_identifier(C); - if (strcmp((char*)oper->a_id, "dot") == 0) { - printf("Assemble dot! **************************\n"); - } if (oper->a_id == SLANG_ATOM_NULL) return 0; while (*C->I != OP_END) { @@ -1547,15 +1549,19 @@ parse_function_definition(slang_parse_ctx * C, slang_output_ctx * O, static GLboolean initialize_global(slang_assemble_ctx * A, slang_variable * var) { +#if 01 slang_assembly_file_restore_point point; +#endif slang_machine mach; slang_assembly_local_info save_local = A->local; slang_operation op_id, op_assign; GLboolean result; +#if 01 /* save the current assembly */ if (!slang_assembly_file_restore_point_save(A->file, &point)) return GL_FALSE; +#endif /* setup the machine */ mach = *A->mach; @@ -1578,13 +1584,13 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) /* put the variable into operation's scope */ op_id.locals->variables = - (slang_variable *) slang_alloc_malloc(sizeof(slang_variable)); + (slang_variable **) slang_alloc_malloc(sizeof(slang_variable *)); if (op_id.locals->variables == NULL) { slang_operation_destruct(&op_id); return GL_FALSE; } op_id.locals->num_variables = 1; - op_id.locals->variables[0] = *var; + op_id.locals->variables[0] = var; /* construct the assignment expression */ if (!slang_operation_construct(&op_assign)) { @@ -1605,8 +1611,12 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) op_assign.children[0] = op_id; op_assign.children[1] = *var->initializer; +#if 0 /* this should go away */ /* insert the actual expression */ result = _slang_assemble_operation(A, &op_assign, slang_ref_forbid); +#else + result = 1; +#endif /* carefully destroy the operations */ op_assign.num_children = 0; @@ -1627,9 +1637,11 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) return GL_FALSE; #endif +#if 01 /* restore the old assembly */ if (!slang_assembly_file_restore_point_load(A->file, &point)) return GL_FALSE; +#endif A->local = save_local; /* now we copy the contents of the initialized variable back to the original machine */ @@ -1732,8 +1744,11 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, A.space.funcs = O->funs; A.space.structs = O->structs; A.space.vars = O->vars; - A.codegen = O->codegen; A.program = O->program; +#if 0 + A.codegen = O->codegen; +#endif + A.vartable = O->vartable; _slang_codegen_global_variable(&A, var, C->type); } @@ -1896,7 +1911,10 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, A.space.structs = O->structs; A.space.vars = O->vars; A.program = O->program; +#if 0 A.codegen = O->codegen; +#endif + A.vartable = O->vartable; _slang_reset_error(); @@ -1906,14 +1924,14 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, (*parsed_func_ret)->param_count); #endif - +#if 0 if (!_slang_assemble_function(&A, *parsed_func_ret)) { /* propogate the error message back through the info log */ C->L->text = _mesa_strdup(_slang_error_text()); C->L->dont_free_text = GL_FALSE; return GL_FALSE; } - +#endif #if 0 printf("**************************************\n"); @@ -1961,6 +1979,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, struct gl_program *program) { slang_output_ctx o; + GLboolean success; /* setup output context */ o.funs = &unit->funs; @@ -1970,7 +1989,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, o.global_pool = &unit->object->varpool; o.machine = &unit->object->machine; o.program = program; - o.codegen = _slang_new_codegen_context(); + o.vartable = _slang_push_var_table(NULL); /* parse individual functions and declarations */ while (*C->I != EXTERNAL_NULL) { @@ -1978,20 +1997,25 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, case EXTERNAL_FUNCTION_DEFINITION: { slang_function *func; - - if (!parse_function(C, &o, 1, &func)) - return GL_FALSE; + success = parse_function(C, &o, 1, &func); } break; case EXTERNAL_DECLARATION: - if (!parse_declaration(C, &o)) - return GL_FALSE; + success = parse_declaration(C, &o); break; default: + success = GL_FALSE; + } + + if (!success) { + /* xxx free codegen */ + _slang_pop_var_table(o.vartable); return GL_FALSE; } } C->I++; + + _slang_pop_var_table(o.vartable); return GL_TRUE; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 2670134025..81f8565502 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -34,6 +34,7 @@ #include "program.h" #include "prog_instruction.h" #include "prog_parameter.h" +#include "prog_print.h" #include "slang_emit.h" @@ -83,6 +84,7 @@ static slang_ir_info IrInfo[] = { { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, /* other */ { IR_SEQ, "IR_SEQ", 0, 0, 0 }, + { IR_SCOPE, "IR_SCOPE", 0, 0, 0 }, { IR_LABEL, "IR_LABEL", 0, 0, 0 }, { IR_JUMP, "IR_JUMP", 0, 0, 0 }, { IR_CJUMP, "IR_CJUMP", 0, 0, 0 }, @@ -227,6 +229,11 @@ slang_print_ir(const slang_ir_node *n, int indent) slang_print_ir(n->Children[0], indent + IND); slang_print_ir(n->Children[1], indent + IND); break; + case IR_SCOPE: + printf("NEW SCOPE\n"); + assert(!n->Children[1]); + slang_print_ir(n->Children[0], indent + 3); + break; case IR_MOVE: printf("MOVE (writemask = %s)\n", writemask_string(n->Writemask)); slang_print_ir(n->Children[0], indent+3); @@ -279,71 +286,36 @@ slang_print_ir(const slang_ir_node *n, int indent) } -GLint -_slang_alloc_temporary(slang_gen_context *gc, GLint size) -{ - const GLuint sz4 = (size + 3) / 4; - GLuint i, j; - ASSERT(size > 0); /* number of floats */ - - for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { - GLuint found = 0; - for (j = 0; j < sz4; j++) { - if (!gc->TempUsed[i + j]) { - found++; - } - } - if (found == sz4) { - /* found block of size/4 free regs */ - for (j = 0; j < sz4; j++) - gc->TempUsed[i + j] = GL_TRUE; - return i; - } - } - return -1; -} - - - -static GLboolean -is_temporary(const slang_gen_context *gc, const slang_ir_storage *st) -{ - if (st->File == PROGRAM_TEMPORARY && gc->TempUsed[st->Index]) - return gc->TempUsed[st->Index]; - else - return GL_FALSE; -} - - -void -_slang_free_temporary(slang_gen_context *gc, GLuint r, GLint size) -{ - const GLuint sz4 = (size + 3) / 4; - GLuint i; - for (i = 0; i < sz4; i++) { - if (gc->TempUsed[r + i]) - gc->TempUsed[r + i] = GL_FALSE; - } -} - - /** * Allocate temporary storage for an intermediate result (such as for * a multiply or add, etc. */ static void -slang_alloc_temp_storage(slang_gen_context *gc, slang_ir_node *n, GLint size) +alloc_temp_storage(slang_var_table *vt, slang_ir_node *n, GLint size) { GLint indx; assert(!n->Var); assert(!n->Store); assert(size > 0); - printf("Allocate binop temp:\n"); - indx = _slang_alloc_temporary(gc, size); + indx = _slang_alloc_temp(vt, size); n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, indx, size); } +static void +free_temp_storage(slang_var_table *vt, slang_ir_node *n) +{ + if (n->Store->File == PROGRAM_TEMPORARY && n->Store->Index >= 0) { + if (_slang_is_temp(vt, n->Store->Index)) { + _slang_free_temp(vt, n->Store->Index, n->Store->Size); + /* XXX free(store)? */ + n->Store->Index = -1; + n->Store->Size = -1; + } + } +} + + static slang_ir_storage * alloc_constant(const GLfloat v[], GLuint size, struct gl_program *prog) { @@ -445,14 +417,14 @@ new_instruction(struct gl_program *prog, gl_inst_opcode opcode) static struct prog_instruction * -emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog); +emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog); /** * Generate code for a simple binary-op instruction. */ static struct prog_instruction * -emit_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); @@ -460,25 +432,32 @@ emit_binop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) assert(info->InstOpcode != OPCODE_NOP); - emit(gc, n->Children[0], prog); - emit(gc, n->Children[1], prog); + /* gen code for children */ + emit(vt, n->Children[0], prog); + emit(vt, n->Children[1], prog); + + /* gen this instruction */ inst = new_instruction(prog, info->InstOpcode); - /* alloc temp storage for the result: */ - if (!n->Store || n->Store->File == PROGRAM_UNDEFINED) { - slang_alloc_temp_storage(gc, n, info->ResultSize); - } - storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, n->Children[0]->Swizzle); storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store, n->Children[1]->Swizzle); + free_temp_storage(vt, n->Children[0]); + free_temp_storage(vt, n->Children[1]); + + if (!n->Store) { + alloc_temp_storage(vt, n, info->ResultSize); + } + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + inst->Comment = n->Comment; + /*_mesa_print_instruction(inst);*/ return inst; } static struct prog_instruction * -emit_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); @@ -486,26 +465,28 @@ emit_unop(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) assert(info->NumParams == 1); - emit(gc, n->Children[0], prog); + /* gen code for child */ + emit(vt, n->Children[0], prog); + /* gen this instruction */ inst = new_instruction(prog, info->InstOpcode); - - if (!n->Store) - slang_alloc_temp_storage(gc, n, info->ResultSize); - - storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, n->Children[0]->Swizzle); + free_temp_storage(vt, n->Children[0]); - inst->Comment = n->Comment; + if (!n->Store) { + alloc_temp_storage(vt, n, info->ResultSize); + } + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + inst->Comment = n->Comment; + /*_mesa_print_instruction(inst);*/ return inst; } static struct prog_instruction * -emit_negation(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { /* Implement as MOV dst, -src; */ /* XXX we could look at the previous instruction and in some circumstances @@ -513,10 +494,10 @@ emit_negation(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) */ struct prog_instruction *inst; - emit(gc, n->Children[0], prog); + emit(vt, n->Children[0], prog); if (!n->Store) - slang_alloc_temp_storage(gc, n, n->Children[0]->Store->Size); + alloc_temp_storage(vt, n, n->Children[0]->Store->Size); inst = new_instruction(prog, OPCODE_MOV); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); @@ -563,7 +544,7 @@ emit_jump(const char *target, struct gl_program *prog) static struct prog_instruction * -emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; if (n->Opcode == IR_TEX) { @@ -578,7 +559,7 @@ emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) } if (!n->Store) - slang_alloc_temp_storage(gc, n, 4); + alloc_temp_storage(vt, n, 4); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); @@ -600,7 +581,7 @@ emit_tex(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) +emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; if (!n) @@ -610,34 +591,54 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_SEQ: assert(n->Children[0]); assert(n->Children[1]); - emit(gc, n->Children[0], prog); - inst = emit(gc, n->Children[1], prog); + emit(vt, n->Children[0], prog); + inst = emit(vt, n->Children[1], prog); n->Store = n->Children[1]->Store; return inst; - break; + + case IR_SCOPE: + /* new variable scope */ + vt = _slang_push_var_table(vt); + inst = emit(vt, n->Children[0], prog); + vt = _slang_pop_var_table(vt); + return inst; + case IR_VAR_DECL: + /* Variable declaration - allocate a register for it */ + assert(n->Store); + assert(n->Store->File != PROGRAM_UNDEFINED); + assert(n->Store->Size > 0); + if (n->Var->isTemp) + n->Store->Index = _slang_alloc_temp(vt, n->Store->Size); + else + n->Store->Index = _slang_alloc_var(vt, n->Store->Size); + break; + case IR_VAR: - /* Storage should have already been resolved/allocated */ + /* Reference to a variable + * Storage should have already been resolved/allocated. + */ assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Index >= 0); assert(n->Store->Size > 0); break; + case IR_MOVE: /* rhs */ assert(n->Children[1]); - inst = emit(gc, n->Children[1], prog); + inst = emit(vt, n->Children[1], prog); /* lhs */ - emit(gc, n->Children[0], prog); + emit(vt, n->Children[0], prog); #if 1 - if (inst && is_temporary(gc, n->Children[1]->Store)) { + if (inst && _slang_is_temp(vt, n->Children[1]->Store->Index)) { /* Peephole optimization: * Just modify the RHS to put its result into the dest of this * MOVE operation. Then, this MOVE is a no-op. */ - _slang_free_temporary(gc, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); + _slang_free_temp(vt, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); @@ -673,9 +674,9 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) n->Children[1]->Swizzle); } /* XXX is this test correct? */ - if (n->Children[1]->Store->File == PROGRAM_TEMPORARY) { - _slang_free_temporary(gc, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); + if (_slang_is_temp(vt, n->Children[1]->Store->Index)) { + _slang_free_temp(vt, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); } /*inst->Comment = _mesa_strdup("IR_MOVE");*/ n->Store = n->Children[0]->Store; /*XXX new */ @@ -697,7 +698,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_POW: case IR_EXP: case IR_EXP2: - return emit_binop(gc, n, prog); + return emit_binop(vt, n, prog); case IR_RSQ: case IR_RCP: case IR_FLOOR: @@ -707,13 +708,13 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) case IR_COS: case IR_DDX: case IR_DDY: - return emit_unop(gc, n, prog); + return emit_unop(vt, n, prog); case IR_TEX: case IR_TEXB: case IR_TEXP: - return emit_tex(gc, n, prog); + return emit_tex(vt, n, prog); case IR_NEG: - return emit_negation(gc, n, prog); + return emit_negation(vt, n, prog); case IR_LABEL: return emit_label(n->Target, prog); case IR_FLOAT: @@ -726,7 +727,7 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) * Next instruction is typically an IR_CJUMP. */ /* last child expr instruction: */ - struct prog_instruction *inst = emit(gc, n->Children[0], prog); + struct prog_instruction *inst = emit(vt, n->Children[0], prog); if (inst) { /* set inst's CondUpdate flag */ inst->CondUpdate = GL_TRUE; @@ -737,13 +738,13 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) * is normally generated for the expression "i". * Generate a move instruction just to set condition codes. */ - slang_alloc_temp_storage(gc, n, 1); + alloc_temp_storage(vt, n, 1); inst = new_instruction(prog, OPCODE_MOV); inst->CondUpdate = GL_TRUE; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, n->Children[0]->Swizzle); - _slang_free_temporary(gc, n->Store->Index, n->Store->Size); + _slang_free_temp(vt, n->Store->Index, n->Store->Size); return inst; /* XXX or null? */ } } @@ -760,23 +761,14 @@ emit(slang_gen_context *gc, slang_ir_node *n, struct gl_program *prog) } -slang_gen_context * -_slang_new_codegen_context(void) -{ - slang_gen_context *gc = (slang_gen_context *) _mesa_calloc(sizeof(*gc)); - return gc; -} - - - GLboolean -_slang_emit_code(slang_ir_node *n, slang_gen_context *gc, +_slang_emit_code(slang_ir_node *n, slang_var_table *vt, struct gl_program *prog, GLboolean withEnd) { GLboolean success; - if (emit(gc, n, prog)) { - /* finish up by addeing the END opcode to program */ + if (emit(vt, n, prog)) { + /* finish up by adding the END opcode to program */ if (withEnd) { struct prog_instruction *inst; inst = new_instruction(prog, OPCODE_END); @@ -788,8 +780,8 @@ _slang_emit_code(slang_ir_node *n, slang_gen_context *gc, success = GL_FALSE; } -#if 0 printf("*********** End generate code (%u inst):\n", prog->NumInstructions); +#if 0 _mesa_print_program(prog); _mesa_print_program_parameters(ctx,prog); #endif diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 73ae0827c0..7a845feac2 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -32,10 +32,6 @@ #include "mtypes.h" -extern slang_gen_context * -_slang_new_codegen_context(void); - - extern void slang_print_ir(const slang_ir_node *n, int indent); @@ -48,15 +44,8 @@ extern slang_ir_storage * _slang_clone_ir_storage(slang_ir_storage *store); -extern GLint -_slang_alloc_temporary(slang_gen_context *gc, GLint size); - -extern void -_slang_free_temporary(slang_gen_context *gc, GLuint r, GLint size); - - extern GLboolean -_slang_emit_code(slang_ir_node *n, slang_gen_context *gc, +_slang_emit_code(slang_ir_node *n, slang_var_table *vartable, struct gl_program *prog, GLboolean withEnd); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index b106e85dbb..baf1137e73 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -45,6 +45,7 @@ typedef enum { IR_NOP = 0, IR_SEQ, /* sequence (eval left, then right) */ + IR_SCOPE, /* new variable scope (one child) */ IR_LABEL, /* target of a jump or cjump */ IR_JUMP, /* unconditional jump */ IR_CJUMP, /* conditional jump */ diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 7dfdd288e1..3ea7954451 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -259,8 +259,10 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) if (inst->Opcode == OPCODE_TEX || inst->Opcode == OPCODE_TXB || inst->Opcode == OPCODE_TXP) { + /* printf("====== remap sampler from %d to %d\n", inst->Sampler, map[ inst->Sampler ]); + */ inst->Sampler = map[ inst->Sampler ]; } } diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index 020f30a940..07509cddbc 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -188,7 +188,7 @@ find_scope(const slang_variable_scope *s, slang_atom name) { GLuint i; for (i = 0; i < s->num_variables; i++) { - if (s->variables[i].a_name == name) + if (s->variables[i]->a_name == name) return s; } if (s->outer_scope) @@ -202,8 +202,8 @@ find_var(const slang_variable_scope *s, slang_atom name) { GLuint i; for (i = 0; i < s->num_variables; i++) { - if (s->variables[i].a_name == name) - return &s->variables[i]; + if (s->variables[i]->a_name == name) + return s->variables[i]; } if (s->outer_scope) return find_var(s->outer_scope, name); @@ -621,7 +621,7 @@ slang_print_function(const slang_function *f, GLboolean body) (char *) f->header.a_name); for (i = 0; i < f->param_count; i++) { - print_variable(&f->parameters->variables[i], 3); + print_variable(f->parameters->variables[i], 3); } printf(")\n"); @@ -632,199 +632,6 @@ slang_print_function(const slang_function *f, GLboolean body) -/* operation */ -#define OP_END 0 -#define OP_BLOCK_BEGIN_NO_NEW_SCOPE 1 -#define OP_BLOCK_BEGIN_NEW_SCOPE 2 -#define OP_DECLARE 3 -#define OP_ASM 4 -#define OP_BREAK 5 -#define OP_CONTINUE 6 -#define OP_DISCARD 7 -#define OP_RETURN 8 -#define OP_EXPRESSION 9 -#define OP_IF 10 -#define OP_WHILE 11 -#define OP_DO 12 -#define OP_FOR 13 -#define OP_PUSH_VOID 14 -#define OP_PUSH_BOOL 15 -#define OP_PUSH_INT 16 -#define OP_PUSH_FLOAT 17 -#define OP_PUSH_IDENTIFIER 18 -#define OP_SEQUENCE 19 -#define OP_ASSIGN 20 -#define OP_ADDASSIGN 21 -#define OP_SUBASSIGN 22 -#define OP_MULASSIGN 23 -#define OP_DIVASSIGN 24 -/*#define OP_MODASSIGN 25*/ -/*#define OP_LSHASSIGN 26*/ -/*#define OP_RSHASSIGN 27*/ -/*#define OP_ORASSIGN 28*/ -/*#define OP_XORASSIGN 29*/ -/*#define OP_ANDASSIGN 30*/ -#define OP_SELECT 31 -#define OP_LOGICALOR 32 -#define OP_LOGICALXOR 33 -#define OP_LOGICALAND 34 -/*#define OP_BITOR 35*/ -/*#define OP_BITXOR 36*/ -/*#define OP_BITAND 37*/ -#define OP_EQUAL 38 -#define OP_NOTEQUAL 39 -#define OP_LESS 40 -#define OP_GREATER 41 -#define OP_LESSEQUAL 42 -#define OP_GREATEREQUAL 43 -/*#define OP_LSHIFT 44*/ -/*#define OP_RSHIFT 45*/ -#define OP_ADD 46 -#define OP_SUBTRACT 47 -#define OP_MULTIPLY 48 -#define OP_DIVIDE 49 -/*#define OP_MODULUS 50*/ -#define OP_PREINCREMENT 51 -#define OP_PREDECREMENT 52 -#define OP_PLUS 53 -#define OP_MINUS 54 -/*#define OP_COMPLEMENT 55*/ -#define OP_NOT 56 -#define OP_SUBSCRIPT 57 -#define OP_CALL 58 -#define OP_FIELD 59 -#define OP_POSTINCREMENT 60 -#define OP_POSTDECREMENT 61 - - -void -slang_print_opcode(unsigned int opcode) -{ - switch (opcode) { - case OP_PUSH_VOID: - printf("OP_PUSH_VOID\n"); - break; - case OP_PUSH_BOOL: - printf("OP_PUSH_BOOL\n"); - break; - case OP_PUSH_INT: - printf("OP_PUSH_INT\n"); - break; - case OP_PUSH_FLOAT: - printf("OP_PUSH_FLOAT\n"); - break; - case OP_PUSH_IDENTIFIER: - printf("OP_PUSH_IDENTIFIER\n"); - break; - case OP_SEQUENCE: - printf("OP_SEQUENCE\n"); - break; - case OP_ASSIGN: - printf("OP_ASSIGN\n"); - break; - case OP_ADDASSIGN: - printf("OP_ADDASSIGN\n"); - break; - case OP_SUBASSIGN: - printf("OP_SUBASSIGN\n"); - break; - case OP_MULASSIGN: - printf("OP_MULASSIGN\n"); - break; - case OP_DIVASSIGN: - printf("OP_DIVASSIGN\n"); - break; - /*case OP_MODASSIGN:*/ - /*case OP_LSHASSIGN:*/ - /*case OP_RSHASSIGN:*/ - /*case OP_ORASSIGN:*/ - /*case OP_XORASSIGN:*/ - /*case OP_ANDASSIGN:*/ - case OP_SELECT: - printf("OP_SELECT\n"); - break; - case OP_LOGICALOR: - printf("OP_LOGICALOR\n"); - break; - case OP_LOGICALXOR: - printf("OP_LOGICALXOR\n"); - break; - case OP_LOGICALAND: - printf("OP_LOGICALAND\n"); - break; - /*case OP_BITOR:*/ - /*case OP_BITXOR:*/ - /*case OP_BITAND:*/ - case OP_EQUAL: - printf("OP_EQUAL\n"); - break; - case OP_NOTEQUAL: - printf("OP_NOTEQUAL\n"); - break; - case OP_LESS: - printf("OP_LESS\n"); - break; - case OP_GREATER: - printf("OP_GREATER\n"); - break; - case OP_LESSEQUAL: - printf("OP_LESSEQUAL\n"); - break; - case OP_GREATEREQUAL: - printf("OP_GREATEREQUAL\n"); - break; - /*case OP_LSHIFT:*/ - /*case OP_RSHIFT:*/ - case OP_ADD: - printf("OP_ADD\n"); - break; - case OP_SUBTRACT: - printf("OP_SUBTRACT\n"); - break; - case OP_MULTIPLY: - printf("OP_MULTIPLY\n"); - break; - case OP_DIVIDE: - printf("OP_DIVIDE\n"); - break; - /*case OP_MODULUS:*/ - case OP_PREINCREMENT: - printf("OP_PREINCREMENT\n"); - break; - case OP_PREDECREMENT: - printf("OP_PREDECREMENT\n"); - break; - case OP_PLUS: - printf("OP_PLUS\n"); - break; - case OP_MINUS: - printf("OP_MINUS\n"); - break; - case OP_NOT: - printf("OP_NOT\n"); - break; - /*case OP_COMPLEMENT:*/ - case OP_SUBSCRIPT: - printf("OP_SUBSCRIPT\n"); - break; - case OP_CALL: - printf("OP_CALL\n"); - break; - case OP_FIELD: - printf("OP_FIELD\n"); - break; - case OP_POSTINCREMENT: - printf("OP_POSTINCREMENT\n"); - break; - case OP_POSTDECREMENT: - printf("OP_POSTDECREMENT\n"); - break; - default: - printf("UNKNOWN OP %d\n", opcode); - } -} - - const char * slang_asm_string(slang_assembly_type t) @@ -1083,6 +890,7 @@ slang_print_type(const slang_fully_specified_type *t) } +#if 0 static char * slang_var_string(const slang_variable *v) { @@ -1092,6 +900,7 @@ slang_var_string(const slang_variable *v) slang_fq_type_string(&v->type)); return str; } +#endif void @@ -1111,13 +920,13 @@ _slang_print_var_scope(const slang_variable_scope *vars, int indent) printf("Var scope %p %d vars:\n", (void *) vars, vars->num_variables); for (i = 0; i < vars->num_variables; i++) { spaces(indent + 3); - printf("%s\n", (char *) vars->variables[i].a_name); + printf("%s (at %p)\n", (char *) vars->variables[i]->a_name, (void*) (vars->variables + i)); } spaces(indent + 3); printf("outer_scope = %p\n", (void*) vars->outer_scope); if (vars->outer_scope) { - spaces(indent + 3); + /*spaces(indent + 3);*/ _slang_print_var_scope(vars->outer_scope, indent + 3); } } diff --git a/src/mesa/shader/slang/slang_print.h b/src/mesa/shader/slang/slang_print.h index a98607a540..ae39be6806 100644 --- a/src/mesa/shader/slang/slang_print.h +++ b/src/mesa/shader/slang/slang_print.h @@ -10,10 +10,6 @@ extern void slang_print_tree(const slang_operation *op, int indent); -extern void -slang_print_opcode(unsigned int opcode); - - extern const char * slang_asm_string(slang_assembly_type t); diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 6220b7c5bf..71ac0692e1 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -126,8 +126,8 @@ static GLboolean aggregate_variables (slang_storage_aggregate *agg, slang_variab GLuint i; for (i = 0; i < vars->num_variables; i++) - if (!_slang_aggregate_variable (agg, &vars->variables[i].type.specifier, - vars->variables[i].array_len, funcs, structs, globals, mach, file, atoms)) + if (!_slang_aggregate_variable (agg, &vars->variables[i]->type.specifier, + vars->variables[i]->array_len, funcs, structs, globals, mach, file, atoms)) return GL_FALSE; return GL_TRUE; } diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c new file mode 100644 index 0000000000..cd6a081e04 --- /dev/null +++ b/src/mesa/shader/slang/slang_vartable.c @@ -0,0 +1,202 @@ + +#include "imports.h" +#include "slang_compile.h" +#include "slang_compile_variable.h" +#include "slang_vartable.h" + + +static int dbg = 0; + + +typedef enum { + FREE, + VAR, + TEMP +} TempState; + +static int Level = 0; + +struct slang_var_table_ +{ + int level; + int num_entries; + slang_variable **vars; /* array [num_entries] */ + + TempState temps[MAX_PROGRAM_TEMPS]; + + struct slang_var_table_ *parent; +}; + + + +/** + * Create new table, put at head, return ptr to it. + */ +slang_var_table * +_slang_push_var_table(slang_var_table *parent) +{ + slang_var_table *t + = (slang_var_table *) _mesa_calloc(sizeof(slang_var_table)); + if (t) { + t->level = Level++; + t->parent = parent; + if (parent) { + /* copy the info indicating which temp regs are in use */ + memcpy(t->temps, parent->temps, sizeof(t->temps)); + } + if (dbg) printf("Pushing level %d\n", t->level); + } + return t; +} + + +/** + * Destroy given table, return ptr to parent + */ +slang_var_table * +_slang_pop_var_table(slang_var_table *t) +{ + slang_var_table *parent = t->parent; + int i; + if (dbg) printf("Popping level %d\n", t->level); + if (t->parent) { + for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { + if (t->temps[i] && !t->parent->temps[i]) + if (dbg) printf(" Free reg %d\n", i); + } + } + for (i = 0; i < t->num_entries; i++) { + if (dbg) printf(" Free var %s\n", (char*) t->vars[i]->a_name); + } + + if (t->vars) + free(t->vars); + free(t); + Level--; + return parent; +} + + +/** + * Add a new variable to the given symbol table. + */ +void +_slang_add_variable(slang_var_table *t, slang_variable *v) +{ + assert(t); + t->vars = realloc(t->vars, (t->num_entries + 1) * sizeof(slang_variable *)); + t->vars[t->num_entries] = v; + t->num_entries++; +} + + +/** + * Look for variable by name in given table. + * If not found, parent table will be searched. + */ +slang_variable * +_slang_find_variable(const slang_var_table *t, slang_atom name) +{ + while (1) { + int i; + for (i = 0; i < t->num_entries; i++) { + if (t->vars[i]->a_name == name) + return t->vars[i]; + } + if (t->parent) + t = t->parent; + else + return NULL; + } +} + + +static GLint +alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) +{ + const GLuint sz4 = (size + 3) / 4; + GLuint i, j; + assert(size > 0); /* number of floats */ + + for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { + GLuint found = 0; + for (j = 0; j < sz4; j++) { + if (!t->temps[i + j]) { + found++; + } + else { + break; + } + } + if (found == sz4) { + /* found block of size/4 free regs */ + for (j = 0; j < sz4; j++) + t->temps[i + j] = isTemp ? TEMP : VAR; + return i; + } + } + return -1; +} + + +/** + * Allocate temp register(s) for storing a variable. + */ +GLint +_slang_alloc_var(slang_var_table *t, GLint size) +{ + int i = alloc_reg(t, size, GL_FALSE); + if (dbg) printf("Alloc var %d (level %d)\n", i, t->level); + return i; +} + + +void +_slang_reserve_var(slang_var_table *t, GLint r, GLint size) +{ + const GLint sz4 = (size + 3) / 4; + GLint i; + for (i = 0; i < sz4; i++) { + t->temps[r + i] = VAR; + } +} + + +/** + * Allocate temp register(s) for storing an unnamed intermediate value. + */ +GLint +_slang_alloc_temp(slang_var_table *t, GLint size) +{ + int i = alloc_reg(t, size, GL_TRUE); + if (dbg) printf("Alloc temp %d (level %d)\n", i, t->level); + return i; +} + + +void +_slang_free_temp(slang_var_table *t, GLint r, GLint size) +{ + const GLuint sz4 = (size + 3) / 4; + GLuint i; + assert(size > 0); + assert(r >= 0); + assert(r < MAX_PROGRAM_TEMPS); + if (dbg) printf("Free temp %d (level %d)\n", r, t->level); + for (i = 0; i < sz4; i++) { + assert(t->temps[r + i] == TEMP); + t->temps[r + i] = FREE; + } +} + + +GLboolean +_slang_is_temp(slang_var_table *t, GLint r) +{ + assert(r >= 0); + assert(r < MAX_PROGRAM_TEMPS); + if (t->temps[r] == TEMP) + return GL_TRUE; + else + return GL_FALSE; +} diff --git a/src/mesa/shader/slang/slang_vartable.h b/src/mesa/shader/slang/slang_vartable.h new file mode 100644 index 0000000000..c8e37c94aa --- /dev/null +++ b/src/mesa/shader/slang/slang_vartable.h @@ -0,0 +1,38 @@ + +#ifndef SLANG_VARTABLE_H +#define SLANG_VARTABLE_H + + +typedef struct slang_var_table_ slang_var_table; + +struct slang_variable_; + +extern slang_var_table * +_slang_push_var_table(slang_var_table *parent); + +extern slang_var_table * +_slang_pop_var_table(slang_var_table *t); + +extern void +_slang_add_variable(slang_var_table *t, struct slang_variable_ *v); + +extern struct slang_variable_ * +_slang_find_variable(const slang_var_table *t, slang_atom name); + +extern GLint +_slang_alloc_var(slang_var_table *t, GLint size); + +extern void +_slang_reserve_var(slang_var_table *t, GLint r, GLint size); + +extern GLint +_slang_alloc_temp(slang_var_table *t, GLint size); + +extern void +_slang_free_temp(slang_var_table *t, GLint r, GLint size); + +extern GLboolean +_slang_is_temp(slang_var_table *t, GLint r); + + +#endif /* SLANG_VARTABLE_H */ diff --git a/src/mesa/sources b/src/mesa/sources index 19f43384ea..1b0474c14b 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -189,6 +189,7 @@ SLANG_SOURCES = \ shader/slang/slang_preprocess.c \ shader/slang/slang_simplify.c \ shader/slang/slang_storage.c \ + shader/slang/slang_vartable.c \ shader/slang/slang_print.c \ shader/slang/slang_utility.c -- cgit v1.2.3 From 629fd78f79ae49ca4a8fc2589ee479999130e550 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 10:35:03 -0700 Subject: clean-up slang_allocate_storage() --- src/mesa/shader/slang/slang_codegen.c | 66 ++++++++++++----------------------- 1 file changed, 22 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index aff108dace..3d68bb2b63 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -253,20 +253,15 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) /** * Allocate storage info for an IR node (n->Store). - * We may do any of the following: - * 1. Compute Store->File/Index for program inputs/outputs/uniforms/etc. - * 2. Allocate storage for user-declared variables. - * 3. Allocate intermediate/unnamed storage for complex expressions. - * 4. other? + * If n is an IR_VAR_DECL, allocate a temporary for the variable. + * Otherwise, if n is an IR_VAR, check if it's a uniform or constant + * that needs to have storage allocated. */ static void slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) { - struct gl_program *prog = A->program; assert(A->vartable); assert(n); - assert(n->Opcode == IR_VAR_DECL || n->Opcode == IR_VAR); - assert(prog); if (!n->Store) { /* allocate storage info for this node */ @@ -291,48 +286,32 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) assert(n->Store->Size > 0); return; } - -#if 00 - if (n->Store->File == PROGRAM_UNDEFINED) { - printf("*** Var %s size %d\n", (char*) n->Var->a_name, n->Store->Size); - assert(n->Store->File != PROGRAM_UNDEFINED); - } -#endif - - /** - ** XXX this all has to be redone - **/ - if (n->Store->Index < 0) { - /* determine storage location for this var */ - + else { + assert(n->Opcode == IR_VAR); assert(n->Var); assert(n->Store->Size > 0); - if (n->Store->File == PROGRAM_STATE_VAR) { - GLint i = slang_lookup_statevar((char *) n->Var->a_name, 0, - prog->Parameters); - assert(i >= 0); - if (i >= 0) { - assert(n->Store->File == PROGRAM_STATE_VAR /*|| - n->Store->File == PROGRAM_UNIFORM*/); - n->Store->File = PROGRAM_STATE_VAR; + if (n->Store->Index < 0) { + const char *varName = (char *) n->Var->a_name; + struct gl_program *prog = A->program; + assert(prog); + + /* determine storage location for this var. + * This is probably a pre-defined uniform or constant. + * We don't allocate storage for these until they're actually + * used to avoid wasting registers. + */ + if (n->Store->File == PROGRAM_STATE_VAR) { + GLint i = slang_lookup_statevar(varName, 0, prog->Parameters); + assert(i >= 0); n->Store->Index = i; - return; } - } - else if (n->Store->File == PROGRAM_CONSTANT) { - GLint i = slang_lookup_constant((char *) n->Var->a_name, 0, - prog->Parameters); - assert(i >= 0); - if (i >= 0) { - n->Store->File = PROGRAM_CONSTANT; + else if (n->Store->File == PROGRAM_CONSTANT) { + GLint i = slang_lookup_constant(varName, 0, prog->Parameters); + assert(i >= 0); n->Store->Index = i; - return; } } - else { - /* what's this??? */ - } } } @@ -2199,7 +2178,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } else if (var->type.qualifier == slang_qual_const && !prog) { /* pre-defined global constant, like gl_MaxLights */ - GLint size = -1; + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); if (dbg) printf("CONST "); } @@ -2283,7 +2262,6 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* should have been allocated earlier: */ assert(A->program->Parameters ); assert(A->program->Varying); - assert(A->vartable); /* fold constant expressions, etc. */ -- cgit v1.2.3 From 4f5901b265dd00fd672a1f3ea5586363176c2371 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 10:35:59 -0700 Subject: fix the subassig, mulassign and divassign cases --- src/mesa/shader/slang/slang_codegen.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 3d68bb2b63..8cf30793dd 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1969,10 +1969,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; assert(oper->num_children == 2); - n = _slang_gen_function_call_name(A, "-=", oper, NULL); - /* The result of this operation should be stored back into child[0] */ - assert(n->Children[0]->Store); - n->Store = n->Children[0]->Store; + n = _slang_gen_function_call_name(A, "-=", oper, &oper->children[0]); return n; } break; @@ -1980,20 +1977,14 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; assert(oper->num_children == 2); - n = _slang_gen_function_call_name(A, "*=", oper, NULL); - /* The result of this operation should be stored back into child[0] */ - assert(n->Children[0]->Store); - n->Store = n->Children[0]->Store; + n = _slang_gen_function_call_name(A, "*=", oper, &oper->children[0]); return n; } case slang_oper_divassign: { slang_ir_node *n; assert(oper->num_children == 2); - n = _slang_gen_function_call_name(A, "/=", oper, NULL); - /* The result of this operation should be stored back into child[0] */ - assert(n->Children[0]->Store); - n->Store = n->Children[0]->Store; + n = _slang_gen_function_call_name(A, "/=", oper, &oper->children[0]); return n; } case slang_oper_asm: -- cgit v1.2.3 From 8de3dc17018a7060c536446803b86abe29386cb8 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 10:44:11 -0700 Subject: Move some global vars into slang_assemble_ctx. --- src/mesa/shader/slang/slang_assemble.h | 4 +++ src/mesa/shader/slang/slang_codegen.c | 64 ++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index e801ea249d..4f1512afca 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -256,6 +256,10 @@ typedef struct slang_assemble_ctx_ slang_swizzle swz; struct gl_program *program; slang_var_table *vartable; + + struct slang_function_ *CurFunction; + slang_atom CurLoopBreak; + slang_atom CurLoopCont; } slang_assemble_ctx; extern struct slang_function_ * diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 8cf30793dd..55bf368c9b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -51,9 +51,11 @@ /** * XXX move these into the slang_assemble_ctx struct */ +#if 0 static slang_function *CurFunction = NULL; static slang_atom CurLoopBreak = 0; static slang_atom CurLoopCont = 0; +#endif static slang_ir_node * @@ -1050,7 +1052,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, &inlined->children, inlined->num_children); lab->type = slang_oper_label; - lab->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + lab->a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); } for (i = 0; i < totalArgs; i++) { @@ -1096,13 +1098,13 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, slang_operation *inlined; slang_function *prevFunc; - prevFunc = CurFunction; - CurFunction = fun; + prevFunc = A->CurFunction; + A->CurFunction = fun; - if (!CurFunction->end_label) { + if (!A->CurFunction->end_label) { char name[200]; - sprintf(name, "__endOfFunc_%s_", (char *) CurFunction->header.a_name); - CurFunction->end_label = slang_atom_pool_gen(A->atoms, name); + sprintf(name, "__endOfFunc_%s_", (char *) A->CurFunction->header.a_name); + A->CurFunction->end_label = slang_atom_pool_gen(A->atoms, name); } if (slang_is_asm_function(fun) && !dest) { @@ -1134,9 +1136,9 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, n = _slang_gen_operation(A, oper); - CurFunction->end_label = NULL; + A->CurFunction->end_label = NULL; - CurFunction = prevFunc; + A->CurFunction = prevFunc; return n; } @@ -1338,12 +1340,12 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startWhile"); slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endWhile"); slang_ir_node *startLab, *cond, *bra, *body, *jump, *endLab, *tree; - slang_atom prevLoopBreak = CurLoopBreak; - slang_atom prevLoopCont = CurLoopCont; + slang_atom prevLoopBreak = A->CurLoopBreak; + slang_atom prevLoopCont = A->CurLoopCont; /* Push this loop */ - CurLoopBreak = endAtom; - CurLoopCont = startAtom; + A->CurLoopBreak = endAtom; + A->CurLoopCont = startAtom; startLab = new_label(startAtom); cond = _slang_gen_operation(A, &oper->children[0]); @@ -1363,8 +1365,8 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) tree = new_seq(tree, endLab); /* Pop this loop */ - CurLoopBreak = prevLoopBreak; - CurLoopCont = prevLoopCont; + A->CurLoopBreak = prevLoopBreak; + A->CurLoopCont = prevLoopCont; return tree; } @@ -1392,12 +1394,12 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endFor"); slang_ir_node *init, *startLab, *cond, *bra, *body, *contLab; slang_ir_node *incr, *jump, *endLab, *tree; - slang_atom prevLoopBreak = CurLoopBreak; - slang_atom prevLoopCont = CurLoopCont; + slang_atom prevLoopBreak = A->CurLoopBreak; + slang_atom prevLoopCont = A->CurLoopCont; /* Push this loop */ - CurLoopBreak = endAtom; - CurLoopCont = contAtom; + A->CurLoopBreak = endAtom; + A->CurLoopCont = contAtom; init = _slang_gen_operation(A, &oper->children[0]); startLab = new_label(startAtom); @@ -1426,8 +1428,8 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) tree = new_seq(tree, endLab); /* Pop this loop */ - CurLoopBreak = prevLoopBreak; - CurLoopCont = prevLoopCont; + A->CurLoopBreak = prevLoopBreak; + A->CurLoopCont = prevLoopCont; return tree; } @@ -1501,7 +1503,7 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) slang_operation gotoOp; slang_operation_construct(&gotoOp); gotoOp.type = slang_oper_goto; - gotoOp.a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + gotoOp.a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); /* assemble the new code */ n = _slang_gen_operation(A, &gotoOp); /* destroy temp code */ @@ -1555,8 +1557,8 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) /* child[1]: goto __endOfFunction */ jump = &block->children[1]; jump->type = slang_oper_goto; - assert(CurFunction->end_label); - jump->a_id = slang_atom_pool_atom(A->atoms, CurFunction->end_label); + assert(A->CurFunction->end_label); + jump->a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); #if 0 /* debug */ printf("NEW RETURN:\n"); @@ -1869,15 +1871,15 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_for: return _slang_gen_for(A, oper); case slang_oper_break: - if (!CurLoopBreak) { + if (!A->CurLoopBreak) { RETURN_ERROR("'break' not in loop", 0); } - return new_jump(CurLoopBreak); + return new_jump(A->CurLoopBreak); case slang_oper_continue: - if (!CurLoopCont) { + if (!A->CurLoopCont) { RETURN_ERROR("'continue' not in loop", 0); } - return new_jump(CurLoopCont); + return new_jump(A->CurLoopCont); case slang_oper_equal: return new_node(IR_SEQUAL, _slang_gen_operation(A, &oper->children[0]), @@ -2258,11 +2260,11 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* fold constant expressions, etc. */ slang_simplify(fun->body, &A->space, A->atoms); - CurFunction = fun; + A->CurFunction = fun; /* Create an end-of-function label */ - if (!CurFunction->end_label) - CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); + if (!A->CurFunction->end_label) + A->CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); /* push new vartable scope */ A->vartable = _slang_push_var_table(A->vartable); @@ -2284,7 +2286,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) endLabel = new_label(fun->end_label); n = new_seq(n, endLabel); - CurFunction = NULL; + A->CurFunction = NULL; #if 0 printf("************* New AST for %s *****\n", (char*)fun->header.a_name); -- cgit v1.2.3 From a5bbe206a8d6ee13cb90810d8e7011e332697910 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 11:08:10 -0700 Subject: comments --- src/mesa/shader/slang/slang_emit.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 81f8565502..5d7e5b318f 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -302,6 +302,10 @@ alloc_temp_storage(slang_var_table *vt, slang_ir_node *n, GLint size) } +/** + * Free temporary storage, if n->Store is, in fact, temp storage. + * Otherwise, no-op. + */ static void free_temp_storage(slang_var_table *vt, slang_ir_node *n) { @@ -316,6 +320,9 @@ free_temp_storage(slang_var_table *vt, slang_ir_node *n) } +/** + * Allocate storage for a floating point constant. + */ static slang_ir_storage * alloc_constant(const GLfloat v[], GLuint size, struct gl_program *prog) { -- cgit v1.2.3 From c807169888c900dd303adb260c3cfeb744ed842d Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 11:10:11 -0700 Subject: remove old globals --- src/mesa/shader/slang/slang_codegen.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 55bf368c9b..899aa32d4a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -48,16 +48,6 @@ #include "slang_print.h" -/** - * XXX move these into the slang_assemble_ctx struct - */ -#if 0 -static slang_function *CurFunction = NULL; -static slang_atom CurLoopBreak = 0; -static slang_atom CurLoopCont = 0; -#endif - - static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); -- cgit v1.2.3 From 83d3ff590d0024b63501db91c9a3137e9ec959a0 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 13:58:45 -0700 Subject: Redo the way array indexes are handled. Resolve storage location at code emit time, not codegen time. --- src/mesa/shader/slang/slang_codegen.c | 68 +++++++++++------------------------ src/mesa/shader/slang/slang_emit.c | 25 +++++++++++++ src/mesa/shader/slang/slang_ir.h | 1 + 3 files changed, 46 insertions(+), 48 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 899aa32d4a..3d79d77ace 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1234,7 +1234,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, n0 = _slang_gen_operation(A, dest_oper); assert(n0->Var); assert(n0->Store); - + assert(!n->Store); n->Store = n0->Store; n->Writemask = writemask; @@ -1735,60 +1735,32 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) /** - * Generate IR tree for an array element reference. + * Gen code for array indexing. */ static slang_ir_node * _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) { - if (oper->children[1].type == slang_oper_literal_int) { - /* compile-time constant index - OK */ - slang_assembly_typeinfo array_ti, elem_ti; - slang_ir_node *base; - GLint index; - - /* get type of array element */ - slang_assembly_typeinfo_construct(&elem_ti); - _slang_typeof_operation(A, oper, &elem_ti); - - /* get type of array */ - slang_assembly_typeinfo_construct(&array_ti); - _slang_typeof_operation(A, &oper->children[0], &array_ti); - - - base = _slang_gen_operation(A, &oper->children[0]); - assert(base->Opcode == IR_VAR); - assert(base->Store); - - index = (GLint) oper->children[1].literal[0]; - /*printf("element[%d]\n", index);*/ - /* new storage info since we don't want to change the original */ - base->Store = _slang_clone_ir_storage(base->Store); - if (_slang_type_is_vector(array_ti.spec.type)) { - /* scalar element (float) of a basic vector (ex: vec3) */ - const GLuint max = _slang_type_dim(array_ti.spec.type); - if (index >= max) { - RETURN_ERROR("array index out of bounds", 0); - } - assert(index < 4); - /* use swizzle to access the element */ - base->Swizzle = SWIZZLE_X + index; - base->Writemask = WRITEMASK_X << index; - } - else { - /* bias Index by array subscript, update storage size */ - base->Store->Index += index; - base->Store->Size = _slang_sizeof_type_specifier(&elem_ti.spec); - } - return base; - } - else { - /* run-time index - not supported yet - TBD */ - abort(); - return NULL; - } + slang_assembly_typeinfo elem_ti; + slang_ir_node *elem, *array, *index; + GLint elemSize; + + /* size of array element */ + slang_assembly_typeinfo_construct(&elem_ti); + _slang_typeof_operation(A, oper, &elem_ti); + elemSize = _slang_sizeof_type_specifier(&elem_ti.spec); + assert(elemSize >= 1); + + array = _slang_gen_operation(A, &oper->children[0]); + index = _slang_gen_operation(A, &oper->children[1]); + elem = new_node(IR_ELEMENT, array, index); + elem->Store = _slang_new_ir_storage(array->Store->File, + array->Store->Index, + elemSize); + return elem; } + /** * Generate IR tree for a slang_operation (AST node) */ diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 5d7e5b318f..f0bcb7a0ae 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -600,6 +600,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Children[1]); emit(vt, n->Children[0], prog); inst = emit(vt, n->Children[1], prog); + assert(!n->Store); n->Store = n->Children[1]->Store; return inst; @@ -619,6 +620,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) n->Store->Index = _slang_alloc_temp(vt, n->Store->Size); else n->Store->Index = _slang_alloc_var(vt, n->Store->Size); + assert(n->Store->Index >= 0); break; case IR_VAR: @@ -631,6 +633,28 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store->Size > 0); break; + case IR_ELEMENT: + /* Dereference array element. Just resolve storage for the array + * element represented by this node. + */ + assert(n->Store); + assert(n->Store->File != PROGRAM_UNDEFINED); + assert(n->Store->Size > 0); + if (n->Children[1]->Opcode == IR_FLOAT) { + /* OK, constant index */ + const GLint arrayAddr = n->Children[0]->Store->Index; + const GLint index = n->Children[1]->Value[0]; + n->Store->Index = arrayAddr + index; + } + else { + /* Problem: variable index */ + const GLint arrayAddr = n->Children[0]->Store->Index; + const GLint index = 0; + _mesa_problem(NULL, "variable array indexes not supported yet!"); + n->Store->Index = arrayAddr + index; + } + return NULL; /* no instruction */ + case IR_MOVE: /* rhs */ assert(n->Children[1]); @@ -686,6 +710,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) n->Children[1]->Store->Size); } /*inst->Comment = _mesa_strdup("IR_MOVE");*/ + assert(!n->Store); n->Store = n->Children[0]->Store; /*XXX new */ return inst; } diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index baf1137e73..2589d68872 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -82,6 +82,7 @@ typedef enum IR_NOT, /* logical not */ IR_VAR, /* variable reference */ IR_VAR_DECL,/* var declaration */ + IR_ELEMENT, /* array element */ IR_TEX, /* texture lookup */ IR_TEXB, /* texture lookup with LOD bias */ IR_TEXP, /* texture lookup with projection */ -- cgit v1.2.3 From 04ac15fd80723fe4ae676c3dd9e7783a8f80f574 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 15:51:49 -0700 Subject: checkpoint: ++, -- and && operators --- src/mesa/shader/slang/slang_codegen.c | 79 ++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 3d79d77ace..df83b4d34a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -499,11 +499,13 @@ static slang_asm_info AsmInfo[] = { static void _slang_free_ir_tree(slang_ir_node *n) { +#if 0 if (!n) return; _slang_free_ir_tree(n->Children[0]); _slang_free_ir_tree(n->Children[1]); free(n); +#endif } @@ -1641,6 +1643,24 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) } +#if 0 +static slang_ir_node * +_slang_gen_logical_and(slang_assemble_ctx * A, slang_operation *oper) +{ + /* + * bool b; + * b = test(child[0]); + * if !b goto endLab; + * b = test(child[1]); + * endLab: + * (b) + */ + slang_ir_node *temp; + +} +#endif + + /** * Generate IR tree for an assignment (=). */ @@ -1923,7 +1943,6 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return _slang_gen_assignment(A, oper); case slang_oper_addassign: { - /* XXX this is broken */ slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "+=", oper, &oper->children[0]); @@ -1951,6 +1970,27 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) n = _slang_gen_function_call_name(A, "/=", oper, &oper->children[0]); return n; } + case slang_oper_logicalor: + printf("OR\n"); + abort(); + case slang_oper_logicalxor: + printf("XOR\n"); + abort(); + case slang_oper_logicaland: + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = _slang_gen_function_call_name(A, "__logicalAnd", oper, NULL); + return n; + } +#if 0 + printf("AND\n"); + return _slang_gen_logical_and(A, oper); +#endif + case slang_oper_not: + printf("NOT\n"); + abort(); + case slang_oper_asm: return _slang_gen_asm(A, oper, NULL); case slang_oper_call: @@ -1977,17 +2017,46 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return new_float_literal(oper->literal[0], 0, 0, 0); case slang_oper_literal_bool: return new_float_literal(oper->literal[0], 0, 0, 0); - case slang_oper_postincrement: + + case slang_oper_postincrement: /* var++ */ /* XXX not 100% about this */ { slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); slang_ir_node *sum = new_node(IR_ADD, var, one); slang_ir_node *assign = new_node(IR_MOVE, var, sum); - assert(sum->Opcode != IR_SEQ); return assign; } - break; + + case slang_oper_postdecrement: /* var-- */ + /* XXX not 100% about this */ + { + slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); + slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); + slang_ir_node *sum = new_node(IR_ADD, var, one); + slang_ir_node *assign = new_node(IR_MOVE, var, sum); + return assign; + } + + case slang_oper_preincrement: /* ++var */ + { + slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); + slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); + slang_ir_node *sum = new_node(IR_ADD, var, one); + slang_ir_node *assign = new_node(IR_MOVE, var, sum); + assign->Store = var->Store; + return assign; + } + case slang_oper_predecrement: /* --var */ + { + slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); + slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); + slang_ir_node *sum = new_node(IR_SUB, var, one); + slang_ir_node *assign = new_node(IR_MOVE, var, sum); + assign->Store = var->Store; + return assign; + } + case slang_oper_sequence: { slang_ir_node *tree = NULL; @@ -1998,7 +2067,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) } return tree; } - break; + case slang_oper_none: return NULL; default: -- cgit v1.2.3 From 82258b7af3f939ce3b323dedf17ef7dadd567237 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 16:33:54 -0700 Subject: added IR_ELEMENT --- src/mesa/shader/slang/slang_emit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index f0bcb7a0ae..e58256c9f1 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -99,6 +99,7 @@ static slang_ir_info IrInfo[] = { { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 1 }, { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, { IR_FIELD, "IR_FIELD", 0, 0, 0 }, + { IR_ELEMENT, "IR_ELEMENT", 0, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } }; -- cgit v1.2.3 From 0a097675f174ead793f9c7e3dcd17128279f079b Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 16:34:33 -0700 Subject: added vec3 constructor code --- src/mesa/shader/slang/slang_simplify.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index 94e6e1ecc2..dfae746a40 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -155,6 +155,7 @@ slang_simplify(slang_operation *oper, } } else if (n == 4 && isFloat[0] && isFloat[1] && isFloat[2] && isFloat[3]) { + /* vec4(flt, flt, flt, flt) constructor */ if (oper->type == slang_oper_call) { if (strcmp((char *) oper->a_id, "vec4") == 0) { oper->literal[0] = oper->children[0].literal[0]; @@ -166,5 +167,18 @@ slang_simplify(slang_operation *oper, } } } + else if (n == 3 && isFloat[0] && isFloat[1] && isFloat[2]) { + /* vec3(flt, flt, flt) constructor */ + if (oper->type == slang_oper_call) { + if (strcmp((char *) oper->a_id, "vec3") == 0) { + oper->literal[0] = oper->children[0].literal[0]; + oper->literal[1] = oper->children[1].literal[0]; + oper->literal[2] = oper->children[2].literal[0]; + oper->literal[3] = 0.0; + slang_operation_destruct(oper); + oper->type = slang_oper_literal_float; + } + } + } } -- cgit v1.2.3 From c41099465370721ae4aaf05cd0223b28a4835bc1 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 16:38:12 -0700 Subject: Implement the ++var and --var operators, improve some constructors. --- src/mesa/shader/slang/library/slang_core.gc | 213 ++-- src/mesa/shader/slang/library/slang_core_gc.h | 1414 +++++++++++++------------ src/mesa/shader/slang/slang_codegen.c | 27 +- 3 files changed, 843 insertions(+), 811 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 75f54a8cee..890b38a6c1 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -102,13 +102,13 @@ // //bp: -vec4 vec4(const float a1, const float b1, const float c1, const float d1) -{ - __retVal.x = a1; - __retVal.y = b1; - __retVal.z = c1; - __retVal.w = d1; -} +//vec4 vec4(const float a1, const float b1, const float c1, const float d1) +//{ +// __retVal.x = a1; +// __retVal.y = b1; +// __retVal.z = c1; +// __retVal.w = d1; +//} //// //// Assorted constructors @@ -150,12 +150,14 @@ int __constructor (const int i) { return i; } -float __constructor (const float f) { - return f; +float __constructor(const float f) +{ + __retVal = f.x; } -vec2 __constructor (const float f) { - return vec2 (f, f); +vec2 __constructor(const float f) +{ + __retVal.xy = f.xx; } vec2 __constructor (const int i) { @@ -170,10 +172,7 @@ vec2 __constructor (const bool b) { vec3 __constructor(const float f) { -// return vec3 (f, f, f); - __retVal.x = f; - __retVal.y = f; - __retVal.z = f; + __retVal.xyz = f.xxx; } vec3 __constructor (const int i) { @@ -192,11 +191,9 @@ vec3 __constructor(const vec4 v) } - - -//bp: TODO replace with asm == f.xxxx -vec4 __constructor (const float f) { - return vec4 (f, f, f, f); +vec4 __constructor(const float f) +{ + __retVal.xyzw = f.xxxx; } vec4 __constructor (const int i) { @@ -1899,140 +1896,155 @@ void __operator *= (inout vec4 v, const mat4 m) //// pre-decrement operators -void __operator -- (inout int a) +int __operator --(inout int a) { - a -= 1; + a = a - 1; + __retVal = a; } -void __operator -- (inout ivec2 v) +ivec2 __operator --(inout ivec2 v) { - --v.x; - --v.y; + v = v - ivec2(1); + __retVal = v; } -void __operator -- (inout ivec3 v) +ivec3 __operator --(inout ivec3 v) { - --v.x; - --v.y; - --v.z; + v = v - ivec3(1); + __retVal = v; } -void __operator -- (inout ivec4 v) +ivec4 __operator --(inout ivec4 v) { - --v.x; - --v.y; - --v.z; - --v.w; + v = v - ivec4(1); + __retVal = v; } -void __operator -- (inout float a) + +float __operator --(inout float a) { - a -= 1.0; + a = a - 1.0; + __retVal = a; } -void __operator -- (inout vec2 v) +vec2 __operator --(inout vec2 v) { - vec2 one = vec1(1.0, 1.0); - v = v - one; + v = v - vec2(1.0); + __retVal = v; } -void __operator -- (inout vec3 v) +vec3 __operator --(inout vec3 v) { - vec3 one = vec1(1.0, 1.0, 1.0); - v = v - one; + v = v - vec3(1.0); + __retVal = v; } -void __operator -- (inout vec4 v) +vec4 __operator --(inout vec4 v) { - vec4 one = vec1(1.0, 1.0, 1.0, 1.0); - v = v - one; + v = v - vec4(1.0); + __retVal = v; } -void __operator -- (inout mat2 m) + +mat2 __operator --(inout mat2 m) { - --m[0]; - --m[1]; + m[0] = m[0] - vec2(1.0); + m[1] = m[1] - vec2(1.0); + __retVal = m; } -void __operator -- (inout mat3 m) +mat3 __operator --(inout mat3 m) { - --m[0]; - --m[1]; - --m[2]; + m[0] = m[0] - vec3(1.0); + m[1] = m[1] - vec3(1.0); + m[2] = m[2] - vec3(1.0); + __retVal = m; } -void __operator -- (inout mat4 m) +mat4 __operator --(inout mat4 m) { - --m[0]; - --m[1]; - --m[2]; - --m[3]; + m[0] = m[0] - vec4(1.0); + m[1] = m[1] - vec4(1.0); + m[2] = m[2] - vec4(1.0); + m[3] = m[3] - vec4(1.0); + __retVal = m; } //// pre-increment operators -void __operator ++ (inout float a) +float __operator ++(inout int a) { - a += 1.0; + a = a + 1; + __retVal = a; } -void __operator ++ (inout int a) { - a += 1; +ivec2 __operator ++(inout ivec2 v) +{ + v = v + ivec2(1); + __retVal = v; } -void __operator ++ (inout vec2 v) { - ++v.x; - ++v.y; +ivec3 __operator ++(inout ivec3 v) +{ + v = v + ivec3(1); + __retVal = v; } -void __operator ++ (inout vec3 v) { - ++v.x; - ++v.y; - ++v.z; +ivec4 __operator ++(inout ivec4 v) +{ + v = v + ivec4(1); + __retVal = v; } -void __operator ++ (inout vec4 v) { - ++v.x; - ++v.y; - ++v.z; - ++v.w; + +float __operator ++(inout float a) +{ + a = a + 1.0; + __retVal = a; } -void __operator ++ (inout ivec2 v) { - ++v.x; - ++v.y; +vec2 __operator ++(inout vec2 v) +{ + v = v + vec2(1.0); + __retVal = v; } -void __operator ++ (inout ivec3 v) { - ++v.x; - ++v.y; - ++v.z; +vec3 __operator ++(inout vec3 v) +{ + v = v + vec3(1.0); + __retVal = v; } -void __operator ++ (inout ivec4 v) { - ++v.x; - ++v.y; - ++v.z; - ++v.w; +vec4 __operator ++(inout vec4 v) +{ + v = v + vec4(1.0); + __retVal = v; } -void __operator ++ (inout mat2 m) { - ++m[0]; - ++m[1]; + +mat2 __operator ++(inout mat2 m) +{ + m[0] = m[0] + vec2(1.0); + m[1] = m[1] + vec2(1.0); + __retVal = m; } -void __operator ++ (inout mat3 m) { - ++m[0]; - ++m[1]; - ++m[2]; +mat3 __operator ++(inout mat3 m) +{ + m[0] = m[0] + vec3(1.0); + m[1] = m[1] + vec3(1.0); + m[2] = m[2] + vec3(1.0); + __retVal = m; } -void __operator ++ (inout mat4 m) { - ++m[0]; - ++m[1]; - ++m[2]; - ++m[3]; +mat4 __operator ++(inout mat4 m) +{ + m[0] = m[0] + vec4(1.0); + m[1] = m[1] + vec4(1.0); + m[2] = m[2] + vec4(1.0); + m[3] = m[3] + vec4(1.0); + __retVal = m; } @@ -2208,6 +2220,13 @@ bool __operator ! (const bool a) { return a == false; } +bool __logicalAnd(const bool a, const bool b) +{ + if (a) + return b; + return false; +} + // diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 4a7a58499f..fd99ea7759 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -2,714 +2,732 @@ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ /* slang_core.gc */ -3,1,0,12,0,118,101,99,52,0,1,1,0,9,97,49,0,0,1,1,0,9,98,49,0,0,1,1,0,9,99,49,0,0,1,1,0,9,100,49,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,97,49,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,59,121,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,99,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,119,0,18,100,49,0,20,0,0,1,0,5,1,1,1,0,9,102,0,0,0,1,3,2,0,5,1,105,0,0, -0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,105,0,0,18,102,0,0,0,8,18,105,0,0,0,1,0,1,1, -1,1,0,5,105,0,0,0,1,8,18,105,0,16,8,48,0,39,0,0,1,0,1,1,1,1,0,9,102,0,0,0,1,8,18,102,0,17,48,0,48, -0,0,39,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,8,18,98,0,16,10,49,0,16,8,48,0,31,0,0,1,0,9,1,1,1,0,1,98,0,0, -0,1,8,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,1,0,9,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,102,0,0,0, -4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1, -1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5,105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0, -0,1,8,18,102,0,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,50,0,18,102,0,0,18,102,0,0,0,0,0,1, -0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118, -101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, -102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,102,0,20,0,0,1,0,11,1,1,1,0,5,105,0,0,0, -1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8, -58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,51,0,18,98,0,17,49, -0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99, -52,0,18,102,0,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120, -0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52, -0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0, -48,0,0,31,0,0,0,0,1,0,12,1,1,1,0,11,118,51,0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0, -0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9, -102,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0, -0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58, -105,118,101,99,51,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105, -118,101,99,51,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101, -99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0, -18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99, -52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58, -105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18, -98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0, -0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0, -0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1, -1,0,9,102,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5, -105,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0, -0,0,1,8,58,98,118,101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0, -0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1, -8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58, -109,97,116,50,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105, -0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0, -0,8,58,109,97,116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0, -17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102, -0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0, -0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116, -95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1, -0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1, -0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48, -0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0, -48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, -0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8, -58,109,97,116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1, -1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1, -1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0, -0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97, -100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95, -116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98, -0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, -0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95, -97,100,100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95, -116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98, -0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98, -0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0, -4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1, -1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116, -95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111, -97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18, -120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18, -99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0, -18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1, -1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59, -121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1, -0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, -59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7, -117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18, -117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1, -0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121, -0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0, -1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59, -121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118, -0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0, -59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8, -118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18, -118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0, -18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52, -0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, -122,0,18,117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118, -0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0, -59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117, -0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18, -118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0, -18,117,0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97, -0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1, -0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4, -102,108,111,97,116,95,100,105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98, -0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1, -0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2, -26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4, +3,1,0,5,1,1,1,0,9,102,0,0,0,1,3,2,0,5,1,105,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, +18,105,0,0,18,102,0,0,0,8,18,105,0,0,0,1,0,1,1,1,1,0,5,105,0,0,0,1,8,18,105,0,16,8,48,0,39,0,0,1,0, +1,1,1,1,0,9,102,0,0,0,1,8,18,102,0,17,48,0,48,0,0,39,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,8,18,98,0,16, +10,49,0,16,8,48,0,31,0,0,1,0,9,1,1,1,0,1,98,0,0,0,1,8,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0, +1,0,9,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,102,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0, +18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5, +105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0, +59,120,0,20,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18, +102,0,59,120,120,0,20,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116, +111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1, +1,1,0,1,98,0,0,0,1,8,58,118,101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1, +1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0, +20,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8, +58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,12,118,0,0,0,1, +9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1,1,1, +0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,18,102,0,59,120,120,120, +120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0, +0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,12,1,1,1,0,11,118,51, +0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118, +101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,50,0,58, +105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110, +116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0,18,105,0, +0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,102,0, +0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0, +0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0, +0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1, +0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1, +0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58, +98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98, +118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118, +101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,51, +0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51,0,58, +98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18,98,0,0, +18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111, +111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111, +108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48, +0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0, +0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0, +0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, +17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1, +0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97, +116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97, +116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, +17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17, +48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2, +0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109, +97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0, +0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1, +1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2, +26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, +59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, +0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, +2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103, +97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, +59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, +0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, +2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108, +116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105, +110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0, +9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102, +108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97, +116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1, +1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, +121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1, +0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, +59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6, +117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18, +117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0, +18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122, +0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99, +51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, +122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, +99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0, +59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, +101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18, +118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0, +46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8, +2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18, +118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, +48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8, +2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, +118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2, +27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0, +0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0, +18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100, +105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,2,26,1,1,0, +10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, +0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119, +0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1, +0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, +115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1, +0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, +59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0, +59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12, +2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0, +0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4, 102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, 95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0, -0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, -0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, -12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1, -3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117, -0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59, -120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18, -98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117, -98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18, -117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0, -18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0, -0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, -121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,105, -110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59, -120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0, -0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1, -0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, -66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1, -1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11, -118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0, -1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1, -1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0, -1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120, -121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0, -18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110, -118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0, -0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1, -1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118,66,0,59,120,120,120,0,0, -0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, -98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, -115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0, -18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, -0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, -12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1, -0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0, -0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,119,0,0,18,117, -0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9, -98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0, -0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0, -5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0, -6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1, -0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1, -0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1, -1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1, -1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0, -1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0, -1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0, -0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0, -0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118, -0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97, -0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5, -97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5, -97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0, -18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4, -102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1, -0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7, -2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18, -118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120, -0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0, -0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0, -0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103, -97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, -50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0, -1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111, -116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0, -18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99, -51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116, -0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97, -108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110, -116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0, -2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5, -98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0, -58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1, -0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117, -0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1, -0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, -59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120, -0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0, -59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120, -0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0, -0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0, -0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8, -118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0, -22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59, -119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0, -1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1, -0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0, -0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1, -0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0, -0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18, -118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2, -10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117, -0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117, -0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0, -9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1, -1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117, -0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4, -1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121, -0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0, -59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18, -118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118, -0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0, -0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0, -0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0, -59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0, -22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0, -1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59, -122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0, -9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1, -0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0, -0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, -0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0, -0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120, -120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0, -9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0, -0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120, -121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120, -0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0, +119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18, +117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59, +120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1, +0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1, +0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1, +0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0, +1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0, +0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18, +105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105, +110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, +0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0, +59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, +4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59, +120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9, +98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97, +0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2, +21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0, +0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108, +111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0, +0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0, +9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, +0,0,18,118,0,59,120,121,122,0,0,18,105,110,118,66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97, +0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97, +0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0, +0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27, +1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1, +0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0, +0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118, +0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1, +105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0, +59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0, +0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120, +120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, +105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, +118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, +118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, +118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, +118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, +118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, +118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, +118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, +118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, +118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, +118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, +118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, +118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, +0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2, +0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108, +111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95, +105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58, +105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0, +8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, +18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27, +1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110, +101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0, +0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0, +9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0, +10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1, +0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12, +98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0, +0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98, +0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105, +110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1, +0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97, +0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0, +2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1, +0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1, +0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0, +18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1, +0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, +0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8, +118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0, +23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59, +119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, +119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10, +118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0, +0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, +59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, +1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0, +2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0, +18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1, +0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1, +0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1, +0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0, +2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97, +0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0, +59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0, +23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, +120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1, +9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0, +0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121, +0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9, +18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0, +1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0, +18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118, +101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2, +8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0, +0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, +0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, +97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10, +118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18, +97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117, +98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0, +2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3, +2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0, +0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121, +0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11, +118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121, +122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0, +59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59, +120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0, +18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0, +0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, +120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0, 1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0, -0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1, -4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0, -0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, -0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0, -1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0, -0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9, -1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121, -122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, -52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118, -0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18, -97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2, -4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13, -109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109, -82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18, -109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, -20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116, +118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0, +18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1, +0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110, +0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59, +120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57, +59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, +111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, +18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0, +13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, +16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2, +21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, +0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20, +0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, +59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109, +82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, +20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116, 86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, 0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, -119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, +119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, +0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111, +119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121, +0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111, +119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122, +0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14, +109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, +50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, +57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1, +0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1, +109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8, +48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, +109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119, +0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59, +121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111, +119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0, +16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0, +9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59, +122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82, +111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18, +109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, +48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, +100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111, +119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, 0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, 86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0, -0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20, -0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82, -111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57, -59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82, -111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50, -0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49, -0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, -0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0, -18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, -0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0, -18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0, -14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, -110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, -0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82, -111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59, -120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57, -59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82, -111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49, -0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48, -0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109, -82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18, -109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0, -20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51, -0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10, -51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, -109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116, -0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18, -110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111, -116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0, -18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100, -111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0, -0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100, -111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0, -1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110, -0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82, +111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82, +111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, +122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51, +0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, +119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50, +0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1, +9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50, +0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16, +10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97, +0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, +0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20, +0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9, +98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2, +22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0, +9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9, +97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, +48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0, +14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, +110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0, 0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0, -1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, -0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1, -0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1, -0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1, -1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0, -0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2, +26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0, +15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0, +0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, 18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, 110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, -10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97, -0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, -0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14, -2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0, -49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, -110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16, -10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0, -1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0, -15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, -21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111, -116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, -111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0, -0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, -20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0, -16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0, -14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, -109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, -0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, -111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0, -0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59, -122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, -20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0, -16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50, -0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59, -122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0, -18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, -0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0, -20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1, -114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59, -120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, -114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, -57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, -18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59, -122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, -20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, -114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0, -0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, -118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0, -0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, -1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, -0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, -0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, -0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, -0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, -10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, -1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, -57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, -0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, -50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, -10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0, -13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, -0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, -118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0, -2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7, -118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2, -25,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0, -9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,0,0,2, -25,1,0,2,10,118,0,0,0,1,3,2,0,10,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48, -0,0,0,0,0,0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,3,2,0, -11,1,111,110,101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,9, -18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,3,2,0,12,1,111,110, -101,0,2,58,118,101,99,49,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,17,49,0,48,0,0,0,0,0, -0,9,18,118,0,18,118,0,18,111,110,101,0,47,20,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8, -48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0, -0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18, -109,0,16,10,51,0,57,52,0,0,1,0,0,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2, -24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59, -120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9, -18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59, -120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24, -1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0, -0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2, -8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118, -0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49, -0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57, -51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0, -9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9, -2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0, -5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1, -0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59, -121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120, -0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0, -0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18, -118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18, -118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58, -105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0, -8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59, -121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0, -5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14, -2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16, -10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8, -58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57, -61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2, -18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0, -2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118, -101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0, -5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60, -0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0, -18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118, -0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1, -0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0, -59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118, -101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0, -60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, -60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97, -116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0, -1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18, -109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15, -1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, -97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9, -98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97, -0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0, -0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0, -1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0, -0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101, -0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0, -1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108, -111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0, -1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, -116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0, -1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116, -0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112, +10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, +47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, +18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, +16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18, +118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114, +49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, +0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114, +49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, +100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, +111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118, +0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0, +0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121, +0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, +9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, +49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59, +120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, +20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21, +1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0, +18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111, +116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, +100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, +0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0, +15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0, +59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, +0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0, +16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49, +0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, +121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18, +114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, +0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, +1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0, +14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0, +15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57, +18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, +10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0, +0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2, +15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18, +109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109, +0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, +0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, +10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, +9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, +23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, +18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, +9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, +57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, +0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, +0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, +24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, +51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109, +0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, +1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25, +1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0, +20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0, +18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18, +97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10, +118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, +109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, +101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101, +99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99, +51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0, +2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, +0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,9,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, +10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49, +0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118, +101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2, +24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58, +118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0, +13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0, +48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9, +18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, +0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16, +10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109, +0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8, +18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0, +8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, +61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51, +0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12, +118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, +0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105, +118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1, +0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122, +0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0, +61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2, +13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57, +61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57, +61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1, +1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0, +16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, +0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, +2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0, +1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11, +118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118, +0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, +59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, +24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, +0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, +1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, +118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, +0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, +8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, +60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, +60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, +1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, +0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, +1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, +18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, +0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, +0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, +1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, +4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, +32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, +39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,1,0,95,95,108,111,103,105,99, +97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0, +0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114, +105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1, +98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112, 114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, 118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, 105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, -101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112, -114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4, -105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7, +118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0, +57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116, +77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49, +0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16, +8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17, +101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110, +116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index df83b4d34a..26a65e722c 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1303,10 +1303,10 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, fun = _slang_locate_function(A->space.funcs, atom, params, param_count, &A->space, A->atoms); if (!fun) { + /* XXX temporary */ print_funcs(A->space.funcs); - - fun = _slang_locate_function(A->space.funcs, atom, params, param_count, - &A->space, A->atoms); + fun = _slang_locate_function(A->space.funcs, atom, params, param_count, + &A->space, A->atoms); RETURN_ERROR2("Undefined function", name, 0); } @@ -2027,7 +2027,6 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *assign = new_node(IR_MOVE, var, sum); return assign; } - case slang_oper_postdecrement: /* var-- */ /* XXX not 100% about this */ { @@ -2040,21 +2039,17 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_preincrement: /* ++var */ { - slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); - slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); - slang_ir_node *sum = new_node(IR_ADD, var, one); - slang_ir_node *assign = new_node(IR_MOVE, var, sum); - assign->Store = var->Store; - return assign; + slang_ir_node *n; + assert(oper->num_children == 1); + n = _slang_gen_function_call_name(A, "++", oper, NULL); + return n; } case slang_oper_predecrement: /* --var */ { - slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); - slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); - slang_ir_node *sum = new_node(IR_SUB, var, one); - slang_ir_node *assign = new_node(IR_MOVE, var, sum); - assign->Store = var->Store; - return assign; + slang_ir_node *n; + assert(oper->num_children == 1); + n = _slang_gen_function_call_name(A, "--", oper, NULL); + return n; } case slang_oper_sequence: -- cgit v1.2.3 From f6507157e290b783c036e9459886e0f7ae60ef7b Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Jan 2007 16:54:38 -0700 Subject: Reimplement the post-increment/decrement functions. Instead of defining functions with an extra dummy parameter to distinguish from the pre-incr/decr functions, just use new function names: __postIncr and __postDecr. --- src/mesa/shader/slang/library/slang_core.gc | 128 ++++++++++------- src/mesa/shader/slang/library/slang_core_gc.h | 192 ++++++++++++++------------ src/mesa/shader/slang/slang_codegen.c | 21 ++- 3 files changed, 190 insertions(+), 151 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 890b38a6c1..d7f0976fde 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1973,7 +1973,7 @@ mat4 __operator --(inout mat4 m) //// pre-increment operators -float __operator ++(inout int a) +int __operator ++(inout int a) { a = a + 1; __retVal = a; @@ -2049,105 +2049,135 @@ mat4 __operator ++(inout mat4 m) +//// post-decrement -// -// NOTE: post-increment and decrement operators take an additional -// dummy int parameter to distinguish their prototypes from prefix ones. -// - -float __operator -- (inout float a, const int) { - float b = a; - --a; - return b; +int __postDecr(inout int a) +{ + __retVal = a; + a = a - 1; } -int __operator -- (inout int a, const int) { - int b = a; - --a; - return b; +ivec2 __postDecr(inout ivec2 v) +{ + __retVal = v; + v = v - ivec2(1); } -vec2 __operator -- (inout vec2 v, const int) { - return vec2 (v.x--, v.y--); +ivec3 __postDecr(inout ivec3 v) +{ + __retVal = v; + v = v - ivec3(1); } -vec3 __operator -- (inout vec3 v, const int) { - return vec3 (v.x--, v.y--, v.z--); +ivec4 __postDecr(inout ivec4 v) +{ + __retVal = v; + v = v - ivec4(1); } -vec4 __operator -- (inout vec4 v, const int) { - return vec4 (v.x--, v.y--, v.z--, v.w--); -} -ivec2 __operator -- (inout ivec2 v, const int) { - return ivec2 (v.x--, v.y--); +float __postDecr(inout float a) +{ + __retVal = v; + v = v - 1.0; } -ivec3 __operator -- (inout ivec3 v, const int) { - return ivec3 (v.x--, v.y--, v.z--); +vec2 __postDecr(inout vec2 v) +{ + __retVal = v; + v = v - vec2(1.0); } -ivec4 __operator -- (inout ivec4 v, const int) { - return ivec4 (v.x--, v.y--, v.z--, v.w--); +vec3 __postDecr(inout vec3 v) +{ + __retVal = v; + v = v - vec3(1.0); } -mat2 __operator -- (inout mat2 m, const int) { - return mat2 (m[0]--, m[1]--); +vec4 __postDecr(inout vec4 v) +{ + __retVal = v; + v = v - vec4(1.0); } -mat3 __operator -- (inout mat3 m, const int) { - return mat3 (m[0]--, m[1]--, m[2]--); + +mat2 __postDecr(inout mat2 m) +{ + __retVal = m; + m[0] = m[0] - vec2(1.0); + m[1] = m[1] - vec2(1.0); } -mat4 __operator -- (inout mat4 m, const int) { - return mat4 (m[0]--, m[1]--, m[2]--, m[3]--); +mat3 __postDecr(inout mat3 m) +{ + __retVal = m; + m[0] = m[0] - vec3(1.0); + m[1] = m[1] - vec3(1.0); + m[2] = m[2] - vec3(1.0); } -float __operator ++ (inout float a, const int) { - float b = a; - ++a; - return b; +mat4 __postDecr(inout mat4 m) +{ + __retVal = m; + m[0] = m[0] - vec4(1.0); + m[1] = m[1] - vec4(1.0); + m[2] = m[2] - vec4(1.0); + m[3] = m[3] - vec4(1.0); } -int __operator ++ (inout int a, const int) { - int b = a; + +//// post-increment + +float __postIncr(inout float a) { + float b = a; ++a; return b; } -vec2 __operator ++ (inout vec2 v, const int) { +vec2 __postIncr(inout vec2 v) { return vec2 (v.x++, v.y++); } -vec3 __operator ++ (inout vec3 v, const int) { +vec3 __postIncr(inout vec3 v) { return vec3 (v.x++, v.y++, v.z++); } -vec4 __operator ++ (inout vec4 v, const int) { - return vec4 (v.x++, v.y++, v.z++, v.w++); +vec4 __postIncr(inout vec4 v) +{ + __retVal = v; + v = v + vec4(1.0); +} + + +int __postIncr(inout int a) { + int b = a; + ++a; + return b; } -ivec2 __operator ++ (inout ivec2 v, const int) { +ivec2 __postIncr(inout ivec2 v) { return ivec2 (v.x++, v.y++); } -ivec3 __operator ++ (inout ivec3 v, const int) { +ivec3 __postIncr(inout ivec3 v) { return ivec3 (v.x++, v.y++, v.z++); } -ivec4 __operator ++ (inout ivec4 v, const int) { +ivec4 __postIncr(inout ivec4 v) { return ivec4 (v.x++, v.y++, v.z++, v.w++); } -mat2 __operator ++ (inout mat2 m, const int) { + + +mat2 __postIncr(inout mat2 m) { return mat2 (m[0]++, m[1]++); } -mat3 __operator ++ (inout mat3 m, const int) { +mat3 __postIncr(inout mat3 m) { return mat3 (m[0]++, m[1]++, m[2]++); } -mat4 __operator ++ (inout mat4 m, const int) { +mat4 __postIncr(inout mat4 m) { return mat4 (m[0]++, m[1]++, m[2]++, m[3]++); } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index fd99ea7759..2787a47d09 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -618,7 +618,7 @@ 0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, 20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, 9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,9,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, +95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, 10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9, 18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, 18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49, @@ -641,93 +641,107 @@ 109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, 0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16, 10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8, -18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0, -8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, -61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51, -0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12, -118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118, -0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105, -118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1, -0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122, -0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0, -61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2, -13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57, -61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57, -61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1, -1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0, -16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2, -0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3, -2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0, -1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11, -118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118, -0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0, -59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2, -24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121, -0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0, -60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0, -1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18, -118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109, -0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1, -8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57, -60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57, -60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0, -1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, -108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0, -1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0, -0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0, -18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0, -1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, -18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, -0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0, -0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1, -1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0, -4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0, -32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0, -39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,1,0,95,95,108,111,103,105,99, -97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0, -0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114, -105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1, -98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7, -118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58, +0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68, +101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, +118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114, +0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, +118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52, +0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0, +95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112, +111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, +9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116, +68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, +18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99, +114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116, +68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0, +57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111, +115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18, +109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0, +16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98, +0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18, +118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1, +0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, +122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46, +20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0, +0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8, +58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111, +115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118, +0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8, +118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122, +0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0, +0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, +57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115, +116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0, +16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0, +9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98, +0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0, +0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0, +58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1, +103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4, +102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32, +0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, +111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, +101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111, +97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, +17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2, +29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110, +100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116, +0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1, +4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, 112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0, -57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116, -77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49, -0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16, -8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, +105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, 101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110, -116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 26a65e722c..7872d0ce8f 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2019,24 +2019,19 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return new_float_literal(oper->literal[0], 0, 0, 0); case slang_oper_postincrement: /* var++ */ - /* XXX not 100% about this */ { - slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); - slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); - slang_ir_node *sum = new_node(IR_ADD, var, one); - slang_ir_node *assign = new_node(IR_MOVE, var, sum); - return assign; + slang_ir_node *n; + assert(oper->num_children == 1); + n = _slang_gen_function_call_name(A, "__postIncr", oper, NULL); + return n; } case slang_oper_postdecrement: /* var-- */ - /* XXX not 100% about this */ { - slang_ir_node *var = _slang_gen_operation(A, &oper->children[0]); - slang_ir_node *one = new_float_literal(1.0, 1.0, 1.0, 1.0); - slang_ir_node *sum = new_node(IR_ADD, var, one); - slang_ir_node *assign = new_node(IR_MOVE, var, sum); - return assign; + slang_ir_node *n; + assert(oper->num_children == 1); + n = _slang_gen_function_call_name(A, "__postDecr", oper, NULL); + return n; } - case slang_oper_preincrement: /* ++var */ { slang_ir_node *n; -- cgit v1.2.3 From 156e583a350670cb877879673b8d050b11f973dc Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 10:45:34 -0700 Subject: fix _slang_gen_subscript() for the case when a simple vector is accessed as an array: convert index to a swizzle/writemask --- src/mesa/shader/slang/slang_codegen.c | 69 ++++++++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 7872d0ce8f..bd49a265b2 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1760,23 +1760,58 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) static slang_ir_node * _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) { - slang_assembly_typeinfo elem_ti; - slang_ir_node *elem, *array, *index; - GLint elemSize; - - /* size of array element */ - slang_assembly_typeinfo_construct(&elem_ti); - _slang_typeof_operation(A, oper, &elem_ti); - elemSize = _slang_sizeof_type_specifier(&elem_ti.spec); - assert(elemSize >= 1); - - array = _slang_gen_operation(A, &oper->children[0]); - index = _slang_gen_operation(A, &oper->children[1]); - elem = new_node(IR_ELEMENT, array, index); - elem->Store = _slang_new_ir_storage(array->Store->File, - array->Store->Index, - elemSize); - return elem; + slang_assembly_typeinfo array_ti; + + /* get array's type info */ + slang_assembly_typeinfo_construct(&array_ti); + _slang_typeof_operation(A, &oper->children[0], &array_ti); + + if (_slang_type_is_vector(array_ti.spec.type)) { + /* indexing a simple vector type: "vec4 v; v[0]=p;" */ + /* translate the index into a swizzle/writemask: "v.x=p" */ + const GLuint max = _slang_type_dim(array_ti.spec.type); + GLint index; + slang_ir_node *n; + + index = (GLint) oper->children[1].literal[0]; + if (oper->children[1].type != slang_oper_literal_int || + index >= max) { + RETURN_ERROR("Invalid array index", 0); + } + + n = _slang_gen_operation(A, &oper->children[0]); + if (n) { + /* use swizzle to access the element */ + n->Swizzle = SWIZZLE_X + index; + n->Writemask = WRITEMASK_X << index; + } + return n; + } + else { + /* conventional array */ + slang_assembly_typeinfo elem_ti; + slang_ir_node *elem, *array, *index; + GLint elemSize; + + /* size of array element */ + slang_assembly_typeinfo_construct(&elem_ti); + _slang_typeof_operation(A, oper, &elem_ti); + elemSize = _slang_sizeof_type_specifier(&elem_ti.spec); + assert(elemSize >= 1); + + array = _slang_gen_operation(A, &oper->children[0]); + index = _slang_gen_operation(A, &oper->children[1]); + if (array && index) { + elem = new_node(IR_ELEMENT, array, index); + elem->Store = _slang_new_ir_storage(array->Store->File, + array->Store->Index, + elemSize); + return elem; + } + else { + return NULL; + } + } } -- cgit v1.2.3 From 99e788fe561b1dd54ce083d3f05e6895fb91953a Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 14:10:30 -0700 Subject: some additional vector constructors --- src/mesa/shader/slang/library/slang_core.gc | 30 +- src/mesa/shader/slang/library/slang_core_gc.h | 1452 +++++++++++++------------ 2 files changed, 758 insertions(+), 724 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index d7f0976fde..78b983ce9a 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -155,11 +155,20 @@ float __constructor(const float f) __retVal = f.x; } + +//// vec2 constructors + vec2 __constructor(const float f) { __retVal.xy = f.xx; } +vec2 __constructor(const float x, const float y) +{ + __retVal.x = x; + __retVal.y = y; +} + vec2 __constructor (const int i) { float x; __asm int_to_float x, i; @@ -170,11 +179,26 @@ vec2 __constructor (const bool b) { return vec2 (b ? 1.0 : 0.0); } +vec2 __constructor(const vec3 v) +{ + __retVal.xy = v.xy; +} + + +//// vec3 constructors + vec3 __constructor(const float f) { __retVal.xyz = f.xxx; } +vec3 __constructor(const float x, const float y, const float z) +{ + __retVal.x = x; + __retVal.y = y; + __retVal.z = z; +} + vec3 __constructor (const int i) { float x; __asm int_to_float x, i; @@ -191,6 +215,8 @@ vec3 __constructor(const vec4 v) } +//// vec4 constructors + vec4 __constructor(const float f) { __retVal.xyzw = f.xxxx; @@ -484,7 +510,9 @@ float __operator * (const float a, const float b) float __operator / (const float a, const float b) { - __asm float_divide __retVal, a, b; + float bInv; + __asm float_rcp bInv.x, b.x; + __asm vec4_multiply __retVal.x, a, bInv; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 2787a47d09..654accbcb3 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -10,738 +10,744 @@ 18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5, 105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0, 59,120,0,20,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18, -102,0,59,120,120,0,20,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116, -111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1, -1,1,0,1,98,0,0,0,1,8,58,118,101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1, -1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0, -20,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8, -58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0,12,118,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1,1,1, -0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,18,102,0,59,120,120,120, -120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0, -0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,12,1,1,1,0,11,118,51, -0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118, -101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,50,0,58, -105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110, -116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0,18,105,0, -0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,102,0, -0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0, -0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0, -0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1, -0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1, -0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58, -98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98, -118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118, -101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,51, -0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51,0,58, -98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18,98,0,0, -18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111, -111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111, -108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48, -0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0, -0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0, -0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1, -0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97, -116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97, -116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17, -48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2, -0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109, -97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0, -0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1, -1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2, -26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, -59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, -0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, -2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103, -97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, -59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, -0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, -2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108, -116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105, -110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0, -9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102, -108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97, -116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1, -1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, -121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1, -0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, -59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18, -117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0, -18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122, -0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99, -51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, -122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, -99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0, -59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, -101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18, -118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0, -46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8, -2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18, -118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, -48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8, -2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, +102,0,59,120,120,0,20,0,0,1,0,10,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0,1,0,10, +1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120, +0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99, +50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,10,1,1,1,0,11,118,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,18,118,0,59,120,121,0,20,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,11,1,1,1,0,9,120, +0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, +122,0,18,122,0,20,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95, +102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0, +1,98,0,0,0,1,8,58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0, +12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0, +0,1,0,12,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,18,102,0,59, +120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111, +95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1, +0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,12,1,1,1, +0,11,118,51,0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8, +58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99, +50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58, +105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0, +18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0, +18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,98,0, +0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0, +18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,102,0,0, +0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0, +1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0, +0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1, +8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58, +98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101, +99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51, +0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18, +98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58, +98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98, +111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17, +48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4, +105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120, +0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0, +31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0, +48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, +0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8, +58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8, +58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, +18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0, +48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105, +0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0, +0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0, +17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12, +114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,114,51,0, +20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0, +0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116, +111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120, +0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, +99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1, +1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0, +0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116, +95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59, +120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, +18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, +0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18, +97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97, +116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116, +95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5, +98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18, +98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4, +102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1, +0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0, +18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, +105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0, +47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120, +0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0, +1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59, +121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, +99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, +59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, +101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18, +118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58, +105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, +48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1, +8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59, +121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0, +0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, +59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0, +0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18, +117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0, +47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1, +8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59, +121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0, +1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0, +59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, 118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, 99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2, 27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95, 114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0, 0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0, -18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100, -105,118,105,100,101,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,2,26,1,1,0, -10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, -0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119, -0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1, -0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, -115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, -59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0, -59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12, -2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0, -0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18, -117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59, -120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1, -0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1, -0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1, -0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0, -1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0, -0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18, -105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105, -110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, -0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0, -59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, -4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59, -120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4, -118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9, -98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97, -0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2, -21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0, -0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0, -0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0, -9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, -0,0,18,118,0,59,120,121,122,0,0,18,105,110,118,66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97, -0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97, -0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0, -0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27, -1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1, -0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0, -0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118, -0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1, -105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0, -59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0, -0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120, -120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, -105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, -105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, -118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, -118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, -118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105, -118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, -118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, -118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, -118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105, -118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, -118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, -118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, -118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105, -118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118, -0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2, -0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,108, -111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,95, -105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58, -105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0, -8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, -18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27, -1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110, -101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0, -0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114, -101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0, -9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0, -10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1, -0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12, -98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0, -0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0, -18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98, -0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105, -110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1, -0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97, -0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0, -2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1, -0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1, -0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1, -0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, +18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,98,73,110,118,0,0,0, +4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0, +18,98,73,110,118,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1, +1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0, +10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, +119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11, +117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2, +0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12, +2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101, +99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1, +1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0, +18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9, +97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0, +9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0, +1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120, +0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18, +117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1, +0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0, +0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0, +1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0, +11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121, +122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98, +0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120, +120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117, +0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, +59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0, +0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117, +0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11, +2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118, +66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12, +2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0, +59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, +52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120, +120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0, +0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22, +1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, +59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0, +12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, +114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1, +0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1, +0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1, +0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1, +0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1, +0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1, +0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0, +0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2, +27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0, +0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, +54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, +59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2, +27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1, +0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52, +95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13, +109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0, +57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, +51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0, +1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48, +18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0, +0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, +0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18, +97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0, +0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5, +97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102, +108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0, +58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20, +0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118, +0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, +23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0, +2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0, +0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0, +1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0, +18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, 18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8, -118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0, -23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9, +122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0, +1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0, +0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1, +0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, +59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18, +97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, +59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117, +0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1, +0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0, +0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0, +11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, +12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0, +0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9, 18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59, -119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, -119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10, -118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0, -0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, -59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, -1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0, -2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1, -0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1, -0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1, -0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0, -2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97, -0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0, -59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0, -23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, -120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1, -9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0, -0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121, -0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9, -18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0, -18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118, -101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2, -8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0, -0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, -0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, -97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10, -118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18, -97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117, -98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0, -2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3, -2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0, -0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121, -0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11, -118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121, -122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0, -59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59, -120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0, -18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0, -0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, -120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0, -1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0, -18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1, -0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110, -0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59, -120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57, -59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, -111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, -18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0, -13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2, -21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, -0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20, -0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, -59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109, -82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, +119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118, +0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0, +0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0, +0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1, +1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21, +0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, +120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1, +0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0, +9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, +0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2, +8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120, +120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0, +1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, +97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0, +18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0, +59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0, +2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120, +120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1, +0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0, +0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18, +97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0, +59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1, +0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18, +118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, +0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1, +1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2, +21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, +0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2, +26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0, +0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, +9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, +120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, +59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, +111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109, +0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, +0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, +49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, +100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, +100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0, +0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, +10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, +47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51, +0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0, +1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111, +119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0, +16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, +9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, +120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, +59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, +111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, 109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, -20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, -119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, -0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111, -119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121, -0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111, -119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122, -0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14, -109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, -50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1, -0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1, -109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, -109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119, -0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59, -121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111, -119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0, -16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0, -9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59, -122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0, -57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82, -111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18, -109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, -48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, -100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111, -119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, -0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82, -111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82, -111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, -122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51, -0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, -119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50, -0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50, -0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16, -10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97, -0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, -0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20, -0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2, -22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0, -9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9, +20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50, +0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109, +82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18, +109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, +0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49, +0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58, +100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, +100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111, +119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119, +0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1, +0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, +109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0, +13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, +46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1, +0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0, +13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9, 97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0, -14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, -110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2, -26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0, -15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0, +14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, 0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, 0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0, -0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, -10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, -47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18, -118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114, -49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, -0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114, -49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, -111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118, -0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0, -0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121, -0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, -9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, -49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59, -120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, -20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21, -1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0, -18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111, -116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, -100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, -0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0, -15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0, -59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, -0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0, -16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49, -0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, -121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18, -114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, -57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0, -18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9, -18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, -0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, -1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0, -14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0, -15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57, -18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0, -0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2, -15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109, -0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, -0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, -10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, -23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, -18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, -57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, -0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, -0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, -51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109, -0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, -1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25, -1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0, -20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0, -18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18, -97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0, -2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, -109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, -101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101, -99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99, -51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0, -2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, -0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, -10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49, -0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118, -101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2, -24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58, -118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0, -13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9, -18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, -0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, -118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114, -0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52, -0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0, -95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112, -111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, -9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116, -68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, -18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116, -68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111, -115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18, -109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98, -0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18, -118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1, -0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, -122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46, -20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0, -0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8, -58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111, -115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118, -0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8, -118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122, -0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0, -0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0, -95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, -57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0, -16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0, -9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98, -0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0, -0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0, -58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1, -103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4, -102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32, -0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, -111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, -101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111, -97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, -17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2, -29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110, -100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116, -0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1, -4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, +0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, +110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2, +22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49, +20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9, +97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, +48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1, +1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, +0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, +21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111, +116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, +111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0, +0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, +20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0, +16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0, +14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, +109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, +0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, +111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0, +0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8, +48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59, +122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, +20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0, +16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50, +0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59, +122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0, +18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, +118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, +0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0, +20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1, +114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59, +120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, +114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, +57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59, +122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, +20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, +114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0, +0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, +118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0, +0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, +1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, +0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, +0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, +0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, +0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, +10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, +1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, +18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, +57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, +0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, +50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, +10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0, +13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, +0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, +118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20, +0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18, +118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20, +0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18, +118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116, +86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0, +17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11, +118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0, +2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, +0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10, +49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1, +9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10, +49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1, +9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10, +2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0, +58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1, +0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58, +118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0, +15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0, +48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101, +99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16, +10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20, +0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95, +95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115, +116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, +18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49, +0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0, +47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0, +1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0, +0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, +49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, +48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, +0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0, +17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, +49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, +48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2, +18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10, +118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60, +0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114, +0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118, +101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97, +0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73, +110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0, +60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99, +51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18, +118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115, +116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0, +16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58, +109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0, +0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18, +109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51, +0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, +95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5, +98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1, +2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115, +0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58, +102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97, +0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0, +18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0, +18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108, +111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1, +0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0, +0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0, +0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98, +0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,1,0, +95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18, +98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, +108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, +1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, 9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, -105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, -101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,101,0,0,0,0,0 +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, +65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, +0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, +0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From d90c655b0571c474785fa94b4c64ab099a2229a2 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 14:15:05 -0700 Subject: implement logical or, xor, not --- src/mesa/shader/slang/library/slang_core.gc | 21 ++++++- src/mesa/shader/slang/library/slang_core_gc.h | 90 ++++++++++++++------------- src/mesa/shader/slang/slang_codegen.c | 28 ++++++--- 3 files changed, 84 insertions(+), 55 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 78b983ce9a..063de8428b 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -2274,8 +2274,11 @@ bool __operator ^^ (const bool a, const bool b) { // } // -bool __operator ! (const bool a) { - return a == false; +bool __logicalNot(const bool a) +{ + if (a) + return false; + return true; } bool __logicalAnd(const bool a, const bool b) @@ -2285,6 +2288,20 @@ bool __logicalAnd(const bool a, const bool b) return false; } +bool __logicalOr(const bool a, const bool b) +{ + if (a) + return true; + return b; +} + +bool __logicalXor(const bool a, const bool b) +{ + if (a) + return __logicalNot(b); + return b; +} + // diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 654accbcb3..2cb69f167c 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -706,48 +706,52 @@ 0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0, 0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, 116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98, -0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,18,97,0,15,2,48,0,38,0,0,1,0,1,0, -95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18, -98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102, -108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, -1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1, +0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0, +0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65, +110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1, +0,95,95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2, +49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1, +1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14, +0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116, +95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, +0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0, +0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1, 9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114, +65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, +16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114, 105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0, -0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0, -0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index bd49a265b2..635f47c20e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2006,11 +2006,19 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } case slang_oper_logicalor: - printf("OR\n"); - abort(); + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = _slang_gen_function_call_name(A, "__logicalOr", oper, NULL); + return n; + } case slang_oper_logicalxor: - printf("XOR\n"); - abort(); + { + slang_ir_node *n; + assert(oper->num_children == 2); + n = _slang_gen_function_call_name(A, "__logicalXor", oper, NULL); + return n; + } case slang_oper_logicaland: { slang_ir_node *n; @@ -2018,13 +2026,13 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) n = _slang_gen_function_call_name(A, "__logicalAnd", oper, NULL); return n; } -#if 0 - printf("AND\n"); - return _slang_gen_logical_and(A, oper); -#endif case slang_oper_not: - printf("NOT\n"); - abort(); + { + slang_ir_node *n; + assert(oper->num_children == 1); + n = _slang_gen_function_call_name(A, "__logicalNot", oper, NULL); + return n; + } case slang_oper_asm: return _slang_gen_asm(A, oper, NULL); -- cgit v1.2.3 From 0f91310bf3e0955fad636e5d50c51ffabb9dcf82 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 14:17:57 -0700 Subject: comments --- src/mesa/shader/slang/library/slang_core.gc | 17 ++--- src/mesa/shader/slang/library/slang_core_gc.h | 93 +++++++++++++-------------- 2 files changed, 50 insertions(+), 60 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 063de8428b..0b5a912046 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -2257,22 +2257,12 @@ bool __operator <= (const int a, const int b) { return float (a) <= float (b); } -bool __operator ^^ (const bool a, const bool b) { - return a != b; -} +//bool __operator ^^ (const bool a, const bool b) { +// return a != b; +//} -// -// These operators are handled internally by the compiler: -// -// bool __operator && (bool a, bool b) { -// return a ? b : false; -// } -// bool __operator || (bool a, bool b) { -// return a ? true : b; -// } -// bool __logicalNot(const bool a) { @@ -2297,6 +2287,7 @@ bool __logicalOr(const bool a, const bool b) bool __logicalXor(const bool a, const bool b) { + // XXX return a != b; if (a) return __logicalNot(b); return b; diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 2cb69f167c..d5a0d9b03d 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -705,53 +705,52 @@ 0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0, 0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0, 0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,2,11,1,1,0,1,97,0,0,1,1,0,1,98, -0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0, -0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65, -110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1, -0,95,95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2, -49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1, -1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14, -0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116, -95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0, -0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97, +108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95, +95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0, +0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1, +98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108, +88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108, +78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9, +102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0, +18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110, 116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, -16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, +14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, +16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114, 105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0, +109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0, 0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 4f027a33b90fc855de324ac07328a7df0568c6af Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 14:19:37 -0700 Subject: remove dead code --- src/mesa/shader/slang/slang_codegen.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 635f47c20e..666f36b7cf 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1911,20 +1911,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) _slang_gen_operation(A, &oper->children[1])); case slang_oper_less: /* child[0] < child[1] ----> child[1] > child[0] */ -#if 0 - { - slang_ir_node *n; - assert(oper->num_children == 2); - /* XXX tranpose children */ - n = _slang_gen_function_call_name(A, "<", oper, NULL); - return n; - } -#else - /** the operands must be ints or floats, not vectors */ return new_node(IR_SGT, _slang_gen_operation(A, &oper->children[1]), _slang_gen_operation(A, &oper->children[0])); -#endif case slang_oper_greaterequal: return new_node(IR_SGE, _slang_gen_operation(A, &oper->children[0]), -- cgit v1.2.3 From 9b5dc1358a82949aaf9a25abb18c5df64d5f01a1 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 14:52:22 -0700 Subject: when automatically binding vertex attributes, start with attrib 1, not 0 --- src/mesa/shader/slang/slang_link2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 3ea7954451..0a517aecc5 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -363,8 +363,11 @@ _slang_resolve_attributes(struct gl_shader_program *shProg, attr = shProg->Attributes->Parameters[index].StateIndexes[0]; } else { - /* not found, choose our own attribute number */ - for (attr = 0; attr < MAX_VERTEX_ATTRIBS; attr++) { + /* Not found, choose our own attribute number. + * Start at 1 since generic attribute 0 always aliases + * glVertex/position. + */ + for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) { if (((1 << attr) & usedAttributes) == 0) break; } -- cgit v1.2.3 From 3596903068fb989dceefe60ea44f6e98f691c277 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 16:53:41 -0700 Subject: fix typo --- src/mesa/shader/slang/slang_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 666f36b7cf..4213e1c4b4 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1669,7 +1669,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) { if (oper->children[0].type == slang_oper_identifier && oper->children[1].type == slang_oper_call) { - /* Sspecial case of: x = f(a, b) + /* Special case of: x = f(a, b) * Replace with f(a, b, x) (where x == hidden __retVal out param) */ slang_ir_node *n; -- cgit v1.2.3 From 552a65e4546bd543d60ffe87dc298a41d8a318be Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 16 Jan 2007 17:38:39 -0700 Subject: Implement codegen for the selection operator ( b ? x : y ) --- src/mesa/shader/slang/slang_codegen.c | 120 +++++++++++++++++++++++++++++----- src/mesa/shader/slang/slang_emit.c | 3 +- 2 files changed, 104 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 4213e1c4b4..0189b75134 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1477,6 +1477,96 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Generate IR node for storage of a temporary of given size. + */ +static slang_ir_node * +_slang_gen_temporary(GLint size) +{ + slang_ir_storage *store; + slang_ir_node *n; + + store = _slang_new_ir_storage(PROGRAM_TEMPORARY, -1, size); + if (store) { + n = new_node(IR_VAR_DECL, NULL, NULL); + if (n) { + n->Store = store; + } + else { + free(store); + } + } + return n; +} + + +/** + * Generate code for a selection expression: b ? x : y + */ +static slang_ir_node * +_slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) +{ + slang_atom altAtom = slang_atom_pool_gen(A->atoms, "__selectAlt"); + slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__selectEnd"); + slang_ir_node *altLab, *endLab; + slang_ir_node *tree, *tmpDecl, *tmpVar, *cond, *cjump, *jump; + slang_ir_node *bodx, *body, *assignx, *assigny; + slang_assembly_typeinfo type; + int size; + + /* size of x or y's type */ + slang_assembly_typeinfo_construct(&type); + _slang_typeof_operation(A, &oper->children[1], &type); + size = _slang_sizeof_type_specifier(&type.spec); + assert(size > 0); + + /* temporary var */ + tmpDecl = _slang_gen_temporary(size); + + /* eval condition */ + cond = _slang_gen_operation(A, &oper->children[0]); + cond = _slang_gen_cond(cond); + tree = new_seq(tmpDecl, cond); + + /* jump if true to "alt" label */ + cjump = new_cjump(altAtom); + tree = new_seq(tree, cjump); + + /* evaluate child 2 (y) and assign to tmp */ + tmpVar = new_node(IR_VAR, NULL, NULL); + tmpVar->Store = tmpDecl->Store; + body = _slang_gen_operation(A, &oper->children[2]); + assigny = new_node(IR_MOVE, tmpVar, body); + tree = new_seq(tree, assigny); + + /* jump to "end" label */ + jump = new_jump(endAtom); + tree = new_seq(tree, jump); + + /* "alt" label */ + altLab = new_label(altAtom); + tree = new_seq(tree, altLab); + + /* evaluate child 1 (x) and assign to tmp */ + tmpVar = new_node(IR_VAR, NULL, NULL); + tmpVar->Store = tmpDecl->Store; + bodx = _slang_gen_operation(A, &oper->children[1]); + assignx = new_node(IR_MOVE, tmpVar, bodx); + tree = new_seq(tree, assignx); + + /* "end" label */ + endLab = new_label(endAtom); + tree = new_seq(tree, endLab); + + /* tmp var value */ + tmpVar = new_node(IR_VAR, NULL, NULL); + tmpVar->Store = tmpDecl->Store; + tree = new_seq(tree, tmpVar); + + return tree; +} + + /** * Generate IR tree for a return statement. */ @@ -1643,24 +1733,6 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) } -#if 0 -static slang_ir_node * -_slang_gen_logical_and(slang_assemble_ctx * A, slang_operation *oper) -{ - /* - * bool b; - * b = test(child[0]); - * if !b goto endLab; - * b = test(child[1]); - * endLab: - * (b) - */ - slang_ir_node *temp; - -} -#endif - - /** * Generate IR tree for an assignment (=). */ @@ -1671,6 +1743,10 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) oper->children[1].type == slang_oper_call) { /* Special case of: x = f(a, b) * Replace with f(a, b, x) (where x == hidden __retVal out param) + * + * XXX this could be even more effective if we could accomodate + * cases such as "v.x = f();" - would help with typical vertex + * transformation. */ slang_ir_node *n; n = _slang_gen_function_call_name(A, @@ -2023,6 +2099,14 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } + case slang_oper_select: /* b ? x : y */ + { + slang_ir_node *n; + assert(oper->num_children == 3); + n = _slang_gen_select(A, oper ); + return n; + } + case slang_oper_asm: return _slang_gen_asm(A, oper, NULL); case slang_oper_call: diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index e58256c9f1..1142bc6416 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -617,7 +617,8 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Size > 0); - if (n->Var->isTemp) + assert(n->Store->Index < 0); + if (!n->Var || n->Var->isTemp) n->Store->Index = _slang_alloc_temp(vt, n->Store->Size); else n->Store->Index = _slang_alloc_var(vt, n->Store->Size); -- cgit v1.2.3 From 811f54fa75a557380b34ac97929eaa0190d2d5aa Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 09:54:31 -0700 Subject: Fix/clean-up a number of things related to variable/temporary allocation. --- src/mesa/shader/slang/slang_codegen.c | 52 +++++++++++++++++++--------------- src/mesa/shader/slang/slang_emit.c | 9 ++++-- src/mesa/shader/slang/slang_vartable.c | 22 +++++++++++--- 3 files changed, 54 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 0189b75134..31f2576cb5 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -266,6 +266,7 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -5); if (n->Var) n->Var->aux = n->Store; + assert(n->Var->aux); } } @@ -281,7 +282,6 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) else { assert(n->Opcode == IR_VAR); assert(n->Var); - assert(n->Store->Size > 0); if (n->Store->Index < 0) { const char *varName = (char *) n->Var->a_name; @@ -1500,6 +1500,29 @@ _slang_gen_temporary(GLint size) } +/** + * Generate IR node for allocating/declaring a variable. + */ +static slang_ir_node * +_slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) +{ + slang_ir_node *n; + n = new_node(IR_VAR_DECL, NULL, NULL); + if (n) { + n->Var = var; + slang_allocate_storage(A, n); + assert(n->Store); + assert(n->Store->Index < 0); + assert(n->Store->Size > 0); + assert(var->aux); + assert(n->Store == var->aux); + } + return n; +} + + + + /** * Generate code for a selection expression: b ? x : y */ @@ -1670,13 +1693,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) v = _slang_locate_variable(oper->locals, oper->a_id, GL_TRUE); assert(v); - varDecl = new_node(IR_VAR_DECL, NULL, NULL); - if (!varDecl) - return NULL; - - varDecl->Var = v; - - slang_allocate_storage(A, varDecl); + varDecl = _slang_gen_var_decl(A, v); if (oper->num_children > 0) { /* child is initializer */ @@ -2314,21 +2331,10 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } else { /* ordinary variable (may be const) */ - const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); - const GLint index = -1; slang_ir_node *n; /* IR node to declare the variable */ - n = new_node(IR_VAR_DECL, NULL, NULL); - if (!n) - return GL_FALSE; - n->Var = var; - store = _slang_new_ir_storage(PROGRAM_TEMPORARY, index, size); - var->aux = store; /* save var's storage info */ - - slang_allocate_storage(A, n); - - _slang_add_variable(A->vartable, var); + n = _slang_gen_var_decl(A, var); /* IR code for the var's initializer, if present */ if (var->initializer) { @@ -2338,7 +2344,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, lhs = new_node(IR_VAR, NULL, NULL); lhs->Var = var; lhs->Swizzle = SWIZZLE_NOOP; - lhs->Store = store; + lhs->Store = n->Store; /* constant folding, etc */ slang_simplify(var->initializer, &A->space, A->atoms); @@ -2357,8 +2363,8 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, if (dbg) printf("GLOBAL VAR %s idx %d\n", (char*) var->a_name, store ? store->Index : -2); - - var->aux = store; /* save var's storage info */ + if (store) + var->aux = store; /* save var's storage info */ return success; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 1142bc6416..52627486bd 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -618,10 +618,15 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Size > 0); assert(n->Store->Index < 0); - if (!n->Var || n->Var->isTemp) + if (!n->Var || n->Var->isTemp) { + /* a nameless/temporary variable, will be freed after first use */ n->Store->Index = _slang_alloc_temp(vt, n->Store->Size); - else + } + else { + /* a regular variable */ + _slang_add_variable(vt, n->Var); n->Store->Index = _slang_alloc_var(vt, n->Store->Size); + } assert(n->Store->Index >= 0); break; diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index cd6a081e04..d4ec848a0a 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -3,6 +3,7 @@ #include "slang_compile.h" #include "slang_compile_variable.h" #include "slang_vartable.h" +#include "slang_ir.h" static int dbg = 0; @@ -58,16 +59,28 @@ _slang_pop_var_table(slang_var_table *t) { slang_var_table *parent = t->parent; int i; + if (dbg) printf("Popping level %d\n", t->level); + + /* free the storage allocated for each variable */ + for (i = 0; i < t->num_entries; i++) { + slang_ir_storage *store = (slang_ir_storage *) t->vars[i]->aux; + if (dbg) printf(" Free var %s\n", (char*) t->vars[i]->a_name); + assert(t->temps[store->Index] == VAR); + t->temps[store->Index] = FREE; + store->Index = -1; + } if (t->parent) { + /* just verify that any remaining allocations in this scope + * were for temps + */ for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { - if (t->temps[i] && !t->parent->temps[i]) + if (t->temps[i] && !t->parent->temps[i]) { if (dbg) printf(" Free reg %d\n", i); + assert(t->temps[i] == TEMP); + } } } - for (i = 0; i < t->num_entries; i++) { - if (dbg) printf(" Free var %s\n", (char*) t->vars[i]->a_name); - } if (t->vars) free(t->vars); @@ -84,6 +97,7 @@ void _slang_add_variable(slang_var_table *t, slang_variable *v) { assert(t); + if (dbg) printf("Adding var %s\n", (char *) v->a_name); t->vars = realloc(t->vars, (t->num_entries + 1) * sizeof(slang_variable *)); t->vars[t->num_entries] = v; t->num_entries++; -- cgit v1.2.3 From 0bad236cfbaabfc0ed4f20088e64fa89f81934ce Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 15:54:14 -0700 Subject: Added OPCODE_INT to convert 4 floats to 4 ints. --- src/mesa/shader/prog_instruction.c | 1 + src/mesa/shader/prog_instruction.h | 1 + src/mesa/swrast/s_fragprog.c | 11 +++++++++++ src/mesa/tnl/t_vb_arbprogram.c | 17 +++++++++++++++++ 4 files changed, 30 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index bebc3ecb69..1379018d4a 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -135,6 +135,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_EXP, "EXP", 1 }, { OPCODE_FLR, "FLR", 1 }, { OPCODE_FRC, "FRC", 1 }, + { OPCODE_INT, "INT", 1 }, { OPCODE_KIL, "KIL", 1 }, { OPCODE_KIL_NV, "KIL", 0 }, { OPCODE_LG2, "LG2", 1 }, diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index d825e6e0a3..b659879651 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -148,6 +148,7 @@ typedef enum prog_opcode { OPCODE_EXP, /* X X */ OPCODE_FLR, /* X X 2 X */ OPCODE_FRC, /* X X 2 X */ + OPCODE_INT, /* */ OPCODE_KIL, /* X */ OPCODE_KIL_NV, /* X */ OPCODE_LG2, /* X X 2 X */ diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 83a50c7451..b842b49616 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -888,6 +888,17 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; + case OPCODE_INT: /* float to int */ + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = (GLfloat) (GLint) a[0]; + result[1] = (GLfloat) (GLint) a[1]; + result[2] = (GLfloat) (GLint) a[2]; + result[3] = (GLfloat) (GLint) a[3]; + store_vector4( inst, machine, result ); + } + break; case OPCODE_KIL_NV: /* NV_f_p only */ { const GLuint swizzle = inst->DstReg.CondSwizzle; diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 906fd3f1e8..5773f0f627 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -338,6 +338,17 @@ static void do_FRC( struct arb_vp_machine *m, union instruction op ) result[3] = arg0[3] - FLOORF(arg0[3]); } +static void do_INT( struct arb_vp_machine *m, union instruction op ) +{ + GLfloat *result = m->File[0][op.alu.dst]; + const GLfloat *arg0 = m->File[op.alu.file0][op.alu.idx0]; + + result[0] = (GLfloat) (GLint) arg0[0]; + result[1] = (GLfloat) (GLint) arg0[1]; + result[2] = (GLfloat) (GLint) arg0[2]; + result[3] = (GLfloat) (GLint) arg0[3]; +} + /* High precision log base 2: */ static void do_LG2( struct arb_vp_machine *m, union instruction op ) @@ -665,6 +676,7 @@ _tnl_disassem_vba_insn( union instruction op ) case OPCODE_EXP: case OPCODE_FLR: case OPCODE_FRC: + case OPCODE_INT: case OPCODE_LG2: case OPCODE_LIT: case OPCODE_LOG: @@ -739,6 +751,7 @@ static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union i do_EXP, do_FLR, do_FRC, + do_INT, do_NOP,/*KIL*/ do_NOP,/*KIL_NV*/ do_LG2, @@ -1458,6 +1471,10 @@ static GLboolean init_vertex_program( GLcontext *ctx, const GLuint size = VB->Size; GLuint i; + /* spot checks to be sure the opcode table is correct */ + assert(opcode_func[OPCODE_SGE] == do_SGE); + assert(opcode_func[OPCODE_XPD] == do_XPD); + stage->privatePtr = _mesa_calloc(sizeof(*m)); m = ARB_VP_MACHINE(stage); if (!m) -- cgit v1.2.3 From bb53124fca80faf0f920d720cf01bba182e0988d Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 15:58:24 -0700 Subject: added IR_F_TO_I, update comments --- src/mesa/shader/slang/slang_ir.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 2589d68872..7fe3f7f153 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -61,8 +61,8 @@ typedef enum IR_CROSS, /* vec3 cross product */ IR_MIN, IR_MAX, - IR_SEQUAL, /* Set if not equal */ - IR_SNEQUAL, /* Set if equal */ + IR_SEQUAL, /* Set if args are equal */ + IR_SNEQUAL, /* Set if args are not equal */ IR_SGE, /* Set if greater or equal */ IR_SGT, /* Set if greater than */ IR_POW, /* x^y */ @@ -88,7 +88,8 @@ typedef enum IR_TEXP, /* texture lookup with projection */ IR_FLOAT, IR_FIELD, - IR_I_TO_F + IR_I_TO_F, /* int[4] to float[4] conversion */ + IR_F_TO_I /* float[4] to int[4] conversion */ } slang_ir_opcode; -- cgit v1.2.3 From 397b807ad5045c354f3fb2079b7779a6d671dc03 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 16:05:03 -0700 Subject: code clean-up, re-org. Added IR_F_TO_I support. --- src/mesa/shader/slang/slang_emit.c | 202 ++++++++++++++++++++----------------- 1 file changed, 112 insertions(+), 90 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 52627486bd..8e62817336 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -69,6 +69,7 @@ static slang_ir_info IrInfo[] = { { IR_POW, "IR_POW", OPCODE_POW, 1, 2 }, /* unary ops */ { IR_I_TO_F, "IR_I_TO_F", OPCODE_NOP, 1, 1 }, + { IR_F_TO_I, "IR_F_TO_I", OPCODE_INT, 4, 1 }, /* 4 floats to 4 ints */ { IR_EXP, "IR_EXP", OPCODE_EXP, 1, 1 }, { IR_EXP2, "IR_EXP2", OPCODE_EX2, 1, 1 }, { IR_LOG2, "IR_LOG2", OPCODE_LG2, 1, 1 }, @@ -588,6 +589,104 @@ emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +static struct prog_instruction * +emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *inst; + + /* rhs */ + assert(n->Children[1]); + inst = emit(vt, n->Children[1], prog); + + /* lhs */ + emit(vt, n->Children[0], prog); + +#if 1 + if (inst && _slang_is_temp(vt, n->Children[1]->Store->Index)) { + /* Peephole optimization: + * Just modify the RHS to put its result into the dest of this + * MOVE operation. Then, this MOVE is a no-op. + */ + _slang_free_temp(vt, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); + *n->Children[1]->Store = *n->Children[0]->Store; + /* fixup the prev (RHS) instruction */ + storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); + return inst; + } + else +#endif + { + if (n->Children[0]->Store->Size > 4) { + /* move matrix/struct etc */ + slang_ir_storage dstStore = *n->Children[0]->Store; + slang_ir_storage srcStore = *n->Children[1]->Store; + GLint size = srcStore.Size; + ASSERT(n->Children[0]->Writemask == WRITEMASK_XYZW); + ASSERT(n->Children[1]->Swizzle == SWIZZLE_NOOP); + dstStore.Size = 4; + srcStore.Size = 4; + while (size >= 4) { + inst = new_instruction(prog, OPCODE_MOV); + inst->Comment = _mesa_strdup("IR_MOVE block"); + storage_to_dst_reg(&inst->DstReg, &dstStore, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], &srcStore, + n->Children[1]->Swizzle); + srcStore.Index++; + dstStore.Index++; + size -= 4; + } + } + else { + inst = new_instruction(prog, OPCODE_MOV); + storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, + n->Children[1]->Swizzle); + } + /* XXX is this test correct? */ + if (_slang_is_temp(vt, n->Children[1]->Store->Index)) { + _slang_free_temp(vt, n->Children[1]->Store->Index, + n->Children[1]->Store->Size); + } + /*inst->Comment = _mesa_strdup("IR_MOVE");*/ + assert(!n->Store); + n->Store = n->Children[0]->Store; /*XXX new */ + return inst; + } +} + + +static struct prog_instruction * +emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + /* Conditional expression (in if/while/for stmts). + * Need to update condition code register. + * Next instruction is typically an IR_CJUMP. + */ + /* last child expr instruction: */ + struct prog_instruction *inst = emit(vt, n->Children[0], prog); + if (inst) { + /* set inst's CondUpdate flag */ + inst->CondUpdate = GL_TRUE; + return inst; /* XXX or null? */ + } + else { + /* This'll happen for things like "if (i) ..." where no code + * is normally generated for the expression "i". + * Generate a move instruction just to set condition codes. + */ + alloc_temp_storage(vt, n, 1); + inst = new_instruction(prog, OPCODE_MOV); + inst->CondUpdate = GL_TRUE; + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, + n->Children[0]->Swizzle); + _slang_free_temp(vt, n->Store->Index, n->Store->Size); + return inst; /* XXX or null? */ + } +} + + static struct prog_instruction * emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { @@ -597,6 +696,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) switch (n->Opcode) { case IR_SEQ: + /* sequence of two sub-trees */ assert(n->Children[0]); assert(n->Children[1]); emit(vt, n->Children[0], prog); @@ -662,66 +762,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } return NULL; /* no instruction */ - case IR_MOVE: - /* rhs */ - assert(n->Children[1]); - inst = emit(vt, n->Children[1], prog); - /* lhs */ - emit(vt, n->Children[0], prog); - -#if 1 - if (inst && _slang_is_temp(vt, n->Children[1]->Store->Index)) { - /* Peephole optimization: - * Just modify the RHS to put its result into the dest of this - * MOVE operation. Then, this MOVE is a no-op. - */ - _slang_free_temp(vt, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); - *n->Children[1]->Store = *n->Children[0]->Store; - /* fixup the prev (RHS) instruction */ - storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); - return inst; - } - else -#endif - { - if (n->Children[0]->Store->Size > 4) { - /* move matrix/struct etc */ - slang_ir_storage dstStore = *n->Children[0]->Store; - slang_ir_storage srcStore = *n->Children[1]->Store; - GLint size = srcStore.Size; - ASSERT(n->Children[0]->Writemask == WRITEMASK_XYZW); - ASSERT(n->Children[1]->Swizzle == SWIZZLE_NOOP); - dstStore.Size = 4; - srcStore.Size = 4; - while (size >= 4) { - inst = new_instruction(prog, OPCODE_MOV); - inst->Comment = _mesa_strdup("IR_MOVE block"); - storage_to_dst_reg(&inst->DstReg, &dstStore, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], &srcStore, - n->Children[1]->Swizzle); - srcStore.Index++; - dstStore.Index++; - size -= 4; - } - } - else { - inst = new_instruction(prog, OPCODE_MOV); - storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, - n->Children[1]->Swizzle); - } - /* XXX is this test correct? */ - if (_slang_is_temp(vt, n->Children[1]->Store->Index)) { - _slang_free_temp(vt, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); - } - /*inst->Comment = _mesa_strdup("IR_MOVE");*/ - assert(!n->Store); - n->Store = n->Children[0]->Store; /*XXX new */ - return inst; - } - break; + /* Simple binary operators */ case IR_ADD: case IR_SUB: case IR_MUL: @@ -738,10 +779,12 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_EXP: case IR_EXP2: return emit_binop(vt, n, prog); + /* Simple unary operators */ case IR_RSQ: case IR_RCP: case IR_FLOOR: case IR_FRAC: + case IR_F_TO_I: case IR_ABS: case IR_SIN: case IR_COS: @@ -754,44 +797,23 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return emit_tex(vt, n, prog); case IR_NEG: return emit_negation(vt, n, prog); - case IR_LABEL: - return emit_label(n->Target, prog); case IR_FLOAT: n->Store = alloc_constant(n->Value, 4, prog); /*XXX fix size */ break; + + case IR_MOVE: + return emit_move(vt, n, prog); + case IR_COND: - { - /* Conditional expression (in if/while/for stmts). - * Need to update condition code register. - * Next instruction is typically an IR_CJUMP. - */ - /* last child expr instruction: */ - struct prog_instruction *inst = emit(vt, n->Children[0], prog); - if (inst) { - /* set inst's CondUpdate flag */ - inst->CondUpdate = GL_TRUE; - return inst; /* XXX or null? */ - } - else { - /* This'll happen for things like "if (i) ..." where no code - * is normally generated for the expression "i". - * Generate a move instruction just to set condition codes. - */ - alloc_temp_storage(vt, n, 1); - inst = new_instruction(prog, OPCODE_MOV); - inst->CondUpdate = GL_TRUE; - storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - n->Children[0]->Swizzle); - _slang_free_temp(vt, n->Store->Index, n->Store->Size); - return inst; /* XXX or null? */ - } - } - return NULL; + return emit_cond(vt, n, prog); + + case IR_LABEL: + return emit_label(n->Target, prog); case IR_JUMP: return emit_jump(n->Target, prog); case IR_CJUMP: return emit_cjump(n->Target, prog); + default: _mesa_problem(NULL, "Unexpected IR opcode in emit()\n"); abort(); -- cgit v1.2.3 From eabb7e66bd6fa9770bcf17833cf9fc6317ae7948 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 16:11:50 -0700 Subject: New _slang_adapt_call() function. This is used to modify function calls (when possible) to make the arguments map to the function parameters. This includes "unrolling" vector types and doing casts. Example: vec2 v2 = vec2(1.2, 3.4) ivec3 iv = ivec3(false, v2); Is converted into: ivec3 iv = ivec3(int(false), int(v2[0]), int(v2[1])) --- src/mesa/shader/slang/slang_simplify.c | 148 +++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_simplify.h | 6 ++ 2 files changed, 154 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index dfae746a40..821a716f58 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -31,7 +31,9 @@ #include "imports.h" #include "macros.h" #include "slang_compile.h" +#include "slang_codegen.h" #include "slang_simplify.h" +#include "slang_print.h" /** @@ -182,3 +184,149 @@ slang_simplify(slang_operation *oper, } } + + +/** + * Adapt the arguments for a function call to match the parameters of + * the given function. + * This is for: + * 1. converting/casting argument types to match parameters + * 2. breaking up vector/matrix types into individual components to + * satisfy constructors. + */ +GLboolean +_slang_adapt_call(slang_operation *callOper, const slang_function *fun, + const slang_assembly_name_space * space, + slang_atom_pool * atoms) +{ + const GLboolean haveRetValue = _slang_function_has_return_value(fun); + const int numParams = fun->param_count - haveRetValue; + int i; + int dbg = 0; + + if (dbg) printf("Adapt %d args to %d parameters\n", + callOper->num_children, numParams); + + if (callOper->num_children != numParams) { + /* number of arguments doesn't match number of parameters */ + + if (fun->kind == slang_func_constructor) { + /* For constructor calls, we can try to unroll vector/matrix args + * into individual floats/ints and try to match the function params. + */ + for (i = 0; i < numParams; i++) { + slang_assembly_typeinfo argType; + GLint argSz, j; + + /* Get type of arg[i] */ + if (!slang_assembly_typeinfo_construct(&argType)) + return GL_FALSE; + if (!_slang_typeof_operation_(&callOper->children[i], space, + &argType, atoms)) { + slang_assembly_typeinfo_destruct(&argType); + return GL_FALSE; + } + + /* + paramSz = _slang_sizeof_type_specifier(¶mVar->type.specifier); + assert(paramSz == 1); + */ + argSz = _slang_sizeof_type_specifier(&argType.spec); + if (argSz > 1) { + slang_operation origArg; + /* break up arg[i] into components */ + if (dbg) + printf("Break up arg %d from 1 to %d elements\n", i, argSz); + + slang_operation_construct(&origArg); + slang_operation_copy(&origArg, + &callOper->children[i]); + + /* insert argSz-1 new children/args */ + for (j = 0; j < argSz - 1; j++) { + (void) slang_operation_insert(&callOper->num_children, + &callOper->children, i); + } + + /* replace arg[i+j] with subscript/index oper */ + for (j = 0; j < argSz; j++) { + callOper->children[i + j].type = slang_oper_subscript; + callOper->children[i + j].num_children = 2; + callOper->children[i + j].children = slang_operation_new(2); + slang_operation_copy(&callOper->children[i + j].children[0], + &origArg); + callOper->children[i + j].children[1].type + = slang_oper_literal_int; + callOper->children[i + j].children[1].literal[0] = j; + } + + } + } /* for i */ + } + else { + /* non-constructor function: number of args must match number + * of function params. + */ + return GL_FALSE; /* caller will record an error msg */ + } + } + + if (callOper->num_children < numParams) { + /* still not enough args for all params */ + return GL_FALSE; + } + else if (callOper->num_children > numParams) { + /* now too many arguments */ + /* XXX this isn't always an error, see spec */ + return GL_FALSE; + } + + /* + * Second phase, argument casting. + * Example: + * void foo(int i, bool b) {} + * x = foo(3.15, 9); + * Gets translated into: + * x = foo(int(3.15), bool(9)) + */ + for (i = 0; i < numParams; i++) { + slang_assembly_typeinfo argType; + slang_variable *paramVar = fun->parameters->variables[i]; + + /* Get type of arg[i] */ + if (!slang_assembly_typeinfo_construct(&argType)) + return GL_FALSE; + if (!_slang_typeof_operation_(&callOper->children[i], space, + &argType, atoms)) { + slang_assembly_typeinfo_destruct(&argType); + return GL_FALSE; + } + + /* see if arg type matches parameter type */ + if (!slang_type_specifier_equal(&argType.spec, + ¶mVar->type.specifier)) { + /* need to adapt arg type to match param type */ + const char *constructorName = + slang_type_specifier_type_to_string(paramVar->type.specifier.type); + slang_operation *child = slang_operation_new(1); + + slang_operation_copy(child, &callOper->children[i]); + child->locals->outer_scope = callOper->locals; + + callOper->children[i].type = slang_oper_call; + callOper->children[i].a_id = slang_atom_pool_atom(atoms, constructorName); + callOper->children[i].num_children = 1; + callOper->children[i].children = child; + } + + slang_assembly_typeinfo_destruct(&argType); + } + + if (dbg) { + printf("===== New call to %s with adapted arguments ===============\n", + (char*) fun->header.a_name); + slang_print_tree(callOper, 5); + } + + return GL_TRUE; +} diff --git a/src/mesa/shader/slang/slang_simplify.h b/src/mesa/shader/slang/slang_simplify.h index 69be3092a5..0ca1fa2f0d 100644 --- a/src/mesa/shader/slang/slang_simplify.h +++ b/src/mesa/shader/slang/slang_simplify.h @@ -8,5 +8,11 @@ slang_simplify(slang_operation *oper, slang_atom_pool * atoms); +extern GLboolean +_slang_adapt_call(slang_operation *callOper, const slang_function *fun, + const slang_assembly_name_space * space, + slang_atom_pool * atoms); + + #endif /* SLANG_SIMPLIFY_H */ -- cgit v1.2.3 From 3a3bb953b63e8e85afb330f5d7c887413ad43c1e Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 16:14:03 -0700 Subject: _slang_gen_function_call_name() now tries to adapt function calls (expand vectors, insert casts) when a perfect match isn't found. --- src/mesa/shader/slang/slang_codegen.c | 53 +++++++++++++++++++++++++++-------- src/mesa/shader/slang/slang_codegen.h | 3 ++ 2 files changed, 44 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 31f2576cb5..15c05a39a2 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -187,7 +187,7 @@ _slang_sizeof_struct(const slang_struct *s) } -static GLuint +GLuint _slang_sizeof_type_specifier(const slang_type_specifier *spec) { switch (spec->type) { @@ -482,6 +482,7 @@ static slang_asm_info AsmInfo[] = { /* unary op */ { "int_to_float", IR_I_TO_F, 1, 1 }, + { "float_to_int", IR_F_TO_I, 1, 1 }, { "float_exp", IR_EXP, 1, 1 }, { "float_exp2", IR_EXP2, 1, 1 }, { "float_log2", IR_LOG2, 1, 1 }, @@ -758,6 +759,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, printf("Substitute %s with %f in id node %p\n", (char*)v->a_name, substNew[i]->literal[0], (void*) oper); + } #endif slang_operation_copy(oper, substNew[i]); break; @@ -1268,21 +1270,42 @@ _slang_gen_cond(slang_ir_node *n) } -static void print_funcs(struct slang_function_scope_ *scope) +static void +print_funcs(struct slang_function_scope_ *scope, const char *name) { int i; for (i = 0; i < scope->num_functions; i++) { slang_function *f = &scope->functions[i]; - printf("func %s\n", (char *) f->header.a_name); - if (strcmp("vec3", (char*) f->header.a_name) == 0) - printf("VEC3!\n"); + if (!name || strcmp(name, (char*) f->header.a_name) == 0) + printf(" %s (%d args)\n", name, f->param_count); } if (scope->outer_scope) - print_funcs(scope->outer_scope); + print_funcs(scope->outer_scope, name); } +/** + * Return first function in the scope that has the given name. + * This is the function we'll try to call when there is no exact match + * between function parameters and call arguments. + */ +static slang_function * +_slang_first_function(struct slang_function_scope_ *scope, const char *name) +{ + int i; + for (i = 0; i < scope->num_functions; i++) { + slang_function *f = &scope->functions[i]; + if (strcmp(name, (char*) f->header.a_name) == 0) + return f; + } + if (scope->outer_scope) + return _slang_first_function(scope->outer_scope, name); + return NULL; +} + + + /** * Assemble a function call, given a particular function name. * \param name the function's name (operators like '*' are possible). @@ -1300,15 +1323,21 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, if (atom == SLANG_ATOM_NULL) return NULL; + /* + * Use 'name' to find the function to call + */ fun = _slang_locate_function(A->space.funcs, atom, params, param_count, &A->space, A->atoms); if (!fun) { - /* XXX temporary */ - print_funcs(A->space.funcs); - fun = _slang_locate_function(A->space.funcs, atom, params, param_count, - &A->space, A->atoms); - - RETURN_ERROR2("Undefined function", name, 0); + /* A function with exactly the right parameters/types was not found. + * Try adapting the parameters. + */ + fun = _slang_first_function(A->space.funcs, name); + if (!_slang_adapt_call(oper, fun, &A->space, A->atoms)) { + RETURN_ERROR2("Undefined function (or no matching parameters)", + name, 0); + } + assert(fun); } return _slang_gen_function_call(A, fun, oper, dest); diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h index 76d364237a..821d396162 100644 --- a/src/mesa/shader/slang/slang_codegen.h +++ b/src/mesa/shader/slang/slang_codegen.h @@ -31,6 +31,9 @@ #include "slang_compile.h" +extern GLuint +_slang_sizeof_type_specifier(const slang_type_specifier *spec); + extern GLboolean _slang_codegen_function(slang_assemble_ctx *A , struct slang_function_ *fun); -- cgit v1.2.3 From eb0c478b1716b4d79d282f0af4970a94db3619ce Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 16:29:51 -0700 Subject: Rewrite a bunch of constructors. It's now important that the first constructor for any given type be the one that takes the most parameters as this is the constructor that'll be used when there's no perfect match to the caller's arguments. See the _slang_adapt_call() function for details. --- src/mesa/shader/slang/library/slang_core.gc | 255 +++-- src/mesa/shader/slang/library/slang_core_gc.h | 1259 +++++++++++++------------ 2 files changed, 801 insertions(+), 713 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 0b5a912046..11393cd7b6 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -101,53 +101,50 @@ // specification to provide all valid operator prototypes. // -//bp: -//vec4 vec4(const float a1, const float b1, const float c1, const float d1) -//{ -// __retVal.x = a1; -// __retVal.y = b1; -// __retVal.z = c1; -// __retVal.w = d1; -//} -//// -//// Assorted constructors -//// -int __constructor (const float f) { - int i; - __asm float_to_int i, f; - return i; +//// Basic, scalar constructors/casts + +int __constructor (const float f) +{ + __asm float_to_int __retVal, f; } -bool __constructor (const int i) { - return i != 0; +bool __constructor(const int i) +{ + const float zero = 0.0; + __asm vec4_seq __retVal.x, i.x, zero; } -bool __constructor (const float f) { - return f != 0.0; +bool __constructor(const float f) +{ + const float zero = 0.0; + __asm vec4_seq __retVal.x, i.x, zero; } -int __constructor (const bool b) { - return b ? 1 : 0; +int __constructor(const bool b) +{ + __retVal.x = b.x; } -float __constructor (const bool b) { - return b ? 1.0 : 0.0; +float __constructor (const bool b) +{ + __retVal.x = b.x; } -float __constructor (const int i) { - float f; - __asm int_to_float f, i; - return f; +float __constructor (const int i) +{ + __asm int_to_float __retVal, i; } -bool __constructor (const bool b) { - return b; +bool __constructor(const bool b) +{ + __retVal = b.x; } -int __constructor (const int i) { - return i; +int __constructor(const int i) +{ + __retVal = i.x; } float __constructor(const float f) @@ -158,17 +155,17 @@ float __constructor(const float f) //// vec2 constructors -vec2 __constructor(const float f) -{ - __retVal.xy = f.xx; -} - vec2 __constructor(const float x, const float y) { __retVal.x = x; __retVal.y = y; } +vec2 __constructor(const float f) +{ + __retVal.xy = f.xx; +} + vec2 __constructor (const int i) { float x; __asm int_to_float x, i; @@ -187,11 +184,6 @@ vec2 __constructor(const vec3 v) //// vec3 constructors -vec3 __constructor(const float f) -{ - __retVal.xyz = f.xxx; -} - vec3 __constructor(const float x, const float y, const float z) { __retVal.x = x; @@ -199,14 +191,19 @@ vec3 __constructor(const float x, const float y, const float z) __retVal.z = z; } -vec3 __constructor (const int i) { - float x; - __asm int_to_float x, i; - return vec3 (x); +vec3 __constructor(const float f) +{ + __retVal.xyz = f.xxx; +} + +vec3 __constructor(const int i) +{ + __asm int_to_float __retVal.xyz, i.xxx; } -vec3 __constructor (const bool b) { - return vec3 (b ? 1.0 : 0.0); +vec3 __constructor(const bool b) +{ + __retVal.xyz = b.xxx; } vec3 __constructor(const vec4 v) @@ -217,99 +214,169 @@ vec3 __constructor(const vec4 v) //// vec4 constructors +vec4 __constructor(const float x, const float y, const float z, const float w) +{ + __retVal.x = x; + __retVal.y = y; + __retVal.z = z; + __retVal.w = w; +} + vec4 __constructor(const float f) { - __retVal.xyzw = f.xxxx; + __retVal = f.xxxx; } -vec4 __constructor (const int i) { - float x; - __asm int_to_float x, i; - return vec4 (x); +vec4 __constructor(const int i) +{ + __retVal = i.xxxx; } -vec4 __constructor (const bool b) { - return vec4 (b ? 1.0 : 0.0); +vec4 __constructor(const bool b) +{ + __retVal = b.xxxx; } vec4 __constructor(const vec3 v3, const float f) { + // XXX this constructor shouldn't be needed anymore __retVal.xyz = v3; __retVal.w = f; } +//// ivec2 constructors -ivec2 __constructor (const int i) { - return ivec2 (i, i); +ivec2 __constructor(const int i, const int j) +{ + __retVal.x = i; + __retVal.y = j; } -ivec2 __constructor (const float f) { - return ivec2 (int (f)); +ivec2 __constructor(const int i) +{ + __retVal.xy = i.xx; } -ivec2 __constructor (const bool b) { - return ivec2 (int (b)); +ivec2 __constructor(const float f) +{ + __asm float_to_int __retVal.xy, f.xx; } -ivec3 __constructor (const int i) { - return ivec3 (i, i, i); +ivec2 __constructor(const bool b) +{ + __asm float_to_int __retVal.xy, b.xx; } -ivec3 __constructor (const float f) { - return ivec3 (int (f)); + +//// ivec3 constructors + +ivec3 __constructor(const int i, const int j, const int k) +{ + __retVal.x = i; + __retVal.y = j; + __retVal.z = k; } -ivec3 __constructor (const bool b) { - return ivec3 (int (b)); +ivec3 __constructor(const int i) +{ + __retVal.xyz = i.xxx; } -ivec4 __constructor (const int i) { - return ivec4 (i, i, i, i); +ivec3 __constructor(const float f) +{ + __retVal.xyz = f.xxx; } -ivec4 __constructor (const float f) { - return ivec4 (int (f)); +ivec3 __constructor(const bool b) +{ + __retVal.xyz = b.xxx; } -ivec4 __constructor (const bool b) { - return ivec4 (int (b)); + +//// ivec4 constructors + +ivec4 __constructor(const int x, const int y, const int z, const int w) +{ + __retVal.x = x; + __retVal.y = y; + __retVal.z = z; + __retVal.w = w; } -bvec2 __constructor (const bool b) { - return bvec2 (b, b); +ivec4 __constructor(const int i) +{ + __retVal = i.xxxx; } -bvec2 __constructor (const float f) { - return bvec2 (bool (f)); +ivec4 __constructor(const float f) +{ + __asm float_to_int __retVal, f.xxxx; } -bvec2 __constructor (const int i) { - return bvec2 (bool (i)); +ivec4 __constructor(const bool b) +{ + __retVal = b.xxxx; } -bvec3 __constructor (const bool b) { - return bvec3 (b, b, b); + +//// bvec2 constructors + +bvec2 __constructor(const bool b) +{ + __retVal.xy = b.xx; } -bvec3 __constructor (const float f) { - return bvec3 (bool (f)); +bvec2 __constructor(const float f) +{ + const vec2 zero = vec2(0.0, 0.0); + __asm vec4_seq __retVal.xy, f.xx, zero; +} + +bvec2 __constructor(const int i) +{ + const ivec2 zero = ivec2(0, 0); + __asm vec4_seq __retVal.xy, i.xx, zero; +} + + +//// bvec3 constructors + +bvec3 __constructor(const bool b) +{ + __retVal.xyz = b.xxx; +} + +bvec3 __constructor(const float f) +{ + const vec3 zero = vec3(0.0, 0.0, 0.0); + __asm vec4_seq __retVal.xyz, f.xxx, zero; } -bvec3 __constructor (const int i) { - return bvec3 (bool (i)); +bvec3 __constructor(const int i) +{ + const ivec3 zero = ivec3(0, 0, 0); + __asm vec4_seq __retVal.xyz, i.xxx, zero; } -bvec4 __constructor (const bool b) { - return bvec4 (b, b, b, b); + +//// bvec4 constructors + +bvec4 __constructor(const bool b) +{ + __retVal.xyzw = b.xxxx; } -bvec4 __constructor (const float f) { - return bvec4 (bool (f)); +bvec4 __constructor(const float f) +{ + const vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); + __asm vec4_seq __retVal, f.xxxx, zero; } -bvec4 __constructor (const int i) { - return bvec4 (bool (i)); +bvec4 __constructor(const int i) +{ + const ivec4 zero = ivec4(0, 0, 0, 0); + __asm vec4_seq __retVal, i.xxxx, zero; } @@ -858,13 +925,7 @@ ivec4 __operator / (const ivec4 v, const int b) { int __operator - (const int a) { -// XXX redo - float x; - int b; - __asm int_to_float x, a; - __asm float_negate x, x; - __asm float_to_int b, x; - return b; + __asm float_negate __retVal.x, a; } ivec2 __operator - (const ivec2 v) diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index d5a0d9b03d..bea5cf6a26 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -2,109 +2,137 @@ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ /* slang_core.gc */ -3,1,0,5,1,1,1,0,9,102,0,0,0,1,3,2,0,5,1,105,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, -18,105,0,0,18,102,0,0,0,8,18,105,0,0,0,1,0,1,1,1,1,0,5,105,0,0,0,1,8,18,105,0,16,8,48,0,39,0,0,1,0, -1,1,1,1,0,9,102,0,0,0,1,8,18,102,0,17,48,0,48,0,0,39,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,8,18,98,0,16, -10,49,0,16,8,48,0,31,0,0,1,0,9,1,1,1,0,1,98,0,0,0,1,8,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0, -1,0,9,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,102,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0, -18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5, -105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0, -59,120,0,20,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18, -102,0,59,120,120,0,20,0,0,1,0,10,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0,1,0,10, -1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120, -0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99, -50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,10,1,1,1,0,11,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,18,118,0,59,120,121,0,20,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,11,1,1,1,0,9,120, +3,1,0,5,1,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101, +116,86,97,108,0,0,18,102,0,0,0,0,1,0,1,1,1,1,0,5,105,0,0,0,1,3,2,1,9,1,122,101,114,111,0,2,17,48,0, +48,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,105,0, +59,120,0,0,18,122,101,114,111,0,0,0,0,1,0,1,1,1,1,0,9,102,0,0,0,1,3,2,1,9,1,122,101,114,111,0,2,17, +48,0,48,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +105,0,59,120,0,0,18,122,101,114,111,0,0,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,59,120,0,18,98,0,59,120,0,20,0,0,1,0,9,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,18,98,0,59,120,0,20,0,0,1,0,9,1,1,1,0,5,105,0,0,0,1,4,105,110,116,95,116,111,95,102, +108,111,97,116,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,18,98,0,59,120,0,20,0,0,1,0,5,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,18,105,0,59,120,0,20,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,18,102,0,59,120,0,20,0,0,1,0,10,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0, +1,0,10,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,102,0,59,120,120,0, +20,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8, +58,118,101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,10,1,1,1,0,11,118,0,0,0,1, +9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,118,0,59,120,121,0,20,0,0,1,0,11,1,1,1,0,9,120, 0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0, 9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -122,0,18,122,0,20,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95, -102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0, -1,98,0,0,0,1,8,58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,11,1,1,1,0, -12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0, -0,1,0,12,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,18,102,0,59, -120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111, -95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1, -0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,12,1,1,1, -0,11,118,51,0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8, -58,105,118,101,99,50,0,18,105,0,0,18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99, -50,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58, -105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0, -18,105,0,0,18,105,0,0,0,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0, -18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,98,0, -0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0, -18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,102,0,0, -0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0, -1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0, -0,0,1,8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1, -8,58,98,118,101,99,50,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58, -98,118,101,99,51,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101, -99,51,0,58,98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51, -0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18, -98,0,0,18,98,0,0,18,98,0,0,18,98,0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58, -98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98, -111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17, -48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4, -105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120, -0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0, -31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0, -48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, -0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8, -58,109,97,116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8, -58,109,97,116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0, -48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105, -0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0, -0,8,58,109,97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0, -17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12, -114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,114,51,0, -20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0, -0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116, -111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120, -0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, -99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1, -1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0, -0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116, -95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59, -120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0, -18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, -0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18, -97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97, -116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116, -95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5, -98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18, -98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4, -102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1, -0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0, -18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58, -105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0, -47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120, -0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0, -1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59, -121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, -99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0, -59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, -101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18, -118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58, -105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, -48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1, -8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59, -121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0, -0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0, -59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0, -0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18, -117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0, -47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1, -8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59, -121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0, -1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0, -59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, +122,0,18,122,0,20,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,4,105,110,116,95,116,111,95, +102,108,111,97,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0, +0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59, +120,120,120,0,20,0,0,1,0,11,1,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,1, +1,0,9,119,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,119,0,18,119,0,20,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,18,102,0,59,120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,18,105,0,59,120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,11,118,51,0,0,1,1,0, +9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,1,1,0,5,106,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, +106,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,105,0, +59,120,120,0,20,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,102,0,59,120,120,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0, +0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,98,0,59,120,120,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,1,1,0,5,106,0,0,1,1,0,5,107,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, +106,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,107,0,20,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1, +9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,105,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0, +9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0, +1,0,7,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120, +120,0,20,0,0,1,0,8,1,1,1,0,5,120,0,0,1,1,0,5,121,0,0,1,1,0,5,122,0,0,1,1,0,5,119,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, +121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,59,119,0,18,119,0,20,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +105,0,59,120,120,120,120,0,20,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,116,111,95, +105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,102,0,59,120,120,120,120,0,0,0,0,1,0,8,1,1,1,0, +1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,2,1,1,1,0, +1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,0,59,120,120,0,20,0,0,1,0,2,1,1, +1,0,9,102,0,0,0,1,3,2,1,10,1,122,101,114,111,0,2,58,118,101,99,50,0,17,48,0,48,0,0,0,17,48,0,48,0, +0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,102, +0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,3,2,1,6,1,122,101,114,111, +0,2,58,105,118,101,99,50,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1, +1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20, +0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,3,2,1,11,1,122,101,114,111,0,2,58,118,101,99,51,0,17,48,0,48,0,0,0, +17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,0,18,102,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,5, +105,0,0,0,1,3,2,1,7,1,122,101,114,111,0,2,58,105,118,101,99,51,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0, +0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +105,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,119,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,4,1,1,1,0,9,102,0,0,0, +1,3,2,1,12,1,122,101,114,111,0,2,58,118,101,99,52,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0, +0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18, +102,0,59,120,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,3,2,1,8,1,122, +101,114,111,0,2,58,105,118,101,99,52,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118, +101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,59,120,120,120,120,0,0,18, +122,101,114,111,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48,0, +0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0, +0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0, +0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, +17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1, +0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97, +116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97, +116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, +17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17, +48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2, +0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109, +97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0, +0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1, +1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2, +26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108, +111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, +59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, +0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, +2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103, +97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, +59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, +0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, +2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108, +116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105, +110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0, +9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, +120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102, +108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97, +116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1, +1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, +121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1, +0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, +59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6, +117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18, +117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0, +18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122, +0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99, +51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, +122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, +99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0, +59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, +101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18, +118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0, +46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8, +2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18, +118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, +48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8, +2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, +120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, 118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, 99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2, 27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95, @@ -226,531 +254,530 @@ 0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1, 0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1, 0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1, -0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,97,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0, -0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,6,2, -27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0, -0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0, -54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, -59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2, -27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116, -101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1, -0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52, -95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0, -1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48, -18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0, -0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, -0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18, -97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0, -0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5, -97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102, -108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0, -58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20, -0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118, -0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0, -23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0, -2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0, -0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0, -1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0, -18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, +0,5,97,0,0,0,1,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,97,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0, +54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, +59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8, +58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118, +0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101, +99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, +121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12, +118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118, +0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20, +0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0, +15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, +18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, +0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, +97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, +1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, +97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, +54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, +5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, +0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, +117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, +117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, +0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, +0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, +0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, +0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, +1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, +18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, +0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, +1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, +97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1, +0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0, +18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18, +118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2, +10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18, +117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, +59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117, +0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1, +0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121, +122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, +95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3, +1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118, +0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9, 18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0, -1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0, -0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1, -0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, -59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18, -97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117, -0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1, -0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0, -0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, -97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0, -11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, -12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0, -0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59, -119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118, -0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0, -0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0, -0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1, -1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21, -0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, -120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1, -0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0, -9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, -0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2, -8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120, -120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0, -1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, -97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, -18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0, -18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0, -59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0, -2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120, -120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1, -0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0, -0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18, -97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0, -59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1, -0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18, -118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, -0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, +122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1, +4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1, +0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18, +117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122, +0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9, +18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, +5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6, +118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0, +0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, +0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0, +0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97, +0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0, +59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0, +0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0, +24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18, +118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101, +99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1, +0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1, +9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0, +9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10, +118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0, +0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0, +0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, 116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1, -1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2, -21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, -0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, -59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0, +2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118, +0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, +0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118, +0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105, +110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120, +121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0, +1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, +120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, +99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59, +120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26, +1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, +8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47, +20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109, +82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109, +82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, +48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, +100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, +49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0, +0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1, +1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1, +109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48, +0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49, +0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109, +82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18, +109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121, +0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119, +50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16, +10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, +0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, +18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0, +18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, +0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2, -26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0, -0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, -16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, -9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, -120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, -59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, -111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109, -0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, -0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0, +15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1, +1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, +51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0, +12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119, +51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119, +48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16, +10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9, +18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109, +82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18, +109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122, +0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119, +51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10, +49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18, +109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0, +18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100, +111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0, 20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, 49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, 100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, 97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, -50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, -100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0, -0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57, -47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51, -0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0, -1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111, -119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0, -16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, -9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59, -120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57, -59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82, -111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, -20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50, -0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109, -82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18, -109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0, -0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49, -0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58, -100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, -50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, -100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111, -119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119, -0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1, -0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0, -13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1, -0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0, -13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111, +119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122, +0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82, +111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, +119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51, +0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26, +1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110, +0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49, +0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, +0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0, +13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13, +2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0, +14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97, +0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0, +16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0, +57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0, 1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0, -14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, -110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2, -22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49, -20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, -110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9, -97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1, -1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, -0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, -21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111, -116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, -111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0, -0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, -20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0, -16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0, -14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, -109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, -0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, -111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0, -0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59, -122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, -20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0, -16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50, -0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59, -122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0, -18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, -0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0, +1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0, +15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2, +27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0, +15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0, +0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, +110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, +10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, +48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, +18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, +16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114, 101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0, -20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1, -114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59, -120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, -114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, -57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, -18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59, -122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, -20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, -114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0, -0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, -118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0, -0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, -1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, -0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, -0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, -0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, -0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, -10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, -1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, -57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, -0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, -50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, -10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0, -13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, -0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, -118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20, -0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18, -118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, -0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20, -0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18, -118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, -0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0, -17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0, -2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, -0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10, -49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1, -9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10, -49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1, -9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10, -2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0, -58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1, -0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58, -118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0, -15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0, -0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101, -99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16, -10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20, -0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95, -95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115, -116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, -18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49, -0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0, -47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0, -1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0, -0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, -0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, +114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0, +10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0, +59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, +0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, +0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, +114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11, +2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9, +18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49, +0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59, +120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0, +16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50, +0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18, +95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0, +1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48, +0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16, +10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109, +0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0, +18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2, +0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48, +0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59, +120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18, +109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18, +114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0, +57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122, +0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0, +9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10, +49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59, +119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, +101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0, +0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0, +2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0, +0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16, +10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, +1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, +1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16, +10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1, +0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51, +0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0, +2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18, +97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, +18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, +8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0, +0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, +10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, +97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, +16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, +1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, +57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, +0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, +0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, +0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, +49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, +1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, +10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, +0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2, +3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12, +118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1, +9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25, +1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105, +118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2, +25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0, +48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1, +9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0, +48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0, +0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, +0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, 49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, 48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, -0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0, -17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, -49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, -48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, -0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2, -18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10, -118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95, -95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60, -0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114, +0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118, +0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, +1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118, +0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, +1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11, +118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0, +2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, +50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, +0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0, +1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, +118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51, +0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0, +0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111, +115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, +118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68, +101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, +118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114, 0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118, -101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97, -0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73, -110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0, -60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99, -51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18, -118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0, -16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58, -109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0, -0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18, -109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51, -0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5, -98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1, -2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115, -0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58, -102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97, -0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0, -18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0, -18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108, -111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1, -0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0, -0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0, -0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97, -108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95, -95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0, -0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1, -98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108, -88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108, -78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9, -102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0, -18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110, +101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13, +109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0, +1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101, +99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48, +0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109, +0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73, +110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0, +0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0, +0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0, +8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110, +99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60, +0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8, +58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118, +0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109, +97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111, +115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18, +109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110, +99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0, +57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97, +0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2, +0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0, +0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, +111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, +101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111, +97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, +18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, +102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, +101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0, +5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, +0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8, +15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97, +0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103, +105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98, +0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18, +97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110, +116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0, +1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, 116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, -14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, -16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, +105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, +101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 4864aaeb02f25942226ce507b6b530b5b883ed63 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 18:02:44 -0700 Subject: handle var size > 4 in _slang_pop_var_table() --- src/mesa/shader/slang/slang_vartable.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index d4ec848a0a..f9121f740b 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -65,9 +65,13 @@ _slang_pop_var_table(slang_var_table *t) /* free the storage allocated for each variable */ for (i = 0; i < t->num_entries; i++) { slang_ir_storage *store = (slang_ir_storage *) t->vars[i]->aux; - if (dbg) printf(" Free var %s\n", (char*) t->vars[i]->a_name); - assert(t->temps[store->Index] == VAR); - t->temps[store->Index] = FREE; + GLint j, sz4 = (store->Size + 3) / 4; + if (dbg) printf(" Free var %s, size %d\n", + (char*) t->vars[i]->a_name, store->Size); + for (j = 0; j < sz4; j++) { + assert(t->temps[store->Index + j] == VAR); + t->temps[store->Index + j] = FREE; + } store->Index = -1; } if (t->parent) { -- cgit v1.2.3 From 2585b74e190585962da6f0a67c3b1ce830009f82 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 18:06:40 -0700 Subject: rewrite matrix constructors --- src/mesa/shader/slang/library/slang_core.gc | 160 ++- src/mesa/shader/slang/library/slang_core_gc.h | 1555 +++++++++++++------------ 2 files changed, 928 insertions(+), 787 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 11393cd7b6..80c9a0be4e 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -105,7 +105,7 @@ //// Basic, scalar constructors/casts -int __constructor (const float f) +int __constructor(const float f) { __asm float_to_int __retVal, f; } @@ -127,12 +127,12 @@ int __constructor(const bool b) __retVal.x = b.x; } -float __constructor (const bool b) +float __constructor(const bool b) { __retVal.x = b.x; } -float __constructor (const int i) +float __constructor(const int i) { __asm int_to_float __retVal, i; } @@ -166,14 +166,14 @@ vec2 __constructor(const float f) __retVal.xy = f.xx; } -vec2 __constructor (const int i) { - float x; - __asm int_to_float x, i; - return vec2 (x); +vec2 __constructor(const int i) +{ + __retVal.xy = i.xx; } -vec2 __constructor (const bool b) { - return vec2 (b ? 1.0 : 0.0); +vec2 __constructor(const bool b) +{ + __retVal.xy = b.xx; } vec2 __constructor(const vec3 v) @@ -383,55 +383,147 @@ bvec4 __constructor(const int i) //// mat2 constructors -mat2 __constructor (const float f) { - return mat2 (f, 0.0, 0.0, f); +mat2 __constructor(const float m00, const float m10, + const float m01, const float m11) +{ + // xxx verify: + __retVal[0].x = m00; + __retVal[0].y = m10; + __retVal[1].x = m01; + __retVal[1].y = m11; } -mat2 __constructor (const int i) { - float x; - __asm int_to_float x, i; - return mat2 (x); +mat2 __constructor(const float f) +{ + __retVal[0].x = f; + __retVal[0].y = 0.0; + __retVal[1].x = 0.0; + __retVal[1].y = f; } -mat2 __constructor (const bool b) { - return mat2 (b ? 1.0 : 0.0); +mat2 __constructor(const int i) +{ + return mat2(float(i)); +} + +mat2 __constructor(const bool b) +{ + return mat2(float(b)); +} + +mat2 __constructor(const vec2 r0, const vec2 r1) +{ + __retVal[0] = r0; + __retVal[1] = r1; } //// mat3 constructors -mat3 __constructor (const float f) { - return mat3 (f, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, f); +mat3 __constructor(const float m00, const float m10, const float m20, + const float m01, const float m11, const float m21, + const float m02, const float m12, const float m22) +{ + // xxx verify: + __retVal[0].x = m00; + __retVal[0].y = m10; + __retVal[0].z = m20; + __retVal[1].x = m01; + __retVal[1].y = m11; + __retVal[1].z = m21; + __retVal[2].x = m02; + __retVal[2].y = m12; + __retVal[2].z = m22; +} + +mat3 __constructor(const float f) +{ + __retVal[0].x = f; + __retVal[0].y = 0.0; + __retVal[0].z = 0.0; + __retVal[1].x = 0.0; + __retVal[1].y = f; + __retVal[1].z = 0.0; + __retVal[2].x = 0.0; + __retVal[2].y = 0.0; + __retVal[2].z = f; } -mat3 __constructor (const int i) { - float x; - __asm int_to_float x, i; - return mat3 (x); +mat3 __constructor(const int i) +{ + return mat3(float(i)); } -mat3 __constructor (const bool b) { - return mat3 (b ? 1.0 : 0.0); +mat3 __constructor(const bool b) +{ + return mat3(float(b)); +} + +mat3 __constructor(const vec3 r0, const vec3 r1, const vec3 r2) +{ + __retVal[0] = r0; + __retVal[1] = r1; + __retVal[2] = r2; } //// mat4 constructors -mat4 __constructor (const float f) { - return mat4 (f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f); +mat4 __constructor(const float m00, const float m10, const float m20, const float m30, + const float m01, const float m11, const float m21, const float m31, + const float m02, const float m12, const float m22, const float m32, + const float m03, const float m13, const float m23, const float m33) +{ + __retVal[0].x = m00; + __retVal[0].y = m10; + __retVal[0].z = m20; + __retVal[0].w = m30; + __retVal[1].x = m01; + __retVal[1].y = m11; + __retVal[1].z = m21; + __retVal[1].w = m31; + __retVal[2].x = m02; + __retVal[2].y = m12; + __retVal[2].z = m22; + __retVal[2].w = m32; + __retVal[3].x = m03; + __retVal[3].y = m13; + __retVal[3].z = m23; + __retVal[3].w = m33; +} + + +mat4 __constructor(const float f) +{ + __retVal[0].x = f; + __retVal[0].y = 0.0; + __retVal[0].z = 0.0; + __retVal[0].w = 0.0; + __retVal[1].x = 0.0; + __retVal[1].y = f; + __retVal[1].z = 0.0; + __retVal[1].w = 0.0; + __retVal[2].x = 0.0; + __retVal[2].y = 0.0; + __retVal[2].z = f; + __retVal[2].w = 0.0; + __retVal[3].x = 0.0; + __retVal[3].y = 0.0; + __retVal[3].z = 0.0; + __retVal[3].w = f; } -mat4 __constructor (const int i) { - float x; - __asm int_to_float x, i; - return mat4 (x); +mat4 __constructor(const int i) +{ + return mat4(float(i)); } -mat4 __constructor (const bool b) { - return mat4 (b ? 1.0 : 0.0); +mat4 __constructor(const bool b) +{ + return mat4(float(b)); } -mat4 __constructor (const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) +mat4 __constructor(const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) { __retVal[0] = r0; __retVal[1] = r1; diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index bea5cf6a26..4b6daea13a 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -16,768 +16,817 @@ 97,108,0,18,102,0,59,120,0,20,0,0,1,0,10,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0, 1,0,10,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,102,0,59,120,120,0, -20,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8, -58,118,101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,10,1,1,1,0,11,118,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,118,0,59,120,121,0,20,0,0,1,0,11,1,1,1,0,9,120, -0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -122,0,18,122,0,20,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,4,105,110,116,95,116,111,95, -102,108,111,97,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0, -0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59, -120,120,120,0,20,0,0,1,0,11,1,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,1, -1,0,9,119,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,119,0,18,119,0,20,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,102,0,59,120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,105,0,59,120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,12,1,1,1,0,11,118,51,0,0,1,1,0, -9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,1,1,0,5,106,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, -106,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,105,0, -59,120,120,0,20,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,102,0,59,120,120,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0, -0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,98,0,59,120,120,0,0,0,0,1,0,7,1,1,1,0,5,105,0,0,1,1,0,5,106,0,0,1,1,0,5,107,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, -106,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,107,0,20,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,105,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0, -9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0, -1,0,7,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120, -120,0,20,0,0,1,0,8,1,1,1,0,5,120,0,0,1,1,0,5,121,0,0,1,1,0,5,122,0,0,1,1,0,5,119,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, -121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,119,0,18,119,0,20,0,0,1,0,8,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -105,0,59,120,120,120,120,0,20,0,0,1,0,8,1,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,116,111,95, -105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,102,0,59,120,120,120,120,0,0,0,0,1,0,8,1,1,1,0, -1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,2,1,1,1,0, -1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,0,59,120,120,0,20,0,0,1,0,2,1,1, -1,0,9,102,0,0,0,1,3,2,1,10,1,122,101,114,111,0,2,58,118,101,99,50,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,102, -0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,3,2,1,6,1,122,101,114,111, -0,2,58,105,118,101,99,50,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1, -1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20, -0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,3,2,1,11,1,122,101,114,111,0,2,58,118,101,99,51,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,122,0,0,18,102,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,5, -105,0,0,0,1,3,2,1,7,1,122,101,114,111,0,2,58,105,118,101,99,51,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0, -0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -105,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,119,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,4,1,1,1,0,9,102,0,0,0, -1,3,2,1,12,1,122,101,114,111,0,2,58,118,101,99,52,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18, -102,0,59,120,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,3,2,1,8,1,122, -101,114,111,0,2,58,105,118,101,99,52,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118, -101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,59,120,120,120,120,0,0,18, -122,101,114,111,0,0,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48,0, -0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0, -0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0, -0,1,0,14,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1, -0,14,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,105,0,0,0,8,58,109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97, -116,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97, -116,52,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17, -48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2, -0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109, -97,116,52,0,18,120,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0, -0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12,114,49,0,0,1,1,0,12,114,50,0,0,1, -1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,114,51,0,20,0,0,1,0,5,2, -26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108, -111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, -59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, -0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, -2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103, -97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,59,120,0,0,18,120,0, -59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120, -0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3, -2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110, -116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,109,117,108, -116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105, -110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0, -9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18, -120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,102, -108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97, -116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1, -1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, -121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1, -0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0, -59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18, -117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0, -18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122, -0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99, -51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59, -122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101, -99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0, -59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118, -101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18, -118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0, -46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8, -2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18, -118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0, -48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8, -2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59, -120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18, -118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101, -99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2, -27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95, -114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0, -0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0, -18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,98,73,110,118,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0, -18,98,73,110,118,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1, -1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0, -10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, -119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2, -0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12, -2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1, -1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0, -18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9, -97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0, -9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, -118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4, -118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, -18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1, +20,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,105,0,59, +120,120,0,20,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98, +0,59,120,120,0,20,0,0,1,0,10,1,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121, +0,18,118,0,59,120,121,0,20,0,0,1,0,11,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0, +18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,0,1,0,11,1,1,1,0,9,102,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,11,1, +1,1,0,5,105,0,0,0,1,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,11,1,1,1,0,12,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1, +1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,1,1,0,9,119,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,119, +0,20,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0,59,120,120,120, +120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,105,0,59,120,120, +120,120,0,20,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,59,120,120, +120,120,0,20,0,0,1,0,12,1,1,1,0,11,118,51,0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1, +0,6,1,1,1,0,5,105,0,0,1,1,0,5,106,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,105,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,121,0,18,105,0,59,120,120,0,20,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,4, +102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +102,0,59,120,120,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,7,1,1,1,0,5,105,0, +0,1,1,0,5,106,0,0,1,1,0,5,107,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122, +0,18,107,0,20,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +18,105,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,8,1,1,1,0,5,120,0,0,1,1,0,5,121,0, +0,1,1,0,5,122,0,0,1,1,0,5,119,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122, +0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,119,0,20,0,0,1,0,8,1,1,1,0,5,105,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,105,0,59,120,120,120,120,0,20,0,0,1,0,8,1,1,1,0,9,102, +0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,102, +0,59,120,120,120,120,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0, +59,120,120,120,120,0,20,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,18,98,0,59,120,120,0,20,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,3,2,1,10,1,122,101,114,111,0,2,58, +118,101,99,50,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,102,0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,2,1, +1,1,0,5,105,0,0,0,1,3,2,1,6,1,122,101,114,111,0,2,58,105,118,101,99,50,0,16,8,48,0,0,16,8,48,0,0,0, +0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,59, +120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,3,2,1,11,1,122,101, +114,111,0,2,58,118,101,99,51,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101, +99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,102,0,59,120,120,120, +0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,3,2,1,7,1,122,101,114,111,0,2,58,105, +118,101,99,51,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0, +0,1,0,4,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,18,98,0,59, +120,120,120,120,0,20,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,3,2,1,12,1,122,101,114,111,0,2,58,118,101,99, +52,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95, +115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,102,0,59,120,120,120,120,0,0,18,122,101,114, +111,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,3,2,1,8,1,122,101,114,111,0,2,58,105,118,101,99,52,0,16,8, +48,0,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101, +116,86,97,108,0,0,18,105,0,59,120,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,13,1,1,1,0,9,109, +48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18, +109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,0,1, +0,13,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,59,121,0,18,102,0,20,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,50,0,58,102,108, +111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,58,102,108,111, +97,116,0,18,98,0,0,0,0,0,0,0,1,0,13,1,1,1,0,10,114,48,0,0,1,1,0,10,114,49,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,114,49,0,20,0,0,1,0,14,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1, +0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0,9,109,50,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49, +50,0,0,1,1,0,9,109,50,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109, +48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50, +49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,17,48,0, +48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,49,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, +0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,17,48,0,48,0,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,0,20,0,0,1,0,14,1,1,1,0,5,105,0, +0,0,1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0, +1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,14,1,1,1,0,11,114,48,0,0,1, +1,0,11,114,49,0,0,1,1,0,11,114,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114, +48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,0,1,0,15,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0, +1,1,0,9,109,50,48,0,0,1,1,0,9,109,51,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0,9, +109,50,49,0,0,1,1,0,9,109,51,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50,0,0,1,1,0,9,109,50,50, +0,0,1,1,0,9,109,51,50,0,0,1,1,0,9,109,48,51,0,0,1,1,0,9,109,49,51,0,0,1,1,0,9,109,50,51,0,0,1,1,0, +9,109,51,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,59,119,0,18,109,51,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109, +48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,59,119,0,18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +59,120,0,18,109,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49, +50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,59,120,0,18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +59,121,0,18,109,49,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,18,109,50, +51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51,51,0,20,0,0,1,0,15,1, +1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59, +119,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,59,119,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0, +17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,17,48,0,48,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,119,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, +57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,17,48,0, +48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,102,0,20,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,8, +58,109,97,116,52,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58, +109,97,116,52,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12, +114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, +0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0, +0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, +110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0, +18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95, +105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3, +2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0, +18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4, +102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100, +100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116, +111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0, +0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0, +0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4, +102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1, +0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95, +116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, +116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0, +0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0, +0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117, +0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6, +117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, +117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0, +18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22, +1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0, +49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1, +8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59, +121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0, +0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0, +59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7, +117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18, +117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1, +0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, +0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0, +1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, +121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0, +59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118, +0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18, +117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1, +0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121, +0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59, +119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, +59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117, +0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9, +98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0, +18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9, +97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9, +1,98,73,110,118,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0, +59,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0, +0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, +99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1, +0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1, +0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, +117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, 4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0, -1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120, -0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18, -117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1, -0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0, -0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0, -1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0, -11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121, -122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, -97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98, -0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120, -120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117, -0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117, -0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11, -2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118, -66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12, -2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, -97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0, -59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120, -120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0, -0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22, -1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0, -12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, -114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1, -0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1, -0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1, -0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1, -0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1, -0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1, -0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1, -0,5,97,0,0,0,1,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0, -54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0, -59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8, -58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118, -0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101, -99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, -121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12, -118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118, -0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20, -0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0, -15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, -18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, -0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, -97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, -1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, -97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, -54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, -5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, -0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, -117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, -117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, -0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, -0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, -1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, -18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, -0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, -1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, -97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1, -0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0, -18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18, -118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2, -10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18, -117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0, -59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117, -0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1, -0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121, -122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, -95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3, -1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118, -0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9, +0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11, +2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0, +0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117, +0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59, +120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108, +111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0, +0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95, +114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0, +0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, +0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1, +0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119, +0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117, +0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0, +10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10, +118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117, +0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, +9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0, +10,117,0,0,0,1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, +85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59, +121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1, +0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0, +59,120,120,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121, +122,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0, +0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59, +120,121,122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0, +0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0, +59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1, +0,11,117,0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, +59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0, +0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0, +0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105, +110,118,66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, +52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0, +0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0, +12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, +0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0, +0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0, +0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0, +0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120, +0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, +0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, +0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, +0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, +0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, +0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, +0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, +0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, +0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, +0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, +0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, +0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, +0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, +0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, +0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, +0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, +0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, +0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, +0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, +0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, +0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, +0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, +0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, +0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, +0,49,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58, +105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0, +8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, +18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52, +95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27, +1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110, +101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0, +0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0, +9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0, +10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1, +0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12, +98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0, +0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0, +18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98, +0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105, +110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1, +0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97, +0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0, +2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59, +121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1, +0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1, +0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0, +18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1, +0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, 18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, -97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1, -4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1, -0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18, -117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122, -0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9, -18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, -5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6, -118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0, -0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118, -0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0, -0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,18,97, -0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0, -59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0, -0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0, -24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18, -118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1, -0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1, -9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0, -9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10, -118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0, -0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0, -0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0, -2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118, -0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, -0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118, -0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105, -110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120, -121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0, -1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, -120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59, -120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, +122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0, +18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59, +122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0, +0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, +0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8, +118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0, +23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9, +18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59, +119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, +119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10, +118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117, +0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0, +0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0, +0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, +59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, +1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0, +2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0, +18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1, +0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1, +0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1, +0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, +24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0, +2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97, +0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0, +59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0, +23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, +120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1, +9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0, +0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121, +0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9, +18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0, +1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0, +18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118, +101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2, +8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0, +0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, +0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, +97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10, +118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18, +97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117, +98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0, +2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3, +2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0, +0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121, +0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97, +100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11, +118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121, +122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0, +59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, 0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26, -1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, -8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47, -20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109, -82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109, -82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, +117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59, +120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0, +18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0, +0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, +120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0, +1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0, +18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1, +0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110, +0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59, +120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57, +59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, +111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, +18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0, +13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, +16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2, +21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, +0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20, +0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, +59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109, +82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, +20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, +119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, +0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111, +119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121, +0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111, +119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122, +0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14, +109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, +50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, +57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1, +0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1, +109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8, +48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, +109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119, +0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59, +121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111, +119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0, +16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0, +9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59, +122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82, +111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18, +109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, 48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, 100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, -49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0, -0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1, -1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1, -109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48, -0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49, -0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109, -82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18, -109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121, -0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119, -50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16, -10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, -0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, -18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0, -18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110, -0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0, -15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1, -1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0, -12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119, -51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119, -48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16, -10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9, -18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, -121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109, -82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18, -109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122, -0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119, -51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10, -49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18, -109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0, -18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100, -111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, -49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, -100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111, -119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122, -0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82, -111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, -119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51, -0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26, -1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110, -0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49, -0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13, -109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, -20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0, -13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13, -2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111, +119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, +0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82, +111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82, +111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, +122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51, +0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, +119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50, +0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82, +111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1, +9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50, +0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16, +10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, 108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14, -109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0, -14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97, -0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0, -16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0, -57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0, -1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0, -15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2, -27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0, -15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97, +0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, +0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20, +0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9, +98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2, +22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0, +9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9, +97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, +48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0, +14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, 0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, 0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0, -0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, -110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, -10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, -48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0, -10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0, +0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, +110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2, +26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0, +15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0, +0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, +10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, +47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, +18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, +16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18, +118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114, +49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, +0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114, +49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, +100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, +111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118, +0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0, +0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121, +0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, +9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, +49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59, +120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, +20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21, +1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0, +18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111, +116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, +100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, +0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0, +15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0, 59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, -0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, -0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, -114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11, -2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9, -18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49, -0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59, -120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0, -16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50, -0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18, -95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0, -1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48, -0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16, -10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109, -0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0, -18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2, -0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0, -16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48, -0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59, -120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18, -109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18, -114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0, -57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122, -0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0, -9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10, -49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59, -119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, -101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0, -0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0, -2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0, -0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9, -18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, -1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9, -18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16, -10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1, -0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51, -0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0, -2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18, -97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, -18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, -8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0, -0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, -10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, -16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, -1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, -57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, -0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, -0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, -0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, -49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, -10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, -0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2, -3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12, -118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1, -9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25, -1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2, -25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0, -48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1, -9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0, -48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0, -0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, -49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, -48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, -0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118, -0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, -1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118, -0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, -1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0, -2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, -50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0, -1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, -118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51, -0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0, -0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111, -115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, -118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, -118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114, -0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118, -101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0, -1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101, -99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48, -0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109, -0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73, -110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0, -95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, -60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0, -0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0, -0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95, -95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0, -8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110, -99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60, -0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8, -58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118, -0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109, -97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111, -115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18, -109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110, -99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0, -57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97, -0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2, -0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0, -0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, -111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, -101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111, +0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0, +16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49, +0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, +121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18, +109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18, +114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, +57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, +0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, +1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0, +14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0, +15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57, +18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, +10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0, +0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2, +15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18, +109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109, +0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, +0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, +10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, +9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, +23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, +18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, +9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, +57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, +0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, +0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, +24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, +51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109, +0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, +1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25, +1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0, +20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0, +18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18, +97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10, +118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, +109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, +101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101, +99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99, +51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0, +2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, +0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, +10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49, +0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118, +101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2, +24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58, +118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0, +13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0, +48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9, +18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, +0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16, +10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109, +0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68, +101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, +118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114, +0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, +118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52, +0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0, +95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112, +111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, +9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116, +68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, +18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99, +114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116, +68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0, +57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111, +115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18, +109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0, +16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98, +0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18, +118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1, +0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, +122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46, +20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0, +0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8, +58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111, +115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118, +0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8, +118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122, +0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0, +0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, +57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115, +116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0, +16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0, +9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98, +0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0, +0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0, +58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1, +103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4, +102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32, +0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, +111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, +101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111, 97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, -18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, -102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0, -5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, -0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8, -15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97, -0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103, -105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98, -0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18, -97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110, -116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0, -1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, +17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18, +97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1, +1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108, +111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0, +8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0, +1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114, +105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1, +98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7, +118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58, 112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, -105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, +18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0, +57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116, +77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49, +0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16, +8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17, 101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,101,0,0,0,0,0 +69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110, +116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 272622a2e016c2e378efd64f22b5e37e342a1f48 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 18:21:00 -0700 Subject: do bounds check in _slang_push_var_table(), added comment --- src/mesa/shader/slang/slang_vartable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index f9121f740b..6d2b4369d9 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -32,6 +32,8 @@ struct slang_var_table_ /** * Create new table, put at head, return ptr to it. + * XXX we should take a maxTemps parameter to indicate how many temporaries + * are available for the current shader/program target. */ slang_var_table * _slang_push_var_table(slang_var_table *parent) @@ -139,7 +141,7 @@ alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { GLuint found = 0; for (j = 0; j < sz4; j++) { - if (!t->temps[i + j]) { + if (i + j < MAX_PROGRAM_TEMPS && !t->temps[i + j]) { found++; } else { -- cgit v1.2.3 From 89a3bafe0438dae818cf585504830d168019fd03 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 18:30:53 -0700 Subject: rewrite mat4 * mat4 operator to use fewer temps --- src/mesa/shader/slang/library/slang_core.gc | 78 +-- src/mesa/shader/slang/library/slang_core_gc.h | 735 ++++++++++++++------------ 2 files changed, 430 insertions(+), 383 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 80c9a0be4e..b5c33692f3 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1588,39 +1588,51 @@ mat4 __operator - (const mat4 m, const mat4 n) mat4 __operator * (const mat4 m, const mat4 n) { - vec4 mRow0, mRow1, mRow2, mRow3; - mRow0.x = m[0].x; - mRow0.y = m[1].x; - mRow0.z = m[2].x; - mRow0.w = m[3].x; - mRow1.x = m[0].y; - mRow1.y = m[1].y; - mRow1.z = m[2].y; - mRow1.w = m[3].y; - mRow2.x = m[0].z; - mRow2.y = m[1].z; - mRow2.z = m[2].z; - mRow2.w = m[3].z; - mRow3.x = m[0].w; - mRow3.y = m[1].w; - mRow3.z = m[2].w; - mRow3.w = m[3].w; - __retVal[0].x = dot(mRow0, n[0]); - __retVal[1].x = dot(mRow0, n[1]); - __retVal[2].x = dot(mRow0, n[2]); - __retVal[3].x = dot(mRow0, n[3]); - __retVal[0].y = dot(mRow1, n[0]); - __retVal[1].y = dot(mRow1, n[1]); - __retVal[2].y = dot(mRow1, n[2]); - __retVal[3].y = dot(mRow1, n[3]); - __retVal[0].z = dot(mRow2, n[0]); - __retVal[1].z = dot(mRow2, n[1]); - __retVal[2].z = dot(mRow2, n[2]); - __retVal[3].z = dot(mRow2, n[3]); - __retVal[0].w = dot(mRow3, n[0]); - __retVal[1].w = dot(mRow3, n[1]); - __retVal[2].w = dot(mRow3, n[2]); - __retVal[3].w = dot(mRow3, n[3]); + // sub-blocks to reduce temporary usage + { + vec4 mRow0; + mRow0.x = m[0].x; + mRow0.y = m[1].x; + mRow0.z = m[2].x; + mRow0.w = m[3].x; + __retVal[0].x = dot(mRow0, n[0]); + __retVal[1].x = dot(mRow0, n[1]); + __retVal[2].x = dot(mRow0, n[2]); + __retVal[3].x = dot(mRow0, n[3]); + } + { + vec4 mRow1; + mRow1.x = m[0].y; + mRow1.y = m[1].y; + mRow1.z = m[2].y; + mRow1.w = m[3].y; + __retVal[0].y = dot(mRow1, n[0]); + __retVal[1].y = dot(mRow1, n[1]); + __retVal[2].y = dot(mRow1, n[2]); + __retVal[3].y = dot(mRow1, n[3]); + } + { + vec4 mRow2; + mRow2.x = m[0].z; + mRow2.y = m[1].z; + mRow2.z = m[2].z; + mRow2.w = m[3].z; + __retVal[0].z = dot(mRow2, n[0]); + __retVal[1].z = dot(mRow2, n[1]); + __retVal[2].z = dot(mRow2, n[2]); + __retVal[3].z = dot(mRow2, n[3]); + } + { + vec4 mRow3; + mRow3.x = m[0].w; + mRow3.y = m[1].w; + mRow3.z = m[2].w; + mRow3.w = m[3].w; + __retVal[0].w = dot(mRow3, n[0]); + __retVal[1].w = dot(mRow3, n[1]); + __retVal[2].w = dot(mRow3, n[2]); + __retVal[3].w = dot(mRow3, n[3]); + } } mat4 __operator / (const mat4 m, const mat4 n) diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 4b6daea13a..7108a8e431 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -476,357 +476,392 @@ 16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, 0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, 108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1, -0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,1,1, -109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, -109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119, -0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59, -121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111, -119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0, -16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0, -9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59, -122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0, -57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82, -111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18, -109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, -48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, -100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111, -119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, -0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82, -111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82, -111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, -122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51, -0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, -119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50, -0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82, -111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50, -0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16, -10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97, -0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, -0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20, -0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2, -22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,0,111,108, +100,109,117,108,0,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109, +82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0, +59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0, +57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109, +82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49, +0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48, +0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109, +82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18, +109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0, +20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51, +0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10, +51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, +109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116, +0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18, +110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111, +116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0, +18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100, +111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0, +0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100, +111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0, +1,1,0,15,110,0,0,0,1,2,3,2,0,12,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109, +0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20, +0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, +59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59, +120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49, +0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82, +111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109, +82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109, +82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18, +109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, +49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, +100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111, +119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,50,0,0,0,9,18,109,82,111, +119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0, +16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0, +9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0, +58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0, +57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8, +48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18, +109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119, +0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58, +100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119, +51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0, +58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, +50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46, +20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, +0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0, +13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13, +2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97, +0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, +0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14, +2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0, +46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, +110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2, +22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, 110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0, -9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0, -14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, -110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0, +49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49, +20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0, 0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2, -26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0, -15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0, -0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, -10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, -47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18, -118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114, -49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, -0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114, -49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, -111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118, -0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0, -0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121, -0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0, -9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, -49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59, -120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, -20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,51,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,51,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21, -1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0, -18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111, -116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, -100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, -0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0, -15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0, -59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, -0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0, -16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49, -0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59, -121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18, -114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0, -57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0, -18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9, -18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,4,118,101,99,52,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, -0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, -1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0, -14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0, -15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57, -18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0, -0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2, -15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109, -0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, -0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, -10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, -23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, -18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, -57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, -0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, -0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, -51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109, -0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, -1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25, -1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0, -20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0, -18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18, -97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0, -2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, -109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, -101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101, -99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99, -51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0, -2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, -0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, -10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49, -0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118, -101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2, -24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58, -118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0, -13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9, -18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, -0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, -118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114, -0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52, -0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0, -95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112, -111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, -9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116, -68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, -18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116, -68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111, -115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18, -109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98, -0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18, -118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1, -0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59, -122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46, -20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0, -0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8, -58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111, -115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118, -0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8, -118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122, -0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0, -0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0, -95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0, -57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0, -16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0, -9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98, -0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0, -0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0, -58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1, -103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4, -102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32, -0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, -111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, -101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111, -97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, -17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18, -97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1, -1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108, -111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0, -8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0, -1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114, -105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1, -98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7, -118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77, +48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9, +97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, +48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1, +1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, +0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, +21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111, +116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, +111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0, +0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, +20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0, +16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0, +14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, +109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, +0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, +111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0, +0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8, +48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59, +122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, +20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0, +16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50, +0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59, +122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0, +18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, +118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, +0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0, +20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1, +114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59, +120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, +114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, +57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, +0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59, +122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, +20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, +114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0, +0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, +118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0, +0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, +1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, +0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, +0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, +24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, +8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, +0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, +16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, +0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, +49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, +10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, +1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, +18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, +57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, +0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, +0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, +50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, +10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0, +13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, +0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, +118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20, +0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18, +118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20, +0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18, +118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116, +86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0, +17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11, +118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0, +2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, +0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10, +49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1, +9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10, +49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1, +9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10, +2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0, +58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1, +0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58, +118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0, +15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0, +48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101, +99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16, +10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20, +0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95, +95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115, +116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, +18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49, +0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0, +47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0, +1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0, +0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, +49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, +48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, +0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0, +17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, +49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, +48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2, +18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10, +118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60, +0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114, +0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118, +101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97, +0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73, +110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0, +60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99, +51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18, +118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115, +116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0, +16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58, +109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0, +0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18, +109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51, +0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, +95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5, +98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1, +2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115, +0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58, +102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97, +0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0, +18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0, +18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108, +111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1, +0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0, +0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0, +0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97, +108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95, +95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0, +0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1, +98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108, +88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108, +78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9, +102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0, +18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77, 69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, 59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0, -57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116, -77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49, -0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16, -8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17, -101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110, -116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, +14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, +16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 8a2368edce9531e1b17a604b136ae2709f215b31 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Jan 2007 18:37:20 -0700 Subject: rewrite additional matrix-related functions to reduce register needs --- src/mesa/shader/slang/library/slang_core.gc | 134 +++-- src/mesa/shader/slang/library/slang_core_gc.h | 797 ++++++++++++-------------- 2 files changed, 463 insertions(+), 468 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index b5c33692f3..e901c5ae6a 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1539,25 +1539,34 @@ mat3 __operator - (const mat3 m, const mat3 n) mat3 __operator * (const mat3 m, const mat3 n) { - vec3 mRow0, mRow1, mRow2; - mRow0.x = m[0].x; - mRow0.y = m[1].x; - mRow0.z = m[2].x; - mRow1.x = m[0].y; - mRow1.y = m[1].y; - mRow1.z = m[2].y; - mRow2.x = m[0].z; - mRow2.y = m[1].z; - mRow2.z = m[2].z; - __retVal[0].x = dot(mRow0, n[0]); - __retVal[1].x = dot(mRow0, n[1]); - __retVal[2].x = dot(mRow0, n[2]); - __retVal[0].y = dot(mRow1, n[0]); - __retVal[1].y = dot(mRow1, n[1]); - __retVal[2].y = dot(mRow1, n[2]); - __retVal[0].z = dot(mRow2, n[0]); - __retVal[1].z = dot(mRow2, n[1]); - __retVal[2].z = dot(mRow2, n[2]); + // sub-blocks to reduce register usage + { + vec3 mRow0; + mRow0.x = m[0].x; + mRow0.y = m[1].x; + mRow0.z = m[2].x; + __retVal[0].x = dot(mRow0, n[0]); + __retVal[1].x = dot(mRow0, n[1]); + __retVal[2].x = dot(mRow0, n[2]); + } + { + vec3 mRow1; + mRow1.x = m[0].y; + mRow1.y = m[1].y; + mRow1.z = m[2].y; + __retVal[0].y = dot(mRow1, n[0]); + __retVal[1].y = dot(mRow1, n[1]); + __retVal[2].y = dot(mRow1, n[2]); + } + { + vec3 mRow2; + mRow2.x = m[0].z; + mRow2.y = m[1].z; + mRow2.z = m[2].z; + __retVal[0].z = dot(mRow2, n[0]); + __retVal[1].z = dot(mRow2, n[1]); + __retVal[2].z = dot(mRow2, n[2]); + } } mat3 __operator / (const mat3 m, const mat3 n) @@ -1850,19 +1859,27 @@ vec3 __operator * (const mat3 m, const vec3 v) vec3 __operator * (const vec3 v, const mat3 m) { - vec3 r0, r1, r2; - r0.x = m[0].x; - r0.y = m[1].x; - r0.z = m[2].x; - r1.x = m[0].y; - r1.y = m[1].y; - r1.z = m[2].y; - r2.x = m[0].z; - r2.y = m[1].z; - r2.z = m[2].z; - __asm vec3_dot __retVal.x, v, r0; - __asm vec3_dot __retVal.y, v, r1; - __asm vec3_dot __retVal.z, v, r2; + { + vec3 r0; + r0.x = m[0].x; + r0.y = m[1].x; + r0.z = m[2].x; + __asm vec3_dot __retVal.x, v, r0; + } + { + vec3 r1; + r1.x = m[0].y; + r1.y = m[1].y; + r1.z = m[2].y; + __asm vec3_dot __retVal.y, v, r1; + } + { + vec3 r2; + r2.x = m[0].z; + r2.y = m[1].z; + r2.z = m[2].z; + __asm vec3_dot __retVal.z, v, r2; + } } vec4 __operator * (const mat4 m, const vec4 v) @@ -1875,27 +1892,38 @@ vec4 __operator * (const mat4 m, const vec4 v) vec4 __operator * (const vec4 v, const mat4 m) { - vec4 r0, r1, r2, r3; - r0.x = m[0].x; - r0.y = m[1].x; - r0.z = m[2].x; - r0.w = m[3].x; - r1.x = m[0].y; - r1.y = m[1].y; - r1.z = m[2].y; - r1.w = m[3].y; - r2.x = m[0].z; - r2.y = m[1].z; - r2.z = m[2].z; - r2.w = m[3].z; - r3.x = m[0].w; - r3.y = m[1].w; - r3.z = m[2].w; - r3.w = m[3].w; - __asm vec4_dot __retVal.x, v, r0; - __asm vec4_dot __retVal.y, v, r1; - __asm vec4_dot __retVal.z, v, r2; - __asm vec4_dot __retVal.w, v, r3; + { + vec4 r0; + r0.x = m[0].x; + r0.y = m[1].x; + r0.z = m[2].x; + r0.w = m[3].x; + __asm vec4_dot __retVal.x, v, r0; + } + { + vec4 r1; + r1.x = m[0].y; + r1.y = m[1].y; + r1.z = m[2].y; + r1.w = m[3].y; + __asm vec4_dot __retVal.y, v, r1; + } + { + vec4 r2; + r2.x = m[0].z; + r2.y = m[1].z; + r2.z = m[2].z; + r2.w = m[3].z; + __asm vec4_dot __retVal.z, v, r2; + } + { + vec4 r3; + r3.x = m[0].w; + r3.y = m[1].w; + r3.z = m[2].w; + r3.w = m[3].w; + __asm vec4_dot __retVal.w, v, r3; + } } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 7108a8e431..9f2084ff33 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -444,424 +444,391 @@ 86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, 116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, 101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2, -21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,3,2,0,11,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, -0,1,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20, -0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, -59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109, -82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18, -109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, -20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, -119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, -0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111, -119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121, -0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111, -119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122, -0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,1,0,14,2,22,1,1,0,14, -109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, -50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,0,111,108, -100,109,117,108,0,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,3,2,0,12,1,109,82,111,119,48,0,0,1,1,109, -82,111,119,49,0,0,1,1,109,82,111,119,50,0,0,1,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,48,0, -59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0, -57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109, -82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49, -0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48, -0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109, -82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18, -109,0,16,10,51,0,57,59,122,0,20,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0, -20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51, -0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10, -51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, -109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116, -0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18, -110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111, -116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0, -18,110,0,16,10,51,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100, -111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0, -0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100, -111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0, -1,1,0,15,110,0,0,0,1,2,3,2,0,12,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109, -0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20, -0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, -59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59, -120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49, -0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82, -111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109, -82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109, -82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18, -109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, -49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58, -100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111, -119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,50,0,0,0,9,18,109,82,111, -119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0, -16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0, -9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, -50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0, -58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0, -57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8, -48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18, -109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119, -0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58, -100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119, -51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0, -58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, -50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13, -109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46, -20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0, -13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13, -2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97, -0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, -0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14, -2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0, -46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, -110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2, -22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,2,3,2,0,11,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119, +48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10, +49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18, +110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111, +116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0, +2,3,2,0,11,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59, +121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111, +119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0, +16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0, +18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82,111,119,50,0,0,0,9, +18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59, +121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0, +57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109, +82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16, +10,50,0,57,0,0,20,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2, +26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, +57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,2,3,2,0,12,1,109, +82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109, +82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18, +109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, +48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, +100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111, +119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,49,0,0,0,9,18,109,82,111, +119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0, +9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, +49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0, +58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0, +57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8, +48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18, +109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119, +0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58, +100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0, +58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82, +111,119,51,0,0,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82, +111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18, +109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119, +51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58, +100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111, +119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0, +57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10, +51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97, +0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, +0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20, +0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9, +98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2, +22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, 110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49, -20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, -110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0, +49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0, +9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9, +97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, +48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0, +14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, +110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0, 0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9, -97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1, -1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98, -0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2, -21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111, -116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, -111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0, -0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, -20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0, -16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0, -14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, -109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, -0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100, -111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0, -0,0,1,3,2,0,11,1,114,48,0,0,1,1,114,49,0,0,1,1,114,50,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59, -122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0, -20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0, -16,10,50,0,57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50, -0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59, -122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0, -18,114,48,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -118,0,0,18,114,49,0,0,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0, -0,18,118,0,0,18,114,50,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0, -20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,3,2,0,12,1,114,48,0,0,1,1,114,49,0,0,1,1, -114,50,0,0,1,1,114,51,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59, -120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18, -114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0, -57,59,121,0,20,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, -18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48, -0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59, -122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0, -20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, -114,48,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0, -0,18,114,49,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, -118,0,0,18,114,50,0,0,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0, -0,18,118,0,0,18,114,51,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2, -1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20, -0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109, -0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1, -0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1, -0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10, -49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16, -10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4, -1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0, -57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50, -0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10, -50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16, -10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0, -13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0, -0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18, -118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20, -0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18, -118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, -0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20, -0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18, -118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, -0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0, -17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0, -2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, -0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10, -49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1, -9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10, -49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1, -9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10, -2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0, -58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1, -0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58, -118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0, -15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0, -0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101, -99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16, -10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20, -0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95, -95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115, -116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0, -18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49, -0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0, -47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0, -1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0, -0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, -0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2, +26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0, +15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0, +0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, +110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, +10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, +47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, +18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, +16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18, +118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114, +49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, +0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114, +49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, +100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, +111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118, +0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,2,3,2,0,11,1,114,48,0,0,0,9,18,114, +48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59, +120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,4,118,101,99,51,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,0,2,3,2,0,11,1,114,49, +0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,4,118,101, +99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2, +3,2,0,11,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0, +59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122, +0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18, +114,50,0,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0, +1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,2,3,2,0,12,1,114,48,0,0,0,9,18,114,48,0,59,120,0, +18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9, +18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51, +0,57,59,120,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +118,0,0,18,114,48,0,0,0,0,2,3,2,0,12,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57, +59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0, +18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,4, +118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0, +0,0,0,2,3,2,0,12,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18, +114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0, +57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,2,3,2,0,12, +1,114,51,0,0,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1, +1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2, +13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0, +1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16, +10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, +1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, +1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16, +10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15, +109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1, +0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51, +0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0, +2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18, +97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, +18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, +8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0, +0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, +10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, +97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, +16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, +1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, +57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, +0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, +0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, +0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, +49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, +1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, +10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, +0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2, +3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12, +118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1, +9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25, +1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105, +118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2, +25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0, +48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1, +9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0, +48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0, +0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, +0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, 49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, 48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, -0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0, -17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, -49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, -48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, -0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2, -18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10, -118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95, -95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60, -0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114, +0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118, +0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, +1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118, +0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, +1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11, +118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0, +2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, +50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, +0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0, +1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, +118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51, +0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0, +0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111, +115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, +118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68, +101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, +118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114, 0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118, -101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97, -0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73, -110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0, -60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99, -51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18, -118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0, -16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58, -109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0, -0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18, -109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51, -0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5, -98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1, -2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115, -0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58, -102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97, -0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0, -18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0, -18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108, -111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1, -0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0, -0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0, -0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97, -108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95, -95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0, -0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1, -98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108, -88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108, -78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9, -102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0, -18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110, +101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13, +109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0, +1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101, +99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48, +0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109, +0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73, +110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, +60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0, +0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0, +0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0, +8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101, +99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110, +99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60, +0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8, +58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118, +0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109, +97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111, +115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18, +109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110, +99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0, +57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97, +0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2, +0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0, +0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, +111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, +101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111, +97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, +18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, +102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, +101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0, +5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, +0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8, +15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97, +0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103, +105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98, +0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18, +97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110, +116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0, +1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, 116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, -14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, -16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, +105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, +101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From f43eac3ed8772c13df448c4ce5b566458ab0154b Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 18 Jan 2007 09:22:44 -0700 Subject: remove swizzle param from new_var() --- src/mesa/shader/slang/slang_codegen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 15c05a39a2..85f1f0ccfd 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -581,9 +581,9 @@ new_jump(slang_atom target) * New IR_VAR node - a reference to a previously declared variable. */ static slang_ir_node * -new_var(slang_assemble_ctx *A, slang_operation *oper, - slang_atom name, GLuint swizzle) +new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) { + GLuint swizzle = SWIZZLE_NOOP; slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE); slang_ir_node *n = new_node(IR_VAR, NULL, NULL); if (!v) { @@ -1728,7 +1728,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) /* child is initializer */ slang_ir_node *var, *init, *rhs; assert(oper->num_children == 1); - var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); + var = new_var(A, oper, oper->a_id); /* XXX make copy of this initializer? */ /* printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); @@ -1741,7 +1741,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) } else if (v->initializer) { slang_ir_node *var, *init, *rhs; - var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); + var = new_var(A, oper, oper->a_id); /* XXX make copy of this initializer? */ /* printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); @@ -1771,7 +1771,7 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) * use it. Otherwise, use the oper's var id. */ slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; - slang_ir_node *n = new_var(A, oper, aVar, SWIZZLE_NOOP); + slang_ir_node *n = new_var(A, oper, aVar); /* assert(oper->var); */ -- cgit v1.2.3 From d885ff470a7d52f59538bd0ff3e2abb2452279ec Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 18 Jan 2007 15:33:13 -0700 Subject: rewrite a bunch of assignment operators (like +=) --- src/mesa/shader/slang/library/slang_core.gc | 55 +- src/mesa/shader/slang/library/slang_core_gc.h | 928 +++++++++++++------------- 2 files changed, 495 insertions(+), 488 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index e901c5ae6a..01d91e3c41 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1246,26 +1246,25 @@ void __operator /= (inout float a, const float b) void __operator += (inout vec2 v, const vec2 u) { - v.x += u.x; - v.y += u.y; + __asm vec4_add v.xy, v.xy, u.xy; } void __operator -= (inout vec2 v, const vec2 u) { - v.x -= u.x; - v.y -= u.y; + __asm vec4_subtract v.xy, v.xy, u.xy; } void __operator *= (inout vec2 v, const vec2 u) { - v.x *= u.x; - v.y *= u.y; + __asm vec4_multiply v.xy, v.xy, u.xy; } void __operator /= (inout vec2 v, const vec2 u) { - v.x /= u.x; - v.y /= u.y; + vec2 w; + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm vec4_multiply v.xy, v.xy, w.xy; } @@ -1288,10 +1287,11 @@ void __operator *= (inout vec3 v, const vec3 u) void __operator /= (inout vec3 v, const vec3 u) { -// XXX rcp - v.x /= u.x; - v.y /= u.y; - v.z /= u.z; + vec3 w; + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm float_rcp w.z, u.z; + __asm vec4_multiply v.xyz, v.xyz, w.xyz; } @@ -1314,11 +1314,12 @@ void __operator *= (inout vec4 v, const vec4 u) void __operator /= (inout vec4 v, const vec4 u) { -// XXX rcp - v.x /= u.x; - v.y /= u.y; - v.z /= u.z; - v.w /= u.w; + vec4 w; + __asm float_rcp w.x, u.x; + __asm float_rcp w.y, u.y; + __asm float_rcp w.z, u.z; + __asm float_rcp w.w, u.w; + __asm vec4_multiply v, v, w; } @@ -1327,18 +1328,17 @@ void __operator /= (inout vec4 v, const vec4 u) void __operator += (inout ivec2 v, const int a) { - v.x += a; - v.y += a; + __asm vec4_add v.xy, v.xy, a.xx; } void __operator -= (inout ivec2 v, const int a) { - v.x -= a; - v.y -= a; + __asm vec4_subtract v.xy, v.xy, a.xx; } void __operator *= (inout ivec2 v, const int a) { + __asm vec4_multiply v.xy, v.xy, a.xx; v.x *= a; v.y *= a; } @@ -1355,27 +1355,22 @@ void __operator /= (inout ivec2 v, const int a) void __operator += (inout ivec3 v, const int a) { - v.x += a; - v.y += a; - v.z += a; + __asm vec4_add v.xyz, v.xyz, a.xxx; } void __operator -= (inout ivec3 v, const int a) { - v.x -= a; - v.y -= a; - v.z -= a; + __asm vec4_subtract v.xyz, v.xyz, a.xxx; } void __operator *= (inout ivec3 v, const int a) { - v.x *= a; - v.y *= a; - v.z *= a; + __asm vec4_multiply v.xyz, v.xyz, a.xxx; } void __operator /= (inout ivec3 v, const int a) { + // XXX rcp v.x /= a; v.y /= a; v.z /= a; diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 9f2084ff33..3091f5c5e8 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -362,473 +362,485 @@ 18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, 119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95, 109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10, -118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0, -0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0, -0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0, -59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1, -1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0, -2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1, -0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1, -0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, +118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59, +120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, +99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0, +59,120,121,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0, +1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, +59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,0,0,18,118,0,59,120,121,0,0,18,119,0,59,120,121,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, +11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, +0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0, +18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, +122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120, +121,122,0,0,18,118,0,59,120,121,122,0,0,18,119,0,59,120,121,122,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0, +1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2, +2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, 117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1, -0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0, -2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97, -0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0, -59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0, -23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, -120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1, -9,18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0, -0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121, -0,18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9, -18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0, -18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118, -101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2, -8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0, -0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, -0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18, -97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10, -118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18, -97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117, -98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0, -2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3, -2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0, -0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121, -0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11, -118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121, -122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0, -59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59, -120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0, -18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0, -0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120, -120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0, -1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0, -18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1, -0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110, -0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59, -120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57, -59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, -111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0, -18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0, -13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, +117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, +4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,118,0,0,18,118,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0, +1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, +120,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, +99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0, +2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,9,18,118,0,59,120,0,18,97,0,23,0,9,18, +118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, +97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118, +101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120, +120,120,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0, +1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1, +0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0, +9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1, +1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0, +59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2, +8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9, +18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120, +0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, +0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118, +0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118, +65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, +120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0, +59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0, +18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, +0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0, +0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118, +0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, +0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0, +1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120, +120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0, +13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0, +10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, +9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120, +0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82, +111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, +121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1, +0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, +20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0, +0,1,1,0,14,110,0,0,0,1,2,3,2,0,11,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18, +109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0, +20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, +119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, +0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82, +111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, +111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18, +109,0,16,10,50,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100, +111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0, +0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,50,0, +59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0, +57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0, +16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0, +18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,0,1,0, +14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, 109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2, -21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,2,3,2,0,11,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119, -48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10, -49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18, -110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111, -116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0, -2,3,2,0,11,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59, -121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111, -119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0, -16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0, -18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82,111,119,50,0,0,0,9, -18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59, -121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0, -57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109, -82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16, -10,50,0,57,0,0,20,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2, -26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, -57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, 110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, -110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,2,3,2,0,12,1,109, -82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109, -82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18, -109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119, -48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58, -100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111, -119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,49,0,0,0,9,18,109,82,111, -119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0, -9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119, -49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0, -58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0, -57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8, -48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18, -109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119, -0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58, -100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, -50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0, -58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82, -111,119,51,0,0,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82, -111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18, -109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119, -51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58, -100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111, -119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0, -57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10, -51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97, -0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48, -0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20, -0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2, -22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0, -9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9, -97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8, -48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0, -14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18, -110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2, -26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0, -15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0, -0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, -110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, -10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, -47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, +0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,2,3,2,0,12,1,109,82,111,119,48,0,0,0,9,18,109, +82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18, +109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120, +0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82, +111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, +120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51, +0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16, +8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9, +18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, +0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82, +111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109, +82,111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109, +82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18, +109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, +100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111, +119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,51,0,0,0,9,18,109,82,111, +119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0, +16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0, +9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119, +51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0, +58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0, +57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26, +1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110, +0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49, +0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, +0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0, +13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13, +2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0, +14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97, +0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0, +16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0, +57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, 108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18, -118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114, -49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, -0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114, -49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100, -111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118, -0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,2,3,2,0,11,1,114,48,0,0,0,9,18,114, -48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59, -120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,4,118,101,99,51,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,0,2,3,2,0,11,1,114,49, -0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,4,118,101, -99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2, -3,2,0,11,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0, -59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122, -0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18, -114,50,0,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0, +1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0, +15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2, +27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0, +15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0, +0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, +110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, +10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, +48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, +18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, +16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0, +10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0, +59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, +0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, +16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, +0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, +114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, 108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116, 86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0, -1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,2,3,2,0,12,1,114,48,0,0,0,9,18,114,48,0,59,120,0, -18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9, -18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51, -0,57,59,120,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -118,0,0,18,114,48,0,0,0,0,2,3,2,0,12,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57, -59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0, -18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,4, -118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0, -0,0,0,2,3,2,0,12,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18, -114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0, -57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,2,3,2,0,12, -1,114,51,0,0,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0, -18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9, -18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1, -1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2, -13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0, -1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9, -18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0, -1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9, -18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16, -10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11, +2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,2,3,2,0,11,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109, +0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114, +48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,0,2,3,2,0,11,1,114,49,0,0,0,9,18,114,49, +0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59, +121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,4,118,101,99,51,95,100,111, +116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,11,1,114,50, +0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0, +16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101, +99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,0, +1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, +100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121, +0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12, +118,0,0,1,1,0,15,109,0,0,0,1,2,3,2,0,12,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0, +57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122, +0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0, +4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48, +0,0,0,0,2,3,2,0,12,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18, +114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, +57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,12, +1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, +18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, +18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,2,3,2,0,12,1,114,51,0,0,0,9,18, +114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0, +57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119, +0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97, +108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13, +110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, 16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15, -109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1, -0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51, -0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0, -2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18, -97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9, -18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, -8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0, -0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, -10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, -16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2, -1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0, -57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0, -0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49, -0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1, -0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10, -49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0, -1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16, -10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24, -0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2, -3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12, -118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1, -9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25, -1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2, -25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0, -48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1, -9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0, -48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0, -0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, -49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, -48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, -0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118, -0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, -1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118, -0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, -1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0, -2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, -50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0, -1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, -118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51, -0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0, -0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111, -115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, -118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, -118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114, -0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118, -101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0, -1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101, -99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48, +110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18, +110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10, +50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2, +2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22, +0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0, +0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, +57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18, +109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0, +2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, +18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109, +0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, +9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, +16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0, +23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109, +0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1, +1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18, +109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0, +0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9, +18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109, +0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0, +9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0, +24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2, +10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0, +1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15, +109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0, +16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0, +1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16, +10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0, +0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0, +58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1, +0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18, +118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99, +50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0, +17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48, 0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57, 18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18, 109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109, -0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73, -110,99,114,0,1,0,2,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0, -95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0, -60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0, -0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0, -0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95, -95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0, -8,18,98,0,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110, -99,114,0,1,0,2,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60, -0,18,118,0,59,122,0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8, -58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118, -0,59,119,0,60,0,0,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109, -97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111, -115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18, -109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110, -99,114,0,1,0,2,15,109,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0, -57,60,0,18,109,0,16,10,50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97, -0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2, -0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0, -0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, -111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, -101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111, -97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, -18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, -18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4, -102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0, -5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0, -0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8, -15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97, -0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103, -105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98, -0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18, -97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110, -116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0, -1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, +0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, +101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1, +0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, +101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1, +0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97, +0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18, +118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, +0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58, +118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118, +101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101, +99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99, +52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95, +112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0, +9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,6,118,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0, +16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0, +47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0, +9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99, +114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58, +118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2, +11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99, +51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49, +0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101, +99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99, +50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58, +118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118, +101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15, +109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57, +58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58, +118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9, +97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0,95,95,112,111,115, +116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59, +121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,8,58,118,101, +99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,0,95,95, +112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115, +116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, +0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0, +59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7, +118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122, +0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8,58,105,118,101,99, +52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0, +0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109,97,116,50,0,18, +109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99, +114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57, +60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109, +0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10, +50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118, +101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0, +1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, +116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108, +111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5, +97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0, +0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, +111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113, +117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0, +1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0, +0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, +116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97, +108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0, +5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0, +1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9, +14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1, +98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108, +79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0, +95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58, +95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111, +108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0, +1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, -105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, -101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,101,0,0,0,0,0 +121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16, +8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, +16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110, +116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101, +0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From d70771752f7df031c4fd9a7ad17ddcef6d91377a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 18 Jan 2007 15:35:44 -0700 Subject: Reimplement code for swizzling so that expressions like (p+q).x for vectors p and q works correctly. --- src/mesa/shader/slang/slang_codegen.c | 84 ++++++++++++++-------- src/mesa/shader/slang/slang_emit.c | 127 ++++++++++++++++++---------------- src/mesa/shader/slang/slang_emit.h | 4 -- src/mesa/shader/slang/slang_ir.h | 5 +- 4 files changed, 129 insertions(+), 91 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 85f1f0ccfd..b389f41177 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -57,11 +57,13 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); /** * Lookup a named constant and allocate storage for the parameter in * the given parameter list. + * \param swizzleOut returns swizzle mask for accessing the constant * \return position of the constant in the paramList. */ static GLint slang_lookup_constant(const char *name, GLint index, - struct gl_program_parameter_list *paramList) + struct gl_program_parameter_list *paramList, + GLuint *swizzleOut) { struct constant_info { const char *Name; @@ -82,7 +84,6 @@ slang_lookup_constant(const char *name, GLint index, { NULL, 0 } }; GLuint i; - GLuint swizzle; /* XXX use this */ for (i = 0; info[i].Name; i++) { if (strcmp(info[i].Name, name) == 0) { @@ -92,7 +93,7 @@ slang_lookup_constant(const char *name, GLint index, _mesa_GetFloatv(info[i].Token, &value); ASSERT(value >= 0.0); /* sanity check that glGetFloatv worked */ /* XXX named constant! */ - pos = _mesa_add_unnamed_constant(paramList, &value, 1, &swizzle); + pos = _mesa_add_unnamed_constant(paramList, &value, 1, swizzleOut); return pos; } } @@ -299,8 +300,10 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) n->Store->Index = i; } else if (n->Store->File == PROGRAM_CONSTANT) { - GLint i = slang_lookup_constant(varName, 0, prog->Parameters); + GLint i = slang_lookup_constant(varName, 0, prog->Parameters, + &n->Store->Swizzle); assert(i >= 0); + assert(n->Store->Size == 1); n->Store->Index = i; } } @@ -518,7 +521,6 @@ new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) n->Opcode = op; n->Children[0] = left; n->Children[1] = right; - n->Swizzle = SWIZZLE_NOOP; n->Writemask = WRITEMASK_XYZW; } return n; @@ -544,11 +546,14 @@ new_label(slang_atom labName) static slang_ir_node * new_float_literal(float x, float y, float z, float w) { + GLuint size = 4; /* XXX fix */ slang_ir_node *n = new_node(IR_FLOAT, NULL, NULL); n->Value[0] = x; n->Value[1] = y; n->Value[2] = z; n->Value[3] = w; + /* allocate a storage object, but compute actual location (Index) later */ + n->Store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); return n; } @@ -583,7 +588,6 @@ new_jump(slang_atom target) static slang_ir_node * new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) { - GLuint swizzle = SWIZZLE_NOOP; slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE); slang_ir_node *n = new_node(IR_VAR, NULL, NULL); if (!v) { @@ -592,10 +596,7 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) } assert(!oper->var || oper->var == v); v->used = GL_TRUE; - - n->Swizzle = swizzle; n->Var = v; - slang_allocate_storage(A, n); return n; @@ -667,7 +668,9 @@ slang_inline_asm_function(slang_assemble_ctx *A, slang_operation *inlined = slang_operation_new(1); /*assert(oper->type == slang_oper_call); or vec4_add, etc */ + /* printf("Inline asm %s\n", (char*) fun->header.a_name); + */ inlined->type = fun->body->children[0].type; inlined->a_id = fun->body->children[0].a_id; inlined->num_children = numArgs; @@ -871,9 +874,11 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, substNew = (slang_operation **) _mesa_calloc(totalArgs * sizeof(slang_operation *)); +#if 0 printf("Inline call to %s (total vars=%d nparams=%d)\n", (char *) fun->header.a_name, fun->parameters->num_variables, numArgs); +#endif if (haveRetValue && !returnOper) { /* Create 3-child comma sequence for inlined code: @@ -1022,7 +1027,9 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, slang_operation *decl = slang_operation_insert(&inlined->num_children, &inlined->children, numCopyIn); + /* printf("COPY_IN %s from expr\n", (char*)p->a_name); + */ decl->type = slang_oper_variable_decl; assert(decl->locals); decl->locals = fun->parameters; @@ -1073,13 +1080,12 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, _mesa_free(substOld); _mesa_free(substNew); +#if 0 printf("Done Inline call to %s (total vars=%d nparams=%d)\n", (char *) fun->header.a_name, fun->parameters->num_variables, numArgs); - - /* slang_print_tree(top, 0); - */ +#endif return top; } @@ -1123,7 +1129,6 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, assert(inlined->locals); printf("*** Inlined code for call to %s:\n", (char*) fun->header.a_name); - slang_print_tree(oper, 10); printf("\n"); #endif @@ -1204,11 +1209,15 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, assert(info->NumParams <= 2); if (info->NumParams == oper->num_children) { - /* storage for result not specified */ + /* Storage for result is not specified. + * Children[0], [1] are the operands. + */ firstOperand = 0; } else { - /* storage for result (child[0]) is specified */ + /* Storage for result (child[0]) is specified. + * Children[1], [2] are the operands. + */ firstOperand = 1; } @@ -1229,9 +1238,9 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, slang_ir_node *n0; dest_oper = &oper->children[0]; - if (dest_oper->type == slang_oper_field) { + while /*if*/ (dest_oper->type == slang_oper_field) { /* writemask */ - writemask = make_writemask((char*) dest_oper->a_id); + writemask &= /*=*/make_writemask((char*) dest_oper->a_id); dest_oper = &dest_oper->children[0]; } @@ -1829,6 +1838,20 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) } +static slang_ir_node * +_slang_gen_swizzle(slang_ir_node *child, GLuint swizzle) +{ + slang_ir_node *n = new_node(IR_SWIZZLE, child, NULL); + if (n) { + n->Store = _slang_new_ir_storage(child->Store->File, + child->Store->Index, + child->Store->Size); + n->Store->Swizzle = swizzle; + } + return n; +} + + /** * Generate IR tree for referencing a field in a struct (or basic vector type) */ @@ -1845,28 +1868,35 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) const GLuint rows = _slang_type_dim(ti.spec.type); slang_swizzle swz; slang_ir_node *n; + GLuint swizzle; if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { RETURN_ERROR("Bad swizzle", 0); } + swizzle = MAKE_SWIZZLE4(swz.swizzle[0], + swz.swizzle[1], + swz.swizzle[2], + swz.swizzle[3]); + n = _slang_gen_operation(A, &oper->children[0]); - n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], - swz.swizzle[1], - swz.swizzle[2], - swz.swizzle[3]); + /* create new parent node with swizzle */ + n = _slang_gen_swizzle(n, swizzle); return n; } else if (ti.spec.type == slang_spec_float) { const GLuint rows = 1; slang_swizzle swz; slang_ir_node *n; + GLuint swizzle; if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { RETURN_ERROR("Bad swizzle", 0); } + swizzle = MAKE_SWIZZLE4(swz.swizzle[0], + swz.swizzle[1], + swz.swizzle[2], + swz.swizzle[3]); n = _slang_gen_operation(A, &oper->children[0]); - n->Swizzle = MAKE_SWIZZLE4(swz.swizzle[0], - swz.swizzle[1], - swz.swizzle[2], - swz.swizzle[3]); + /* create new parent node with swizzle */ + n = _slang_gen_swizzle(n, swizzle); return n; } else { @@ -1904,7 +1934,8 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) n = _slang_gen_operation(A, &oper->children[0]); if (n) { /* use swizzle to access the element */ - n->Swizzle = SWIZZLE_X + index; + n = _slang_gen_swizzle(n, SWIZZLE_X + index); + /*n->Store = _slang_clone_ir_storage_swz(n->Store, */ n->Writemask = WRITEMASK_X << index; } return n; @@ -2372,7 +2403,6 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, /* Generate IR_MOVE instruction to initialize the variable */ lhs = new_node(IR_VAR, NULL, NULL); lhs->Var = var; - lhs->Swizzle = SWIZZLE_NOOP; lhs->Store = n->Store; /* constant folding, etc */ diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 8e62817336..a30552b909 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -101,6 +101,7 @@ static slang_ir_info IrInfo[] = { { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, { IR_FIELD, "IR_FIELD", 0, 0, 0 }, { IR_ELEMENT, "IR_ELEMENT", 0, 0, 0 }, + { IR_SWIZZLE, "IR_SWIZZLE", 0, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } }; @@ -124,6 +125,24 @@ slang_ir_name(slang_ir_opcode opcode) } +#if 0 +/** + * Swizzle a swizzle. + */ +static GLuint +swizzle_compose(GLuint swz1, GLuint swz2) +{ + GLuint i, swz, s[4]; + for (i = 0; i < 4; i++) { + GLuint c = GET_SWZ(swz1, i); + s[i] = GET_SWZ(swz2, c); + } + swz = MAKE_SWIZZLE4(s[0], s[1], s[2], s[3]); + return swz; +} +#endif + + slang_ir_storage * _slang_new_ir_storage(enum register_file file, GLint index, GLint size) { @@ -133,20 +152,12 @@ _slang_new_ir_storage(enum register_file file, GLint index, GLint size) st->File = file; st->Index = index; st->Size = size; + st->Swizzle = SWIZZLE_NOOP; } return st; } -slang_ir_storage * -_slang_clone_ir_storage(slang_ir_storage *store) -{ - slang_ir_storage *clone - = _slang_new_ir_storage(store->File, store->Index, store->Size); - return clone; -} - - static const char * swizzle_string(GLuint swizzle) { @@ -257,7 +268,7 @@ slang_print_ir(const slang_ir_node *n, int indent) break; case IR_VAR: printf("VAR %s%s at %s store %p\n", - (char *) n->Var->a_name, swizzle_string(n->Swizzle), + (char *) n->Var->a_name, swizzle_string(n->Store->Swizzle), storage_string(n->Store), (void*) n->Store); break; case IR_VAR_DECL: @@ -270,7 +281,7 @@ slang_print_ir(const slang_ir_node *n, int indent) slang_print_ir(n->Children[0], indent+3); break; case IR_CALL: - printf("ASMCALL %s(%d args)\n", n->Target, n->Swizzle); + printf("ASMCALL %s(%d args)\n", n->Target, 0/*XXX*/); break; case IR_FLOAT: printf("FLOAT %f %f %f %f\n", @@ -279,9 +290,14 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_I_TO_F: printf("INT_TO_FLOAT %d\n", (int) n->Value[0]); break; + case IR_SWIZZLE: + printf("SWIZZLE %s of (store %p) \n", + swizzle_string(n->Store->Swizzle), (void*) n->Store); + slang_print_ir(n->Children[0], indent + 3); + break; default: - printf("%s (%p, %p)\n", slang_ir_name(n->Opcode), - (void*) n->Children[0], (void*) n->Children[1]); + printf("%s (%p, %p) (store %p)\n", slang_ir_name(n->Opcode), + (void*) n->Children[0], (void*) n->Children[1], (void*) n->Store); slang_print_ir(n->Children[0], indent+3); slang_print_ir(n->Children[1], indent+3); } @@ -322,37 +338,6 @@ free_temp_storage(slang_var_table *vt, slang_ir_node *n) } -/** - * Allocate storage for a floating point constant. - */ -static slang_ir_storage * -alloc_constant(const GLfloat v[], GLuint size, struct gl_program *prog) -{ - GLuint swizzle; - GLint ind = _mesa_add_unnamed_constant(prog->Parameters, v, size, &swizzle); - slang_ir_storage *st = _slang_new_ir_storage(PROGRAM_CONSTANT, ind, size); - return st; -} - - -/** - * Swizzle a swizzle. - */ -#if 0 -static GLuint -swizzle_compose(GLuint swz1, GLuint swz2) -{ - GLuint i, swz, s[4]; - for (i = 0; i < 4; i++) { - GLuint c = GET_SWZ(swz1, i); - s[i] = GET_SWZ(swz2, c); - } - swz = MAKE_SWIZZLE4(s[0], s[1], s[2], s[3]); - return swz; -} -#endif - - /** * Convert IR storage to an instruction dst register. */ @@ -366,6 +351,7 @@ storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st, WRITEMASK_X | WRITEMASK_Y | WRITEMASK_Z, WRITEMASK_X | WRITEMASK_Y | WRITEMASK_Z | WRITEMASK_W }; + assert(st->Index >= 0 && st->Index <= 16); dst->File = st->File; dst->Index = st->Index; assert(st->File != PROGRAM_UNDEFINED); @@ -388,7 +374,7 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st, MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W), MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W) }; - + assert(st->File >= 0 && st->File <= 16); src->File = st->File; src->Index = st->Index; assert(st->File != PROGRAM_UNDEFINED); @@ -396,8 +382,8 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st, assert(st->Size <= 4); /* XXX swizzling logic here may need some work */ /*src->Swizzle = swizzle_compose(swizzle, defaultSwizzle[st->Size - 1]);*/ - if (swizzle != SWIZZLE_NOOP) - src->Swizzle = swizzle; + if (st->Swizzle != SWIZZLE_NOOP) + src->Swizzle = st->Swizzle; else src->Swizzle = defaultSwizzle[st->Size - 1]; } @@ -448,9 +434,9 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* gen this instruction */ inst = new_instruction(prog, info->InstOpcode); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - n->Children[0]->Swizzle); + /**n->Children[0]->Swizzle*/0); storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store, - n->Children[1]->Swizzle); + /**n->Children[1]->Swizzle*/0); free_temp_storage(vt, n->Children[0]); free_temp_storage(vt, n->Children[1]); @@ -480,7 +466,7 @@ emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* gen this instruction */ inst = new_instruction(prog, info->InstOpcode); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - n->Children[0]->Swizzle); + /**n->Children[0]->Swizzle*/0); free_temp_storage(vt, n->Children[0]); if (!n->Store) { @@ -511,7 +497,7 @@ emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, OPCODE_MOV); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - n->Children[0]->Swizzle); + /**n->Children[0]->Swizzle*/0); inst->SrcReg[0].NegateBase = NEGATE_XYZW; inst->Comment = n->Comment; return inst; @@ -574,7 +560,7 @@ emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* Child[1] is the coord */ storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, - n->Children[1]->Swizzle); + /**n->Children[1]->Swizzle*/0); /* Child[0] is the sampler (a uniform which'll indicate the texture unit) */ assert(n->Children[0]->Store); @@ -598,6 +584,8 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Children[1]); inst = emit(vt, n->Children[1], prog); + assert(n->Children[1]->Store->Index >= 0); + /* lhs */ emit(vt, n->Children[0], prog); @@ -611,6 +599,8 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) n->Children[1]->Store->Size); *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ + assert(n->Children[0]->Store->Index >= 0); + assert(n->Children[0]->Store->Index < 16); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); return inst; } @@ -623,7 +613,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) slang_ir_storage srcStore = *n->Children[1]->Store; GLint size = srcStore.Size; ASSERT(n->Children[0]->Writemask == WRITEMASK_XYZW); - ASSERT(n->Children[1]->Swizzle == SWIZZLE_NOOP); + ASSERT(n->Children[1]->Store->Swizzle == SWIZZLE_NOOP); dstStore.Size = 4; srcStore.Size = 4; while (size >= 4) { @@ -631,7 +621,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst->Comment = _mesa_strdup("IR_MOVE block"); storage_to_dst_reg(&inst->DstReg, &dstStore, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], &srcStore, - n->Children[1]->Swizzle); + /**n->Children[1]->Swizzle*/0); srcStore.Index++; dstStore.Index++; size -= 4; @@ -639,9 +629,11 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } else { inst = new_instruction(prog, OPCODE_MOV); + assert(n->Children[0]->Store->Index >= 0); + assert(n->Children[0]->Store->Index < 16); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, - n->Children[1]->Swizzle); + /**n->Children[1]->Swizzle*/0); } /* XXX is this test correct? */ if (_slang_is_temp(vt, n->Children[1]->Store->Index)) { @@ -680,7 +672,7 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst->CondUpdate = GL_TRUE; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - n->Children[0]->Swizzle); + /**n->Children[0]->Swizzle*/0); _slang_free_temp(vt, n->Store->Index, n->Store->Size); return inst; /* XXX or null? */ } @@ -726,6 +718,11 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* a regular variable */ _slang_add_variable(vt, n->Var); n->Store->Index = _slang_alloc_var(vt, n->Store->Size); + /* + printf("IR_VAR_DECL %s %d store %p\n", + (char*) n->Var->a_name, n->Store->Index, (void*) n->Store); + */ + assert(n->Var->aux == n->Store); } assert(n->Store->Index >= 0); break; @@ -762,6 +759,17 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } return NULL; /* no instruction */ + case IR_SWIZZLE: + /* swizzled storage access */ + (void) emit(vt, n->Children[0], prog); + /* "pull-up" the child's storage info, applying our swizzle info */ + n->Store->File = n->Children[0]->Store->File; + n->Store->Index = n->Children[0]->Store->Index; + n->Store->Size = n->Children[0]->Store->Size; + assert(n->Store->Index >= 0); + /* XXX compose swizzles here!!! */ + return NULL; + /* Simple binary operators */ case IR_ADD: case IR_SUB: @@ -798,8 +806,11 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_NEG: return emit_negation(vt, n, prog); case IR_FLOAT: - n->Store = alloc_constant(n->Value, 4, prog); /*XXX fix size */ - break; + /* find storage location for this float */ + n->Store->Index = _mesa_add_unnamed_constant(prog->Parameters, n->Value, + 4, &n->Store->Swizzle); + assert(n->Store->Index >= 0); + return NULL; case IR_MOVE: return emit_move(vt, n, prog); diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 7a845feac2..1b792402da 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -40,10 +40,6 @@ extern slang_ir_storage * _slang_new_ir_storage(enum register_file file, GLint index, GLint size); -extern slang_ir_storage * -_slang_clone_ir_storage(slang_ir_storage *store); - - extern GLboolean _slang_emit_code(slang_ir_node *n, slang_var_table *vartable, struct gl_program *prog, GLboolean withEnd); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 7fe3f7f153..34dd1bb691 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -83,6 +83,7 @@ typedef enum IR_VAR, /* variable reference */ IR_VAR_DECL,/* var declaration */ IR_ELEMENT, /* array element */ + IR_SWIZZLE, /* swizzled storage access */ IR_TEX, /* texture lookup */ IR_TEXB, /* texture lookup with LOD bias */ IR_TEXP, /* texture lookup with projection */ @@ -101,6 +102,7 @@ typedef struct enum register_file File; /**< PROGRAM_TEMPORARY, PROGRAM_INPUT, etc */ GLint Index; /**< -1 means unallocated */ GLint Size; /**< number of floats */ + GLuint Swizzle; } slang_ir_storage; @@ -113,11 +115,10 @@ typedef struct slang_ir_node_ struct slang_ir_node_ *Children[2]; const char *Comment; const char *Target; - GLuint Swizzle; GLuint Writemask; /**< If Opcode == IR_MOVE */ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; - slang_ir_storage *Store; + slang_ir_storage *Store; /**< location of result of this operation */ } slang_ir_node; -- cgit v1.2.3 From ce6640001dd9a1f3062dc58b199973d6ca94b883 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 18 Jan 2007 17:23:48 -0700 Subject: _mesa_add_unnamed_constant() now tries to re-use constants already in the parameter list. --- src/mesa/shader/prog_parameter.c | 87 ++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 676f1722e5..90118b6294 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -185,7 +185,6 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, size = 4; /** XXX fix */ return _mesa_add_parameter(paramList, PROGRAM_CONSTANT, name, size, values, NULL); - } @@ -205,18 +204,44 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, GLuint *swizzleOut) { GLint pos; - GLuint swizzle; ASSERT(size >= 1); ASSERT(size <= 4); - size = 4; /* XXX temporary */ - /* check if we already have this constant */ + if (_mesa_lookup_parameter_constant(paramList, values, - size, &pos, &swizzle)) { + size, &pos, swizzleOut)) { return pos; } - return _mesa_add_parameter(paramList, PROGRAM_CONSTANT, NULL, - size, values, NULL); - + + /* Look for empty space in an already unnamed constant parameter + * to add this constant. This will only work for single-element + * constants because we rely on smearing (i.e. .yyyy or .zzzz). + */ + if (size == 1) { + for (pos = 0; pos < paramList->NumParameters; pos++) { + struct gl_program_parameter *p = paramList->Parameters + pos; + if (p->Type == PROGRAM_CONSTANT && p->Size + size <= 4) { + /* ok, found room */ + GLfloat *pVal = paramList->ParameterValues[pos]; + GLuint swz = p->Size; /* 1, 2 or 3 for Y, Z, W */ + pVal[p->Size] = values[0]; + p->Size++; + *swizzleOut = MAKE_SWIZZLE4(swz, swz, swz, swz); + return pos; + } + } + } + + /* add a new parameter to store this constant */ + pos = _mesa_add_parameter(paramList, PROGRAM_CONSTANT, NULL, + size, values, NULL); + if (pos >= 0) { + if (size == 1) + *swizzleOut = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, + SWIZZLE_X, SWIZZLE_X); + else + *swizzleOut = SWIZZLE_NOOP; + } + return pos; } @@ -433,7 +458,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, /** * Look for a float vector in the given parameter list. The float vector * may be of length 1, 2, 3 or 4. - * \param paramList the parameter list to search + * \param list the parameter list to search * \param v the float vector to search for * \param size number of element in v * \param posOut returns the position of the constant, if found @@ -442,7 +467,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, * \return GL_TRUE if found, GL_FALSE if not found */ GLboolean -_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramList, +_mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, const GLfloat v[], GLsizei vSize, GLint *posOut, GLuint *swizzleOut) { @@ -451,32 +476,34 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *paramLis assert(vSize >= 1); assert(vSize <= 4); - if (!paramList) + if (!list) return -1; - for (i = 0; i < paramList->NumParameters; i++) { - if (paramList->Parameters[i].Type == PROGRAM_CONSTANT) { - const GLint maxShift = 4 - vSize; - GLint shift, j; - for (shift = 0; shift <= maxShift; shift++) { - GLint matched = 0; - GLuint swizzle[4]; - swizzle[0] = swizzle[1] = swizzle[2] = swizzle[3] = 0; - /* XXX we could do out-of-order swizzle matches too, someday */ + for (i = 0; i < list->NumParameters; i++) { + if (list->Parameters[i].Type == PROGRAM_CONSTANT) { + if (vSize == 1) { + /* look for v[0] anywhere within float[4] value */ + GLuint j; + for (j = 0; j < 4; j++) { + if (list->ParameterValues[i][j] == v[0]) { + /* found it */ + *posOut = i; + *swizzleOut = MAKE_SWIZZLE4(j, j, j, j); + return GL_TRUE; + } + } + } + else if (list->Parameters[i].Size >= vSize) { + /* see if we can match this constant */ + GLuint match = 0, j; for (j = 0; j < vSize; j++) { - assert(shift + j < 4); - if (paramList->ParameterValues[i][shift + j] == v[j]) { - matched++; - swizzle[j] = shift + j; - ASSERT(swizzle[j] >= SWIZZLE_X); - ASSERT(swizzle[j] <= SWIZZLE_W); + if (list->ParameterValues[i][j] == v[j]) { + match++; } } - if (matched == vSize) { - /* found! */ + if (match == vSize) { *posOut = i; - *swizzleOut = MAKE_SWIZZLE4(swizzle[0], swizzle[1], - swizzle[2], swizzle[3]); + *swizzleOut = SWIZZLE_NOOP; return GL_TRUE; } } -- cgit v1.2.3 From 16183e6430d782ff3576e352e24310dfe53fa8ab Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 18 Jan 2007 17:29:23 -0700 Subject: Implement constant sharing so that 4 float constants can share a single float[4] register slot. --- src/mesa/shader/slang/slang_codegen.c | 6 +++++- src/mesa/shader/slang/slang_emit.c | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index b389f41177..ea08c46fcf 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -546,8 +546,12 @@ new_label(slang_atom labName) static slang_ir_node * new_float_literal(float x, float y, float z, float w) { - GLuint size = 4; /* XXX fix */ + GLuint size; slang_ir_node *n = new_node(IR_FLOAT, NULL, NULL); + if (x == y && x == z && x == w) + size = 1; + else + size = 4; n->Value[0] = x; n->Value[1] = y; n->Value[2] = z; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index a30552b909..ee348e5326 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -36,6 +36,7 @@ #include "prog_parameter.h" #include "prog_print.h" #include "slang_emit.h" +#include "slang_error.h" /** @@ -125,22 +126,20 @@ slang_ir_name(slang_ir_opcode opcode) } -#if 0 /** - * Swizzle a swizzle. + * Swizzle a swizzle. That is, return swz2(swz1) */ static GLuint -swizzle_compose(GLuint swz1, GLuint swz2) +swizzle_swizzle(GLuint swz1, GLuint swz2) { GLuint i, swz, s[4]; for (i = 0; i < 4; i++) { - GLuint c = GET_SWZ(swz1, i); - s[i] = GET_SWZ(swz2, c); + GLuint c = GET_SWZ(swz2, i); + s[i] = GET_SWZ(swz1, c); } swz = MAKE_SWIZZLE4(s[0], s[1], s[2], s[3]); return swz; } -#endif slang_ir_storage * @@ -381,7 +380,7 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st, assert(st->Size >= 1); assert(st->Size <= 4); /* XXX swizzling logic here may need some work */ - /*src->Swizzle = swizzle_compose(swizzle, defaultSwizzle[st->Size - 1]);*/ + /*src->Swizzle = swizzle_swizzlee(swizzle, defaultSwizzle[st->Size - 1]);*/ if (st->Swizzle != SWIZZLE_NOOP) src->Swizzle = st->Swizzle; else @@ -767,7 +766,8 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) n->Store->Index = n->Children[0]->Store->Index; n->Store->Size = n->Children[0]->Store->Size; assert(n->Store->Index >= 0); - /* XXX compose swizzles here!!! */ + n->Store->Swizzle = swizzle_swizzle(n->Children[0]->Store->Swizzle, + n->Store->Swizzle); return NULL; /* Simple binary operators */ @@ -806,10 +806,13 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_NEG: return emit_negation(vt, n, prog); case IR_FLOAT: - /* find storage location for this float */ + /* find storage location for this float constant */ n->Store->Index = _mesa_add_unnamed_constant(prog->Parameters, n->Value, - 4, &n->Store->Swizzle); - assert(n->Store->Index >= 0); + n->Store->Size/*4*/, + &n->Store->Swizzle); + if (n->Store->Index < 0) { + RETURN_ERROR("Ran out of space for constants.", 0); + } return NULL; case IR_MOVE: -- cgit v1.2.3 From 8374ccb66ff13074a3f5938da1e22a48921c5328 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 10:02:58 -0700 Subject: change while-loop to create new scope for loop body, per spec --- src/mesa/shader/slang/library/slang_shader.syn | 4 ++-- src/mesa/shader/slang/library/slang_shader_syn.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn index ee0254f1b8..bfa6793f06 100644 --- a/src/mesa/shader/slang/library/slang_shader.syn +++ b/src/mesa/shader/slang/library/slang_shader.syn @@ -1096,7 +1096,7 @@ condition_3 expression .and .true .emit OP_END; /* - ::= "while" "(" ")" + ::= "while" "(" ")" | "do" "while" "(" ")" ";" | "for" "(" ")" @@ -1105,7 +1105,7 @@ iteration_statement iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3; iteration_statement_1 "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and - rparen .error RPAREN_EXPECTED .and statement_no_new_scope; + rparen .error RPAREN_EXPECTED .and statement; iteration_statement_2 "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon; diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h index abfb6cd42a..58cf1b1390 100644 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ b/src/mesa/shader/slang/library/slang_shader_syn.h @@ -533,7 +533,7 @@ " iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n" "iteration_statement_1\n" " \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n" -" rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n" +" rparen .error RPAREN_EXPECTED .and statement;\n" "iteration_statement_2\n" " \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n" " expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n" -- cgit v1.2.3 From a0092c51b1c334ef8d4a58939dc583b2aafbce69 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 10:15:34 -0700 Subject: Implement fragment discard/kill. --- src/mesa/shader/slang/slang_codegen.c | 3 +++ src/mesa/shader/slang/slang_emit.c | 19 +++++++++++++++++++ src/mesa/shader/slang/slang_ir.h | 3 ++- 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index ea08c46fcf..76dcca576d 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2054,6 +2054,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) RETURN_ERROR("'continue' not in loop", 0); } return new_jump(A->CurLoopCont); + case slang_oper_discard: + return new_node(IR_KILL, NULL, NULL); + case slang_oper_equal: return new_node(IR_SEQUAL, _slang_gen_operation(A, &oper->children[0]), diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index ee348e5326..c660f2ceac 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -90,6 +90,7 @@ static slang_ir_info IrInfo[] = { { IR_LABEL, "IR_LABEL", 0, 0, 0 }, { IR_JUMP, "IR_JUMP", 0, 0, 0 }, { IR_CJUMP, "IR_CJUMP", 0, 0, 0 }, + { IR_KILL, "IR_KILL", 0, 0, 0 }, { IR_COND, "IR_COND", 0, 0, 0 }, { IR_CALL, "IR_CALL", 0, 0, 0 }, { IR_MOVE, "IR_MOVE", 0, 0, 1 }, @@ -537,6 +538,19 @@ emit_jump(const char *target, struct gl_program *prog) } +static struct prog_instruction * +emit_kill(struct gl_program *prog) +{ + struct prog_instruction *inst; + /* NV-KILL - discard fragment depending on condition code. + * Note that ARB-KILL depends on sign of vector operand. + */ + inst = new_instruction(prog, OPCODE_KIL_NV); + inst->DstReg.CondMask = COND_TR; /* always branch */ + return inst; +} + + static struct prog_instruction * emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { @@ -732,6 +746,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) */ assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); + if (n->Store->Index < 0) { + printf("#### VAR %s not allocated!\n", (char*)n->Var->a_name); + } assert(n->Store->Index >= 0); assert(n->Store->Size > 0); break; @@ -827,6 +844,8 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return emit_jump(n->Target, prog); case IR_CJUMP: return emit_cjump(n->Target, prog); + case IR_KILL: + return emit_kill(prog); default: _mesa_problem(NULL, "Unexpected IR opcode in emit()\n"); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 34dd1bb691..a337d61712 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -90,7 +90,8 @@ typedef enum IR_FLOAT, IR_FIELD, IR_I_TO_F, /* int[4] to float[4] conversion */ - IR_F_TO_I /* float[4] to int[4] conversion */ + IR_F_TO_I, /* float[4] to int[4] conversion */ + IR_KILL /* fragment kill/discard */ } slang_ir_opcode; -- cgit v1.2.3 From 74b27674a87b592520793527fe1759173c8fdec7 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 10:31:52 -0700 Subject: remove stray tab --- src/mesa/shader/slang/library/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/Makefile b/src/mesa/shader/slang/library/Makefile index 92a313d7b0..67c00398e3 100644 --- a/src/mesa/shader/slang/library/Makefile +++ b/src/mesa/shader/slang/library/Makefile @@ -29,7 +29,7 @@ builtin: builtin_110 builtin_120 builtin_vec4 syn_to_c: syn_to_c.c $(CC) syn_to_c.c -o syn_to_c - + gc_to_bin: gc_to_bin.c slang_shader_syn.h $(CC) gc_to_bin.c -o gc_to_bin -- cgit v1.2.3 From 203946e1f965c76ba54d48c7e8bf06bfcbb65e8f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 12:02:06 -0700 Subject: print error msg when there's a problem --- src/mesa/shader/slang/library/gc_to_bin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/gc_to_bin.c b/src/mesa/shader/slang/library/gc_to_bin.c index ce9a6541ac..8aef7b5412 100644 --- a/src/mesa/shader/slang/library/gc_to_bin.c +++ b/src/mesa/shader/slang/library/gc_to_bin.c @@ -68,11 +68,14 @@ int main (int argc, char *argv[]) grammar id; id = grammar_load_from_text ((const byte *) slang_shader_syn); - if (id == 0) + if (id == 0) { + fprintf(stderr, "Error loading grammar from text\n"); return 1; + } grammar_set_reg8 (id, (const byte *) "parsing_builtin", 1); grammar_set_reg8 (id, (const byte *) "shader_type", atoi (argv[1])); if (gc_to_bin (id, argv[2], argv[3])) { + fprintf(stderr, "Error in gc_to_bin %s %s\n", argv[2], argv[3]); grammar_destroy (id); return 1; } -- cgit v1.2.3 From dceae2829e981236736513a95fc0e46564625d44 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 12:02:31 -0700 Subject: report error message when something fails --- src/mesa/shader/grammar/grammar.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/grammar/grammar.c b/src/mesa/shader/grammar/grammar.c index 7f2ee42d21..989e954491 100644 --- a/src/mesa/shader/grammar/grammar.c +++ b/src/mesa/shader/grammar/grammar.c @@ -260,6 +260,8 @@ first). */ +#include + static void mem_free (void **); /* @@ -2797,10 +2799,16 @@ static void grammar_load_state_destroy (grammar_load_state **gr) } } + +static void error_msg(int line, const char *msg) +{ + fprintf(stderr, "Error in grammar_load_from_text() at line %d: %s\n", line, msg); +} + + /* the API */ - grammar grammar_load_from_text (const byte *text) { grammar_load_state *g = NULL; @@ -2809,13 +2817,16 @@ grammar grammar_load_from_text (const byte *text) clear_last_error (); grammar_load_state_create (&g); - if (g == NULL) + if (g == NULL) { + error_msg(__LINE__, ""); return 0; + } dict_create (&g->di); if (g->di == NULL) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } @@ -2829,6 +2840,7 @@ grammar grammar_load_from_text (const byte *text) if (get_identifier (&text, &g->syntax_symbol)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } eat_spaces (&text); @@ -2848,6 +2860,7 @@ grammar grammar_load_from_text (const byte *text) if (get_identifier (&text, &symbol)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } eat_spaces (&text); @@ -2862,6 +2875,7 @@ grammar grammar_load_from_text (const byte *text) if (get_emtcode (&text, &ma)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } @@ -2877,6 +2891,7 @@ grammar grammar_load_from_text (const byte *text) if (get_regbyte (&text, &ma)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } @@ -2892,6 +2907,7 @@ grammar grammar_load_from_text (const byte *text) if (get_errtext (&text, &ma)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } @@ -2905,12 +2921,14 @@ grammar grammar_load_from_text (const byte *text) if (g->di->m_string != NULL) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } if (get_identifier (&text, &g->string_symbol)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } @@ -2927,6 +2945,7 @@ grammar grammar_load_from_text (const byte *text) if (get_rule (&text, &ru, g->maps, g->mapb)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } @@ -2940,6 +2959,7 @@ grammar grammar_load_from_text (const byte *text) if (ma == NULL) { grammar_load_state_destroy (&g); + error_msg(__LINE__, ""); return 0; } @@ -2953,6 +2973,7 @@ grammar grammar_load_from_text (const byte *text) g->di->m_regbytes)) { grammar_load_state_destroy (&g); + error_msg(__LINE__, "update_dependencies() failed"); return 0; } -- cgit v1.2.3 From eff9690351c07940a976fade4302b480e9731917 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 12:19:38 -0700 Subject: Rewrite normalize(vec3/vec4) to use one less register. --- .../shader/slang/library/slang_common_builtin.gc | 17 +- .../shader/slang/library/slang_common_builtin_gc.h | 664 +++++++++++---------- 2 files changed, 346 insertions(+), 335 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 822cc3e989..e32a8831dc 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -671,14 +671,23 @@ vec2 normalize(const vec2 v) vec3 normalize(const vec3 v) { - const float s = inversesqrt(dot(v, v)); - __asm vec4_multiply __retVal.xyz, v, s.xxx; +// const float s = inversesqrt(dot(v, v)); +// __retVal = v * s; +// XXX note, we _could_ use __retVal.w instead of tmp and and save a +// register, but that's actually a compilation error because v is a vec3 +// and the .w suffix is illegal. Oh well. + float tmp; + __asm vec3_dot tmp, v, v; + __asm float_rsq tmp, tmp; + __asm vec4_multiply __retVal.xyz, v, tmp.xxx; } vec4 normalize(const vec4 v) { - const float s = inversesqrt(dot(v, v)); - __asm vec4_multiply __retVal, v, s.xxxx; + float tmp; + __asm vec4_dot tmp, v, v; + __asm float_rsq tmp, tmp; + __asm vec4_multiply __retVal.xyz, v, tmp.xxx; } diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index dce92b2ef5..5a2d8ed16f 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -302,343 +302,345 @@ 118,101,114,115,101,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101, 99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, 0,0,18,115,0,59,120,120,0,0,0,0,1,0,11,0,110,111,114,109,97,108,105,122,101,0,1,1,0,11,118,0,0,0,1, -3,2,1,9,1,115,0,2,58,105,110,118,101,114,115,101,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18, -118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,118,0,0,18,115,0,59,120,120,120,0,0,0,0,1,0,12,0,110,111,114,109,97, -108,105,122,101,0,1,1,0,12,118,0,0,0,1,3,2,1,9,1,115,0,2,58,105,110,118,101,114,115,101,115,113, -114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,115,0,59,120,120,120,120,0,0,0,0,1, -0,9,0,97,98,115,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108, -0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,97,98,115,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,0,11,0,97,98,115,0,1,1,0,11,97,0,0, -0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0, -0,1,0,12,0,97,98,115,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86, -97,108,0,0,18,97,0,0,0,0,1,0,9,0,115,105,103,110,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,112,0,0,1,1,110,0, -0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,59,120,0,0,18,120,0,0,17,48,0,48,0,0,0,0,4,118,101, -99,52,95,115,103,116,0,18,110,0,59,120,0,0,17,48,0,48,0,0,0,18,120,0,0,0,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,0,0,18,110,0,0,0,0,1, -0,10,0,115,105,103,110,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95, -115,103,116,0,18,112,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116, -0,18,110,0,59,120,121,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,0,18,110,0,0,0,0,1,0,11,0,115, -105,103,110,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116, -0,18,112,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116,0,18, -110,0,59,120,121,122,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,0,18,110,0,0,0,0,1,0,12,0,115, -105,103,110,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116, -0,18,112,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48, +3,2,0,9,1,116,109,112,0,0,0,4,118,101,99,51,95,100,111,116,0,18,116,109,112,0,0,18,118,0,0,18,118, +0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118, +0,0,18,116,109,112,0,59,120,120,120,0,0,0,0,1,0,12,0,110,111,114,109,97,108,105,122,101,0,1,1,0,12, +118,0,0,0,1,3,2,0,9,1,116,109,112,0,0,0,4,118,101,99,52,95,100,111,116,0,18,116,109,112,0,0,18,118, +0,0,18,118,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, +0,0,18,118,0,0,18,116,109,112,0,59,120,120,120,0,0,0,0,1,0,9,0,97,98,115,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,97, +98,115,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,97,0,0,0,0,1,0,11,0,97,98,115,0,1,1,0,11,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,0,12,0,97,98,115,0,1,1,0,12,97, +0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,0,9,0, +115,105,103,110,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103, +116,0,18,112,0,59,120,0,0,18,120,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116,0,18,110,0, +59,120,0,0,17,48,0,48,0,0,0,18,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95, +95,114,101,116,86,97,108,0,59,120,0,0,18,112,0,0,18,110,0,0,0,0,1,0,10,0,115,105,103,110,0,1,1,0, +10,118,0,0,0,1,3,2,0,10,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,59,120, +121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,59,120,121,0,0,17, +48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,0,0,18,112,0,0,18,110,0,0,0,0,1,0,11,0,115,105,103,110,0,1,1,0,11,118,0,0,0, +1,3,2,0,11,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,59,120,121,122,0,0,18, +118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,59,120,121,122,0,0,17,48,0,48, 0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, -108,0,0,18,112,0,0,18,110,0,0,0,0,1,0,9,0,102,108,111,111,114,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,102, -108,111,111,114,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,0,11,0,102,108,111,111,114,0,1,1,0,11,97,0,0,0,1,4, -118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0, -0,0,0,1,0,12,0,102,108,111,111,114,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,0,9,0,99,101,105,108,0,1,1,0,9,97,0,0,0,1,3,2,0, -9,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,18,98,0,54,20,0,0,1,0,10,0,99,101,105,108,0,1,1,0,10,97,0,0,0, -1,3,2,0,10,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0, -9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,0,54,20,0,0,1,0,11,0,99,101,105,108,0,1,1,0, -11,97,0,0,0,1,3,2,0,11,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0, -18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,54,20,0,0,1,0,12,0,99,101, -105,108,0,1,1,0,12,97,0,0,0,1,3,2,0,12,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111, -114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,0,9,0,102,114, -97,99,116,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,0,0,0,1,0,10,0,102,114,97,99,116,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,102, -114,97,99,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,0,11,0,102,114,97,99, -116,0,1,1,0,11,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,97,0,0,0,0,1,0,12,0,102,114,97,99,116,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95, -102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,0,9,0,109,111,100,0,1,1,0,9,97, -0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59, -120,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0, -48,47,20,0,0,1,0,10,0,109,111,100,0,1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79, -118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18, -98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,97,0,18,98,0,58,102,108,111,111,114,0, -18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,0,11,0,109,111,100,0,1,1,0,11,97, -0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97,0,18,111,110,101,79,118,101,114,66,0, -48,0,0,48,47,20,0,0,1,0,12,0,109,111,100,0,1,1,0,12,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110, +108,0,59,120,121,122,0,0,18,112,0,0,18,110,0,0,0,0,1,0,12,0,115,105,103,110,0,1,1,0,12,118,0,0,0,1, +3,2,0,12,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,0,18,118,0,0,17,48,0,48, +0,0,0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52, +95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,18,110,0,0,0,0,1,0, +9,0,102,108,111,111,114,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,102,108,111,111,114,0,1,1,0,10,97,0,0,0,1,4, +118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0, +0,1,0,11,0,102,108,111,111,114,0,1,1,0,11,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,0,12,0,102,108,111,111,114,0,1,1, +0,12,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,0,18,97, +0,0,0,0,1,0,9,0,99,101,105,108,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,54,0,0,4,118,101,99, +52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18, +98,0,54,20,0,0,1,0,10,0,99,101,105,108,0,1,1,0,10,97,0,0,0,1,3,2,0,10,1,98,0,2,18,97,0,54,0,0,4, +118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,18,98,0,54,20,0,0,1,0,11,0,99,101,105,108,0,1,1,0,11,97,0,0,0,1,3,2,0,11,1,98,0,2,18,97, +0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,18,98,0,54,20,0,0,1,0,12,0,99,101,105,108,0,1,1,0,12,97,0,0,0,1,3,2,0,12, +1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95, +114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,0,9,0,102,114,97,99,116,0,1,1,0,9,97,0,0,0,1,4,118,101, +99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,0,102, +114,97,99,116,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,97,0,0,0,0,1,0,11,0,102,114,97,99,116,0,1,1,0,11,97,0,0,0,1,4,118,101,99, +52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,0,12,0, +102,114,97,99,116,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86, +97,108,0,0,18,97,0,0,0,0,1,0,9,0,109,111,100,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110, 101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66, -0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97, -0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,0,10,0,109,111,100,0,1,1,0,10,97,0,0,1, -1,0,10,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,120,0,0,1,1,111,110,101,79,118,101,114, -66,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,120,0,0,18,98,0, -59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,121,0,0,18,98,0, -59,121,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,97,0,59,120,0,18,98,0,59,120,0,58,102, -108,111,111,114,0,18,97,0,59,120,0,18,111,110,101,79,118,101,114,66,120,0,48,0,0,48,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,121,0,18,97,0,59,121,0,18,98,0,59,121,0,58,102,108,111,111,114,0, -18,97,0,59,121,0,18,111,110,101,79,118,101,114,66,121,0,48,0,0,48,47,20,0,0,1,0,11,0,109,111,100,0, -1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,120,0,0,1,1,111,110, -101,79,118,101,114,66,121,0,0,1,1,111,110,101,79,118,101,114,66,122,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,111,110,101,79,118,101,114,66,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,111,110,101,79,118,101,114,66,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,111,110,101,79,118,101,114,66,122,0,0,18,98,0,59,122,0,0,0,9,18,95,95,114,101,116, -86,97,108,0,59,120,0,18,97,0,59,120,0,18,98,0,59,120,0,58,102,108,111,111,114,0,18,97,0,59,120,0, -18,111,110,101,79,118,101,114,66,120,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121, -0,18,97,0,59,121,0,18,98,0,59,121,0,58,102,108,111,111,114,0,18,97,0,59,121,0,18,111,110,101,79, -118,101,114,66,121,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,97,0,59,122, -0,18,98,0,59,122,0,58,102,108,111,111,114,0,18,97,0,59,122,0,18,111,110,101,79,118,101,114,66,122, -0,48,0,0,48,47,20,0,0,1,0,12,0,109,111,100,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,3,2,0,9,1,111,110, -101,79,118,101,114,66,120,0,0,1,1,111,110,101,79,118,101,114,66,121,0,0,1,1,111,110,101,79,118,101, -114,66,122,0,0,1,1,111,110,101,79,118,101,114,66,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -111,110,101,79,118,101,114,66,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -111,110,101,79,118,101,114,66,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -111,110,101,79,118,101,114,66,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -111,110,101,79,118,101,114,66,119,0,0,18,98,0,59,119,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59, -120,0,18,97,0,59,120,0,18,98,0,59,120,0,58,102,108,111,111,114,0,18,97,0,59,120,0,18,111,110,101, -79,118,101,114,66,120,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,97,0,59, -121,0,18,98,0,59,121,0,58,102,108,111,111,114,0,18,97,0,59,121,0,18,111,110,101,79,118,101,114,66, -121,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,97,0,59,122,0,18,98,0,59, -122,0,58,102,108,111,111,114,0,18,97,0,59,122,0,18,111,110,101,79,118,101,114,66,122,0,48,0,0,48, -47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,97,0,59,119,0,18,98,0,59,119,0,58,102,108, -111,111,114,0,18,97,0,59,119,0,18,111,110,101,79,118,101,114,66,122,0,48,0,0,48,47,20,0,0,1,0,9,0, -109,105,110,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,0,1,0,10,0,109,105,110,0,1,1,0, -10,97,0,0,1,1,0,10,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0,1,0,11,0,109,105,110,0,1,1,0,11,97,0, -0,1,1,0,11,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,121,122,0,0,0,0,1,0,12,0,109,105,110,0,1,1,0,12, -97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,10,0,109,105,110,0,1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95, -109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0, -1,0,11,0,109,105,110,0,1,1,0,11,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95, -95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,12,0, -109,105,110,0,1,1,0,12,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101, -116,86,97,108,0,0,18,97,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,9,0,109,97,120,0,1,1,0,9,97,0,0, -1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -97,0,59,120,0,0,18,98,0,59,120,0,0,0,0,1,0,10,0,109,97,120,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,4, -118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0, -0,18,98,0,59,120,121,0,0,0,0,1,0,11,0,109,97,120,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101, -99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0, -0,18,98,0,59,120,121,122,0,0,0,0,1,0,12,0,109,97,120,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118, -101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,0,109, -97,120,0,1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116, -86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,11,0,109,97,120,0,1,1,0,11,97, -0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0, -59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,12,0,109,97,120,0,1,1,0,12,97,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,59, -120,120,120,120,0,0,0,0,1,0,9,0,99,108,97,109,112,0,1,1,0,9,118,97,108,0,0,1,1,0,9,109,105,110,86, -97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,9,1,116,0,0,0,4,118,101,99,52,95,109,97,120, -0,18,116,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,0,4,118,101,99,52,95,109,105,110,0,18, -95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,10,0,99, -108,97,109,112,0,1,1,0,10,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86, -97,108,0,0,0,1,3,2,0,10,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,0,0,18,118, -97,108,0,59,120,121,0,0,18,109,105,110,86,97,108,0,59,120,120,0,0,0,4,118,101,99,52,95,109,105,110, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,116,0,59,120,121,0,0,18,109,97,120,86,97,108, -0,59,120,120,0,0,0,0,1,0,11,0,99,108,97,109,112,0,1,1,0,11,118,97,108,0,0,1,1,0,9,109,105,110,86, -97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97,120, -0,18,116,0,59,120,121,122,0,0,18,118,97,108,0,59,120,121,122,0,0,18,109,105,110,86,97,108,0,59,120, -120,120,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,116,0,59,120,121,122,0,0,18,109,97,120,86,97,108,0,59,120,120,120,0,0,0,0,1,0,12,0,99,108,97, -109,112,0,1,1,0,12,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0, -0,0,1,3,2,0,12,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105, -110,86,97,108,0,59,120,120,120,120,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86, -97,108,0,0,18,116,0,0,18,109,97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,10,0,99,108,97,109, -112,0,1,1,0,10,118,97,108,0,0,1,1,0,10,109,105,110,86,97,108,0,0,1,1,0,10,109,97,120,86,97,108,0,0, -0,1,3,2,0,10,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,0,0,18,118,97,108,0, -59,120,121,0,0,18,109,105,110,86,97,108,0,59,120,121,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,116,0,59,120,121,0,0,18,109,97,120,86,97,108,0,59,120, -120,120,120,0,0,0,0,1,0,11,0,99,108,97,109,112,0,1,1,0,11,118,97,108,0,0,1,1,0,11,109,105,110,86, -97,108,0,0,1,1,0,11,109,97,120,86,97,108,0,0,0,1,3,2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97, -120,0,18,116,0,59,120,121,122,0,0,18,118,97,108,0,59,120,121,122,0,0,18,109,105,110,86,97,108,0,59, -120,121,122,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, -0,0,18,116,0,59,120,121,122,0,0,18,109,97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,12,0,99, -108,97,109,112,0,1,1,0,12,118,97,108,0,0,1,1,0,12,109,105,110,86,97,108,0,0,1,1,0,12,109,97,120,86, -97,108,0,0,0,1,3,2,0,12,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0, -18,109,105,110,86,97,108,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0, -18,116,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,9,0,109,105,120,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1, -1,0,9,97,0,0,0,1,3,2,1,9,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0, -1,0,10,0,109,105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,10,1,100,0,2,18, -121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0, -0,1,1,0,11,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,11,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18, -100,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,9,97,0,0,0, -1,3,2,1,12,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,10,0,109, -105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0,10,97,0,0,0,1,3,2,1,10,1,100,0,2,18,121,0,18,120, -0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11, -121,0,0,1,1,0,11,97,0,0,0,1,3,2,1,11,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97, -0,48,46,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,12,97,0,0,0,1,3,2,1,12, -1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,9,0,115,116,101,112,0, -1,1,0,9,101,100,103,101,0,0,1,1,0,9,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0, -10,101,100,103,101,0,0,1,1,0,10,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0, -11,101,100,103,101,0,0,1,1,0,11,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,12,0,115,116,101,112,0,1, -1,0,12,101,100,103,101,0,0,1,1,0,12,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101, -116,86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,9,101,100, -103,101,0,0,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0, -9,101,100,103,101,0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,0,0,0,0,1,0,12,0,115, -116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,120,0,0,0,0,1,0,9,0, -115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101, -49,0,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48, -0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0, -0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111, -111,116,104,115,116,101,112,0,1,1,0,10,101,100,103,101,48,0,0,1,1,0,10,101,100,103,101,49,0,0,1,1, -0,10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18, -101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18, -116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116, -104,115,116,101,112,0,1,1,0,11,101,100,103,101,48,0,0,1,1,0,11,101,100,103,101,49,0,0,1,1,0,11,118, -0,0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100, -103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18, -116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115, -116,101,112,0,1,1,0,12,101,100,103,101,48,0,0,1,1,0,12,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1, -3,2,0,12,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101, +0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,97,0,18,98,0,58,102,108,111,111,114, +0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,0,10,0,109,111,100,0,1,1,0,10, +97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97,0,18,111,110,101,79,118,101,114,66,0, +48,0,0,48,47,20,0,0,1,0,11,0,109,111,100,0,1,1,0,11,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110, +101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66, +0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,97,0,18,98,0,58,102,108,111, +111,114,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,0,12,0,109,111,100,0,1, +1,0,12,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97, +108,0,18,97,0,18,98,0,58,102,108,111,111,114,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0, +48,47,20,0,0,1,0,10,0,109,111,100,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,3,2,0,9,1,111,110,101,79, +118,101,114,66,120,0,0,1,1,111,110,101,79,118,101,114,66,121,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,111,110,101,79,118,101,114,66,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,111,110,101,79,118,101,114,66,121,0,0,18,98,0,59,121,0,0,0,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,18,97,0,59,120,0,18,98,0,59,120,0,58,102,108,111,111,114,0,18,97,0,59,120,0,18,111, +110,101,79,118,101,114,66,120,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18, +97,0,59,121,0,18,98,0,59,121,0,58,102,108,111,111,114,0,18,97,0,59,121,0,18,111,110,101,79,118,101, +114,66,121,0,48,0,0,48,47,20,0,0,1,0,11,0,109,111,100,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,3,2,0, +9,1,111,110,101,79,118,101,114,66,120,0,0,1,1,111,110,101,79,118,101,114,66,121,0,0,1,1,111,110, +101,79,118,101,114,66,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114, +66,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114, +66,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114, +66,122,0,0,18,98,0,59,122,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,97,0,59,120,0,18,98, +0,59,120,0,58,102,108,111,111,114,0,18,97,0,59,120,0,18,111,110,101,79,118,101,114,66,120,0,48,0,0, +48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,97,0,59,121,0,18,98,0,59,121,0,58,102, +108,111,111,114,0,18,97,0,59,121,0,18,111,110,101,79,118,101,114,66,121,0,48,0,0,48,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,122,0,18,97,0,59,122,0,18,98,0,59,122,0,58,102,108,111,111,114,0, +18,97,0,59,122,0,18,111,110,101,79,118,101,114,66,122,0,48,0,0,48,47,20,0,0,1,0,12,0,109,111,100,0, +1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,3,2,0,9,1,111,110,101,79,118,101,114,66,120,0,0,1,1,111,110, +101,79,118,101,114,66,121,0,0,1,1,111,110,101,79,118,101,114,66,122,0,0,1,1,111,110,101,79,118,101, +114,66,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,120,0,0,18, +98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,121,0,0,18, +98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,122,0,0,18, +98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,119,0,0,18, +98,0,59,119,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,97,0,59,120,0,18,98,0,59,120,0,58, +102,108,111,111,114,0,18,97,0,59,120,0,18,111,110,101,79,118,101,114,66,120,0,48,0,0,48,47,20,0,9, +18,95,95,114,101,116,86,97,108,0,59,121,0,18,97,0,59,121,0,18,98,0,59,121,0,58,102,108,111,111,114, +0,18,97,0,59,121,0,18,111,110,101,79,118,101,114,66,121,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,122,0,18,97,0,59,122,0,18,98,0,59,122,0,58,102,108,111,111,114,0,18,97,0,59,122,0, +18,111,110,101,79,118,101,114,66,122,0,48,0,0,48,47,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119, +0,18,97,0,59,119,0,18,98,0,59,119,0,58,102,108,111,111,114,0,18,97,0,59,119,0,18,111,110,101,79, +118,101,114,66,122,0,48,0,0,48,47,20,0,0,1,0,9,0,109,105,110,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4, +118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18, +98,0,59,120,0,0,0,0,1,0,10,0,109,105,110,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,4,118,101,99,52,95, +109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59, +120,121,0,0,0,0,1,0,11,0,109,105,110,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,52,95,109, +105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0, +59,120,121,122,0,0,0,0,1,0,12,0,109,105,110,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52, +95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,0,109,105,110,0, +1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108, +0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,11,0,109,105,110,0,1,1,0,11,97,0,0,1,1,0, +9,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120, +121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,12,0,109,105,110,0,1,1,0,12,97,0,0,1,1,0,9,98,0,0,0, +1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,59,120,120, +120,120,0,0,0,0,1,0,9,0,109,97,120,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97, +120,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,0,1,0,10, +0,109,97,120,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0,1,0,11,0,109, +97,120,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,121,122,0,0,0,0,1,0,12,0, +109,97,120,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101, +116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,10,0,109,97,120,0,1,1,0,10,97,0,0,1,1,0,9,98,0,0,0,1, +4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0, +59,120,120,0,0,0,0,1,0,11,0,109,97,120,0,1,1,0,11,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109, +97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0, +0,0,1,0,12,0,109,97,120,0,1,1,0,12,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95, +95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,9,0,99,108,97,109, +112,0,1,1,0,9,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0, +1,3,2,0,9,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105,110, +86,97,108,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +116,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,1,0,10,118,97,108,0,0,1,1,0, +9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,10,1,116,0,0,0,4,118,101,99, +52,95,109,97,120,0,18,116,0,59,120,121,0,0,18,118,97,108,0,59,120,121,0,0,18,109,105,110,86,97,108, +0,59,120,120,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,116,0,59,120,121,0,0,18,109,97,120,86,97,108,0,59,120,120,0,0,0,0,1,0,11,0,99,108,97,109,112, +0,1,1,0,11,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3, +2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,122,0,0,18,118,97,108,0,59, +120,121,122,0,0,18,109,105,110,86,97,108,0,59,120,120,120,0,0,0,4,118,101,99,52,95,109,105,110,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,116,0,59,120,121,122,0,0,18,109,97,120,86, +97,108,0,59,120,120,120,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,1,0,12,118,97,108,0,0,1,1,0,9,109, +105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,12,1,116,0,0,0,4,118,101,99,52,95, +109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,59,120,120,120,120,0,0,0,4, +118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,18,109,97,120,86,97, +108,0,59,120,120,120,120,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,1,0,10,118,97,108,0,0,1,1,0,10,109, +105,110,86,97,108,0,0,1,1,0,10,109,97,120,86,97,108,0,0,0,1,3,2,0,10,1,116,0,0,0,4,118,101,99,52, +95,109,97,120,0,18,116,0,59,120,121,0,0,18,118,97,108,0,59,120,121,0,0,18,109,105,110,86,97,108,0, +59,120,121,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,116,0,59,120,121,0,0,18,109,97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,11,0,99,108,97, +109,112,0,1,1,0,11,118,97,108,0,0,1,1,0,11,109,105,110,86,97,108,0,0,1,1,0,11,109,97,120,86,97,108, +0,0,0,1,3,2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,122,0,0,18,118,97, +108,0,59,120,121,122,0,0,18,109,105,110,86,97,108,0,59,120,121,122,0,0,0,4,118,101,99,52,95,109, +105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,116,0,59,120,121,122,0,0,18,109, +97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,1,0,12,118,97,108,0,0, +1,1,0,12,109,105,110,86,97,108,0,0,1,1,0,12,109,97,120,86,97,108,0,0,0,1,3,2,0,12,1,116,0,0,0,4, +118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,0,4,118, +101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,18,109,97,120,86,97,108,0, +0,0,0,1,0,9,0,109,105,120,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,9,1,100,0,2, +18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,1,0,10,120, +0,0,1,1,0,10,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,10,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18, +100,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,9,97,0,0,0, +1,3,2,1,11,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,12,0,109, +105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,12,1,100,0,2,18,121,0,18,120, +0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,1,0,10,120,0,0,1,1,0,10, +121,0,0,1,1,0,10,97,0,0,0,1,3,2,1,10,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97, +0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,11,97,0,0,0,1,3,2,1,11, +1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1, +1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,12,97,0,0,0,1,3,2,1,12,1,100,0,2,18,121,0,18,120,0,47,0,0,8, +18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,9,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,9, +120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0, +0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,10,101,100,103,101,0,0,1,1,0,10,120, +0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,120,0, +0,18,101,100,103,101,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0,11,101,100,103,101,0,0,1,1,0,11,120, +0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +120,0,0,18,101,100,103,101,0,0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,12,101,100,103,101,0,0,1,1,0, +12,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,18, +101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,10,118,0,0,0, +1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, +101,100,103,101,0,59,120,120,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0, +11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,0,0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,9,101, +100,103,101,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,120,0,0,0,0,1,0,9,0,115,109,111,111,116,104, +115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,9,120,0,0,0, +1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48,0,47,18,101,100,103,101, 49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0, 48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,104,115,116, -101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2,0, -10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18, -101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51, -0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1, -1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,116,0, -2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100, -103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0, -17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9, -101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2,58, -99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101, -48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0, -48,0,0,18,116,0,48,47,48,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,9,120,0,0,0,1,8,58,97,98,115, -0,18,120,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2, -1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0, -18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,11,118,0,0,0,1,3,2,0,9,1,114,0,0,0, -3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113, -0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,12,118,0,0,0,1,3,2,0,9,1,114,0,0,0, -3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113, -0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,114,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1, -3,2,1,9,1,100,0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0, -100,105,115,116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0,2,18,118,0, -18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99, -101,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108, -101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12,118,0,0,1, -1,0,12,117,0,0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18, -100,0,0,0,0,0,1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,51, -95,99,114,111,115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0, -0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1,1,0,9,78, -114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0, -9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8, -58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97, -114,100,0,1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100, -111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116, -0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18, -115,0,0,0,0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1,0,11,73,0,0, -1,1,0,11,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0, -0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18, -100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97,99,101,102, -111,114,119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0,1,3,2,1,9,1, -100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52, -95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0, -18,78,0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,0,1, -8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114, -101,102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111, -116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,1,0,11,73, -0,0,1,1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0, -48,47,0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1,8,18,73,0,17, -50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97, -99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0, -18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100, -111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0, -9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58, -115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,1,0,10, -73,0,0,1,1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0, -18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0, -0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101, -116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0, -18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78, -0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48, -17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47, -48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48, -18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18, -78,0,48,47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,1,1,0,9,101, -116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0, -58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10, -18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97, -0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0, -1,0,13,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0, -0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, -1,0,0,14,109,0,0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,48,0,0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0, -0,1,0,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18, +101,112,0,1,1,0,10,101,100,103,101,48,0,0,1,1,0,10,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2, +0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0, +18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17, +51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112, +0,1,1,0,11,101,100,103,101,48,0,0,1,1,0,11,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1, +116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101, +100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48, +0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0, +12,101,100,103,101,48,0,0,1,1,0,12,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2, +58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103, +101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17, +50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101, +100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99, +108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48, +0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48, +0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103, +101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109, +112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0, +17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18, +116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0, +0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2,58,99,108,97,109,112,0,18, +118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0, +48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48, +47,48,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,9,120,0,0,0,1,8,58,97,98,115,0,18,120,0,0,0,0,0, +1,0,9,0,108,101,110,103,116,104,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0,2,58, +100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112, +0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0, +0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,11,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0,2, +58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18, +112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, +0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,12,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0, +2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18, +112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, +0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,3,2,1,9,1,100, +0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115, +116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0,2,18,118,0,18,117,0,47, +0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0, +11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103, +116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12,118,0,0,1,1,0,12,117,0, +0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0, +1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,51,95,99,114,111, +115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,9,0, +102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1,1,0,9,78,114,101,102,0, +0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0, +4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105, +120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114,100,0, +1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0, +18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115, +0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0, +0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1,0,11,73,0,0,1,1,0,11, +78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3, +2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0, +0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97,99,101,102,111,114, +119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2, +58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115, +103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78, +0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,0,1,8,18, +73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101, +102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0, +18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,1,0,11,73,0,0,1, +1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47, +0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48, +0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116, +0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101, +116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0, +18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8, +18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113, +114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,1,0,10,73,0,0,1, +1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101, +116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73, +0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0, +18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0, +0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,1,1, +0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0, +48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0, +0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101, +116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48, +47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,1,1,0,9,101,116,97,0,0, +0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111, +116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17, +48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111, +116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109, +97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109, +97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0, +0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18, 109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0, -18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1, -1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0, -1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0, -0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118, -101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0, -0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95, -115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4, -0,108,101,115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, +0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16, +10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,10,118, +0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0, +11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117, +0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, +0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, +115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0, +108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, +115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, +95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69, +113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97, +110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115, +84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, +101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, +97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84, +104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, +115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95, +115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97, +116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, +116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101, +97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101, +114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101, +114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116, +101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104, 97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115, -84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103, -101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108, -101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, -52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101, -115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, -115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0, -108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99, -52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0, -1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4, -118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2, -0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52, -95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0, -103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, -95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, -52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114, -101,97,116,101,114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114, -101,97,116,101,114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103, -114,101,97,116,101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115, -103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116, -101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95, -115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0, -103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1, -4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0, -1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, -0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118, -0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97, -108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97, -110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,10,118,0, -0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0, -1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, -18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52, -95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117, -97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0, -1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1, -4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -2,0,110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110, -111,116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116, -69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1, -0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,7,118,0,0,1, -1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, -0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117, -0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0, -0,0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, +116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, +52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0, +1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117, +0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0, +0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6, +117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0, +7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113, +117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0, +0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115, +101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108, +0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0, +7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118, +101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0, +110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,110, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111, +116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69, +113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95, +114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0, +6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1, +0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0, +0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, 100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115, 110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0, 0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, -- cgit v1.2.3 From 3cec66512de9c424088ff4fd9332bcceec8ee3c6 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 13:13:15 -0700 Subject: Implement do/while loops. Replace IR_CJUMP with IR_CJUMP0 and IR_CJUMP1 so we can either jump on zero, or non-zero predicate. --- src/mesa/shader/slang/slang_codegen.c | 66 +++++++++++++++++++++++++++++++---- src/mesa/shader/slang/slang_emit.c | 26 +++++++++----- src/mesa/shader/slang/slang_ir.h | 3 +- 3 files changed, 79 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 76dcca576d..60bf57035f 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -562,18 +562,22 @@ new_float_literal(float x, float y, float z, float w) } /** + * Conditional jump. + * \param zeroOrOne indicates if the jump is to be taken on zero, or non-zero + * condition code state. * XXX maybe pass an IR node as second param to indicate the jump target??? */ static slang_ir_node * -new_cjump(slang_atom target) +new_cjump(slang_atom target, GLuint zeroOrOne) { - slang_ir_node *n = new_node(IR_CJUMP, NULL, NULL); + slang_ir_node *n = new_node(zeroOrOne ? IR_CJUMP1 : IR_CJUMP0, NULL, NULL); if (n) n->Target = (char *) target; return n; } /** + * Unconditional jump. * XXX maybe pass an IR node as second param to indicate the jump target??? */ static slang_ir_node * @@ -1386,7 +1390,7 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) cond = _slang_gen_cond(cond); tree = new_seq(startLab, cond); - bra = new_cjump(endAtom); + bra = new_cjump(endAtom, 0); tree = new_seq(tree, bra); body = _slang_gen_operation(A, &oper->children[1]); @@ -1406,6 +1410,52 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Generate IR tree for a do-while-loop. + */ +static slang_ir_node * +_slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) +{ + /* + * label "__startDo" + * code body + * eval expr (child[0]), updating condcodes + * branch if true to "__startDo" + * label "__endDo" + */ + slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startDo"); + slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endDo"); + slang_ir_node *startLab, *cond, *bra, *body, *endLab, *tree; + slang_atom prevLoopBreak = A->CurLoopBreak; + slang_atom prevLoopCont = A->CurLoopCont; + + /* Push this loop */ + A->CurLoopBreak = endAtom; + A->CurLoopCont = startAtom; + + startLab = new_label(startAtom); + + body = _slang_gen_operation(A, &oper->children[0]); + tree = new_seq(startLab, body); + + cond = _slang_gen_operation(A, &oper->children[1]); + cond = _slang_gen_cond(cond); + tree = new_seq(tree, cond); + + bra = new_cjump(startAtom, 1); + tree = new_seq(tree, bra); + + endLab = new_label(endAtom); + tree = new_seq(tree, endLab); + + /* Pop this loop */ + A->CurLoopBreak = prevLoopBreak; + A->CurLoopCont = prevLoopCont; + + return tree; +} + + /** * Generate IR tree for a for-loop. */ @@ -1443,7 +1493,7 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) cond = _slang_gen_cond(cond); tree = new_seq(tree, cond); - bra = new_cjump(endAtom); + bra = new_cjump(endAtom, 0); tree = new_seq(tree, bra); body = _slang_gen_operation(A, &oper->children[3]); @@ -1493,7 +1543,7 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) cond = _slang_gen_operation(A, &oper->children[0]); cond = _slang_gen_cond(cond); /*assert(cond->Store);*/ - bra = new_cjump(haveElseClause ? elseAtom : endifAtom); + bra = new_cjump(haveElseClause ? elseAtom : endifAtom, 0); tree = new_seq(cond, bra); trueBody = _slang_gen_operation(A, &oper->children[1]); @@ -1593,8 +1643,8 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) cond = _slang_gen_cond(cond); tree = new_seq(tmpDecl, cond); - /* jump if true to "alt" label */ - cjump = new_cjump(altAtom); + /* jump if false to "alt" label */ + cjump = new_cjump(altAtom, 0); tree = new_seq(tree, cjump); /* evaluate child 2 (y) and assign to tmp */ @@ -2042,6 +2092,8 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) break; case slang_oper_while: return _slang_gen_while(A, oper); + case slang_oper_do: + return _slang_gen_do(A, oper); case slang_oper_for: return _slang_gen_for(A, oper); case slang_oper_break: diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c660f2ceac..9dda28d842 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -89,7 +89,8 @@ static slang_ir_info IrInfo[] = { { IR_SCOPE, "IR_SCOPE", 0, 0, 0 }, { IR_LABEL, "IR_LABEL", 0, 0, 0 }, { IR_JUMP, "IR_JUMP", 0, 0, 0 }, - { IR_CJUMP, "IR_CJUMP", 0, 0, 0 }, + { IR_CJUMP0, "IR_CJUMP0", 0, 0, 0 }, + { IR_CJUMP1, "IR_CJUMP1", 0, 0, 0 }, { IR_KILL, "IR_KILL", 0, 0, 0 }, { IR_COND, "IR_COND", 0, 0, 0 }, { IR_CALL, "IR_CALL", 0, 0, 0 }, @@ -262,8 +263,12 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_JUMP: printf("JUMP %s\n", n->Target); break; - case IR_CJUMP: - printf("CJUMP %s\n", n->Target); + case IR_CJUMP0: + printf("CJUMP0 %s\n", n->Target); + slang_print_ir(n->Children[0], indent+3); + break; + case IR_CJUMP1: + printf("CJUMP1 %s\n", n->Target); slang_print_ir(n->Children[0], indent+3); break; case IR_VAR: @@ -515,11 +520,14 @@ emit_label(const char *target, struct gl_program *prog) static struct prog_instruction * -emit_cjump(const char *target, struct gl_program *prog) +emit_cjump(const char *target, struct gl_program *prog, GLuint zeroOrOne) { struct prog_instruction *inst; inst = new_instruction(prog, OPCODE_BRA); - inst->DstReg.CondMask = COND_EQ; /* branch if equal to zero */ + if (zeroOrOne) + inst->DstReg.CondMask = COND_NE; /* branch if non-zero */ + else + inst->DstReg.CondMask = COND_EQ; /* branch if equal to zero */ inst->DstReg.CondSwizzle = SWIZZLE_X; inst->Comment = _mesa_strdup(target); return inst; @@ -666,7 +674,7 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { /* Conditional expression (in if/while/for stmts). * Need to update condition code register. - * Next instruction is typically an IR_CJUMP. + * Next instruction is typically an IR_CJUMP0/1. */ /* last child expr instruction: */ struct prog_instruction *inst = emit(vt, n->Children[0], prog); @@ -842,8 +850,10 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return emit_label(n->Target, prog); case IR_JUMP: return emit_jump(n->Target, prog); - case IR_CJUMP: - return emit_cjump(n->Target, prog); + case IR_CJUMP0: + return emit_cjump(n->Target, prog, 0); + case IR_CJUMP1: + return emit_cjump(n->Target, prog, 1); case IR_KILL: return emit_kill(prog); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index a337d61712..4072c70f90 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -48,7 +48,8 @@ typedef enum IR_SCOPE, /* new variable scope (one child) */ IR_LABEL, /* target of a jump or cjump */ IR_JUMP, /* unconditional jump */ - IR_CJUMP, /* conditional jump */ + IR_CJUMP0, /* conditional jump if zero */ + IR_CJUMP1, /* conditional jump if one (or non-zero) */ IR_COND, /* conditional expression */ IR_CALL, /* call subroutine */ IR_MOVE, -- cgit v1.2.3 From 9f07ed00e4d4bca95189720dd44bf57a228baf02 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Jan 2007 07:56:00 -0700 Subject: rewrite more __postIncr functions --- src/mesa/shader/slang/library/slang_core.gc | 74 ++++++++---- src/mesa/shader/slang/library/slang_core_gc.h | 168 ++++++++++++++------------ 2 files changed, 137 insertions(+), 105 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 01d91e3c41..407c613ab5 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -2344,18 +2344,22 @@ mat4 __postDecr(inout mat4 m) //// post-increment -float __postIncr(inout float a) { - float b = a; - ++a; - return b; +float __postIncr(inout float a) +{ + __retVal = a; + a = a + 1; } -vec2 __postIncr(inout vec2 v) { - return vec2 (v.x++, v.y++); +vec2 __postIncr(inout vec2 v) +{ + __retVal = v; + v = v + vec2(1.0); } -vec3 __postIncr(inout vec3 v) { - return vec3 (v.x++, v.y++, v.z++); +vec3 __postIncr(inout vec3 v) +{ + __retVal = v; + v = v + vec3(1.0); } vec4 __postIncr(inout vec4 v) @@ -2365,36 +2369,56 @@ vec4 __postIncr(inout vec4 v) } -int __postIncr(inout int a) { - int b = a; - ++a; - return b; +int __postIncr(inout int a) +{ + __retVal = a; + a = a + 1; } -ivec2 __postIncr(inout ivec2 v) { - return ivec2 (v.x++, v.y++); +ivec2 __postIncr(inout ivec2 v) +{ + __retVal = v; + v = v + ivec2(1); } -ivec3 __postIncr(inout ivec3 v) { - return ivec3 (v.x++, v.y++, v.z++); +ivec3 __postIncr(inout ivec3 v) +{ + __retVal = v; + v = v + ivec3(1); } -ivec4 __postIncr(inout ivec4 v) { - return ivec4 (v.x++, v.y++, v.z++, v.w++); +ivec4 __postIncr(inout ivec4 v) +{ + __retVal = v; + v = v + ivec3(1); } - -mat2 __postIncr(inout mat2 m) { - return mat2 (m[0]++, m[1]++); +mat2 __postIncr(inout mat2 m) +{ + mat2 n = m; + m[0] = m[0] + vec2(1.0); + m[1] = m[1] + vec2(1.0); + return n; } -mat3 __postIncr(inout mat3 m) { - return mat3 (m[0]++, m[1]++, m[2]++); +mat3 __postIncr(inout mat3 m) +{ + mat3 n = m; + m[0] = m[0] + vec3(1.0); + m[1] = m[1] + vec3(1.0); + m[2] = m[2] + vec3(1.0); + return n; } -mat4 __postIncr(inout mat4 m) { - return mat4 (m[0]++, m[1]++, m[2]++, m[3]++); +mat4 __postIncr(inout mat4 m) +{ + mat4 n = m; + m[0] = m[0] + vec4(1.0); + m[1] = m[1] + vec4(1.0); + m[2] = m[2] + vec4(1.0); + m[3] = m[3] + vec4(1.0); + return n; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 3091f5c5e8..b1869c5d89 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -764,83 +764,91 @@ 57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57, 58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58, 118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9, -97,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,0,10,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,59, -121,0,60,0,0,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,8,58,118,101, -99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,0,95,95, -112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1, -0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0, -59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7, -118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122, -0,60,0,0,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,8,58,105,118,101,99, -52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0, -0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,8,58,109,97,116,50,0,18, -109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99, -114,0,1,0,2,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57, -60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109, -0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10, -50,0,57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118, -101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0, -1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97, -116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108, -111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5, -97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0, -0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108, -111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113, -117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0, -1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0, -0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97, -116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97, -108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0, -5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0, -1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9, -14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110,100,0,1,1,0,1,97,0,0,1,1,0,1, -98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108, -79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0, -95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58, -95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111, -108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0, -1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16, -8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, -16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0, -0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110, -116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101, -0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,0 +97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0, +1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,11,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,12,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, +9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115,116, +73,110,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97, +0,16,10,49,0,46,20,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0, +46,20,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0, +8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0,13,0,95,95, +112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,3,2,0,13,1,110,0,2,18,109,0,0,0,9,18,109,0,16, +8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,14,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,3,2,0,14,1,110,0,2,18,109,0,0,0,9,18, +109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0, +16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0, +15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,3,2,0,15,1,110,0,2,18,109,0,0,0,9, +18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109, +0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, +51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,1, +2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, +108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108, +111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1, +0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18, +97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18, +97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3, +2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97, +0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18, +101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58, +102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103, +0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102, +108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0, +1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, +97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0, +1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110, +100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95, +95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0, +9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1, +98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8, +18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95, +112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1, +4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, +1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0, +0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, +16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From a3e938b8da07e656775e88bb4b078429723689a2 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Jan 2007 09:22:13 -0700 Subject: Reimplement && and || to do short-circuit evaluation. Improved shader error handling. --- src/mesa/shader/slang/library/slang_core.gc | 19 ---- src/mesa/shader/slang/library/slang_core_gc.h | 90 +++++++-------- src/mesa/shader/slang/slang_codegen.c | 158 +++++++++++++++++--------- src/mesa/shader/slang/slang_emit.c | 9 +- 4 files changed, 159 insertions(+), 117 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 407c613ab5..811568c7ba 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -2470,11 +2470,6 @@ bool __operator <= (const int a, const int b) { } -//bool __operator ^^ (const bool a, const bool b) { -// return a != b; -//} - - bool __logicalNot(const bool a) { @@ -2483,20 +2478,6 @@ bool __logicalNot(const bool a) return true; } -bool __logicalAnd(const bool a, const bool b) -{ - if (a) - return b; - return false; -} - -bool __logicalOr(const bool a, const bool b) -{ - if (a) - return true; - return b; -} - bool __logicalXor(const bool a, const bool b) { // XXX return a != b; diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index b1869c5d89..b34cbb89ce 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -805,50 +805,50 @@ 1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, 97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0, 1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110, -100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,18,98,0,0,9,14,0,8,15,2,48,0,0,0,1,0,1,0,95, -95,108,111,103,105,99,97,108,79,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0, -9,14,0,8,18,98,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1, -98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8, -18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95, -112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1, -4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1, -1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0, -0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,15,2,48,0,20,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,79, +114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95, +95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95, +95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0, +0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108, +95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, 118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, 105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, -16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65, -0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 60bf57035f..6923c00562 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -544,18 +544,11 @@ new_label(slang_atom labName) } static slang_ir_node * -new_float_literal(float x, float y, float z, float w) +new_float_literal(const float v[4]) { - GLuint size; + const GLuint size = (v[0] == v[1] && v[0] == v[2] && v[0] == v[3]) ? 1 : 4; slang_ir_node *n = new_node(IR_FLOAT, NULL, NULL); - if (x == y && x == z && x == w) - size = 1; - else - size = 4; - n->Value[0] = x; - n->Value[1] = y; - n->Value[2] = z; - n->Value[3] = w; + COPY_4V(n->Value, v); /* allocate a storage object, but compute actual location (Index) later */ n->Store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); return n; @@ -598,10 +591,8 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) { slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE); slang_ir_node *n = new_node(IR_VAR, NULL, NULL); - if (!v) { - printf("VAR NOT FOUND %s\n", (char *) name); - assert(v); - } + if (!v) + return NULL; assert(!oper->var || oper->var == v); v->used = GL_TRUE; n->Var = v; @@ -1626,9 +1617,12 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *altLab, *endLab; slang_ir_node *tree, *tmpDecl, *tmpVar, *cond, *cjump, *jump; slang_ir_node *bodx, *body, *assignx, *assigny; - slang_assembly_typeinfo type; + slang_assembly_typeinfo type; int size; + assert(oper->type == slang_oper_select); + assert(oper->num_children == 3); + /* size of x or y's type */ slang_assembly_typeinfo_construct(&type); _slang_typeof_operation(A, &oper->children[1], &type); @@ -1647,10 +1641,10 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) cjump = new_cjump(altAtom, 0); tree = new_seq(tree, cjump); - /* evaluate child 2 (y) and assign to tmp */ + /* evaluate child 1 (x) and assign to tmp */ tmpVar = new_node(IR_VAR, NULL, NULL); tmpVar->Store = tmpDecl->Store; - body = _slang_gen_operation(A, &oper->children[2]); + body = _slang_gen_operation(A, &oper->children[1]); assigny = new_node(IR_MOVE, tmpVar, body); tree = new_seq(tree, assigny); @@ -1662,10 +1656,10 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) altLab = new_label(altAtom); tree = new_seq(tree, altLab); - /* evaluate child 1 (x) and assign to tmp */ + /* evaluate child 2 (y) and assign to tmp */ tmpVar = new_node(IR_VAR, NULL, NULL); tmpVar->Store = tmpDecl->Store; - bodx = _slang_gen_operation(A, &oper->children[1]); + bodx = _slang_gen_operation(A, &oper->children[2]); assignx = new_node(IR_MOVE, tmpVar, bodx); tree = new_seq(tree, assignx); @@ -1682,6 +1676,67 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) } +/** + * Generate code for &&. + */ +static slang_ir_node * +_slang_gen_logical_and(slang_assemble_ctx *A, slang_operation *oper) +{ + /* rewrite "a && b" as "a ? b : false" */ + slang_operation *select; + slang_ir_node *n; + + select = slang_operation_new(1); + select->type = slang_oper_select; + select->num_children = 3; + select->children = slang_operation_new(3); + + slang_operation_copy(&select->children[0], &oper->children[0]); + slang_operation_copy(&select->children[1], &oper->children[1]); + select->children[2].type = slang_oper_literal_bool; + ASSIGN_4V(select->children[2].literal, 0, 0, 0, 0); + + n = _slang_gen_select(A, select); + + /* xxx wrong */ + free(select->children); + free(select); + + return n; +} + + +/** + * Generate code for ||. + */ +static slang_ir_node * +_slang_gen_logical_or(slang_assemble_ctx *A, slang_operation *oper) +{ + /* rewrite "a || b" as "a ? true : b" */ + slang_operation *select; + slang_ir_node *n; + + select = slang_operation_new(1); + select->type = slang_oper_select; + select->num_children = 3; + select->children = slang_operation_new(3); + + slang_operation_copy(&select->children[0], &oper->children[0]); + select->children[1].type = slang_oper_literal_bool; + ASSIGN_4V(select->children[2].literal, 1, 1, 1, 1); + slang_operation_copy(&select->children[2], &oper->children[1]); + + n = _slang_gen_select(A, select); + + /* xxx wrong */ + free(select->children); + free(select); + + return n; +} + + + /** * Generate IR tree for a return statement. */ @@ -1779,6 +1834,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *n; slang_ir_node *varDecl; slang_variable *v; + const char *varName = (char *) oper->a_id; assert(oper->num_children == 0 || oper->num_children == 1); @@ -1792,10 +1848,10 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *var, *init, *rhs; assert(oper->num_children == 1); var = new_var(A, oper, oper->a_id); + if (!var) { + RETURN_ERROR2("Undefined variable:", varName, 0); + } /* XXX make copy of this initializer? */ - /* - printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); - */ rhs = _slang_gen_operation(A, &oper->children[0]); assert(rhs); init = new_node(IR_MOVE, var, rhs); @@ -1805,10 +1861,10 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) else if (v->initializer) { slang_ir_node *var, *init, *rhs; var = new_var(A, oper, oper->a_id); + if (!var) { + RETURN_ERROR2("Undefined variable:", varName, 0); + } /* XXX make copy of this initializer? */ - /* - printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); - */ rhs = _slang_gen_operation(A, v->initializer); assert(rhs); init = new_node(IR_MOVE, var, rhs); @@ -1835,9 +1891,9 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) */ slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; slang_ir_node *n = new_var(A, oper, aVar); - /* - assert(oper->var); - */ + if (!n) { + RETURN_ERROR2("Undefined variable:", (char *) aVar, 0); + } return n; } @@ -1876,18 +1932,19 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) } c0 = _slang_gen_operation(A, lhs); c1 = _slang_gen_operation(A, &oper->children[1]); - - assert(c1); - n = new_node(IR_MOVE, c0, c1); - /* - assert(c1->Opcode != IR_SEQ); - */ - if (c0->Writemask != WRITEMASK_XYZW) - /* XXX this is a hack! */ - n->Writemask = c0->Writemask; - else - n->Writemask = mask; - return n; + if (c0 && c1) { + n = new_node(IR_MOVE, c0, c1); + /*assert(c1->Opcode != IR_SEQ);*/ + if (c0->Writemask != WRITEMASK_XYZW) + /* XXX this is a hack! */ + n->Writemask = c0->Writemask; + else + n->Writemask = mask; + return n; + } + else { + return NULL; + } } } @@ -2206,25 +2263,25 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) n = _slang_gen_function_call_name(A, "/=", oper, &oper->children[0]); return n; } - case slang_oper_logicalor: + case slang_oper_logicaland: { slang_ir_node *n; assert(oper->num_children == 2); - n = _slang_gen_function_call_name(A, "__logicalOr", oper, NULL); + n = _slang_gen_logical_and(A, oper); return n; } - case slang_oper_logicalxor: + case slang_oper_logicalor: { slang_ir_node *n; assert(oper->num_children == 2); - n = _slang_gen_function_call_name(A, "__logicalXor", oper, NULL); + n = _slang_gen_logical_or(A, oper); return n; } - case slang_oper_logicaland: + case slang_oper_logicalxor: { slang_ir_node *n; assert(oper->num_children == 2); - n = _slang_gen_function_call_name(A, "__logicalAnd", oper, NULL); + n = _slang_gen_function_call_name(A, "__logicalXor", oper, NULL); return n; } case slang_oper_not: @@ -2239,7 +2296,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; assert(oper->num_children == 3); - n = _slang_gen_select(A, oper ); + n = _slang_gen_select(A, oper); return n; } @@ -2263,12 +2320,11 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_subscript: return _slang_gen_subscript(A, oper); case slang_oper_literal_float: - return new_float_literal(oper->literal[0], oper->literal[1], - oper->literal[2], oper->literal[3]); + /* fall-through */ case slang_oper_literal_int: - return new_float_literal(oper->literal[0], 0, 0, 0); + /* fall-through */ case slang_oper_literal_bool: - return new_float_literal(oper->literal[0], 0, 0, 0); + return new_float_literal(oper->literal); case slang_oper_postincrement: /* var++ */ { diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 9dda28d842..6c31bfc677 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -432,6 +432,10 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(info->InstOpcode != OPCODE_NOP); + /* XXX check if Opcode == OPCODE_ADD, then check if either child is a MUL, + * replace with MAD instruction. + */ + /* gen code for children */ emit(vt, n->Children[0], prog); emit(vt, n->Children[1], prog); @@ -629,7 +633,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) #endif { if (n->Children[0]->Store->Size > 4) { - /* move matrix/struct etc */ + /* move matrix/struct etc (block of registers) */ slang_ir_storage dstStore = *n->Children[0]->Store; slang_ir_storage srcStore = *n->Children[1]->Store; GLint size = srcStore.Size; @@ -649,6 +653,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } } else { + /* single register move */ inst = new_instruction(prog, OPCODE_MOV); assert(n->Children[0]->Store->Index >= 0); assert(n->Children[0]->Store->Index < 16); @@ -833,7 +838,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_FLOAT: /* find storage location for this float constant */ n->Store->Index = _mesa_add_unnamed_constant(prog->Parameters, n->Value, - n->Store->Size/*4*/, + n->Store->Size, &n->Store->Swizzle); if (n->Store->Index < 0) { RETURN_ERROR("Ran out of space for constants.", 0); -- cgit v1.2.3 From 5ae49cf3ed53fda6a904d7e90feef78495ae6903 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Jan 2007 09:27:40 -0700 Subject: Initial implementation of OPCODE_IF/ELSE/ENDIF instructions. --- src/mesa/shader/prog_instruction.c | 3 ++ src/mesa/shader/prog_instruction.h | 3 ++ src/mesa/shader/prog_print.c | 14 +++++++- src/mesa/shader/slang/slang_codegen.c | 53 ++++++++++++++++++++++++++- src/mesa/shader/slang/slang_emit.c | 37 +++++++++++++++++++ src/mesa/shader/slang/slang_ir.h | 3 ++ src/mesa/swrast/s_fragprog.c | 67 +++++++++++++++++++++++++++++++++++ src/mesa/tnl/t_vb_arbprogram.c | 5 ++- 8 files changed, 182 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index 1379018d4a..3de71b8b5d 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -130,11 +130,14 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_DP4, "DP4", 2 }, { OPCODE_DPH, "DPH", 2 }, { OPCODE_DST, "DST", 2 }, + { OPCODE_ELSE, "ELSE", 0 }, { OPCODE_END, "END", 0 }, + { OPCODE_ENDIF, "ENDIF", 0 }, { OPCODE_EX2, "EX2", 1 }, { OPCODE_EXP, "EXP", 1 }, { OPCODE_FLR, "FLR", 1 }, { OPCODE_FRC, "FRC", 1 }, + { OPCODE_IF, "IF", 0 }, { OPCODE_INT, "INT", 1 }, { OPCODE_KIL, "KIL", 1 }, { OPCODE_KIL_NV, "KIL", 0 }, diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index b659879651..b1001885e0 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -143,11 +143,14 @@ typedef enum prog_opcode { OPCODE_DP4, /* X X X X */ OPCODE_DPH, /* X X 1.1 */ OPCODE_DST, /* X X X X */ + OPCODE_ELSE, OPCODE_END, /* X X X X */ + OPCODE_ENDIF, OPCODE_EX2, /* X X 2 X */ OPCODE_EXP, /* X X */ OPCODE_FLR, /* X X 2 X */ OPCODE_FRC, /* X X 2 X */ + OPCODE_IF, OPCODE_INT, /* */ OPCODE_KIL, /* X */ OPCODE_KIL_NV, /* X */ diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 04b7c7d22a..78ce752f2a 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -295,7 +295,7 @@ _mesa_print_instruction(const struct prog_instruction *inst) print_comment(inst); break; case OPCODE_BRA: - _mesa_printf("BRA %u (%s.%s)", + _mesa_printf("BRA %u (%s%s)", inst->BranchTarget, condcode_string(inst->DstReg.CondMask), swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); @@ -305,6 +305,18 @@ _mesa_print_instruction(const struct prog_instruction *inst) _mesa_printf("CAL %u", inst->BranchTarget); print_comment(inst); break; + case OPCODE_IF: + _mesa_printf(" IF (%s%s)", + condcode_string(inst->DstReg.CondMask), + swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); + print_comment(inst); + break; + case OPCODE_ELSE: + _mesa_printf(" ELSE;\n"); + break; + case OPCODE_ENDIF: + _mesa_printf(" ENDIF;\n"); + break; case OPCODE_END: _mesa_printf("END"); print_comment(inst); diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6923c00562..aba6813a8b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1560,6 +1560,51 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Use high-level IF/ELSE/ENDIF instructions + */ +static slang_ir_node * +_slang_gen_if2(slang_assemble_ctx * A, const slang_operation *oper) +{ + /* + * eval expr (child[0]), updating condcodes + * branch if false to _else or _endif + * "true" code block + * if haveElseClause clause: + * jump "__endif" + * label "__else" + * "false" code block + * label "__endif" + */ + const GLboolean haveElseClause = !_slang_is_noop(&oper->children[2]); + slang_ir_node *ifNode, *cond, *trueBody, *elseNode, *falseBody, *endifNode; + slang_ir_node *tree; + + cond = _slang_gen_operation(A, &oper->children[0]); + cond = _slang_gen_cond(cond); + /*assert(cond->Store);*/ + ifNode = new_node(IR_IF, cond, NULL); + + trueBody = _slang_gen_operation(A, &oper->children[1]); + tree = new_seq(ifNode, trueBody); + + if (haveElseClause) { + /* else clause */ + elseNode = new_node(IR_ELSE, NULL, NULL); + tree = new_seq(tree, elseNode); + + falseBody = _slang_gen_operation(A, &oper->children[2]); + tree = new_seq(tree, falseBody); + } + + endifNode = new_node(IR_ENDIF, NULL, NULL); + tree = new_seq(tree, endifNode); + + return tree; +} + + + /** * Generate IR node for storage of a temporary of given size. */ @@ -2314,7 +2359,13 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_identifier: return _slang_gen_variable(A, oper); case slang_oper_if: - return _slang_gen_if(A, oper); + if (A->program->Target == GL_FRAGMENT_PROGRAM_ARB) { + return _slang_gen_if(A, oper); + } + else { + /* XXX update tnl executor */ + return _slang_gen_if(A, oper); + } case slang_oper_field: return _slang_gen_field(A, oper); case slang_oper_subscript: diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6c31bfc677..44fd3752e2 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -91,6 +91,9 @@ static slang_ir_info IrInfo[] = { { IR_JUMP, "IR_JUMP", 0, 0, 0 }, { IR_CJUMP0, "IR_CJUMP0", 0, 0, 0 }, { IR_CJUMP1, "IR_CJUMP1", 0, 0, 0 }, + { IR_IF, "IR_IF", 0, 0, 0 }, + { IR_ELSE, "IR_ELSE", 0, 0, 0 }, + { IR_ENDIF, "IR_ENDIF", 0, 0, 0 }, { IR_KILL, "IR_KILL", 0, 0, 0 }, { IR_COND, "IR_COND", 0, 0, 0 }, { IR_CALL, "IR_CALL", 0, 0, 0 }, @@ -271,6 +274,18 @@ slang_print_ir(const slang_ir_node *n, int indent) printf("CJUMP1 %s\n", n->Target); slang_print_ir(n->Children[0], indent+3); break; + + case IR_IF: + printf("IF \n"); + slang_print_ir(n->Children[0], indent+3); + break; + case IR_ELSE: + printf("ELSE\n"); + break; + case IR_ENDIF: + printf("ENDIF\n"); + break; + case IR_VAR: printf("VAR %s%s at %s store %p\n", (char *) n->Var->a_name, swizzle_string(n->Store->Swizzle), @@ -862,6 +877,28 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_KILL: return emit_kill(prog); + case IR_IF: + { + struct prog_instruction *inst; + emit(vt, n->Children[0], prog); /* the condition */ + inst = new_instruction(prog, OPCODE_IF); + inst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ + inst->DstReg.CondSwizzle = SWIZZLE_X; + return inst; + } + case IR_ELSE: + { + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_ELSE); + return inst; + } + case IR_ENDIF: + { + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_ENDIF); + return inst; + } + default: _mesa_problem(NULL, "Unexpected IR opcode in emit()\n"); abort(); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 4072c70f90..e5a0fa8eb5 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -51,6 +51,9 @@ typedef enum IR_CJUMP0, /* conditional jump if zero */ IR_CJUMP1, /* conditional jump if one (or non-zero) */ IR_COND, /* conditional expression */ + IR_IF, /* high-level IF */ + IR_ELSE, /* high-level ELSE */ + IR_ENDIF, /* high-level ENDIF */ IR_CALL, /* call subroutine */ IR_MOVE, IR_ADD, diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index b842b49616..813345f4cd 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -888,6 +888,73 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; + case OPCODE_IF: + { + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + /* do if-clause (just continue execution) */ + } + else { + /* do else-clause, or go to endif */ + GLint ifDepth = 1; + do { + pc++; + inst = program->Base.Instructions + pc; + if (inst->Opcode == OPCODE_END) { + /* mal-formed program! */ + abort(); + } + else if (inst->Opcode == OPCODE_IF) { + ifDepth++; + } + else if (inst->Opcode == OPCODE_ELSE) { + if (ifDepth == 0) { + /* ok, continue normal execution */ + break; + } + } + else if (inst->Opcode == OPCODE_ENDIF) { + ifDepth--; + if (ifDepth == 0) { + /* ok, continue normal execution */ + break; + } + } + assert(ifDepth >= 0); + } while (pc < maxInst); + } + } + break; + case OPCODE_ELSE: + { + /* find/goto ENDIF */ + GLint ifDepth = 1; + do { + pc++; + inst = program->Base.Instructions + pc; + if (inst->Opcode == OPCODE_END) { + /* mal-formed program! */ + abort(); + } + else if (inst->Opcode == OPCODE_IF) { + ifDepth++; + } + else if (inst->Opcode == OPCODE_ENDIF) { + ifDepth--; + if (ifDepth == 0) + break; + } + assert(ifDepth >= 0); + } while (pc < maxInst); + } + break; + case OPCODE_ENDIF: + /* nothing */ + break; case OPCODE_INT: /* float to int */ { GLfloat a[4], result[4]; diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 5773f0f627..5726a66c90 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -746,11 +746,14 @@ static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union i do_DP4, do_DPH, do_DST, - do_NOP, + do_NOP,/*ELSE*/ + do_NOP,/*END*/ + do_NOP,/*ENDIF*/ do_EX2, do_EXP, do_FLR, do_FRC, + do_NOP,/*IF*/ do_INT, do_NOP,/*KIL*/ do_NOP,/*KIL_NV*/ -- cgit v1.2.3 From 1f208c354694ff3d6664665f7b5e8d33ea48e9b2 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Jan 2007 09:29:04 -0700 Subject: remove unused swizzle parameter to -storage_to_src_reg() --- src/mesa/shader/slang/slang_emit.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 44fd3752e2..eca9cdba2d 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -385,8 +385,7 @@ storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st, * Convert IR storage to an instruction src register. */ static void -storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st, - GLuint swizzle) +storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st) { static const GLuint defaultSwizzle[4] = { MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X), @@ -457,10 +456,8 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* gen this instruction */ inst = new_instruction(prog, info->InstOpcode); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - /**n->Children[0]->Swizzle*/0); - storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store, - /**n->Children[1]->Swizzle*/0); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); free_temp_storage(vt, n->Children[0]); free_temp_storage(vt, n->Children[1]); @@ -489,8 +486,7 @@ emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* gen this instruction */ inst = new_instruction(prog, info->InstOpcode); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - /**n->Children[0]->Swizzle*/0); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); free_temp_storage(vt, n->Children[0]); if (!n->Store) { @@ -520,8 +516,7 @@ emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, OPCODE_MOV); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - /**n->Children[0]->Swizzle*/0); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); inst->SrcReg[0].NegateBase = NEGATE_XYZW; inst->Comment = n->Comment; return inst; @@ -599,8 +594,7 @@ emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); /* Child[1] is the coord */ - storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, - /**n->Children[1]->Swizzle*/0); + storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); /* Child[0] is the sampler (a uniform which'll indicate the texture unit) */ assert(n->Children[0]->Store); @@ -660,8 +654,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, OPCODE_MOV); inst->Comment = _mesa_strdup("IR_MOVE block"); storage_to_dst_reg(&inst->DstReg, &dstStore, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], &srcStore, - /**n->Children[1]->Swizzle*/0); + storage_to_src_reg(&inst->SrcReg[0], &srcStore); srcStore.Index++; dstStore.Index++; size -= 4; @@ -673,8 +666,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Children[0]->Store->Index >= 0); assert(n->Children[0]->Store->Index < 16); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store, - /**n->Children[1]->Swizzle*/0); + storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); } /* XXX is this test correct? */ if (_slang_is_temp(vt, n->Children[1]->Store->Index)) { @@ -712,8 +704,7 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, OPCODE_MOV); inst->CondUpdate = GL_TRUE; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store, - /**n->Children[0]->Swizzle*/0); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); _slang_free_temp(vt, n->Store->Index, n->Store->Size); return inst; /* XXX or null? */ } -- cgit v1.2.3 From f116fcc3287c7b84d31c114bcb8299bc7b1e541a Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Jan 2007 09:46:02 -0700 Subject: optimization: emit MAD instructions when possible --- src/mesa/shader/slang/slang_emit.c | 60 +++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index eca9cdba2d..0f6d6cb554 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -39,6 +39,8 @@ #include "slang_error.h" +#define PEEPHOLE_OPTIMIZATIONS 1 + /** * Assembly and IR info */ @@ -450,16 +452,54 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * replace with MAD instruction. */ - /* gen code for children */ - emit(vt, n->Children[0], prog); - emit(vt, n->Children[1], prog); +#if PEEPHOLE_OPTIMIZATIONS + /* Look for MAD opportunity */ + if (n->Opcode == IR_ADD && n->Children[0]->Opcode == IR_MUL) { + /* found pattern IR_ADD(IR_MUL(A, B), C) */ + emit(vt, n->Children[0]->Children[0], prog); /* A */ + emit(vt, n->Children[0]->Children[1], prog); /* B */ + emit(vt, n->Children[1], prog); /* C */ + /* generate MAD instruction */ + inst = new_instruction(prog, OPCODE_MAD); + /* operands: A, B, C: */ + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[0]->Children[1]->Store); + storage_to_src_reg(&inst->SrcReg[2], n->Children[1]->Store); + free_temp_storage(vt, n->Children[0]->Children[0]); + free_temp_storage(vt, n->Children[0]->Children[1]); + free_temp_storage(vt, n->Children[1]); + } + else if (n->Opcode == IR_ADD && n->Children[1]->Opcode == IR_MUL) { + /* found pattern IR_ADD(A, IR_MUL(B, C)) */ + emit(vt, n->Children[0], prog); /* A */ + emit(vt, n->Children[1]->Children[0], prog); /* B */ + emit(vt, n->Children[1]->Children[1], prog); /* C */ + /* generate MAD instruction */ + inst = new_instruction(prog, OPCODE_MAD); + /* operands: B, C, A */ + storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Children[1]->Store); + storage_to_src_reg(&inst->SrcReg[2], n->Children[0]->Store); + free_temp_storage(vt, n->Children[1]->Children[0]); + free_temp_storage(vt, n->Children[1]->Children[1]); + free_temp_storage(vt, n->Children[0]); + } + else +#endif + { + /* normal case */ - /* gen this instruction */ - inst = new_instruction(prog, info->InstOpcode); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); - free_temp_storage(vt, n->Children[0]); - free_temp_storage(vt, n->Children[1]); + /* gen code for children */ + emit(vt, n->Children[0], prog); + emit(vt, n->Children[1], prog); + + /* gen this instruction */ + inst = new_instruction(prog, info->InstOpcode); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + free_temp_storage(vt, n->Children[0]); + free_temp_storage(vt, n->Children[1]); + } if (!n->Store) { alloc_temp_storage(vt, n, info->ResultSize); @@ -623,7 +663,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* lhs */ emit(vt, n->Children[0], prog); -#if 1 +#if PEEPHOLE_OPTIMIZATIONS if (inst && _slang_is_temp(vt, n->Children[1]->Store->Index)) { /* Peephole optimization: * Just modify the RHS to put its result into the dest of this -- cgit v1.2.3 From 059e9014462fe5361055e529a344338dcbc43c5d Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 20 Jan 2007 10:47:10 -0700 Subject: Add a simple mechanism for annotating instructions for easier debugging. --- src/mesa/shader/slang/slang_emit.c | 152 ++++++++++++++++++++++++++++++++++++- 1 file changed, 148 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 0f6d6cb554..036509c51c 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -40,6 +40,8 @@ #define PEEPHOLE_OPTIMIZATIONS 1 +#define ANNOTATE 0 + /** * Assembly and IR info @@ -436,6 +438,131 @@ static struct prog_instruction * emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog); +/** + * Return an annotation string for given node's storage. + */ +static char * +storage_annotation(const slang_ir_node *n, const struct gl_program *prog) +{ +#if ANNOTATE + const slang_ir_storage *st = n->Store; + static char s[100] = ""; + + if (!st) + return _mesa_strdup(""); + + switch (st->File) { + case PROGRAM_CONSTANT: + if (st->Index >= 0) { + const GLfloat *val = prog->Parameters->ParameterValues[st->Index]; + if (st->Swizzle == SWIZZLE_NOOP) + sprintf(s, "{%f, %f, %f, %f}", val[0], val[1], val[2], val[3]); + else { + sprintf(s, "%f", val[GET_SWZ(st->Swizzle, 0)]); + } + } + break; + case PROGRAM_TEMPORARY: + if (n->Var) + sprintf(s, "%s", (char *) n->Var->a_name); + else + sprintf(s, "t[%d]", st->Index); + break; + case PROGRAM_STATE_VAR: + case PROGRAM_UNIFORM: + sprintf(s, "%s", prog->Parameters->Parameters[st->Index].Name); + break; + case PROGRAM_VARYING: + sprintf(s, "%s", prog->Varying->Parameters[st->Index].Name); + break; + case PROGRAM_INPUT: + sprintf(s, "input[%d]", st->Index); + break; + case PROGRAM_OUTPUT: + sprintf(s, "output[%d]", st->Index); + break; + default: + s[0] = 0; + } + return _mesa_strdup(s); +#else + return NULL; +#endif +} + + +/** + * Return an annotation string for an instruction. + */ +static char * +instruction_annotation(gl_inst_opcode opcode, + char *dstAnnot, char *srcAnnot0, char *srcAnnot1) +{ +#if ANNOTATE + const char *operator; + char *s; + int len = 50; + + if (dstAnnot) + len += strlen(dstAnnot); + else + dstAnnot = _mesa_strdup(""); + + if (srcAnnot0) + len += strlen(srcAnnot0); + else + srcAnnot0 = _mesa_strdup(""); + + if (srcAnnot1) + len += strlen(srcAnnot1); + else + srcAnnot1 = _mesa_strdup(""); + + switch (opcode) { + case OPCODE_ADD: + operator = "+"; + break; + case OPCODE_SUB: + operator = "-"; + break; + case OPCODE_MUL: + operator = "*"; + break; + case OPCODE_DP3: + operator = "DP3"; + break; + case OPCODE_DP4: + operator = "DP4"; + break; + case OPCODE_XPD: + operator = "XPD"; + break; + case OPCODE_RSQ: + operator = "RSQ"; + break; + case OPCODE_SGT: + operator = ">"; + break; + default: + operator = ","; + } + + s = (char *) malloc(len); + sprintf(s, "%s = %s %s %s", dstAnnot, srcAnnot0, operator, srcAnnot1); + assert(_mesa_strlen(s) < len); + + free(dstAnnot); + free(srcAnnot0); + free(srcAnnot1); + + return s; +#else + return NULL; +#endif +} + + + /** * Generate code for a simple binary-op instruction. */ @@ -444,6 +571,7 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); + char *srcAnnot0 = NULL, *srcAnnot1 = NULL, *dstAnnot = NULL; assert(info); assert(info->InstOpcode != OPCODE_NOP); @@ -497,6 +625,10 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, info->InstOpcode); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + + srcAnnot0 = storage_annotation(n->Children[0], prog); + srcAnnot1 = storage_annotation(n->Children[1], prog); + free_temp_storage(vt, n->Children[0]); free_temp_storage(vt, n->Children[1]); } @@ -506,7 +638,10 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - inst->Comment = n->Comment; + dstAnnot = storage_annotation(n, prog); + inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, + srcAnnot0, srcAnnot1); + /*_mesa_print_instruction(inst);*/ return inst; } @@ -517,8 +652,9 @@ emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); - assert(info); + char *srcAnnot, *dstAnnot; + assert(info); assert(info->NumParams == 1); /* gen code for child */ @@ -527,6 +663,7 @@ emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* gen this instruction */ inst = new_instruction(prog, info->InstOpcode); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + srcAnnot = storage_annotation(n->Children[0], prog); free_temp_storage(vt, n->Children[0]); if (!n->Store) { @@ -534,8 +671,10 @@ emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - inst->Comment = n->Comment; - /*_mesa_print_instruction(inst);*/ + dstAnnot = storage_annotation(n, prog); + inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, + NULL, srcAnnot); + return inst; } @@ -702,11 +841,16 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } else { /* single register move */ + char *srcAnnot, *dstAnnot; inst = new_instruction(prog, OPCODE_MOV); assert(n->Children[0]->Store->Index >= 0); assert(n->Children[0]->Store->Index < 16); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); + dstAnnot = storage_annotation(n->Children[0], prog); + srcAnnot = storage_annotation(n->Children[1], prog); + inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, + srcAnnot, NULL); } /* XXX is this test correct? */ if (_slang_is_temp(vt, n->Children[1]->Store->Index)) { -- cgit v1.2.3 From 223d7cb3c785ad58c869a3ee0fbf2f1d42c3310d Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 23 Jan 2007 16:37:51 -0700 Subject: fix g++ warnings/errors --- src/mesa/main/texenvprogram.c | 5 ++-- src/mesa/shader/arbprogram.c | 4 +-- src/mesa/shader/prog_parameter.c | 8 +++--- src/mesa/shader/prog_parameter.h | 4 +-- src/mesa/shader/prog_statevars.c | 2 +- src/mesa/shader/shader_api.c | 6 ++--- src/mesa/shader/slang/slang_codegen.c | 17 ++++++++----- src/mesa/shader/slang/slang_emit.c | 46 +++++++++++++++++------------------ src/mesa/shader/slang/slang_link2.c | 2 +- src/mesa/sources | 1 + src/mesa/swrast/s_fragprog.c | 7 +++--- 11 files changed, 54 insertions(+), 48 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 3cb2adbde2..b69e650159 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -1187,13 +1187,14 @@ static void cache_item( struct texenvprog_cache *cache, const struct state_key *key, void *data ) { - struct texenvprog_cache_item *c = MALLOC(sizeof(*c)); + struct texenvprog_cache_item *c + = (struct texenvprog_cache_item *) MALLOC(sizeof(*c)); c->hash = hash; c->key = _mesa_malloc(sizeof(*key)); memcpy(c->key, key, sizeof(*key)); - c->data = data; + c->data = (struct gl_fragment_program *) data; if (cache->n_items > cache->size * 1.5) { if (cache->size < 1000) diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index f3b25da394..5583f16ce8 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -312,7 +312,7 @@ _mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat *params) { GET_CURRENT_CONTEXT(ctx); - unsigned i; + GLint i; GLfloat * dest; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -464,7 +464,7 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, { GET_CURRENT_CONTEXT(ctx); struct gl_program *prog; - unsigned i; + GLint i; ASSERT_OUTSIDE_BEGIN_END(ctx); FLUSH_VERTICES(ctx, _NEW_PROGRAM); diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 90118b6294..a87dafc598 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -217,7 +217,7 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, * constants because we rely on smearing (i.e. .yyyy or .zzzz). */ if (size == 1) { - for (pos = 0; pos < paramList->NumParameters; pos++) { + for (pos = 0; pos < (GLint) paramList->NumParameters; pos++) { struct gl_program_parameter *p = paramList->Parameters + pos; if (p->Type == PROGRAM_CONSTANT && p->Size + size <= 4) { /* ok, found room */ @@ -321,7 +321,7 @@ _mesa_add_attribute(struct gl_program_parameter_list *paramList, else { /* add */ gl_state_index state[STATE_LENGTH]; - state[0] = attrib; + state[0] = (gl_state_index) attrib; if (size < 0) size = 4; i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name, @@ -373,7 +373,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, GLint index; /* Check if the state reference is already in the list */ - for (index = 0; index < paramList->NumParameters; index++) { + for (index = 0; index < (GLint) paramList->NumParameters; index++) { GLuint i, match = 0; for (i = 0; i < 6; i++) { if (paramList->Parameters[index].StateIndexes[i] == stateTokens[i]) { @@ -468,7 +468,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, */ GLboolean _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, - const GLfloat v[], GLsizei vSize, + const GLfloat v[], GLuint vSize, GLint *posOut, GLuint *swizzleOut) { GLuint i; diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index bfae071be0..459643f425 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -50,7 +50,7 @@ struct gl_program_parameter /** * A sequence of STATE_* tokens and integers to identify GL state. */ - GLuint StateIndexes[STATE_LENGTH]; + GLint StateIndexes[STATE_LENGTH]; }; @@ -127,7 +127,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, extern GLboolean _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, - const GLfloat v[], GLsizei vSize, + const GLfloat v[], GLuint vSize, GLint *posOut, GLuint *swizzleOut); extern GLuint diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index a0a00cfb95..3a54ab8c58 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -775,7 +775,7 @@ _mesa_load_state_parameters(GLcontext *ctx, for (i = 0; i < paramList->NumParameters; i++) { if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) { _mesa_fetch_state(ctx, - paramList->Parameters[i].StateIndexes, + (gl_state_index *) paramList->Parameters[i].StateIndexes, paramList->ParameterValues[i]); } } diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index c18bbcec4b..6bae17a905 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -518,7 +518,7 @@ _mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); if (shProg) { - GLuint i; + GLint i; for (i = 0; i < maxCount && i < shProg->NumShaders; i++) { obj[i] = shProg->Shaders[i]->Name; } @@ -719,7 +719,7 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, program); if (shProg) { - GLuint i; + GLint i; if (location >= 0 && location < shProg->Uniforms->NumParameters) { for (i = 0; i < shProg->Uniforms->Parameters[location].Size; i++) { params[i] = shProg->Uniforms->ParameterValues[location][i]; @@ -883,7 +883,7 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, return; } - if (location < 0 || location >= shProg->Uniforms->NumParameters) { + if (location < 0 || location >= (GLint) shProg->Uniforms->NumParameters) { _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(location)"); return; } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index aba6813a8b..ff42db9def 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -661,7 +661,7 @@ static slang_operation * slang_inline_asm_function(slang_assemble_ctx *A, slang_function *fun, slang_operation *oper) { - const int numArgs = oper->num_children; + const GLuint numArgs = oper->num_children; const slang_operation *args = oper->children; GLuint i; slang_operation *inlined = slang_operation_new(1); @@ -1052,7 +1052,8 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, &inlined->children, inlined->num_children); lab->type = slang_oper_label; - lab->a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); + lab->a_id = slang_atom_pool_atom(A->atoms, + (char *) A->CurFunction->end_label); } for (i = 0; i < totalArgs; i++) { @@ -1281,7 +1282,7 @@ _slang_gen_cond(slang_ir_node *n) static void print_funcs(struct slang_function_scope_ *scope, const char *name) { - int i; + GLuint i; for (i = 0; i < scope->num_functions; i++) { slang_function *f = &scope->functions[i]; if (!name || strcmp(name, (char*) f->header.a_name) == 0) @@ -1301,7 +1302,7 @@ print_funcs(struct slang_function_scope_ *scope, const char *name) static slang_function * _slang_first_function(struct slang_function_scope_ *scope, const char *name) { - int i; + GLuint i; for (i = 0; i < scope->num_functions; i++) { slang_function *f = &scope->functions[i]; if (strcmp(name, (char*) f->header.a_name) == 0) @@ -1800,7 +1801,9 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) slang_operation gotoOp; slang_operation_construct(&gotoOp); gotoOp.type = slang_oper_goto; - gotoOp.a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); + /* XXX don't call function? */ + gotoOp.a_id = slang_atom_pool_atom(A->atoms, + (char *) A->CurFunction->end_label); /* assemble the new code */ n = _slang_gen_operation(A, &gotoOp); /* destroy temp code */ @@ -1855,7 +1858,9 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) jump = &block->children[1]; jump->type = slang_oper_goto; assert(A->CurFunction->end_label); - jump->a_id = slang_atom_pool_atom(A->atoms, A->CurFunction->end_label); + /* XXX don't call function? */ + jump->a_id = slang_atom_pool_atom(A->atoms, + (char *) A->CurFunction->end_label); #if 0 /* debug */ printf("NEW RETURN:\n"); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 036509c51c..82e8c0b158 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -83,35 +83,35 @@ static slang_ir_info IrInfo[] = { { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, - { IR_NEG, "IR_NEG", 0/*spec case*/, 4, 1 }, + { IR_NEG, "IR_NEG", OPCODE_NOP/*spec case*/, 4, 1 }, { IR_DDX, "IR_DDX", OPCODE_DDX, 4, 1 }, { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, /* other */ - { IR_SEQ, "IR_SEQ", 0, 0, 0 }, - { IR_SCOPE, "IR_SCOPE", 0, 0, 0 }, - { IR_LABEL, "IR_LABEL", 0, 0, 0 }, - { IR_JUMP, "IR_JUMP", 0, 0, 0 }, - { IR_CJUMP0, "IR_CJUMP0", 0, 0, 0 }, - { IR_CJUMP1, "IR_CJUMP1", 0, 0, 0 }, - { IR_IF, "IR_IF", 0, 0, 0 }, - { IR_ELSE, "IR_ELSE", 0, 0, 0 }, - { IR_ENDIF, "IR_ENDIF", 0, 0, 0 }, - { IR_KILL, "IR_KILL", 0, 0, 0 }, - { IR_COND, "IR_COND", 0, 0, 0 }, - { IR_CALL, "IR_CALL", 0, 0, 0 }, - { IR_MOVE, "IR_MOVE", 0, 0, 1 }, - { IR_NOT, "IR_NOT", 0, 1, 1 }, - { IR_VAR, "IR_VAR", 0, 0, 0 }, - { IR_VAR_DECL, "IR_VAR_DECL", 0, 0, 0 }, + { IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 }, + { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 }, + { IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 }, + { IR_JUMP, "IR_JUMP", OPCODE_NOP, 0, 0 }, + { IR_CJUMP0, "IR_CJUMP0", OPCODE_NOP, 0, 0 }, + { IR_CJUMP1, "IR_CJUMP1", OPCODE_NOP, 0, 0 }, + { IR_IF, "IR_IF", OPCODE_NOP, 0, 0 }, + { IR_ELSE, "IR_ELSE", OPCODE_NOP, 0, 0 }, + { IR_ENDIF, "IR_ENDIF", OPCODE_NOP, 0, 0 }, + { IR_KILL, "IR_KILL", OPCODE_NOP, 0, 0 }, + { IR_COND, "IR_COND", OPCODE_NOP, 0, 0 }, + { IR_CALL, "IR_CALL", OPCODE_NOP, 0, 0 }, + { IR_MOVE, "IR_MOVE", OPCODE_NOP, 0, 1 }, + { IR_NOT, "IR_NOT", OPCODE_NOP, 1, 1 }, + { IR_VAR, "IR_VAR", OPCODE_NOP, 0, 0 }, + { IR_VAR_DECL, "IR_VAR_DECL", OPCODE_NOP, 0, 0 }, { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 1 }, { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 1 }, - { IR_FLOAT, "IR_FLOAT", 0, 0, 0 }, - { IR_FIELD, "IR_FIELD", 0, 0, 0 }, - { IR_ELEMENT, "IR_ELEMENT", 0, 0, 0 }, - { IR_SWIZZLE, "IR_SWIZZLE", 0, 0, 0 }, + { IR_FLOAT, "IR_FLOAT", OPCODE_NOP, 0, 0 }, + { IR_FIELD, "IR_FIELD", OPCODE_NOP, 0, 0 }, + { IR_ELEMENT, "IR_ELEMENT", OPCODE_NOP, 0, 0 }, + { IR_SWIZZLE, "IR_SWIZZLE", OPCODE_NOP, 0, 0 }, { IR_NOP, NULL, OPCODE_NOP, 0, 0 } }; @@ -219,7 +219,7 @@ storage_string(const slang_ir_storage *st) sprintf(s, "%s[%d..%d]", files[st->File], st->Index, st->Index + st->Size - 1); #endif - assert(st->File < sizeof(files) / sizeof(files[0])); + assert(st->File < (GLint) (sizeof(files) / sizeof(files[0]))); sprintf(s, "%s[%d]", files[st->File], st->Index); return s; } @@ -966,7 +966,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) if (n->Children[1]->Opcode == IR_FLOAT) { /* OK, constant index */ const GLint arrayAddr = n->Children[0]->Store->Index; - const GLint index = n->Children[1]->Value[0]; + const GLint index = (GLint) n->Children[1]->Value[0]; n->Store->Index = arrayAddr + index; } else { diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 0a517aecc5..9676aa5fa1 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -133,7 +133,7 @@ link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog) static GLboolean -is_uniform(enum register_file file) +is_uniform(GLuint file) { return (file == PROGRAM_ENV_PARAM || file == PROGRAM_STATE_VAR || diff --git a/src/mesa/sources b/src/mesa/sources index 1b0474c14b..d0b7246ed6 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -182,6 +182,7 @@ SLANG_SOURCES = \ shader/slang/slang_error.c \ shader/slang/slang_execute.c \ shader/slang/slang_export.c \ + shader/slang/slang_label.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ shader/slang/slang_link.c \ diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 813345f4cd..ed82460669 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -200,8 +200,7 @@ fetch_vector4( GLcontext *ctx, const GLfloat *src = get_register_pointer(ctx, source, machine, program); ASSERT(src); - if (source->Swizzle == MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, - SWIZZLE_Z, SWIZZLE_W)) { + if (source->Swizzle == SWIZZLE_NOOP) { /* no swizzling */ COPY_4V(result, src); } @@ -1263,8 +1262,8 @@ execute_program( GLcontext *ctx, { GLfloat a[4], result[4]; fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = (GLfloat)_mesa_cos(a[0]); - result[1] = (GLfloat)_mesa_sin(a[0]); + result[0] = (GLfloat) _mesa_cos(a[0]); + result[1] = (GLfloat) _mesa_sin(a[0]); result[2] = 0.0; /* undefined! */ result[3] = 0.0; /* undefined! */ store_vector4( inst, machine, result ); -- cgit v1.2.3 From 6d4e561e399a1e203a80f8440691d64aa3493347 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 23 Jan 2007 17:39:25 -0700 Subject: indicate which opcodes are used by Mesa GLSL, updated comments --- src/mesa/shader/prog_instruction.h | 194 +++++++++++++++++++------------------ 1 file changed, 102 insertions(+), 92 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index b1001885e0..c015620594 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -39,13 +39,18 @@ #define PROG_INSTRUCTION_H -/* for GL_ARB_v_p and GL_ARB_f_p SWZ instruction */ +/** + * Swizzle indexes. + * Do not change! + */ +/*@{*/ #define SWIZZLE_X 0 #define SWIZZLE_Y 1 #define SWIZZLE_Z 2 #define SWIZZLE_W 3 -#define SWIZZLE_ZERO 4 /* keep these values together: KW */ -#define SWIZZLE_ONE 5 /* keep these values together: KW */ +#define SWIZZLE_ZERO 4 /**< For SWZ instruction only */ +#define SWIZZLE_ONE 5 /**< For SWZ instruction only */ +/*@}*/ #define MAKE_SWIZZLE4(a,b,c,d) (((a)<<0) | ((b)<<3) | ((c)<<6) | ((d)<<9)) #define SWIZZLE_NOOP MAKE_SWIZZLE4(0,1,2,3) @@ -53,6 +58,10 @@ #define GET_BIT(msk, idx) (((msk) >> (idx)) & 0x1) +/** + * Writemask values, 1 bit per component. + */ +/*@{*/ #define WRITEMASK_X 0x1 #define WRITEMASK_Y 0x2 #define WRITEMASK_XY 0x3 @@ -68,21 +77,22 @@ #define WRITEMASK_XZW 0xd #define WRITEMASK_YZW 0xe #define WRITEMASK_XYZW 0xf +/*@}*/ /** - * Condition codes for GL_NV_fragment_program + * Condition codes */ /*@{*/ -#define COND_GT 1 /* greater than zero */ -#define COND_EQ 2 /* equal to zero */ -#define COND_LT 3 /* less than zero */ -#define COND_UN 4 /* unordered (NaN) */ -#define COND_GE 5 /* greater then or equal to zero */ -#define COND_LE 6 /* less then or equal to zero */ -#define COND_NE 7 /* not equal to zero */ -#define COND_TR 8 /* always true */ -#define COND_FL 9 /* always false */ +#define COND_GT 1 /**< greater than zero */ +#define COND_EQ 2 /**< equal to zero */ +#define COND_LT 3 /**< less than zero */ +#define COND_UN 4 /**< unordered (NaN) */ +#define COND_GE 5 /**< greater then or equal to zero */ +#define COND_LE 6 /**< less then or equal to zero */ +#define COND_NE 7 /**< not equal to zero */ +#define COND_TR 8 /**< always true */ +#define COND_FL 9 /**< always false */ /*@}*/ @@ -124,83 +134,83 @@ * \note changes to this opcode list must be reflected in t_vb_arbprogram.c */ typedef enum prog_opcode { - /* ARB_vp ARB_fp NV_vp NV_fp */ - /*---------------------------------*/ - OPCODE_NOP = 0, - OPCODE_ABS, /* X X 1.1 */ - OPCODE_ADD, /* X X X X */ - OPCODE_ARA, /* 2 */ - OPCODE_ARL, /* X X */ - OPCODE_ARL_NV, /* 2 */ - OPCODE_ARR, /* 2 */ - OPCODE_BRA, /* 2 */ - OPCODE_CAL, /* 2 2 */ - OPCODE_CMP, /* X */ - OPCODE_COS, /* X 2 X */ - OPCODE_DDX, /* X */ - OPCODE_DDY, /* X */ - OPCODE_DP3, /* X X X X */ - OPCODE_DP4, /* X X X X */ - OPCODE_DPH, /* X X 1.1 */ - OPCODE_DST, /* X X X X */ - OPCODE_ELSE, - OPCODE_END, /* X X X X */ - OPCODE_ENDIF, - OPCODE_EX2, /* X X 2 X */ - OPCODE_EXP, /* X X */ - OPCODE_FLR, /* X X 2 X */ - OPCODE_FRC, /* X X 2 X */ - OPCODE_IF, - OPCODE_INT, /* */ - OPCODE_KIL, /* X */ - OPCODE_KIL_NV, /* X */ - OPCODE_LG2, /* X X 2 X */ - OPCODE_LIT, /* X X X X */ - OPCODE_LOG, /* X X */ - OPCODE_LRP, /* X X */ - OPCODE_MAD, /* X X X X */ - OPCODE_MAX, /* X X X X */ - OPCODE_MIN, /* X X X X */ - OPCODE_MOV, /* X X X X */ - OPCODE_MUL, /* X X X X */ - OPCODE_PK2H, /* X */ - OPCODE_PK2US, /* X */ - OPCODE_PK4B, /* X */ - OPCODE_PK4UB, /* X */ - OPCODE_POW, /* X X X */ - OPCODE_POPA, /* 3 */ - OPCODE_PRINT, /* X X */ - OPCODE_PUSHA, /* 3 */ - OPCODE_RCC, /* 1.1 */ - OPCODE_RCP, /* X X X X */ - OPCODE_RET, /* 2 2 */ - OPCODE_RFL, /* X X */ - OPCODE_RSQ, /* X X X X */ - OPCODE_SCS, /* X */ - OPCODE_SEQ, /* 2 X */ - OPCODE_SFL, /* 2 X */ - OPCODE_SGE, /* X X X X */ - OPCODE_SGT, /* 2 X */ - OPCODE_SIN, /* X 2 X */ - OPCODE_SLE, /* 2 X */ - OPCODE_SLT, /* X X X X */ - OPCODE_SNE, /* 2 X */ - OPCODE_SSG, /* 2 */ - OPCODE_STR, /* 2 X */ - OPCODE_SUB, /* X X 1.1 X */ - OPCODE_SWZ, /* X X */ - OPCODE_TEX, /* X 3 X */ - OPCODE_TXB, /* X 3 */ - OPCODE_TXD, /* X */ - OPCODE_TXL, /* 3 2 */ - OPCODE_TXP, /* X */ - OPCODE_TXP_NV, /* 3 X */ - OPCODE_UP2H, /* X */ - OPCODE_UP2US, /* X */ - OPCODE_UP4B, /* X */ - OPCODE_UP4UB, /* X */ - OPCODE_X2D, /* X */ - OPCODE_XPD, /* X X */ + /* ARB_vp ARB_fp NV_vp NV_fp GLSL */ + /*------------------------------------------*/ + OPCODE_NOP = 0, /* X */ + OPCODE_ABS, /* X X 1.1 X */ + OPCODE_ADD, /* X X X X X */ + OPCODE_ARA, /* 2 */ + OPCODE_ARL, /* X X */ + OPCODE_ARL_NV, /* 2 */ + OPCODE_ARR, /* 2 */ + OPCODE_BRA, /* 2 X */ + OPCODE_CAL, /* 2 2 */ + OPCODE_CMP, /* X */ + OPCODE_COS, /* X 2 X X */ + OPCODE_DDX, /* X X */ + OPCODE_DDY, /* X X */ + OPCODE_DP3, /* X X X X X */ + OPCODE_DP4, /* X X X X X */ + OPCODE_DPH, /* X X 1.1 */ + OPCODE_DST, /* X X X X */ + OPCODE_ELSE, /* X */ + OPCODE_END, /* X X X X X */ + OPCODE_ENDIF, /* X */ + OPCODE_EX2, /* X X 2 X X */ + OPCODE_EXP, /* X X X */ + OPCODE_FLR, /* X X 2 X X */ + OPCODE_FRC, /* X X 2 X X */ + OPCODE_IF, /* X */ + OPCODE_INT, /* X */ + OPCODE_KIL, /* X */ + OPCODE_KIL_NV, /* X X */ + OPCODE_LG2, /* X X 2 X X */ + OPCODE_LIT, /* X X X X */ + OPCODE_LOG, /* X X X */ + OPCODE_LRP, /* X X */ + OPCODE_MAD, /* X X X X X */ + OPCODE_MAX, /* X X X X X */ + OPCODE_MIN, /* X X X X X */ + OPCODE_MOV, /* X X X X X */ + OPCODE_MUL, /* X X X X X */ + OPCODE_PK2H, /* X */ + OPCODE_PK2US, /* X */ + OPCODE_PK4B, /* X */ + OPCODE_PK4UB, /* X */ + OPCODE_POW, /* X X X X */ + OPCODE_POPA, /* 3 */ + OPCODE_PRINT, /* X X */ + OPCODE_PUSHA, /* 3 */ + OPCODE_RCC, /* 1.1 */ + OPCODE_RCP, /* X X X X X */ + OPCODE_RET, /* 2 2 */ + OPCODE_RFL, /* X X */ + OPCODE_RSQ, /* X X X X X */ + OPCODE_SCS, /* X */ + OPCODE_SEQ, /* 2 X X */ + OPCODE_SFL, /* 2 X */ + OPCODE_SGE, /* X X X X X */ + OPCODE_SGT, /* 2 X X */ + OPCODE_SIN, /* X 2 X X */ + OPCODE_SLE, /* 2 X X */ + OPCODE_SLT, /* X X X X X */ + OPCODE_SNE, /* 2 X X */ + OPCODE_SSG, /* 2 */ + OPCODE_STR, /* 2 X */ + OPCODE_SUB, /* X X 1.1 X X */ + OPCODE_SWZ, /* X X */ + OPCODE_TEX, /* X 3 X X */ + OPCODE_TXB, /* X 3 X */ + OPCODE_TXD, /* X X */ + OPCODE_TXL, /* 3 2 X */ + OPCODE_TXP, /* X X */ + OPCODE_TXP_NV, /* 3 X */ + OPCODE_UP2H, /* X */ + OPCODE_UP2US, /* X */ + OPCODE_UP4B, /* X */ + OPCODE_UP4UB, /* X */ + OPCODE_X2D, /* X */ + OPCODE_XPD, /* X X X */ MAX_OPCODE } gl_inst_opcode; -- cgit v1.2.3 From c920d201c23f1ff1dfba06d3827e5a0e0d756283 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 23 Jan 2007 17:41:25 -0700 Subject: updated comment --- src/mesa/shader/prog_instruction.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index c015620594..83e8d7080b 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -26,8 +26,7 @@ /** * \file prog_instruction.h * - * Private vertex program types and constants only used by files - * related to vertex programs. + * Vertex/fragment program instruction datatypes and constants. * * \author Brian Paul * \author Keith Whitwell -- cgit v1.2.3 From 07373512c72ca0fc19cccd1d102f14f1a41fd1bd Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 24 Jan 2007 14:12:08 -0700 Subject: added FRAG_BIT_TEX() and FRAG_BIT_VAR() macros --- src/mesa/main/mtypes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index cbb1fd47eb..7cd407a274 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -282,6 +282,10 @@ enum #define FRAG_BIT_TEX5 (1 << FRAG_ATTRIB_TEX5) #define FRAG_BIT_TEX6 (1 << FRAG_ATTRIB_TEX6) #define FRAG_BIT_TEX7 (1 << FRAG_ATTRIB_TEX7) +#define FRAG_BIT_VAR0 (1 << FRAG_ATTRIB_VAR0) + +#define FRAG_BIT_TEX(U) (FRAG_BIT_TEX0 << (U)) +#define FRAG_BIT_VAR(V) (FRAG_BIT_VAR0 << (V)) #define FRAG_BITS_TEX_ANY (FRAG_BIT_TEX0| \ FRAG_BIT_TEX1| \ -- cgit v1.2.3 From 0552abce0ec54dbb3f8de2fb9665fd5e58451543 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 24 Jan 2007 14:13:02 -0700 Subject: only setup varying vars that will be used --- src/mesa/swrast/s_linetemp.h | 48 ++++++++++++++++++++++++-------------------- src/mesa/swrast/s_tritemp.h | 12 ++++++++--- 2 files changed, 35 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index 61c338ac69..b7b434771e 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -336,29 +336,33 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) #endif #ifdef INTERP_VARYING interpFlags |= SPAN_VARYING; - { /* XXX review this */ + { const GLfloat invLen = 1.0F / numPixels; + const GLbitfield inputsUsed = ctx->FragmentProgram._Current ? + ctx->FragmentProgram._Current->Base.InputsRead : 0x0; + const GLfloat invw0 = vert0->win[3]; + const GLfloat invw1 = vert1->win[3]; GLuint v; for (v = 0; v < MAX_VARYING; v++) { - const GLfloat invw0 = vert0->win[3]; - const GLfloat invw1 = vert1->win[3]; - GLfloat ds, dt, dr, dq; - span.var[v][0] = invw0 * vert0->varying[v][0]; - span.var[v][1] = invw0 * vert0->varying[v][1]; - span.var[v][2] = invw0 * vert0->varying[v][2]; - span.var[v][3] = invw0 * vert0->varying[v][3]; - ds = (invw1 * vert1->varying[v][0]) - span.var[v][0]; - dt = (invw1 * vert1->varying[v][1]) - span.var[v][1]; - dr = (invw1 * vert1->varying[v][2]) - span.var[v][2]; - dq = (invw1 * vert1->varying[v][3]) - span.var[v][3]; - span.varStepX[v][0] = ds * invLen; - span.varStepX[v][1] = dt * invLen; - span.varStepX[v][2] = dr * invLen; - span.varStepX[v][3] = dq * invLen; - span.varStepY[v][0] = 0.0F; - span.varStepY[v][1] = 0.0F; - span.varStepY[v][2] = 0.0F; - span.varStepY[v][3] = 0.0F; + if (inputsUsed & FRAG_BIT_VAR(v)) { + GLfloat ds, dt, dr, dq; + span.var[v][0] = invw0 * vert0->varying[v][0]; + span.var[v][1] = invw0 * vert0->varying[v][1]; + span.var[v][2] = invw0 * vert0->varying[v][2]; + span.var[v][3] = invw0 * vert0->varying[v][3]; + ds = (invw1 * vert1->varying[v][0]) - span.var[v][0]; + dt = (invw1 * vert1->varying[v][1]) - span.var[v][1]; + dr = (invw1 * vert1->varying[v][2]) - span.var[v][2]; + dq = (invw1 * vert1->varying[v][3]) - span.var[v][3]; + span.varStepX[v][0] = ds * invLen; + span.varStepX[v][1] = dt * invLen; + span.varStepX[v][2] = dr * invLen; + span.varStepX[v][3] = dq * invLen; + span.varStepY[v][0] = 0.0F; + span.varStepY[v][1] = 0.0F; + span.varStepY[v][2] = 0.0F; + span.varStepY[v][3] = 0.0F; + } } } #endif diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index c85379b4b1..6ff52b5e4a 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -144,13 +144,15 @@ #ifdef INTERP_VARYING -/* XXX need a varyingEnabled[] check */ + #define VARYING_LOOP(CODE) \ { \ GLuint iv, ic; \ for (iv = 0; iv < MAX_VARYING; iv++) { \ - for (ic = 0; ic < 4; ic++) { \ - CODE \ + if (inputsUsed & FRAG_BIT_VAR(iv)) { \ + for (ic = 0; ic < 4; ic++) { \ + CODE \ + } \ } \ } \ } @@ -216,6 +218,10 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, const GLint snapMask = ~((FIXED_ONE / (1 << SUB_PIXEL_BITS)) - 1); /* for x/y coord snapping */ #endif GLinterp vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; +#ifdef INTERP_VARYING + const GLbitfield inputsUsed = ctx->FragmentProgram._Current ? + ctx->FragmentProgram._Current->Base.InputsRead : 0x0; +#endif SWspan span; -- cgit v1.2.3 From ccea3ff8a9eae16d2ca11b9cedef1318cffe3fb4 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 24 Jan 2007 14:13:36 -0700 Subject: fix varying interpolation --- src/mesa/swrast/s_lines.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c index ff507249b0..7b2a52b4ff 100644 --- a/src/mesa/swrast/s_lines.c +++ b/src/mesa/swrast/s_lines.c @@ -198,6 +198,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor ) #define INTERP_Z #define INTERP_FOG #define INTERP_MULTITEX +#define INTERP_VARYING #define RENDER_SPAN(span) \ if (ctx->Line.StippleFlag) { \ span.arrayMask |= SPAN_MASK; \ @@ -298,10 +299,12 @@ _swrast_choose_line( GLcontext *ctx ) _swrast_choose_aa_line_function(ctx); ASSERT(swrast->Line); } - else if (ctx->Texture._EnabledCoordUnits) { + else if (ctx->Texture._EnabledCoordUnits + || ctx->FragmentProgram._Current) { /* textured lines */ if (ctx->Texture._EnabledCoordUnits > 0x1 - || NEED_SECONDARY_COLOR(ctx)) { + || NEED_SECONDARY_COLOR(ctx) + || ctx->FragmentProgram._Current) { /* multi-texture and/or separate specular color */ USE(multitextured_line); } -- cgit v1.2.3 From ff917003f6ed35b9ef966397a58c80dc7df98bff Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 24 Jan 2007 14:14:14 -0700 Subject: use FRAG_BIT_TEX() --- src/mesa/tnl/t_vp_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 5e146bfb36..d80afaf245 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1213,7 +1213,7 @@ static void build_texture_transform( struct tnl_program *p ) for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - if (!(p->state->fragprog_inputs_read & (FRAG_BIT_TEX0<state->fragprog_inputs_read & (FRAG_BIT_TEX(i)))) continue; if (p->state->unit[i].texgen_enabled || -- cgit v1.2.3 From e713c21bd09468887faceebcba9a62a406321c07 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 24 Jan 2007 14:15:01 -0700 Subject: remove some parenthesis --- src/mesa/tnl/t_vp_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index d80afaf245..47fed32904 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1213,7 +1213,7 @@ static void build_texture_transform( struct tnl_program *p ) for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - if (!(p->state->fragprog_inputs_read & (FRAG_BIT_TEX(i)))) + if (!(p->state->fragprog_inputs_read & FRAG_BIT_TEX(i))) continue; if (p->state->unit[i].texgen_enabled || -- cgit v1.2.3 From 5ef553da9a0dc9f6d7f01b967082c24849ee4abf Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 25 Jan 2007 10:51:53 -0700 Subject: new comments, ideas --- src/mesa/swrast/s_context.h | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index f784e18cd4..c9f6ec6bb8 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -86,11 +86,12 @@ struct arrays2 { #endif + /** * \sw_span_arrays * \brief Arrays of fragment values. * - * These will either be computed from the x/xStep values above or + * These will either be computed from the span x/xStep values or * filled in by glDraw/CopyPixels, etc. * These arrays are separated out of sw_span to conserve memory. */ @@ -114,15 +115,25 @@ typedef struct sw_span_arrays { GLchan (*rgba)[4]; GLchan (*spec)[4]; - GLuint index[MAX_WIDTH]; - GLint x[MAX_WIDTH]; /**< X/Y used for point/line rendering only */ - GLint y[MAX_WIDTH]; /**< X/Y used for point/line rendering only */ - GLuint z[MAX_WIDTH]; +#if 0 + /* XXX rearrange and unify these arrays to so that we can + * index all fragment inputs with the FRAG_ATTRIB_* values: + */ + GLfloat attribs[FRAG_ATTRIB_MAX][MAX_WIDTH][4]; + /*OR*/ + typedef GLfloat (*array4f)[4]; + array4f attribs[FRAG_ATTRIB_MAX]; +#endif + + GLint x[MAX_WIDTH]; /**< fragment X coords */ + GLint y[MAX_WIDTH]; /**< fragment Y coords */ + GLuint z[MAX_WIDTH]; /**< fragment Z coords */ + GLuint index[MAX_WIDTH]; /**< Color indexes */ GLfloat fog[MAX_WIDTH]; GLfloat texcoords[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH][4]; GLfloat lambda[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH]; - GLfloat coverage[MAX_WIDTH]; - GLfloat varying[MAX_WIDTH][MAX_VARYING][4]; + GLfloat coverage[MAX_WIDTH]; /**< Fragment coverage for AA/smoothing */ + GLfloat varying[MAX_VARYING][MAX_WIDTH][4]; /**< For shaders */ /** This mask indicates which fragments are alive or culled */ GLubyte mask[MAX_WIDTH]; @@ -130,21 +141,11 @@ typedef struct sw_span_arrays { /** - * \SWspan - * \brief Contains data for either a horizontal line or a set of - * pixels that are passed through a pipeline of functions before being - * drawn. - * - * The sw_span structure describes the colors, Z, fogcoord, texcoords, + * The SWspan structure describes the colors, Z, fogcoord, texcoords, * etc for either a horizontal run or an array of independent pixels. * We can either specify a base/step to indicate interpolated values, or - * fill in arrays of values. The interpMask and arrayMask bitfields - * indicate which are active. - * - * With this structure it's easy to hand-off span rasterization to - * subroutines instead of doing it all inline in the triangle functions - * like we used to do. - * It also cleans up the local variable namespace a great deal. + * fill in explicit arrays of values. The interpMask and arrayMask bitfields + * indicate which attributes are active interpolants or arrays, respectively. * * It would be interesting to experiment with multiprocessor rasterization * with this structure. The triangle rasterizer could simply emit a @@ -225,7 +226,7 @@ typedef struct sw_span { /** * We store the arrays of fragment values in a separate struct so * that we can allocate sw_span structs on the stack without using - * a lot of memory. The span_arrays struct is about 400KB while the + * a lot of memory. The span_arrays struct is about 1.4MB while the * sw_span struct is only about 512 bytes. */ SWspanarrays *array; -- cgit v1.2.3 From ff13f0ea4d5e88ac86bf5d97373ca419ad4226e5 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 25 Jan 2007 10:52:48 -0700 Subject: fixes, clean-ups, transpose span->varying array indexing --- src/mesa/swrast/s_fragprog.c | 50 +++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index ed82460669..74250b3592 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -152,6 +152,7 @@ get_register_pointer( GLcontext *ctx, const struct fp_machine *machine, const struct gl_fragment_program *program ) { + /* XXX relative addressing... */ switch (source->File) { case PROGRAM_TEMPORARY: ASSERT(source->Index < MAX_PROGRAM_TEMPS); @@ -547,7 +548,7 @@ init_machine_deriv( GLcontext *ctx, } /* Add derivatives */ - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_WPOS)) { + if (program->Base.InputsRead & FRAG_BIT_WPOS) { GLfloat *wpos = (GLfloat*) machine->Inputs[FRAG_ATTRIB_WPOS]; if (xOrY == 'X') { wpos[0] += 1.0F; @@ -562,7 +563,7 @@ init_machine_deriv( GLcontext *ctx, wpos[3] += span->dwdy; } } - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_COL0)) { + if (program->Base.InputsRead & FRAG_BIT_COL0) { GLfloat *col0 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL0]; if (xOrY == 'X') { col0[0] += span->drdx * (1.0F / CHAN_MAXF); @@ -577,7 +578,7 @@ init_machine_deriv( GLcontext *ctx, col0[3] += span->dady * (1.0F / CHAN_MAXF); } } - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_COL1)) { + if (program->Base.InputsRead & FRAG_BIT_COL1) { GLfloat *col1 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL1]; if (xOrY == 'X') { col1[0] += span->dsrdx * (1.0F / CHAN_MAXF); @@ -592,7 +593,7 @@ init_machine_deriv( GLcontext *ctx, col1[3] += 0.0; /*XXX fix */ } } - if (program->Base.InputsRead & (1 << FRAG_ATTRIB_FOGC)) { + if (program->Base.InputsRead & FRAG_BIT_FOGC) { GLfloat *fogc = (GLfloat*) machine->Inputs[FRAG_ATTRIB_FOGC]; if (xOrY == 'X') { fogc[0] += span->dfogdx; @@ -602,7 +603,7 @@ init_machine_deriv( GLcontext *ctx, } } for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - if (program->Base.InputsRead & (1 << (FRAG_ATTRIB_TEX0 + u))) { + if (program->Base.InputsRead & FRAG_BIT_TEX(u)) { GLfloat *tex = (GLfloat*) machine->Inputs[FRAG_ATTRIB_TEX0 + u]; /* XXX perspective-correct interpolation */ if (xOrY == 'X') { @@ -621,13 +622,20 @@ init_machine_deriv( GLcontext *ctx, } for (v = 0; v < ctx->Const.MaxVarying; v++) { - if (program->Base.InputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { + if (program->Base.InputsRead & FRAG_BIT_VAR(v)) { GLfloat *var = (GLfloat*) machine->Inputs[FRAG_ATTRIB_VAR0 + v]; - /* XXXX finish this */ - var[0] += span->varStepX[v][0]; - var[1] += span->varStepX[v][1]; - var[2] += span->varStepX[v][2]; - var[3] += span->varStepX[v][3]; + if (xOrY == 'X') { + var[0] += span->varStepX[v][0]; + var[1] += span->varStepX[v][1]; + var[2] += span->varStepX[v][2]; + var[3] += span->varStepX[v][3]; + } + else { + var[0] += span->varStepY[v][0]; + var[1] += span->varStepY[v][1]; + var[2] += span->varStepY[v][2]; + var[3] += span->varStepY[v][3]; + } } } @@ -1640,7 +1648,7 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, } /* Load input registers */ - if (inputsRead & (1 << FRAG_ATTRIB_WPOS)) { + if (inputsRead & FRAG_BIT_WPOS) { GLfloat *wpos = machine->Inputs[FRAG_ATTRIB_WPOS]; ASSERT(span->arrayMask & SPAN_Z); if (span->arrayMask & SPAN_XY) { @@ -1654,17 +1662,17 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, wpos[2] = (GLfloat) span->array->z[col] / ctx->DrawBuffer->_DepthMaxF; wpos[3] = span->w + col * span->dwdx; } - if (inputsRead & (1 << FRAG_ATTRIB_COL0)) { + if (inputsRead & FRAG_BIT_COL0) { ASSERT(span->arrayMask & SPAN_RGBA); COPY_4V(machine->Inputs[FRAG_ATTRIB_COL0], span->array->color.sz4.rgba[col]); } - if (inputsRead & (1 << FRAG_ATTRIB_COL1)) { + if (inputsRead & FRAG_BIT_COL1) { ASSERT(span->arrayMask & SPAN_SPEC); COPY_4V(machine->Inputs[FRAG_ATTRIB_COL1], span->array->color.sz4.spec[col]); } - if (inputsRead & (1 << FRAG_ATTRIB_FOGC)) { + if (inputsRead & FRAG_BIT_FOGC) { GLfloat *fogc = machine->Inputs[FRAG_ATTRIB_FOGC]; ASSERT(span->arrayMask & SPAN_FOG); fogc[0] = span->array->fog[col]; @@ -1673,7 +1681,7 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, fogc[3] = 0.0F; } for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - if (inputsRead & (1 << (FRAG_ATTRIB_TEX0 + u))) { + if (inputsRead & FRAG_BIT_TEX(u)) { GLfloat *tex = machine->Inputs[FRAG_ATTRIB_TEX0 + u]; /*ASSERT(ctx->Texture._EnabledCoordUnits & (1 << u));*/ COPY_4V(tex, span->array->texcoords[u][col]); @@ -1685,15 +1693,15 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, } } for (v = 0; v < ctx->Const.MaxVarying; v++) { - if (inputsRead & (1 << (FRAG_ATTRIB_VAR0 + v))) { + if (inputsRead & FRAG_BIT_VAR(v)) { #if 0 printf("Frag Var %d at y=%d: %f %f %f\n", v, col, - span->array->varying[col][v][0], - span->array->varying[col][v][1], - span->array->varying[col][v][2]); + span->array->varying[v][col][0], + span->array->varying[v][col][1], + span->array->varying[v][col][2]); #endif COPY_4V(machine->Inputs[FRAG_ATTRIB_VAR0 + v], - span->array->varying[col][v]); + span->array->varying[v][col]); } } -- cgit v1.2.3 From ea8b68e0f7e7a4025ce662d36380157273ce10a3 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 25 Jan 2007 10:54:52 -0700 Subject: asst fixes, tranpose span->varying array indexes --- src/mesa/swrast/s_span.c | 92 ++++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 38 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 536ac30033..d97c1672c2 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -822,26 +822,29 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) static INLINE void interpolate_varying(GLcontext *ctx, SWspan *span) { - GLuint i, j; + GLuint var; + const GLbitfield inputsUsed = ctx->FragmentProgram._Current->Base.InputsRead; ASSERT(span->interpMask & SPAN_VARYING); ASSERT(!(span->arrayMask & SPAN_VARYING)); span->arrayMask |= SPAN_VARYING; - for (i = 0; i < MAX_VARYING; i++) { - for (j = 0; j < 4; j++) { - const GLfloat dvdx = span->varStepX[i][j]; - GLfloat v = span->var[i][j]; - const GLfloat dwdx = span->dwdx; - GLfloat w = span->w; - GLuint k; - - for (k = 0; k < span->end; k++) { - GLfloat invW = 1.0f / w; - span->array->varying[k][i][j] = v * invW; - v += dvdx; - w += dwdx; + for (var = 0; var < MAX_VARYING; var++) { + if (inputsUsed & FRAG_BIT_VAR(var)) { + GLuint j; + for (j = 0; j < 4; j++) { + const GLfloat dvdx = span->varStepX[var][j]; + GLfloat v = span->var[var][j]; + const GLfloat dwdx = span->dwdx; + GLfloat w = span->w; + GLuint k; + for (k = 0; k < span->end; k++) { + GLfloat invW = 1.0f / w; + span->array->varying[var][k][j] = v * invW; + v += dvdx; + w += dwdx; + } } } } @@ -852,25 +855,37 @@ interpolate_varying(GLcontext *ctx, SWspan *span) * Apply the current polygon stipple pattern to a span of pixels. */ static INLINE void -stipple_polygon_span( GLcontext *ctx, SWspan *span ) +stipple_polygon_span(GLcontext *ctx, SWspan *span) { - const GLuint highbit = 0x80000000; - const GLuint stipple = ctx->PolygonStipple[span->y % 32]; GLubyte *mask = span->array->mask; - GLuint i, m; ASSERT(ctx->Polygon.StippleFlag); - ASSERT((span->arrayMask & SPAN_XY) == 0); - - m = highbit >> (GLuint) (span->x % 32); - for (i = 0; i < span->end; i++) { - if ((m & stipple) == 0) { - mask[i] = 0; + if (span->arrayMask & SPAN_XY) { + /* arrays of x/y pixel coords */ + GLuint i; + for (i = 0; i < span->end; i++) { + const GLint col = span->array->x[i] % 32; + const GLint row = span->array->y[i] % 32; + const GLuint stipple = ctx->PolygonStipple[row]; + if (((1 << col) & stipple) == 0) { + mask[i] = 0; + } } - m = m >> 1; - if (m == 0) { - m = highbit; + } + else { + /* horizontal span of pixels */ + const GLuint highBit = 1 << 31; + const GLuint stipple = ctx->PolygonStipple[span->y % 32]; + GLuint i, m = highBit >> (GLuint) (span->x % 32); + for (i = 0; i < span->end; i++) { + if ((m & stipple) == 0) { + mask[i] = 0; + } + m = m >> 1; + if (m == 0) { + m = highBit; + } } } span->writeAll = GL_FALSE; @@ -1295,7 +1310,7 @@ clamp_colors(SWspan *span) * Convert the span's color arrays to the given type. */ static INLINE void -convert_color_type(GLcontext *ctx, SWspan *span, GLenum newType) +convert_color_type(SWspan *span, GLenum newType) { GLvoid *src, *dst; if (span->array->ChanType == GL_UNSIGNED_BYTE) { @@ -1598,7 +1613,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (numDrawBuffers > 0) { if (fb->_ColorDrawBuffers[output][0]->DataType != span->array->ChanType) { - convert_color_type(ctx, span, + convert_color_type(span, fb->_ColorDrawBuffers[output][0]->DataType); } } @@ -1656,9 +1671,9 @@ end: /** - * Read RGBA pixels from frame buffer. Clipping will be done to prevent + * Read RGBA pixels from a renderbuffer. Clipping will be done to prevent * reading ouside the buffer's boundaries. - * \param type datatype for returned colors + * \param dstType datatype for returned colors * \param rgba the returned colors */ void @@ -1723,7 +1738,7 @@ _swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb, /** - * Read CI pixels from frame buffer. Clipping will be done to prevent + * Read CI pixels from a renderbuffer. Clipping will be done to prevent * reading ouside the buffer's boundaries. */ void @@ -1805,7 +1820,8 @@ _swrast_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint i, inCount = 0, inStart = 0; for (i = 0; i < count; i++) { - if (x[i] >= 0 && y[i] >= 0 && x[i] < rb->Width && y[i] < rb->Height) { + if (x[i] >= 0 && y[i] >= 0 && + x[i] < (GLint) rb->Width && y[i] < (GLint) rb->Height) { /* inside */ if (inCount == 0) inStart = i; @@ -1839,13 +1855,13 @@ _swrast_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, { GLint skip = 0; - if (y < 0 || y >= rb->Height) + if (y < 0 || y >= (GLint) rb->Height) return; /* above or below */ - if (x + (GLint) count <= 0 || x >= rb->Width) + if (x + (GLint) count <= 0 || x >= (GLint) rb->Width) return; /* entirely left or right */ - if (x + count > rb->Width) { + if ((GLint) (x + count) > (GLint) rb->Width) { /* right clip */ GLint clip = x + count - rb->Width; count -= clip; @@ -1874,10 +1890,10 @@ _swrast_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, { GLint skip = 0; - if (y < 0 || y >= rb->Height) + if (y < 0 || y >= (GLint) rb->Height) return; /* above or below */ - if (x + (GLint) count <= 0 || x >= rb->Width) + if (x + (GLint) count <= 0 || x >= (GLint) rb->Width) return; /* entirely left or right */ if (x + count > rb->Width) { -- cgit v1.2.3 From d6772f157a56bb53b754bb16c98e102b54c82a0e Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 27 Jan 2007 20:06:41 -0700 Subject: Improved register allocation: allow four 'float' vars or temporaries to share a single register. Clean-up needed. --- src/mesa/shader/slang/slang_emit.c | 50 ++++++++---- src/mesa/shader/slang/slang_vartable.c | 140 +++++++++++++++++++++++---------- src/mesa/shader/slang/slang_vartable.h | 11 +-- 3 files changed, 137 insertions(+), 64 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 82e8c0b158..c3167e36fb 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -40,7 +40,7 @@ #define PEEPHOLE_OPTIMIZATIONS 1 -#define ANNOTATE 0 +#define ANNOTATE 1 /** @@ -336,11 +336,14 @@ static void alloc_temp_storage(slang_var_table *vt, slang_ir_node *n, GLint size) { GLint indx; + GLuint swizzle; assert(!n->Var); assert(!n->Store); assert(size > 0); - indx = _slang_alloc_temp(vt, size); + indx = _slang_alloc_temp(vt, size, &swizzle); n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, indx, size); + if (n->Store) + n->Store->Swizzle = swizzle; } @@ -352,8 +355,8 @@ static void free_temp_storage(slang_var_table *vt, slang_ir_node *n) { if (n->Store->File == PROGRAM_TEMPORARY && n->Store->Index >= 0) { - if (_slang_is_temp(vt, n->Store->Index)) { - _slang_free_temp(vt, n->Store->Index, n->Store->Size); + if (_slang_is_temp(vt, n->Store->Index, n->Store->Swizzle)) { + _slang_free_temp(vt, n->Store->Index, n->Store->Size, n->Store->Swizzle); /* XXX free(store)? */ n->Store->Index = -1; n->Store->Size = -1; @@ -381,7 +384,15 @@ storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st, assert(st->File != PROGRAM_UNDEFINED); assert(st->Size >= 1); assert(st->Size <= 4); - dst->WriteMask = defaultWritemask[st->Size - 1] & writemask; + if (st->Size == 1) { + GLuint comp = GET_SWZ(st->Swizzle, 0); + assert(comp < 4); + assert(writemask & WRITEMASK_X); + dst->WriteMask = WRITEMASK_X << comp; + } + else { + dst->WriteMask = defaultWritemask[st->Size - 1] & writemask; + } } @@ -803,13 +814,15 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) emit(vt, n->Children[0], prog); #if PEEPHOLE_OPTIMIZATIONS - if (inst && _slang_is_temp(vt, n->Children[1]->Store->Index)) { + if (inst && _slang_is_temp(vt, n->Children[1]->Store->Index, + n->Children[1]->Store->Swizzle)) { /* Peephole optimization: * Just modify the RHS to put its result into the dest of this * MOVE operation. Then, this MOVE is a no-op. */ _slang_free_temp(vt, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); + n->Children[1]->Store->Size, + n->Children[1]->Store->Swizzle); *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ assert(n->Children[0]->Store->Index >= 0); @@ -852,12 +865,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, srcAnnot, NULL); } - /* XXX is this test correct? */ - if (_slang_is_temp(vt, n->Children[1]->Store->Index)) { - _slang_free_temp(vt, n->Children[1]->Store->Index, - n->Children[1]->Store->Size); - } - /*inst->Comment = _mesa_strdup("IR_MOVE");*/ + free_temp_storage(vt, n->Children[1]); assert(!n->Store); n->Store = n->Children[0]->Store; /*XXX new */ return inst; @@ -883,13 +891,17 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* This'll happen for things like "if (i) ..." where no code * is normally generated for the expression "i". * Generate a move instruction just to set condition codes. + * Note: must use full 4-component vector since all four + * condition codes must be set identically. */ - alloc_temp_storage(vt, n, 1); + alloc_temp_storage(vt, n, 4); inst = new_instruction(prog, OPCODE_MOV); inst->CondUpdate = GL_TRUE; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - _slang_free_temp(vt, n->Store->Index, n->Store->Size); + _slang_free_temp(vt, n->Store->Index, n->Store->Size, + n->Store->Swizzle); + inst->Comment = _mesa_strdup("COND expr"); return inst; /* XXX or null? */ } } @@ -928,12 +940,16 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store->Index < 0); if (!n->Var || n->Var->isTemp) { /* a nameless/temporary variable, will be freed after first use */ - n->Store->Index = _slang_alloc_temp(vt, n->Store->Size); + GLuint swizzle; + n->Store->Index = _slang_alloc_temp(vt, n->Store->Size, &swizzle); + n->Store->Swizzle = swizzle; } else { /* a regular variable */ + GLuint swizzle; _slang_add_variable(vt, n->Var); - n->Store->Index = _slang_alloc_var(vt, n->Store->Size); + n->Store->Index = _slang_alloc_var(vt, n->Store->Size, &swizzle); + n->Store->Swizzle = swizzle; /* printf("IR_VAR_DECL %s %d store %p\n", (char*) n->Var->a_name, n->Store->Index, (void*) n->Store); diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index 6d2b4369d9..cadefda1bc 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -4,6 +4,7 @@ #include "slang_compile_variable.h" #include "slang_vartable.h" #include "slang_ir.h" +#include "prog_instruction.h" static int dbg = 0; @@ -23,7 +24,8 @@ struct slang_var_table_ int num_entries; slang_variable **vars; /* array [num_entries] */ - TempState temps[MAX_PROGRAM_TEMPS]; + TempState temps[MAX_PROGRAM_TEMPS * 4]; + int size[MAX_PROGRAM_TEMPS]; struct slang_var_table_ *parent; }; @@ -46,6 +48,7 @@ _slang_push_var_table(slang_var_table *parent) if (parent) { /* copy the info indicating which temp regs are in use */ memcpy(t->temps, parent->temps, sizeof(t->temps)); + memcpy(t->size, parent->size, sizeof(t->size)); } if (dbg) printf("Pushing level %d\n", t->level); } @@ -67,12 +70,22 @@ _slang_pop_var_table(slang_var_table *t) /* free the storage allocated for each variable */ for (i = 0; i < t->num_entries; i++) { slang_ir_storage *store = (slang_ir_storage *) t->vars[i]->aux; - GLint j, sz4 = (store->Size + 3) / 4; - if (dbg) printf(" Free var %s, size %d\n", - (char*) t->vars[i]->a_name, store->Size); - for (j = 0; j < sz4; j++) { - assert(t->temps[store->Index + j] == VAR); - t->temps[store->Index + j] = FREE; + GLint j; + const GLuint sz = store->Size; + GLuint comp; + if (dbg) printf(" Free var %s, size %d at %d\n", + (char*) t->vars[i]->a_name, store->Size, + store->Index); + + if (sz == 1) + comp = GET_SWZ(store->Swizzle, 0); + else + comp = 0; + + assert(store->Index >= 0); + for (j = 0; j < sz; j++) { + assert(t->temps[store->Index * 4 + j + comp] == VAR); + t->temps[store->Index * 4 + j + comp] = FREE; } store->Index = -1; } @@ -80,9 +93,9 @@ _slang_pop_var_table(slang_var_table *t) /* just verify that any remaining allocations in this scope * were for temps */ - for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { + for (i = 0; i < MAX_PROGRAM_TEMPS * 4; i++) { if (t->temps[i] && !t->parent->temps[i]) { - if (dbg) printf(" Free reg %d\n", i); + if (dbg) printf(" Free reg %d\n", i/4); assert(t->temps[i] == TEMP); } } @@ -131,16 +144,22 @@ _slang_find_variable(const slang_var_table *t, slang_atom name) } +/** + * Allocation helper. + * \param size var size in floats + * \return position for var, measured in floats + */ static GLint alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) { - const GLuint sz4 = (size + 3) / 4; + /* if size == 1, allocate anywhere, else, pos must be multiple of 4 */ + const GLuint step = (size == 1) ? 1 : 4; GLuint i, j; assert(size > 0); /* number of floats */ - for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { + for (i = 0; i < MAX_PROGRAM_TEMPS - size; i += step) { GLuint found = 0; - for (j = 0; j < sz4; j++) { + for (j = 0; j < size; j++) { if (i + j < MAX_PROGRAM_TEMPS && !t->temps[i + j]) { found++; } @@ -148,10 +167,14 @@ alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) break; } } - if (found == sz4) { - /* found block of size/4 free regs */ - for (j = 0; j < sz4; j++) + if (found == size) { + /* found block of size free regs */ + if (size > 1) + assert(i % 4 == 0); + for (j = 0; j < size; j++) t->temps[i + j] = isTemp ? TEMP : VAR; + printf("t->size[%d] = %d\n", i, size); + t->size[i] = size; return i; } } @@ -161,61 +184,98 @@ alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) /** * Allocate temp register(s) for storing a variable. + * \param size size needed, in floats + * \param swizzle returns swizzle mask for accessing var in register + * \return register allocated, or -1 */ GLint -_slang_alloc_var(slang_var_table *t, GLint size) +_slang_alloc_var(slang_var_table *t, GLint size, GLuint *swizzle) { int i = alloc_reg(t, size, GL_FALSE); - if (dbg) printf("Alloc var %d (level %d)\n", i, t->level); - return i; -} - - -void -_slang_reserve_var(slang_var_table *t, GLint r, GLint size) -{ - const GLint sz4 = (size + 3) / 4; - GLint i; - for (i = 0; i < sz4; i++) { - t->temps[r + i] = VAR; + if (i < 0) + return -1; + + if (size == 1) { + GLuint comp = i % 4; + *swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); + char swz = "xyzw"[comp]; + if (dbg) printf("Alloc var sz %d at %d.%c (level %d)\n", size, i/4, swz, t->level); } + else { + *swizzle = SWIZZLE_NOOP; + if (dbg) printf("Alloc var sz %d at %d.xyzw (level %d)\n", size, i/4, t->level); + } + return i / 4; } + /** * Allocate temp register(s) for storing an unnamed intermediate value. */ GLint -_slang_alloc_temp(slang_var_table *t, GLint size) +_slang_alloc_temp(slang_var_table *t, GLint size, GLuint *swizzle) { int i = alloc_reg(t, size, GL_TRUE); - if (dbg) printf("Alloc temp %d (level %d)\n", i, t->level); - return i; + if (i < 0) + return -1; + + if (size == 1) { + GLuint comp = i % 4; + assert(comp < 4); + int swz = "xyzw"[comp]; + *swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); + if (dbg) printf("Alloc temp sz %d at %d.%c (level %d)\n", + size, i/4, swz, t->level); + } + else { + *swizzle = SWIZZLE_NOOP; + if (dbg) printf("Alloc temp sz %d at %d.xyzw (level %d)\n", + size, i/4, t->level); + } + return i / 4; } void -_slang_free_temp(slang_var_table *t, GLint r, GLint size) +_slang_free_temp(slang_var_table *t, GLint r, GLint size, GLuint swizzle) { - const GLuint sz4 = (size + 3) / 4; GLuint i; assert(size > 0); assert(r >= 0); - assert(r < MAX_PROGRAM_TEMPS); - if (dbg) printf("Free temp %d (level %d)\n", r, t->level); - for (i = 0; i < sz4; i++) { - assert(t->temps[r + i] == TEMP); - t->temps[r + i] = FREE; + assert(r + size <= MAX_PROGRAM_TEMPS); + if (dbg) printf("Free temp sz %d at %d (level %d)\n", size, r, t->level); + if (size == 1) { + GLuint comp = GET_SWZ(swizzle, 0); + assert(swizzle == MAKE_SWIZZLE4(comp, comp, comp, comp)); + assert(comp < 4); + assert(t->size[r * 4 + comp] == 1); + assert(t->temps[r * 4 + comp] == TEMP); + t->temps[r * 4 + comp] = FREE; + } + else { + assert(swizzle == SWIZZLE_NOOP); + assert(t->size[r*4] == size); + for (i = 0; i < size; i++) { + assert(t->temps[r * 4 + i] == TEMP); + t->temps[r * 4 + i] = FREE; + } } } GLboolean -_slang_is_temp(slang_var_table *t, GLint r) +_slang_is_temp(slang_var_table *t, GLint r, GLuint swizzle) { assert(r >= 0); assert(r < MAX_PROGRAM_TEMPS); - if (t->temps[r] == TEMP) + GLuint comp; + if (swizzle == SWIZZLE_NOOP) + comp = 0; + else + comp = GET_SWZ(swizzle, 0); + + if (t->temps[r * 4 + comp] == TEMP) return GL_TRUE; else return GL_FALSE; diff --git a/src/mesa/shader/slang/slang_vartable.h b/src/mesa/shader/slang/slang_vartable.h index c8e37c94aa..86fa5d4a4a 100644 --- a/src/mesa/shader/slang/slang_vartable.h +++ b/src/mesa/shader/slang/slang_vartable.h @@ -20,19 +20,16 @@ extern struct slang_variable_ * _slang_find_variable(const slang_var_table *t, slang_atom name); extern GLint -_slang_alloc_var(slang_var_table *t, GLint size); - -extern void -_slang_reserve_var(slang_var_table *t, GLint r, GLint size); +_slang_alloc_var(slang_var_table *t, GLint size, GLuint *swizzle); extern GLint -_slang_alloc_temp(slang_var_table *t, GLint size); +_slang_alloc_temp(slang_var_table *t, GLint size, GLuint *swizzle); extern void -_slang_free_temp(slang_var_table *t, GLint r, GLint size); +_slang_free_temp(slang_var_table *t, GLint r, GLint size, GLuint swizzle); extern GLboolean -_slang_is_temp(slang_var_table *t, GLint r); +_slang_is_temp(slang_var_table *t, GLint r, GLuint swizzle); #endif /* SLANG_VARTABLE_H */ -- cgit v1.2.3 From 513325fa32f802ffb3d3c8323ecf8216782620d3 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 27 Jan 2007 20:29:33 -0700 Subject: Clean-up of var/temp allocation function parameters. --- src/mesa/shader/slang/slang_emit.c | 30 ++++------- src/mesa/shader/slang/slang_ir.h | 6 ++- src/mesa/shader/slang/slang_vartable.c | 92 +++++++++++++++++----------------- src/mesa/shader/slang/slang_vartable.h | 13 ++--- 4 files changed, 67 insertions(+), 74 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c3167e36fb..568b40997d 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -335,15 +335,11 @@ slang_print_ir(const slang_ir_node *n, int indent) static void alloc_temp_storage(slang_var_table *vt, slang_ir_node *n, GLint size) { - GLint indx; - GLuint swizzle; assert(!n->Var); assert(!n->Store); assert(size > 0); - indx = _slang_alloc_temp(vt, size, &swizzle); - n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, indx, size); - if (n->Store) - n->Store->Swizzle = swizzle; + n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, -1, size); + (void) _slang_alloc_temp(vt, n->Store); } @@ -355,8 +351,8 @@ static void free_temp_storage(slang_var_table *vt, slang_ir_node *n) { if (n->Store->File == PROGRAM_TEMPORARY && n->Store->Index >= 0) { - if (_slang_is_temp(vt, n->Store->Index, n->Store->Swizzle)) { - _slang_free_temp(vt, n->Store->Index, n->Store->Size, n->Store->Swizzle); + if (_slang_is_temp(vt, n->Store)) { + _slang_free_temp(vt, n->Store); /* XXX free(store)? */ n->Store->Index = -1; n->Store->Size = -1; @@ -814,15 +810,12 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) emit(vt, n->Children[0], prog); #if PEEPHOLE_OPTIMIZATIONS - if (inst && _slang_is_temp(vt, n->Children[1]->Store->Index, - n->Children[1]->Store->Swizzle)) { + if (inst && _slang_is_temp(vt, n->Children[1]->Store)) { /* Peephole optimization: * Just modify the RHS to put its result into the dest of this * MOVE operation. Then, this MOVE is a no-op. */ - _slang_free_temp(vt, n->Children[1]->Store->Index, - n->Children[1]->Store->Size, - n->Children[1]->Store->Swizzle); + _slang_free_temp(vt, n->Children[1]->Store); *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ assert(n->Children[0]->Store->Index >= 0); @@ -899,8 +892,7 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst->CondUpdate = GL_TRUE; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - _slang_free_temp(vt, n->Store->Index, n->Store->Size, - n->Store->Swizzle); + _slang_free_temp(vt, n->Store); inst->Comment = _mesa_strdup("COND expr"); return inst; /* XXX or null? */ } @@ -940,16 +932,12 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store->Index < 0); if (!n->Var || n->Var->isTemp) { /* a nameless/temporary variable, will be freed after first use */ - GLuint swizzle; - n->Store->Index = _slang_alloc_temp(vt, n->Store->Size, &swizzle); - n->Store->Swizzle = swizzle; + (void) _slang_alloc_temp(vt, n->Store); } else { /* a regular variable */ - GLuint swizzle; _slang_add_variable(vt, n->Var); - n->Store->Index = _slang_alloc_var(vt, n->Store->Size, &swizzle); - n->Store->Swizzle = swizzle; + (void) _slang_alloc_var(vt, n->Store); /* printf("IR_VAR_DECL %s %d store %p\n", (char*) n->Var->a_name, n->Store->Index, (void*) n->Store); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index e5a0fa8eb5..24ed8e0dc6 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -102,13 +102,15 @@ typedef enum /** * Describes where data storage is allocated. */ -typedef struct +struct _slang_ir_storage { enum register_file File; /**< PROGRAM_TEMPORARY, PROGRAM_INPUT, etc */ GLint Index; /**< -1 means unallocated */ GLint Size; /**< number of floats */ GLuint Swizzle; -} slang_ir_storage; +}; + +typedef struct _slang_ir_storage slang_ir_storage; /** diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index cadefda1bc..0271455428 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -24,8 +24,8 @@ struct slang_var_table_ int num_entries; slang_variable **vars; /* array [num_entries] */ - TempState temps[MAX_PROGRAM_TEMPS * 4]; - int size[MAX_PROGRAM_TEMPS]; + TempState temps[MAX_PROGRAM_TEMPS * 4]; /* per-component state */ + int size[MAX_PROGRAM_TEMPS]; /* For debug only */ struct slang_var_table_ *parent; }; @@ -94,7 +94,7 @@ _slang_pop_var_table(slang_var_table *t) * were for temps */ for (i = 0; i < MAX_PROGRAM_TEMPS * 4; i++) { - if (t->temps[i] && !t->parent->temps[i]) { + if (t->temps[i] != FREE && t->parent->temps[i] == FREE) { if (dbg) printf(" Free reg %d\n", i/4); assert(t->temps[i] == TEMP); } @@ -160,7 +160,7 @@ alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) for (i = 0; i < MAX_PROGRAM_TEMPS - size; i += step) { GLuint found = 0; for (j = 0; j < size; j++) { - if (i + j < MAX_PROGRAM_TEMPS && !t->temps[i + j]) { + if (i + j < MAX_PROGRAM_TEMPS && t->temps[i + j] == FREE) { found++; } else { @@ -188,24 +188,26 @@ alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) * \param swizzle returns swizzle mask for accessing var in register * \return register allocated, or -1 */ -GLint -_slang_alloc_var(slang_var_table *t, GLint size, GLuint *swizzle) +GLboolean +_slang_alloc_var(slang_var_table *t, slang_ir_storage *store) { - int i = alloc_reg(t, size, GL_FALSE); + const int i = alloc_reg(t, store->Size, GL_FALSE); if (i < 0) - return -1; + return GL_FALSE; - if (size == 1) { - GLuint comp = i % 4; - *swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); - char swz = "xyzw"[comp]; - if (dbg) printf("Alloc var sz %d at %d.%c (level %d)\n", size, i/4, swz, t->level); + store->Index = i / 4; + if (store->Size == 1) { + const GLuint comp = i % 4; + store->Swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); + if (dbg) printf("Alloc var sz %d at %d.%c (level %d)\n", + store->Size, store->Index, "xyzw"[comp], t->level); } else { - *swizzle = SWIZZLE_NOOP; - if (dbg) printf("Alloc var sz %d at %d.xyzw (level %d)\n", size, i/4, t->level); + store->Swizzle = SWIZZLE_NOOP; + if (dbg) printf("Alloc var sz %d at %d.xyzw (level %d)\n", + store->Size, store->Index, t->level); } - return i / 4; + return GL_TRUE; } @@ -213,50 +215,50 @@ _slang_alloc_var(slang_var_table *t, GLint size, GLuint *swizzle) /** * Allocate temp register(s) for storing an unnamed intermediate value. */ -GLint -_slang_alloc_temp(slang_var_table *t, GLint size, GLuint *swizzle) +GLboolean +_slang_alloc_temp(slang_var_table *t, slang_ir_storage *store) { - int i = alloc_reg(t, size, GL_TRUE); + const int i = alloc_reg(t, store->Size, GL_TRUE); if (i < 0) - return -1; + return GL_FALSE; - if (size == 1) { - GLuint comp = i % 4; - assert(comp < 4); - int swz = "xyzw"[comp]; - *swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); + store->Index = i / 4; + if (store->Size == 1) { + const GLuint comp = i % 4; + store->Swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); if (dbg) printf("Alloc temp sz %d at %d.%c (level %d)\n", - size, i/4, swz, t->level); + store->Size, store->Index, "xyzw"[comp], t->level); } else { - *swizzle = SWIZZLE_NOOP; + store->Swizzle = SWIZZLE_NOOP; if (dbg) printf("Alloc temp sz %d at %d.xyzw (level %d)\n", - size, i/4, t->level); + store->Size, store->Index, t->level); } - return i / 4; + return GL_TRUE; } void -_slang_free_temp(slang_var_table *t, GLint r, GLint size, GLuint swizzle) +_slang_free_temp(slang_var_table *t, slang_ir_storage *store) { GLuint i; - assert(size > 0); + GLuint r = store->Index; + assert(store->Size > 0); assert(r >= 0); - assert(r + size <= MAX_PROGRAM_TEMPS); - if (dbg) printf("Free temp sz %d at %d (level %d)\n", size, r, t->level); - if (size == 1) { - GLuint comp = GET_SWZ(swizzle, 0); - assert(swizzle == MAKE_SWIZZLE4(comp, comp, comp, comp)); + assert(r + store->Size <= MAX_PROGRAM_TEMPS); + if (dbg) printf("Free temp sz %d at %d (level %d)\n", store->Size, r, t->level); + if (store->Size == 1) { + const GLuint comp = GET_SWZ(store->Swizzle, 0); + assert(store->Swizzle == MAKE_SWIZZLE4(comp, comp, comp, comp)); assert(comp < 4); assert(t->size[r * 4 + comp] == 1); assert(t->temps[r * 4 + comp] == TEMP); t->temps[r * 4 + comp] = FREE; } else { - assert(swizzle == SWIZZLE_NOOP); - assert(t->size[r*4] == size); - for (i = 0; i < size; i++) { + assert(store->Swizzle == SWIZZLE_NOOP); + assert(t->size[r*4] == store->Size); + for (i = 0; i < store->Size; i++) { assert(t->temps[r * 4 + i] == TEMP); t->temps[r * 4 + i] = FREE; } @@ -265,17 +267,17 @@ _slang_free_temp(slang_var_table *t, GLint r, GLint size, GLuint swizzle) GLboolean -_slang_is_temp(slang_var_table *t, GLint r, GLuint swizzle) +_slang_is_temp(slang_var_table *t, slang_ir_storage *store) { - assert(r >= 0); - assert(r < MAX_PROGRAM_TEMPS); + assert(store->Index >= 0); + assert(store->Index < MAX_PROGRAM_TEMPS); GLuint comp; - if (swizzle == SWIZZLE_NOOP) + if (store->Swizzle == SWIZZLE_NOOP) comp = 0; else - comp = GET_SWZ(swizzle, 0); + comp = GET_SWZ(store->Swizzle, 0); - if (t->temps[r * 4 + comp] == TEMP) + if (t->temps[store->Index * 4 + comp] == TEMP) return GL_TRUE; else return GL_FALSE; diff --git a/src/mesa/shader/slang/slang_vartable.h b/src/mesa/shader/slang/slang_vartable.h index 86fa5d4a4a..51c2a1f77c 100644 --- a/src/mesa/shader/slang/slang_vartable.h +++ b/src/mesa/shader/slang/slang_vartable.h @@ -2,6 +2,7 @@ #ifndef SLANG_VARTABLE_H #define SLANG_VARTABLE_H +struct _slang_ir_storage; typedef struct slang_var_table_ slang_var_table; @@ -19,17 +20,17 @@ _slang_add_variable(slang_var_table *t, struct slang_variable_ *v); extern struct slang_variable_ * _slang_find_variable(const slang_var_table *t, slang_atom name); -extern GLint -_slang_alloc_var(slang_var_table *t, GLint size, GLuint *swizzle); +extern GLboolean +_slang_alloc_var(slang_var_table *t, struct _slang_ir_storage *store); -extern GLint -_slang_alloc_temp(slang_var_table *t, GLint size, GLuint *swizzle); +extern GLboolean +_slang_alloc_temp(slang_var_table *t, struct _slang_ir_storage *store); extern void -_slang_free_temp(slang_var_table *t, GLint r, GLint size, GLuint swizzle); +_slang_free_temp(slang_var_table *t, struct _slang_ir_storage *store); extern GLboolean -_slang_is_temp(slang_var_table *t, GLint r, GLuint swizzle); +_slang_is_temp(slang_var_table *t, struct _slang_ir_storage *store); #endif /* SLANG_VARTABLE_H */ -- cgit v1.2.3 From 602dc1a63888af10b2ae491bdbb3afcb28004770 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 28 Jan 2007 12:13:27 -0700 Subject: minor clean-ups --- src/mesa/shader/slang/slang_emit.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 568b40997d..a4c1c2fad7 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -353,7 +353,6 @@ free_temp_storage(slang_var_table *vt, slang_ir_node *n) if (n->Store->File == PROGRAM_TEMPORARY && n->Store->Index >= 0) { if (_slang_is_temp(vt, n->Store)) { _slang_free_temp(vt, n->Store); - /* XXX free(store)? */ n->Store->Index = -1; n->Store->Size = -1; } @@ -410,8 +409,6 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st) assert(st->File != PROGRAM_UNDEFINED); assert(st->Size >= 1); assert(st->Size <= 4); - /* XXX swizzling logic here may need some work */ - /*src->Swizzle = swizzle_swizzlee(swizzle, defaultSwizzle[st->Size - 1]);*/ if (st->Swizzle != SWIZZLE_NOOP) src->Swizzle = st->Swizzle; else @@ -579,14 +576,10 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); char *srcAnnot0 = NULL, *srcAnnot1 = NULL, *dstAnnot = NULL; - assert(info); + assert(info); assert(info->InstOpcode != OPCODE_NOP); - /* XXX check if Opcode == OPCODE_ADD, then check if either child is a MUL, - * replace with MAD instruction. - */ - #if PEEPHOLE_OPTIMIZATIONS /* Look for MAD opportunity */ if (n->Opcode == IR_ADD && n->Children[0]->Opcode == IR_MUL) { -- cgit v1.2.3 From 4de6fac4daecac25bb3f4339610312022b457b46 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 28 Jan 2007 12:49:47 -0700 Subject: Lots of vartable clean-ups, fixes. Report an error message when we run out of registers, rather than crash. --- src/mesa/shader/slang/slang_codegen.c | 8 +- src/mesa/shader/slang/slang_compile.c | 15 ++- src/mesa/shader/slang/slang_emit.c | 33 ++++-- src/mesa/shader/slang/slang_vartable.c | 198 ++++++++++++++++++++------------- src/mesa/shader/slang/slang_vartable.h | 10 +- 5 files changed, 168 insertions(+), 96 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index ff42db9def..3dc4fb36e7 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2141,13 +2141,13 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; - A->vartable = _slang_push_var_table(A->vartable); + _slang_push_var_table(A->vartable); oper->type = slang_oper_block_no_new_scope; /* temp change */ n = _slang_gen_operation(A, oper); oper->type = slang_oper_block_new_scope; /* restore */ - A->vartable = _slang_pop_var_table(A->vartable); + _slang_pop_var_table(A->vartable); if (n) n = new_node(IR_SCOPE, n, NULL); @@ -2640,7 +2640,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) A->CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); /* push new vartable scope */ - A->vartable = _slang_push_var_table(A->vartable); + _slang_push_var_table(A->vartable); /* Generate IR tree for the function body code */ n = _slang_gen_operation(A, fun->body); @@ -2648,7 +2648,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) n = new_node(IR_SCOPE, n, NULL); /* pop vartable, restore previous */ - A->vartable = _slang_pop_var_table(A->vartable); + _slang_pop_var_table(A->vartable); if (!n) { /* XXX record error */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index c459eb29e7..43f8a30369 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1978,8 +1978,20 @@ static GLboolean parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, struct gl_program *program) { + GET_CURRENT_CONTEXT(ctx); slang_output_ctx o; GLboolean success; + GLuint maxRegs; + + if (unit->type == slang_unit_fragment_builtin || + unit->type == slang_unit_fragment_shader) { + maxRegs = ctx->Const.FragmentProgram.MaxTemps; + } + else { + assert(unit->type == slang_unit_vertex_builtin || + unit->type == slang_unit_vertex_shader); + maxRegs = ctx->Const.VertexProgram.MaxTemps; + } /* setup output context */ o.funs = &unit->funs; @@ -1989,7 +2001,8 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, o.global_pool = &unit->object->varpool; o.machine = &unit->object->machine; o.program = program; - o.vartable = _slang_push_var_table(NULL); + o.vartable = _slang_new_var_table(maxRegs); + _slang_push_var_table(o.vartable); /* parse individual functions and declarations */ while (*C->I != EXTERNAL_NULL) { diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index a4c1c2fad7..e9cbb895f8 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -332,14 +332,17 @@ slang_print_ir(const slang_ir_node *n, int indent) * Allocate temporary storage for an intermediate result (such as for * a multiply or add, etc. */ -static void +static GLboolean alloc_temp_storage(slang_var_table *vt, slang_ir_node *n, GLint size) { assert(!n->Var); assert(!n->Store); assert(size > 0); n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, -1, size); - (void) _slang_alloc_temp(vt, n->Store); + if (!_slang_alloc_temp(vt, n->Store)) { + RETURN_ERROR("Ran out of registers, too many temporaries", 0); + } + return GL_TRUE; } @@ -634,7 +637,8 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } if (!n->Store) { - alloc_temp_storage(vt, n, info->ResultSize); + if (!alloc_temp_storage(vt, n, info->ResultSize)) + return NULL; } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); @@ -667,7 +671,8 @@ emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) free_temp_storage(vt, n->Children[0]); if (!n->Store) { - alloc_temp_storage(vt, n, info->ResultSize); + if (!alloc_temp_storage(vt, n, info->ResultSize)) + return NULL; } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); @@ -691,7 +696,8 @@ emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) emit(vt, n->Children[0], prog); if (!n->Store) - alloc_temp_storage(vt, n, n->Children[0]->Store->Size); + if (!alloc_temp_storage(vt, n, n->Children[0]->Store->Size)) + return NULL; inst = new_instruction(prog, OPCODE_MOV); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); @@ -768,7 +774,8 @@ emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } if (!n->Store) - alloc_temp_storage(vt, n, 4); + if (!alloc_temp_storage(vt, n, 4)) + return NULL; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); @@ -880,7 +887,8 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * Note: must use full 4-component vector since all four * condition codes must be set identically. */ - alloc_temp_storage(vt, n, 4); + if (!alloc_temp_storage(vt, n, 4)) + return NULL; inst = new_instruction(prog, OPCODE_MOV); inst->CondUpdate = GL_TRUE; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); @@ -912,9 +920,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_SCOPE: /* new variable scope */ - vt = _slang_push_var_table(vt); + _slang_push_var_table(vt); inst = emit(vt, n->Children[0], prog); - vt = _slang_pop_var_table(vt); + _slang_pop_var_table(vt); return inst; case IR_VAR_DECL: @@ -925,19 +933,20 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store->Index < 0); if (!n->Var || n->Var->isTemp) { /* a nameless/temporary variable, will be freed after first use */ - (void) _slang_alloc_temp(vt, n->Store); + if (!_slang_alloc_temp(vt, n->Store)) + RETURN_ERROR("Ran out of registers, too many temporaries", 0); } else { /* a regular variable */ _slang_add_variable(vt, n->Var); - (void) _slang_alloc_var(vt, n->Store); + if (!_slang_alloc_var(vt, n->Store)) + RETURN_ERROR("Ran out of registers, too many variables", 0); /* printf("IR_VAR_DECL %s %d store %p\n", (char*) n->Var->a_name, n->Store->Index, (void*) n->Store); */ assert(n->Var->aux == n->Store); } - assert(n->Store->Index >= 0); break; case IR_VAR: diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index 0271455428..1299696670 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -16,96 +16,132 @@ typedef enum { TEMP } TempState; -static int Level = 0; -struct slang_var_table_ +/** + * Variable/register info for one variable scope. + */ +struct table { - int level; - int num_entries; - slang_variable **vars; /* array [num_entries] */ + int Level; + int NumVars; + slang_variable **Vars; /* array [NumVars] */ - TempState temps[MAX_PROGRAM_TEMPS * 4]; /* per-component state */ - int size[MAX_PROGRAM_TEMPS]; /* For debug only */ + TempState Temps[MAX_PROGRAM_TEMPS * 4]; /* per-component state */ + int ValSize[MAX_PROGRAM_TEMPS]; /* For debug only */ - struct slang_var_table_ *parent; + struct table *Parent; /** Parent scope table */ }; +/** + * A variable table is a stack of tables, one per scope. + */ +struct slang_var_table_ +{ + GLint CurLevel; + GLuint MaxRegisters; + struct table *Top; /**< Table at top of stack */ +}; + + + +slang_var_table * +_slang_new_var_table(GLuint maxRegisters) +{ + slang_var_table *vt + = (slang_var_table *) _mesa_calloc(sizeof(slang_var_table)); + if (vt) { + vt->MaxRegisters = maxRegisters; + } + return vt; +} + + +void +_slang_delete_var_table(slang_var_table *vt) +{ + if (vt->Top) { + _mesa_problem(NULL, "non-empty var table in _slang_delete_var_table()"); + return; + } + _mesa_free(vt); +} + + /** * Create new table, put at head, return ptr to it. * XXX we should take a maxTemps parameter to indicate how many temporaries * are available for the current shader/program target. */ -slang_var_table * -_slang_push_var_table(slang_var_table *parent) +void +_slang_push_var_table(slang_var_table *vt) { - slang_var_table *t - = (slang_var_table *) _mesa_calloc(sizeof(slang_var_table)); + struct table *t = (struct table *) _mesa_calloc(sizeof(struct table)); if (t) { - t->level = Level++; - t->parent = parent; - if (parent) { + t->Level = vt->CurLevel++; + t->Parent = vt->Top; + if (t->Parent) { /* copy the info indicating which temp regs are in use */ - memcpy(t->temps, parent->temps, sizeof(t->temps)); - memcpy(t->size, parent->size, sizeof(t->size)); + memcpy(t->Temps, t->Parent->Temps, sizeof(t->Temps)); + memcpy(t->ValSize, t->Parent->ValSize, sizeof(t->ValSize)); } - if (dbg) printf("Pushing level %d\n", t->level); + vt->Top = t; + if (dbg) printf("Pushing level %d\n", t->Level); } - return t; } /** - * Destroy given table, return ptr to parent + * Destroy given table, return ptr to Parent */ -slang_var_table * -_slang_pop_var_table(slang_var_table *t) +void +_slang_pop_var_table(slang_var_table *vt) { - slang_var_table *parent = t->parent; + struct table *t = vt->Top; int i; - if (dbg) printf("Popping level %d\n", t->level); + if (dbg) printf("Popping level %d\n", t->Level); /* free the storage allocated for each variable */ - for (i = 0; i < t->num_entries; i++) { - slang_ir_storage *store = (slang_ir_storage *) t->vars[i]->aux; + for (i = 0; i < t->NumVars; i++) { + slang_ir_storage *store = (slang_ir_storage *) t->Vars[i]->aux; GLint j; - const GLuint sz = store->Size; GLuint comp; if (dbg) printf(" Free var %s, size %d at %d\n", - (char*) t->vars[i]->a_name, store->Size, + (char*) t->Vars[i]->a_name, store->Size, store->Index); - if (sz == 1) + if (store->Size == 1) comp = GET_SWZ(store->Swizzle, 0); else comp = 0; assert(store->Index >= 0); - for (j = 0; j < sz; j++) { - assert(t->temps[store->Index * 4 + j + comp] == VAR); - t->temps[store->Index * 4 + j + comp] = FREE; + for (j = 0; j < store->Size; j++) { + assert(t->Temps[store->Index * 4 + j + comp] == VAR); + t->Temps[store->Index * 4 + j + comp] = FREE; } store->Index = -1; } - if (t->parent) { + if (t->Parent) { /* just verify that any remaining allocations in this scope * were for temps */ - for (i = 0; i < MAX_PROGRAM_TEMPS * 4; i++) { - if (t->temps[i] != FREE && t->parent->temps[i] == FREE) { + for (i = 0; i < vt->MaxRegisters * 4; i++) { + if (t->Temps[i] != FREE && t->Parent->Temps[i] == FREE) { if (dbg) printf(" Free reg %d\n", i/4); - assert(t->temps[i] == TEMP); + assert(t->Temps[i] == TEMP); } } } - if (t->vars) - free(t->vars); + if (t->Vars) + free(t->Vars); + + vt->Top = t->Parent; free(t); - Level--; - return parent; + vt->CurLevel--; } @@ -113,31 +149,35 @@ _slang_pop_var_table(slang_var_table *t) * Add a new variable to the given symbol table. */ void -_slang_add_variable(slang_var_table *t, slang_variable *v) +_slang_add_variable(slang_var_table *vt, slang_variable *v) { + struct table *t; + assert(vt); + t = vt->Top; assert(t); if (dbg) printf("Adding var %s\n", (char *) v->a_name); - t->vars = realloc(t->vars, (t->num_entries + 1) * sizeof(slang_variable *)); - t->vars[t->num_entries] = v; - t->num_entries++; + t->Vars = realloc(t->Vars, (t->NumVars + 1) * sizeof(slang_variable *)); + t->Vars[t->NumVars] = v; + t->NumVars++; } /** * Look for variable by name in given table. - * If not found, parent table will be searched. + * If not found, Parent table will be searched. */ slang_variable * -_slang_find_variable(const slang_var_table *t, slang_atom name) +_slang_find_variable(const slang_var_table *vt, slang_atom name) { + struct table *t = vt->Top; while (1) { int i; - for (i = 0; i < t->num_entries; i++) { - if (t->vars[i]->a_name == name) - return t->vars[i]; + for (i = 0; i < t->NumVars; i++) { + if (t->Vars[i]->a_name == name) + return t->Vars[i]; } - if (t->parent) - t = t->parent; + if (t->Parent) + t = t->Parent; else return NULL; } @@ -150,17 +190,18 @@ _slang_find_variable(const slang_var_table *t, slang_atom name) * \return position for var, measured in floats */ static GLint -alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) +alloc_reg(slang_var_table *vt, GLint size, GLboolean isTemp) { + struct table *t = vt->Top; /* if size == 1, allocate anywhere, else, pos must be multiple of 4 */ const GLuint step = (size == 1) ? 1 : 4; GLuint i, j; assert(size > 0); /* number of floats */ - for (i = 0; i < MAX_PROGRAM_TEMPS - size; i += step) { + for (i = 0; i <= vt->MaxRegisters * 4 - size; i += step) { GLuint found = 0; for (j = 0; j < size; j++) { - if (i + j < MAX_PROGRAM_TEMPS && t->temps[i + j] == FREE) { + if (i + j < vt->MaxRegisters * 4 && t->Temps[i + j] == FREE) { found++; } else { @@ -172,9 +213,8 @@ alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) if (size > 1) assert(i % 4 == 0); for (j = 0; j < size; j++) - t->temps[i + j] = isTemp ? TEMP : VAR; - printf("t->size[%d] = %d\n", i, size); - t->size[i] = size; + t->Temps[i + j] = isTemp ? TEMP : VAR; + t->ValSize[i] = size; return i; } } @@ -189,9 +229,10 @@ alloc_reg(slang_var_table *t, GLint size, GLboolean isTemp) * \return register allocated, or -1 */ GLboolean -_slang_alloc_var(slang_var_table *t, slang_ir_storage *store) +_slang_alloc_var(slang_var_table *vt, slang_ir_storage *store) { - const int i = alloc_reg(t, store->Size, GL_FALSE); + struct table *t = vt->Top; + const int i = alloc_reg(vt, store->Size, GL_FALSE); if (i < 0) return GL_FALSE; @@ -200,12 +241,12 @@ _slang_alloc_var(slang_var_table *t, slang_ir_storage *store) const GLuint comp = i % 4; store->Swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); if (dbg) printf("Alloc var sz %d at %d.%c (level %d)\n", - store->Size, store->Index, "xyzw"[comp], t->level); + store->Size, store->Index, "xyzw"[comp], t->Level); } else { store->Swizzle = SWIZZLE_NOOP; if (dbg) printf("Alloc var sz %d at %d.xyzw (level %d)\n", - store->Size, store->Index, t->level); + store->Size, store->Index, t->Level); } return GL_TRUE; } @@ -216,9 +257,10 @@ _slang_alloc_var(slang_var_table *t, slang_ir_storage *store) * Allocate temp register(s) for storing an unnamed intermediate value. */ GLboolean -_slang_alloc_temp(slang_var_table *t, slang_ir_storage *store) +_slang_alloc_temp(slang_var_table *vt, slang_ir_storage *store) { - const int i = alloc_reg(t, store->Size, GL_TRUE); + struct table *t = vt->Top; + const int i = alloc_reg(vt, store->Size, GL_TRUE); if (i < 0) return GL_FALSE; @@ -227,57 +269,59 @@ _slang_alloc_temp(slang_var_table *t, slang_ir_storage *store) const GLuint comp = i % 4; store->Swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp); if (dbg) printf("Alloc temp sz %d at %d.%c (level %d)\n", - store->Size, store->Index, "xyzw"[comp], t->level); + store->Size, store->Index, "xyzw"[comp], t->Level); } else { store->Swizzle = SWIZZLE_NOOP; if (dbg) printf("Alloc temp sz %d at %d.xyzw (level %d)\n", - store->Size, store->Index, t->level); + store->Size, store->Index, t->Level); } return GL_TRUE; } void -_slang_free_temp(slang_var_table *t, slang_ir_storage *store) +_slang_free_temp(slang_var_table *vt, slang_ir_storage *store) { + struct table *t = vt->Top; GLuint i; GLuint r = store->Index; assert(store->Size > 0); assert(r >= 0); - assert(r + store->Size <= MAX_PROGRAM_TEMPS); - if (dbg) printf("Free temp sz %d at %d (level %d)\n", store->Size, r, t->level); + assert(r + store->Size <= vt->MaxRegisters * 4); + if (dbg) printf("Free temp sz %d at %d (level %d)\n", store->Size, r, t->Level); if (store->Size == 1) { const GLuint comp = GET_SWZ(store->Swizzle, 0); assert(store->Swizzle == MAKE_SWIZZLE4(comp, comp, comp, comp)); assert(comp < 4); - assert(t->size[r * 4 + comp] == 1); - assert(t->temps[r * 4 + comp] == TEMP); - t->temps[r * 4 + comp] = FREE; + assert(t->ValSize[r * 4 + comp] == 1); + assert(t->Temps[r * 4 + comp] == TEMP); + t->Temps[r * 4 + comp] = FREE; } else { assert(store->Swizzle == SWIZZLE_NOOP); - assert(t->size[r*4] == store->Size); + assert(t->ValSize[r*4] == store->Size); for (i = 0; i < store->Size; i++) { - assert(t->temps[r * 4 + i] == TEMP); - t->temps[r * 4 + i] = FREE; + assert(t->Temps[r * 4 + i] == TEMP); + t->Temps[r * 4 + i] = FREE; } } } GLboolean -_slang_is_temp(slang_var_table *t, slang_ir_storage *store) +_slang_is_temp(const slang_var_table *vt, const slang_ir_storage *store) { + struct table *t = vt->Top; assert(store->Index >= 0); - assert(store->Index < MAX_PROGRAM_TEMPS); + assert(store->Index < vt->MaxRegisters); GLuint comp; if (store->Swizzle == SWIZZLE_NOOP) comp = 0; else comp = GET_SWZ(store->Swizzle, 0); - if (t->temps[store->Index * 4 + comp] == TEMP) + if (t->Temps[store->Index * 4 + comp] == TEMP) return GL_TRUE; else return GL_FALSE; diff --git a/src/mesa/shader/slang/slang_vartable.h b/src/mesa/shader/slang/slang_vartable.h index 51c2a1f77c..8a3b992c96 100644 --- a/src/mesa/shader/slang/slang_vartable.h +++ b/src/mesa/shader/slang/slang_vartable.h @@ -9,9 +9,15 @@ typedef struct slang_var_table_ slang_var_table; struct slang_variable_; extern slang_var_table * +_slang_new_var_table(GLuint maxRegisters); + +extern void +_slang_delete_var_table(slang_var_table *vt); + +extern void _slang_push_var_table(slang_var_table *parent); -extern slang_var_table * +extern void _slang_pop_var_table(slang_var_table *t); extern void @@ -30,7 +36,7 @@ extern void _slang_free_temp(slang_var_table *t, struct _slang_ir_storage *store); extern GLboolean -_slang_is_temp(slang_var_table *t, struct _slang_ir_storage *store); +_slang_is_temp(const slang_var_table *t, const struct _slang_ir_storage *store); #endif /* SLANG_VARTABLE_H */ -- cgit v1.2.3 From 62e7c033c02149966c00100f3c256e2eb3fc3536 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 28 Jan 2007 16:11:11 -0700 Subject: implement mix() with LRP instruction --- .../shader/slang/library/slang_common_builtin.gc | 21 +- .../shader/slang/library/slang_common_builtin_gc.h | 459 +++++++++++---------- src/mesa/shader/slang/library/slang_core_gc.h | 91 ++-- src/mesa/shader/slang/slang_codegen.c | 9 +- src/mesa/shader/slang/slang_emit.c | 45 ++ src/mesa/shader/slang/slang_ir.h | 4 +- 6 files changed, 335 insertions(+), 294 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index e32a8831dc..8812a73416 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1029,44 +1029,37 @@ vec4 clamp(const vec4 val, const vec4 minVal, const vec4 maxVal) float mix(const float x, const float y, const float a) { - const float d = y - x; - return x + d * a; // MAD + __asm vec4_lrp __retVal, a, y, x; } vec2 mix(const vec2 x, const vec2 y, const float a) { - const vec2 d = y - x; - return x + d * a; // MAD + __asm vec4_lrp __retVal, a, y, x; } vec3 mix(const vec3 x, const vec3 y, const float a) { - const vec3 d = y - x; - return x + d * a; // MAD + __asm vec4_lrp __retVal, a, y, x; } vec4 mix(const vec4 x, const vec4 y, const float a) { - const vec4 d = y - x; - return x + d * a; // MAD + __asm vec4_lrp __retVal, a, y, x; } vec2 mix(const vec2 x, const vec2 y, const vec2 a) { - const vec2 d = y - x; - return x + d * a; // MAD + __asm vec4_lrp __retVal, a, y, x; } vec3 mix(const vec3 x, const vec3 y, const vec3 a) { - const vec3 d = y - x; - return x + d * a; // MAD + __asm vec4_lrp __retVal, a, y, x; } vec4 mix(const vec4 x, const vec4 y, const vec4 a) { - const vec4 d = y - x; - return x + d * a; // MAD + __asm vec4_lrp __retVal, a, y, x; } diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 5a2d8ed16f..655efdda16 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -450,239 +450,240 @@ 1,1,0,12,109,105,110,86,97,108,0,0,1,1,0,12,109,97,120,86,97,108,0,0,0,1,3,2,0,12,1,116,0,0,0,4, 118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,0,4,118, 101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,18,109,97,120,86,97,108,0, -0,0,0,1,0,9,0,109,105,120,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,9,1,100,0,2, -18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,1,0,10,120, -0,0,1,1,0,10,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,10,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18, -100,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,9,97,0,0,0, -1,3,2,1,11,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,12,0,109, -105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,9,97,0,0,0,1,3,2,1,12,1,100,0,2,18,121,0,18,120, -0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,1,0,10,120,0,0,1,1,0,10, -121,0,0,1,1,0,10,97,0,0,0,1,3,2,1,10,1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97, -0,48,46,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,11,97,0,0,0,1,3,2,1,11, -1,100,0,2,18,121,0,18,120,0,47,0,0,8,18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1, -1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,12,97,0,0,0,1,3,2,1,12,1,100,0,2,18,121,0,18,120,0,47,0,0,8, -18,120,0,18,100,0,18,97,0,48,46,0,0,1,0,9,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,9, -120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0, -0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,10,101,100,103,101,0,0,1,1,0,10,120, -0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,120,0, -0,18,101,100,103,101,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0,11,101,100,103,101,0,0,1,1,0,11,120, -0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -120,0,0,18,101,100,103,101,0,0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,12,101,100,103,101,0,0,1,1,0, -12,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,18, -101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,10,118,0,0,0, -1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, -101,100,103,101,0,59,120,120,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0, -11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,0,0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,9,101, -100,103,101,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, -108,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,120,0,0,0,0,1,0,9,0,115,109,111,111,116,104, -115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,9,120,0,0,0, -1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48,0,47,18,101,100,103,101, -49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0, -48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,104,115,116, -101,112,0,1,1,0,10,101,100,103,101,48,0,0,1,1,0,10,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2, -0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0, -18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17, -51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112, -0,1,1,0,11,101,100,103,101,48,0,0,1,1,0,11,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1, -116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101, -100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48, -0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0, -12,101,100,103,101,48,0,0,1,1,0,12,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2, -58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103, -101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17, -50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101, -100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99, -108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48, -0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48, -0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103, -101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109, -112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0, -17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18, -116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0, -0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2,58,99,108,97,109,112,0,18, -118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0, -48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48, -47,48,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,9,120,0,0,0,1,8,58,97,98,115,0,18,120,0,0,0,0,0, -1,0,9,0,108,101,110,103,116,104,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0,2,58, -100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112, -0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0, -0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,11,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0,2, -58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18, -112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, -0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,12,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0, -2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18, -112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, -0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,3,2,1,9,1,100, -0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115, -116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0,2,18,118,0,18,117,0,47, -0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0, -11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103, -116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12,118,0,0,1,1,0,12,117,0, -0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0, -1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,51,95,99,114,111, -115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,9,0, -102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1,1,0,9,78,114,101,102,0, -0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0, -4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105, -120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114,100,0, -1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0, -18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115, -0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0, -0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1,0,11,73,0,0,1,1,0,11, -78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3, -2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0, -0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97,99,101,102,111,114, -119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2, -58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115, -103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78, -0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,0,1,8,18, -73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101, -102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0, -18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,1,0,11,73,0,0,1, -1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47, -0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48, -0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116, -0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101, -116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0, -18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8, -18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113, -114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,1,0,10,73,0,0,1, -1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101, -116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73, -0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0, -18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0, -0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,1,1, -0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0, -48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0, -0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101, -116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48, -47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,1,1,0,9,101,116,97,0,0, -0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111, -116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17, -48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111, -116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109, -97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109, -97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0, -0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0, -0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,10,118, -0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0, -11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117, -0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, -0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, -115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0, -108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, -115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69, -113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97, -110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115, -84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, -97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84, -104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, -115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95, -115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97, -116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, -116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101, -97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101, -114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101, -114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116, -101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104, -97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, -116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, -52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0, -1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117, -0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0, -0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0, -7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113, -117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, -101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0, -0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115, -101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108, -0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0, -7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118, +0,0,0,1,0,9,0,109,105,120,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, +108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,10,0,109, +105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18, +95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,11,0,109,105,120,0,1,1,0, +11,120,0,0,1,1,0,11,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101, +116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1, +0,12,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0, +0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,10,0,109,105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1, +0,10,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18, +121,0,0,18,120,0,0,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,11,97,0,0,0, +1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120, +0,0,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,12,97,0,0,0,1,4,118,101,99, +52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,9,0, +115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,9,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116, +101,112,0,1,1,0,10,101,100,103,101,0,0,1,1,0,10,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,11,0,115,116, +101,112,0,1,1,0,11,101,100,103,101,0,0,1,1,0,11,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,12,0,115, +116,101,112,0,1,1,0,12,101,100,103,101,0,0,1,1,0,12,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0, +18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112, +0,1,1,0,9,101,100,103,101,0,0,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,0,0,0,0,1,0,11,0,115, +116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,0, +0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52, +95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120, +120,0,0,0,0,1,0,9,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0, +9,101,100,103,101,49,0,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18, +101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0, +17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0, +1,0,10,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,10,101,100,103,101,48,0,0,1,1,0,10,101, +100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101, +100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49, +0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11, +0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,11,101,100,103,101,48,0,0,1,1,0,11,101,100,103, +101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103, +101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0, +0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115, +109,111,111,116,104,115,116,101,112,0,1,1,0,12,101,100,103,101,48,0,0,1,1,0,12,101,100,103,101,49, +0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48, +0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0, +0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111, +111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0, +10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18, +101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18, +116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116, +104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,11,118,0, +0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103, +101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116, +0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116, +101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0, +12,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18, +101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51, +0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,9,120,0,0,0, +1,8,58,97,98,115,0,18,120,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,10,118,0,0,0,1,3,2,0,9, +1,114,0,0,0,3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95, +114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,11,118,0,0,0,1,3,2,0,9, +1,114,0,0,0,3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95, +114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,12,118,0,0,0,1,3,2,0,9, +1,114,0,0,0,3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95, +114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,114,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9, +121,0,0,0,1,3,2,1,9,1,100,0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0, +0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0, +2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116, +97,110,99,101,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0, +8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12, +118,0,0,1,1,0,12,117,0,0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116, +104,0,18,100,0,0,0,0,0,1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,51,95,99,114,111,115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, +18,117,0,0,0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1, +1,0,9,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0, +0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18, +100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102, +111,114,119,97,114,100,0,1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1, +100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52, +95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0, +18,78,0,0,18,115,0,0,0,0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1, +0,11,73,0,0,1,1,0,11,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0, +0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0, +48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97, +99,101,102,111,114,119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0, +1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4, +118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120, +0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1, +0,9,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0, +0,1,0,10,0,114,101,102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0, +0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116, +0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0, +0,0,48,18,78,0,48,47,0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1, +8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114, +101,102,114,97,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2, +17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73, +0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17, +48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73, +0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116, +0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18, +101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111, +116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9, +14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115, +113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0, +0,1,1,0,11,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18, +101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0, +18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116, +97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18, +107,0,0,0,46,18,78,0,48,47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0, +0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48, +17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47, +48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48, +18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18, +78,0,48,47,0,0,1,0,13,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1, +0,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77, +117,108,116,0,1,0,0,14,109,0,0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57, +18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, +1,0,0,15,109,0,0,1,0,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84, +104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110, +0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1, +0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, +0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117, +0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0, +0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118, +101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, +0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52, +95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115, +115,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115, +103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108, +101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, +52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0, +1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4, +118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2, +0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101, +99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, +0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118, +101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, +0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0, +1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1, +0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, +99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1, +0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101, +99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, +101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0, +103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, +115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0, +103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95, +115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4, +0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52, +95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101, +97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, +99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1, +0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118, +0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12, +118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1, +0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113, +117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, +116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84, +104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101, +0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0, +10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11, +117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, 101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0, -110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,110, -101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111, -116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69, -113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95, -114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0, -6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1, -0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0, -0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, -100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0, -0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, -100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97, -100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101, +101,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1, +0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8, +117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117, +0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99, +52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0, +3,0,110,111,116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, +110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0, +110,111,116,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110, +101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117, +97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0, +7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0, +1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0, +18,117,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99, +52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101, 99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17, -48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101, +48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101, 99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118, 101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122, -0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18, -118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1, -112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59, -120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,8,18,118,0,59, -120,0,18,118,0,59,121,0,34,0,0,1,0,1,0,97,108,108,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,112,114,111,100, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118, -0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114, -111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0, -0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0, -59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0, -18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,119,0,0,0,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59, -120,0,0,17,48,0,48,0,0,0,0,0,1,0,2,0,110,111,116,0,1,1,0,2,118,0,0,0,1,4,118,101,99,52,95,115,101, -113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,3,0,110, -111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0,110,111,116,0,1,1,0,4,118,0,0,0,1,4,118, -101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, -12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99,111, -111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101, -49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1, -3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100, -0,59,120,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,121,0,20,0,4,118, -101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106, -0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, -116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, -99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, +0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109, +0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,115,117,109,0, +0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59, +121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0, +18,118,0,59,122,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0, +59,120,0,0,18,118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,10,118,0,0, +0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112, +114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101, +0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,8, +18,118,0,59,120,0,18,118,0,59,121,0,34,0,0,1,0,1,0,97,108,108,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,112, +114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120, +0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99, +52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17, +48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0, +18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59, +120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,119, +0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111, +100,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,2,0,110,111,116,0,1,1,0,2,118,0,0,0,1,4,118,101,99,52,95, +115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, +3,0,110,111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0,110,111,116,0,1,1,0,4,118,0,0,0,1, +4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0, +0,1,0,12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99, +111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0, +18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114, +101,49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0, +0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114, +100,0,59,120,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,121,0,20,0,4, +118,101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108, +101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111, +106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52, +95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0, +18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, 108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,50,100,0,18,95, 95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0, 12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1, diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index b34cbb89ce..51ec685c26 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -804,51 +804,48 @@ 108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0, 1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, 97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0, -1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,65,110, -100,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,15,2,48,0,20,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,79, -114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,15,2,49,0,0,9,14,0,8,18,98,0,0,0,1,0,1,0,95, -95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95, -95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0, -0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108, -95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, +1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111, +114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111, +116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0, +0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, +65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, -57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, +14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, +16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114, +105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, +105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, +0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110, +116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116, +95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0, +0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 3dc4fb36e7..6ae307d09a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -455,6 +455,7 @@ static slang_asm_info AsmInfo[] = { { "vec4_dot", IR_DOT4, 1, 2 }, { "vec3_dot", IR_DOT3, 1, 2 }, { "vec3_cross", IR_CROSS, 1, 2 }, + { "vec4_lrp", IR_LRP, 1, 3 }, { "vec4_min", IR_MIN, 1, 2 }, { "vec4_max", IR_MAX, 1, 2 }, { "vec4_seq", IR_SEQ, 1, 2 }, @@ -1195,7 +1196,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, slang_operation *dest) { const slang_asm_info *info; - slang_ir_node *kids[2], *n; + slang_ir_node *kids[3], *n; GLuint j, firstOperand; assert(oper->type == slang_oper_asm); @@ -1206,7 +1207,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, (char *) oper->a_id); assert(info); } - assert(info->NumParams <= 2); + assert(info->NumParams <= 3); if (info->NumParams == oper->num_children) { /* Storage for result is not specified. @@ -1222,12 +1223,14 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, } /* assemble child(ren) */ - kids[0] = kids[1] = NULL; + kids[0] = kids[1] = kids[2] = NULL; for (j = 0; j < info->NumParams; j++) { kids[j] = _slang_gen_operation(A, &oper->children[firstOperand + j]); } n = new_node(info->Opcode, kids[0], kids[1]); + if (kids[2]) + n->Children[2] = kids[2]; if (firstOperand) { /* Setup n->Store to be a particular location. Otherwise, storage diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index e9cbb895f8..f230ba9c3f 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -65,6 +65,7 @@ static slang_ir_info IrInfo[] = { { IR_DOT4, "IR_DOT_4", OPCODE_DP4, 1, 2 }, { IR_DOT3, "IR_DOT_3", OPCODE_DP3, 1, 2 }, { IR_CROSS, "IR_CROSS", OPCODE_XPD, 3, 2 }, + { IR_LRP, "IR_LRP", OPCODE_LRP, 4, 3 }, { IR_MIN, "IR_MIN", OPCODE_MIN, 4, 2 }, { IR_MAX, "IR_MAX", OPCODE_MAX, 4, 2 }, { IR_SEQUAL, "IR_SEQUAL", OPCODE_SEQ, 4, 2 }, @@ -684,6 +685,47 @@ emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +/** + * Generate code for a simple tri-op instruction. + */ +static struct prog_instruction * +emit_triop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *inst; + const slang_ir_info *info = slang_find_ir_info(n->Opcode); + + assert(info); + assert(info->InstOpcode != OPCODE_NOP); + + /* only one tri-op IR node (for now): */ + assert(info->InstOpcode == OPCODE_LRP); + + /* gen code for children */ + emit(vt, n->Children[0], prog); + emit(vt, n->Children[1], prog); + emit(vt, n->Children[2], prog); + + /* gen this instruction */ + inst = new_instruction(prog, info->InstOpcode); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + storage_to_src_reg(&inst->SrcReg[2], n->Children[2]->Store); + + free_temp_storage(vt, n->Children[0]); + free_temp_storage(vt, n->Children[1]); + free_temp_storage(vt, n->Children[2]); + + if (!n->Store) { + if (!alloc_temp_storage(vt, n, info->ResultSize)) + return NULL; + } + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + + return inst; +} + + + static struct prog_instruction * emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { @@ -1025,6 +1067,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_DDX: case IR_DDY: return emit_unop(vt, n, prog); + /* trianary operators */ + case IR_LRP: + return emit_triop(vt, n, prog); case IR_TEX: case IR_TEXB: case IR_TEXP: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 24ed8e0dc6..5617c56d4b 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -63,6 +63,7 @@ typedef enum IR_DOT4, IR_DOT3, IR_CROSS, /* vec3 cross product */ + IR_LRP, IR_MIN, IR_MAX, IR_SEQUAL, /* Set if args are equal */ @@ -115,11 +116,12 @@ typedef struct _slang_ir_storage slang_ir_storage; /** * Intermediate Representation (IR) tree node + * Basically a binary tree, but IR_LRP has three children. */ typedef struct slang_ir_node_ { slang_ir_opcode Opcode; - struct slang_ir_node_ *Children[2]; + struct slang_ir_node_ *Children[3]; const char *Comment; const char *Target; GLuint Writemask; /**< If Opcode == IR_MOVE */ -- cgit v1.2.3 From a06f92936272dba3da4329a30ae3f08924428106 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 28 Jan 2007 16:26:09 -0700 Subject: combine emit_unop(), emit_binop(), emit_triop() into emit_arith() --- src/mesa/shader/slang/slang_emit.c | 161 ++++++++++++------------------------- 1 file changed, 52 insertions(+), 109 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index f230ba9c3f..092c53bda0 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -503,8 +503,8 @@ storage_annotation(const slang_ir_node *n, const struct gl_program *prog) * Return an annotation string for an instruction. */ static char * -instruction_annotation(gl_inst_opcode opcode, - char *dstAnnot, char *srcAnnot0, char *srcAnnot1) +instruction_annotation(gl_inst_opcode opcode, char *dstAnnot, + char *srcAnnot0, char *srcAnnot1, char *srcAnnot2) { #if ANNOTATE const char *operator; @@ -526,6 +526,11 @@ instruction_annotation(gl_inst_opcode opcode, else srcAnnot1 = _mesa_strdup(""); + if (srcAnnot2) + len += strlen(srcAnnot2); + else + srcAnnot2 = _mesa_strdup(""); + switch (opcode) { case OPCODE_ADD: operator = "+"; @@ -556,12 +561,14 @@ instruction_annotation(gl_inst_opcode opcode, } s = (char *) malloc(len); - sprintf(s, "%s = %s %s %s", dstAnnot, srcAnnot0, operator, srcAnnot1); + sprintf(s, "%s = %s %s %s %s", dstAnnot, + srcAnnot0, operator, srcAnnot1, srcAnnot2); assert(_mesa_strlen(s) < len); free(dstAnnot); free(srcAnnot0); free(srcAnnot1); + free(srcAnnot2); return s; #else @@ -572,21 +579,26 @@ instruction_annotation(gl_inst_opcode opcode, /** - * Generate code for a simple binary-op instruction. + * Generate code for a simple arithmetic instruction. + * Either 1, 2 or 3 operands. */ static struct prog_instruction * -emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_arith(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); - char *srcAnnot0 = NULL, *srcAnnot1 = NULL, *dstAnnot = NULL; + char *srcAnnot[3], *dstAnnot; + GLuint i; assert(info); assert(info->InstOpcode != OPCODE_NOP); + srcAnnot[0] = srcAnnot[1] = srcAnnot[2] = dstAnnot = NULL; + #if PEEPHOLE_OPTIMIZATIONS /* Look for MAD opportunity */ - if (n->Opcode == IR_ADD && n->Children[0]->Opcode == IR_MUL) { + if (info->NumParams == 2 && + n->Opcode == IR_ADD && n->Children[0]->Opcode == IR_MUL) { /* found pattern IR_ADD(IR_MUL(A, B), C) */ emit(vt, n->Children[0]->Children[0], prog); /* A */ emit(vt, n->Children[0]->Children[1], prog); /* B */ @@ -601,7 +613,8 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) free_temp_storage(vt, n->Children[0]->Children[1]); free_temp_storage(vt, n->Children[1]); } - else if (n->Opcode == IR_ADD && n->Children[1]->Opcode == IR_MUL) { + else if (info->NumParams == 2 && + n->Opcode == IR_ADD && n->Children[1]->Opcode == IR_MUL) { /* found pattern IR_ADD(A, IR_MUL(B, C)) */ emit(vt, n->Children[0], prog); /* A */ emit(vt, n->Children[1]->Children[0], prog); /* B */ @@ -622,21 +635,24 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* normal case */ /* gen code for children */ - emit(vt, n->Children[0], prog); - emit(vt, n->Children[1], prog); + for (i = 0; i < info->NumParams; i++) + emit(vt, n->Children[i], prog); - /* gen this instruction */ + /* gen this instruction and src registers */ inst = new_instruction(prog, info->InstOpcode); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + for (i = 0; i < info->NumParams; i++) + storage_to_src_reg(&inst->SrcReg[i], n->Children[i]->Store); - srcAnnot0 = storage_annotation(n->Children[0], prog); - srcAnnot1 = storage_annotation(n->Children[1], prog); + /* annotation */ + for (i = 0; i < info->NumParams; i++) + srcAnnot[i] = storage_annotation(n->Children[i], prog); - free_temp_storage(vt, n->Children[0]); - free_temp_storage(vt, n->Children[1]); + /* free temps */ + for (i = 0; i < info->NumParams; i++) + free_temp_storage(vt, n->Children[i]); } + /* result storage */ if (!n->Store) { if (!alloc_temp_storage(vt, n, info->ResultSize)) return NULL; @@ -644,83 +660,11 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); dstAnnot = storage_annotation(n, prog); - inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, - srcAnnot0, srcAnnot1); - - /*_mesa_print_instruction(inst);*/ - return inst; -} - - -static struct prog_instruction * -emit_unop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) -{ - struct prog_instruction *inst; - const slang_ir_info *info = slang_find_ir_info(n->Opcode); - char *srcAnnot, *dstAnnot; - - assert(info); - assert(info->NumParams == 1); - - /* gen code for child */ - emit(vt, n->Children[0], prog); - - /* gen this instruction */ - inst = new_instruction(prog, info->InstOpcode); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - srcAnnot = storage_annotation(n->Children[0], prog); - free_temp_storage(vt, n->Children[0]); - - if (!n->Store) { - if (!alloc_temp_storage(vt, n, info->ResultSize)) - return NULL; - } - storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - - dstAnnot = storage_annotation(n, prog); - inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, - NULL, srcAnnot); - - return inst; -} - - -/** - * Generate code for a simple tri-op instruction. - */ -static struct prog_instruction * -emit_triop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) -{ - struct prog_instruction *inst; - const slang_ir_info *info = slang_find_ir_info(n->Opcode); - - assert(info); - assert(info->InstOpcode != OPCODE_NOP); - - /* only one tri-op IR node (for now): */ - assert(info->InstOpcode == OPCODE_LRP); - - /* gen code for children */ - emit(vt, n->Children[0], prog); - emit(vt, n->Children[1], prog); - emit(vt, n->Children[2], prog); - /* gen this instruction */ - inst = new_instruction(prog, info->InstOpcode); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); - storage_to_src_reg(&inst->SrcReg[2], n->Children[2]->Store); - - free_temp_storage(vt, n->Children[0]); - free_temp_storage(vt, n->Children[1]); - free_temp_storage(vt, n->Children[2]); - - if (!n->Store) { - if (!alloc_temp_storage(vt, n, info->ResultSize)) - return NULL; - } - storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, srcAnnot[0], + srcAnnot[1], srcAnnot[2]); + /*_mesa_print_instruction(inst);*/ return inst; } @@ -898,7 +842,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) dstAnnot = storage_annotation(n->Children[0], prog); srcAnnot = storage_annotation(n->Children[1], prog); inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, - srcAnnot, NULL); + srcAnnot, NULL, NULL); } free_temp_storage(vt, n->Children[1]); assert(!n->Store); @@ -1038,7 +982,19 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) n->Store->Swizzle); return NULL; - /* Simple binary operators */ + /* Simple arithmetic */ + /* unary */ + case IR_RSQ: + case IR_RCP: + case IR_FLOOR: + case IR_FRAC: + case IR_F_TO_I: + case IR_ABS: + case IR_SIN: + case IR_COS: + case IR_DDX: + case IR_DDY: + /* binary */ case IR_ADD: case IR_SUB: case IR_MUL: @@ -1054,22 +1010,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_POW: case IR_EXP: case IR_EXP2: - return emit_binop(vt, n, prog); - /* Simple unary operators */ - case IR_RSQ: - case IR_RCP: - case IR_FLOOR: - case IR_FRAC: - case IR_F_TO_I: - case IR_ABS: - case IR_SIN: - case IR_COS: - case IR_DDX: - case IR_DDY: - return emit_unop(vt, n, prog); - /* trianary operators */ + /* trinary operators */ case IR_LRP: - return emit_triop(vt, n, prog); + return emit_arith(vt, n, prog); case IR_TEX: case IR_TEXB: case IR_TEXP: -- cgit v1.2.3 From 7aece10039ad4786d7f85d61ec8614b9f287ea23 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 28 Jan 2007 19:01:35 -0700 Subject: noise functions --- src/mesa/shader/prog_instruction.c | 4 + src/mesa/shader/prog_instruction.h | 4 + .../shader/slang/library/slang_common_builtin.gc | 162 ++++++++++----------- .../shader/slang/library/slang_common_builtin_gc.h | 114 ++++++++------- src/mesa/shader/slang/slang_codegen.c | 7 + src/mesa/shader/slang/slang_emit.c | 9 ++ src/mesa/shader/slang/slang_ir.h | 4 + src/mesa/swrast/s_fragprog.c | 45 ++++++ src/mesa/tnl/t_vb_arbprogram.c | 4 + 9 files changed, 214 insertions(+), 139 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index 3de71b8b5d..0523f42125 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -150,6 +150,10 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_MIN, "MIN", 2 }, { OPCODE_MOV, "MOV", 1 }, { OPCODE_MUL, "MUL", 2 }, + { OPCODE_NOISE1, "NOISE1", 1 }, + { OPCODE_NOISE2, "NOISE2", 1 }, + { OPCODE_NOISE3, "NOISE3", 1 }, + { OPCODE_NOISE4, "NOISE4", 1 }, { OPCODE_PK2H, "PK2H", 1 }, { OPCODE_PK2US, "PK2US", 1 }, { OPCODE_PK4B, "PK4B", 1 }, diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index 83e8d7080b..3e88b4e627 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -172,6 +172,10 @@ typedef enum prog_opcode { OPCODE_MIN, /* X X X X X */ OPCODE_MOV, /* X X X X X */ OPCODE_MUL, /* X X X X X */ + OPCODE_NOISE1, /* X */ + OPCODE_NOISE2, /* X */ + OPCODE_NOISE3, /* X */ + OPCODE_NOISE4, /* X */ OPCODE_PK2H, /* X */ OPCODE_PK2US, /* X */ OPCODE_PK4B, /* X */ diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 8812a73416..e4a55846b8 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1699,123 +1699,107 @@ vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord) { // AUTHOR: Stefan Gustavson (stegu@itn.liu.se), Nov 26, 2005 // -float noise1 (float x) { - float a; - __asm float_noise1 a, x; - return a; +float noise1(const float x) +{ + __asm float_noise1 __retVal, x; } -float noise1 (vec2 x) { - float a; - __asm float_noise2 a, x; - return a; -} -float noise1 (vec3 x) { - float a; - __asm float_noise3 a, x; - return a; +float noise1(const vec2 x) +{ + __asm float_noise2 __retVal, x; } -float noise1 (vec4 x) { - float a; - __asm float_noise4 a, x; - return a; +float noise1(const vec3 x) +{ + __asm float_noise3 __retVal, x; } -vec2 noise2 (float x) { - return vec2 ( - noise1 (x), - noise1 (x + 19.34) - ); +float noise1(const vec4 x) +{ + __asm float_noise4 __retVal, x; } -vec2 noise2 (vec2 x) { - return vec2 ( - noise1 (x), - noise1 (x + vec2 (19.34, 7.66)) - ); +vec2 noise2(const float x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + 19.34); } -vec2 noise2 (vec3 x) { - return vec2 ( - noise1 (x), - noise1 (x + vec3 (19.34, 7.66, 3.23)) - ); +vec2 noise2(const vec2 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec2(19.34, 7.66)); } -vec2 noise2 (vec4 x) { - return vec2 ( - noise1 (x), - noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77)) - ); +vec2 noise2(const vec3 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec3(19.34, 7.66, 3.23)); } -vec3 noise3 (float x) { - return vec3 ( - noise1 (x), - noise1 (x + 19.34), - noise1 (x + 5.47) - ); +vec2 noise2(const vec4 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec4(19.34, 7.66, 3.23, 2.77)); } -vec3 noise3 (vec2 x) { - return vec3 ( - noise1 (x), - noise1 (x + vec2 (19.34, 7.66)), - noise1 (x + vec2 (5.47, 17.85)) - ); +vec3 noise3(const float x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + 19.34); + __retVal.z = noise1(x + 5.47); } -vec3 noise3 (vec3 x) { - return vec3 ( - noise1 (x), - noise1 (x + vec3 (19.34, 7.66, 3.23)), - noise1 (x + vec3 (5.47, 17.85, 11.04)) - ); +vec3 noise3(const vec2 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec2(19.34, 7.66)); + __retVal.z = noise1(x + vec2(5.47, 17.85)); } -vec3 noise3 (vec4 x) { - return vec3 ( - noise1 (x), - noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77)), - noise1 (x + vec4 (5.47, 17.85, 11.04, 13.19)) - ); +vec3 noise3(const vec3 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec3(19.34, 7.66, 3.23)); + __retVal.z = noise1(x + vec3(5.47, 17.85, 11.04)); } -vec4 noise4 (float x) { - return vec4 ( - noise1 (x), - noise1 (x + 19.34), - noise1 (x + 5.47), - noise1 (x + 23.54) - ); +vec3 noise3(const vec4 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec4(19.34, 7.66, 3.23, 2.77)); + __retVal.z = noise1(x + vec4(5.47, 17.85, 11.04, 13.19)); } -vec4 noise4 (vec2 x) { - return vec4 ( - noise1 (x), - noise1 (x + vec2 (19.34, 7.66)), - noise1 (x + vec2 (5.47, 17.85)), - noise1 (x + vec2 (23.54, 29.11)) - ); +vec4 noise4(const float x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + 19.34); + __retVal.z = noise1(x + 5.47); + __retVal.w = noise1(x + 23.54); } -vec4 noise4 (vec3 x) { - return vec4 ( - noise1 (x), - noise1 (x + vec3 (19.34, 7.66, 3.23)), - noise1 (x + vec3 (5.47, 17.85, 11.04)), - noise1 (x + vec3 (23.54, 29.11, 31.91)) - ); +vec4 noise4(const vec2 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec2 (19.34, 7.66)); + __retVal.z = noise1(x + vec2 (5.47, 17.85)); + __retVal.w = noise1(x + vec2 (23.54, 29.11)); } -vec4 noise4 (vec4 x) { - return vec4 ( - noise1 (x), - noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77)), - noise1 (x + vec4 (5.47, 17.85, 11.04, 13.19)), - noise1 (x + vec4 (23.54, 29.11, 31.91, 37.48)) - ); +vec4 noise4(const vec3 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec3(19.34, 7.66, 3.23)); + __retVal.z = noise1(x + vec3(5.47, 17.85, 11.04)); + __retVal.w = noise1(x + vec3(23.54, 29.11, 31.91)); } +vec4 noise4(const vec4 x) +{ + __retVal.x = noise1(x); + __retVal.y = noise1(x + vec4(19.34, 7.66, 3.23, 2.77)); + __retVal.z = noise1(x + vec4(5.47, 17.85, 11.04, 13.19)); + __retVal.w = noise1(x + vec4(23.54, 29.11, 31.91, 37.48)); +} diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 655efdda16..e64f401115 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -717,54 +717,68 @@ 100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51, 0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0, 59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114, -100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0, -0,0,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0, -110,111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111, -105,115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11, -120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0, -0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102, -108,111,97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111, -105,115,101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0, -0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, -115,101,50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, -58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, -0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58, -110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17, -49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105, -115,101,50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0, -58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, -17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9, -120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101, -49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0, -46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110, -111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49, -57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99, -50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0, -1,0,0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111, -105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50, -51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17, -49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0, -0,12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51, -0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53, -0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0, -0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, -101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17, -50,51,0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118, -101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18, -120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115, -101,49,0,18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0, -0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115, -101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0, -0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110, -111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17, -51,49,0,57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58, -118,101,99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58, +100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,1,0,9,120,0,0,0,1,4,102,108,111, +97,116,95,110,111,105,115,101,49,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,9,0,110, +111,105,115,101,49,0,1,1,0,10,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,50,0,18,95, +95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,1,0,11,120,0,0,0,1, +4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0, +1,0,9,0,110,111,105,115,101,49,0,1,1,0,12,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101, +52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,1,0,9, +120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0, +51,52,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105,115,101,50,0,1,1,0,10,120,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0, +17,55,0,54,54,0,0,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105,115,101,50,0,1,1,0,11,120,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51, +52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105,115,101,50,0, +1,1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18, +120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58, 118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0, -0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0, -56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0, -18,120,0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0, -17,51,55,0,52,56,0,0,0,0,46,0,0,0,0,0,0,0 +0,46,0,0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1,0,9,120,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, +121,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0,0,1,0,11,0, +110,111,105,115,101,51,0,1,1,0,10,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110, +111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105, +115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50, +0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1, +0,11,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53, +0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,20,0,0,1,0,11,0,110,111,105, +115,101,51,0,1,1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115, +101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0, +55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17, +49,51,0,49,57,0,0,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0,9,120,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0, +46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120,0,17,50, +51,0,53,52,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0,10,120,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0, +0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115, +101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17, +50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0, +11,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, +99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0, +52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0, +17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1, +1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120, +0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118, +101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0, +46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58, +118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57, +0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120, +0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55, +0,52,56,0,0,0,0,46,0,0,20,0,0,0 diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6ae307d09a..9b932ca71b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -494,6 +494,11 @@ static slang_asm_info AsmInfo[] = { { "float_rcp", IR_RCP, 1, 1 }, { "float_sine", IR_SIN, 1, 1 }, { "float_cosine", IR_COS, 1, 1 }, + { "float_noise1", IR_NOISE1, 1, 1}, + { "float_noise2", IR_NOISE2, 1, 1}, + { "float_noise3", IR_NOISE3, 1, 1}, + { "float_noise4", IR_NOISE4, 1, 1}, + { NULL, IR_NOP, 0, 0 } }; @@ -1657,6 +1662,8 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) /** * Generate code for a selection expression: b ? x : y + * XXX in some cases we could implement a selection expression + * with an LRP instruction (use the boolean as the interpolant). */ static slang_ir_node * _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 092c53bda0..8e598bf660 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -89,6 +89,11 @@ static slang_ir_info IrInfo[] = { { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, + { IR_NOISE1, "IR_NOISE1", OPCODE_NOISE1, 1, 1 }, + { IR_NOISE2, "IR_NOISE2", OPCODE_NOISE2, 1, 1 }, + { IR_NOISE3, "IR_NOISE3", OPCODE_NOISE3, 1, 1 }, + { IR_NOISE4, "IR_NOISE4", OPCODE_NOISE4, 1, 1 }, + /* other */ { IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 }, { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 }, @@ -994,6 +999,10 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_COS: case IR_DDX: case IR_DDY: + case IR_NOISE1: + case IR_NOISE2: + case IR_NOISE3: + case IR_NOISE4: /* binary */ case IR_ADD: case IR_SUB: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 5617c56d4b..39b4ab65b5 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -84,6 +84,10 @@ typedef enum IR_DDY, /* derivative w.r.t. Y */ IR_SIN, /* sine */ IR_COS, /* cosine */ + IR_NOISE1, /* noise(x) */ + IR_NOISE2, /* noise(x, y) */ + IR_NOISE3, /* noise(x, y, z) */ + IR_NOISE4, /* noise(x, y, z, w) */ IR_NOT, /* logical not */ IR_VAR, /* variable reference */ IR_VAR_DECL,/* var declaration */ diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 74250b3592..ab1e586f35 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -32,6 +32,7 @@ #include "s_fragprog.h" #include "s_span.h" +#include "slang_library_noise.h" /* See comments below for info about this */ @@ -1133,6 +1134,50 @@ execute_program( GLcontext *ctx, } } break; + case OPCODE_NOISE1: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise1(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_NOISE2: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise2(a[0], a[1]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_NOISE3: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise3(a[0], a[1], a[2]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_NOISE4: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise4(a[0], a[1], a[2], a[3]); + store_vector4( inst, machine, result ); + } + break; case OPCODE_NOP: break; case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 5726a66c90..22b6089fc8 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -766,6 +766,10 @@ static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union i do_MIN, do_MOV, do_MUL, + do_NOP,/*NOISE1*/ + do_NOP,/*NOISE2*/ + do_NOP,/*NOISE3*/ + do_NOP,/*NOISE4*/ do_NOP,/*PK2H*/ do_NOP,/*PK2US*/ do_NOP,/*PK4B*/ -- cgit v1.2.3 From 716239877823e13a6111b5cff1bf2b446a37a537 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 30 Jan 2007 16:55:03 -0700 Subject: fix _mesa_get_uniform_location() so it uses the given program handle --- src/mesa/shader/shader_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 6bae17a905..e2fedf7fa6 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -741,8 +741,9 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, GLint _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) { - if (ctx->Shader.CurrentProgram) { - const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; + struct gl_shader_program *shProg + = _mesa_lookup_shader_program(ctx, program); + if (shProg) { GLuint loc; for (loc = 0; loc < shProg->Uniforms->NumParameters; loc++) { const struct gl_program_parameter *u -- cgit v1.2.3 From 9d5853813f90cf03581d5150b4f2d46fd847211b Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 31 Jan 2007 08:47:12 -0700 Subject: allow fragment-only and vertex-only programs --- src/mesa/shader/slang/slang_link2.c | 111 ++++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c index 9676aa5fa1..017cf6078c 100644 --- a/src/mesa/shader/slang/slang_link2.c +++ b/src/mesa/shader/slang/slang_link2.c @@ -510,8 +510,8 @@ _slang_link2(GLcontext *ctx, GLhandleARB programObj, struct gl_shader_program *shProg) { - struct gl_vertex_program *vertProg; - struct gl_fragment_program *fragProg; + const struct gl_vertex_program *vertProg; + const struct gl_fragment_program *fragProg; GLuint i; _mesa_free_shader_program_data(ctx, shProg); @@ -532,6 +532,7 @@ _slang_link2(GLcontext *ctx, else _mesa_problem(ctx, "unexpected shader target in slang_link2()"); } +#if 00 if (!vertProg || !fragProg) { /* XXX is it legal to have one but not the other?? */ /* XXX record error */ @@ -539,68 +540,108 @@ _slang_link2(GLcontext *ctx, return; } + /* XXX is this test used? */ if (!vertProg->Base.Varying || !fragProg->Base.Varying) { /* temporary */ _mesa_problem(ctx, "vertex/fragment program lacks varying list!"); + abort(); shProg->LinkStatus = GL_FALSE; return; } +#endif /* * Make copies of the vertex/fragment programs now since we'll be * changing src/dst registers after merging the uniforms and varying vars. */ - shProg->VertexProgram - = vertex_program(_mesa_clone_program(ctx, &vertProg->Base)); - shProg->FragmentProgram - = fragment_program(_mesa_clone_program(ctx, &fragProg->Base)); + if (vertProg) { + shProg->VertexProgram + = vertex_program(_mesa_clone_program(ctx, &vertProg->Base)); + } + else { + shProg->VertexProgram = NULL; + } + + if (fragProg) { + shProg->FragmentProgram + = fragment_program(_mesa_clone_program(ctx, &fragProg->Base)); + } + else { + shProg->FragmentProgram = NULL; + } - link_varying_vars(shProg, &shProg->VertexProgram->Base); - link_varying_vars(shProg, &shProg->FragmentProgram->Base); + if (shProg->VertexProgram) + link_varying_vars(shProg, &shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + link_varying_vars(shProg, &shProg->FragmentProgram->Base); - link_uniform_vars(shProg, &shProg->VertexProgram->Base); - link_uniform_vars(shProg, &shProg->FragmentProgram->Base); + if (shProg->VertexProgram) + link_uniform_vars(shProg, &shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + link_uniform_vars(shProg, &shProg->FragmentProgram->Base); /* The vertex and fragment programs share a common set of uniforms now */ - _mesa_free_parameter_list(shProg->VertexProgram->Base.Parameters); - _mesa_free_parameter_list(shProg->FragmentProgram->Base.Parameters); - shProg->VertexProgram->Base.Parameters = shProg->Uniforms; - shProg->FragmentProgram->Base.Parameters = shProg->Uniforms; - - _slang_resolve_branches(&shProg->VertexProgram->Base); - _slang_resolve_branches(&shProg->FragmentProgram->Base); + if (shProg->VertexProgram) { + _mesa_free_parameter_list(shProg->VertexProgram->Base.Parameters); + shProg->VertexProgram->Base.Parameters = shProg->Uniforms; + } + if (shProg->FragmentProgram) { + _mesa_free_parameter_list(shProg->FragmentProgram->Base.Parameters); + shProg->FragmentProgram->Base.Parameters = shProg->Uniforms; + } - _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); - _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); + if (shProg->VertexProgram) { + _slang_resolve_branches(&shProg->VertexProgram->Base); + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); + } + if (shProg->FragmentProgram) { + _slang_resolve_branches(&shProg->FragmentProgram->Base); + _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); + } - if (!_slang_resolve_attributes(shProg, &shProg->VertexProgram->Base)) { - /*goto cleanup;*/ + if (shProg->VertexProgram) { + if (!_slang_resolve_attributes(shProg, &shProg->VertexProgram->Base)) { + /*goto cleanup;*/ + _mesa_problem(ctx, "_slang_resolve_attributes() failed"); + abort(); /* XXX fix */ + } } - _slang_update_inputs_outputs(&shProg->VertexProgram->Base); - _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); + if (shProg->VertexProgram) + _slang_update_inputs_outputs(&shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); + if (fragProg && shProg->FragmentProgram) { #if 1 - printf("************** original fragment program\n"); - _mesa_print_program(&fragProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); + printf("************** original fragment program\n"); + _mesa_print_program(&fragProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); #endif #if 1 - printf("************** linked fragment prog\n"); - _mesa_print_program(&shProg->FragmentProgram->Base); - _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); + printf("************** linked fragment prog\n"); + _mesa_print_program(&shProg->FragmentProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); #endif + } + + if (vertProg && shProg->VertexProgram) { #if 1 - printf("************** original vertex program\n"); - _mesa_print_program(&vertProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); + printf("************** original vertex program\n"); + _mesa_print_program(&vertProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); #endif #if 1 - printf("************** linked vertex prog\n"); - _mesa_print_program(&shProg->VertexProgram->Base); - _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); + printf("************** linked vertex prog\n"); + _mesa_print_program(&shProg->VertexProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); #endif + } +#if 0 shProg->LinkStatus = (shProg->VertexProgram && shProg->FragmentProgram); +#else + shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); +#endif } -- cgit v1.2.3 From 309d5b665051179b7e135d7329da1ea45bfeb8e5 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 31 Jan 2007 08:55:10 -0700 Subject: New asm instruction and IR_CLAMP node type to allow clamping to [0,1] with instruction saturate-write option. Not finished yet. --- .../shader/slang/library/slang_common_builtin.gc | 28 +- .../shader/slang/library/slang_common_builtin_gc.h | 505 ++++++++++----------- src/mesa/shader/slang/slang_codegen.c | 10 +- src/mesa/shader/slang/slang_emit.c | 96 +++- src/mesa/shader/slang/slang_ir.h | 1 + 5 files changed, 356 insertions(+), 284 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index e4a55846b8..5a25bbc30b 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -977,51 +977,37 @@ vec4 max(const vec4 a, const float b) float clamp(const float val, const float minVal, const float maxVal) { - float t; - __asm vec4_max t, val, minVal; - __asm vec4_min __retVal.x, t, maxVal; + __asm vec4_clamp __retVal, val, minVal, maxVal; } vec2 clamp(const vec2 val, const float minVal, const float maxVal) { - vec2 t; - __asm vec4_max t.xy, val.xy, minVal.xx; - __asm vec4_min __retVal.xy, t.xy, maxVal.xx; + __asm vec4_clamp __retVal, val, minVal, maxVal; } vec3 clamp(const vec3 val, const float minVal, const float maxVal) { - vec3 t; - __asm vec4_max t.xyz, val.xyz, minVal.xxx; - __asm vec4_min __retVal.xyz, t.xyz, maxVal.xxx; + __asm vec4_clamp __retVal, val, minVal, maxVal; } vec4 clamp(const vec4 val, const float minVal, const float maxVal) { - vec4 t; - __asm vec4_max t, val, minVal.xxxx; - __asm vec4_min __retVal, t, maxVal.xxxx; + __asm vec4_clamp __retVal, val, minVal, maxVal; } vec2 clamp(const vec2 val, const vec2 minVal, const vec2 maxVal) { - vec2 t; - __asm vec4_max t.xy, val.xy, minVal.xy; - __asm vec4_min __retVal.xy, t.xy, maxVal.xxxx; + __asm vec4_clamp __retVal, val, minVal, maxVal; } vec3 clamp(const vec3 val, const vec3 minVal, const vec3 maxVal) { - vec3 t; - __asm vec4_max t.xyz, val.xyz, minVal.xyz; - __asm vec4_min __retVal.xyz, t.xyz, maxVal.xxxx; + __asm vec4_clamp __retVal, val, minVal, maxVal; } vec4 clamp(const vec4 val, const vec4 minVal, const vec4 maxVal) { - vec4 t; - __asm vec4_max t, val, minVal; - __asm vec4_min __retVal, t, maxVal; + __asm vec4_clamp __retVal, val, minVal, maxVal; } diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index e64f401115..ed59b07c76 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -422,268 +422,259 @@ 0,0,1,0,12,0,109,97,120,0,1,1,0,12,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95, 95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,9,0,99,108,97,109, 112,0,1,1,0,9,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0, -1,3,2,0,9,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105,110, -86,97,108,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -116,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,1,0,10,118,97,108,0,0,1,1,0, -9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,10,1,116,0,0,0,4,118,101,99, -52,95,109,97,120,0,18,116,0,59,120,121,0,0,18,118,97,108,0,59,120,121,0,0,18,109,105,110,86,97,108, -0,59,120,120,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,116,0,59,120,121,0,0,18,109,97,120,86,97,108,0,59,120,120,0,0,0,0,1,0,11,0,99,108,97,109,112, -0,1,1,0,11,118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3, -2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,122,0,0,18,118,97,108,0,59, -120,121,122,0,0,18,109,105,110,86,97,108,0,59,120,120,120,0,0,0,4,118,101,99,52,95,109,105,110,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,116,0,59,120,121,122,0,0,18,109,97,120,86, -97,108,0,59,120,120,120,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,1,0,12,118,97,108,0,0,1,1,0,9,109, -105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,3,2,0,12,1,116,0,0,0,4,118,101,99,52,95, -109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,59,120,120,120,120,0,0,0,4, -118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,18,109,97,120,86,97, -108,0,59,120,120,120,120,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,1,0,10,118,97,108,0,0,1,1,0,10,109, -105,110,86,97,108,0,0,1,1,0,10,109,97,120,86,97,108,0,0,0,1,3,2,0,10,1,116,0,0,0,4,118,101,99,52, -95,109,97,120,0,18,116,0,59,120,121,0,0,18,118,97,108,0,59,120,121,0,0,18,109,105,110,86,97,108,0, -59,120,121,0,0,0,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, -18,116,0,59,120,121,0,0,18,109,97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,11,0,99,108,97, -109,112,0,1,1,0,11,118,97,108,0,0,1,1,0,11,109,105,110,86,97,108,0,0,1,1,0,11,109,97,120,86,97,108, -0,0,0,1,3,2,0,11,1,116,0,0,0,4,118,101,99,52,95,109,97,120,0,18,116,0,59,120,121,122,0,0,18,118,97, -108,0,59,120,121,122,0,0,18,109,105,110,86,97,108,0,59,120,121,122,0,0,0,4,118,101,99,52,95,109, -105,110,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,116,0,59,120,121,122,0,0,18,109, -97,120,86,97,108,0,59,120,120,120,120,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,1,0,12,118,97,108,0,0, -1,1,0,12,109,105,110,86,97,108,0,0,1,1,0,12,109,97,120,86,97,108,0,0,0,1,3,2,0,12,1,116,0,0,0,4, -118,101,99,52,95,109,97,120,0,18,116,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,0,4,118, -101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,18,109,97,120,86,97,108,0, -0,0,0,1,0,9,0,109,105,120,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, +1,4,118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18, +109,105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,1,0,10, +118,97,108,0,0,1,1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,4,118,101,99, +52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86, +97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,11,0,99,108,97,109,112,0,1,1,0,11,118,97,108,0,0,1, +1,0,9,109,105,110,86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99,108,97, +109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,18,109, +97,120,86,97,108,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,1,0,12,118,97,108,0,0,1,1,0,9,109,105,110, +86,97,108,0,0,1,1,0,9,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99,108,97,109,112,0,18,95,95, +114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,18,109,97,120,86,97,108,0, +0,0,0,1,0,10,0,99,108,97,109,112,0,1,1,0,10,118,97,108,0,0,1,1,0,10,109,105,110,86,97,108,0,0,1,1, +0,10,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86, +97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,11,0, +99,108,97,109,112,0,1,1,0,11,118,97,108,0,0,1,1,0,11,109,105,110,86,97,108,0,0,1,1,0,11,109,97,120, +86,97,108,0,0,0,1,4,118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118, +97,108,0,0,18,109,105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,12,0,99,108,97,109,112, +0,1,1,0,12,118,97,108,0,0,1,1,0,12,109,105,110,86,97,108,0,0,1,1,0,12,109,97,120,86,97,108,0,0,0,1, +4,118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109, +105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,0,9,0,109,105,120,0,1,1,0,9,120,0,0,1,1,0, +9,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0, +18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,10,0,109,105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121, +0,0,18,120,0,0,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0, +0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, 108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,10,0,109, -105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18, -95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,11,0,109,105,120,0,1,1,0, -11,120,0,0,1,1,0,11,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101, -116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1, -0,12,121,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0, -0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,10,0,109,105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1, -0,10,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18, -121,0,0,18,120,0,0,0,0,1,0,11,0,109,105,120,0,1,1,0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,11,97,0,0,0, -1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120, -0,0,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0,1,1,0,12,121,0,0,1,1,0,12,97,0,0,0,1,4,118,101,99, -52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,9,0, -115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,9,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116, -101,112,0,1,1,0,10,101,100,103,101,0,0,1,1,0,10,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,11,0,115,116, -101,112,0,1,1,0,11,101,100,103,101,0,0,1,1,0,11,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,12,0,115, -116,101,112,0,1,1,0,12,101,100,103,101,0,0,1,1,0,12,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112, -0,1,1,0,9,101,100,103,101,0,0,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,0,0,0,0,1,0,11,0,115, -116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,0, -0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52, -95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120, -120,0,0,0,0,1,0,9,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0, -9,101,100,103,101,49,0,0,1,1,0,9,120,0,0,0,1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18, -101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0, -17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0, -1,0,10,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,10,101,100,103,101,48,0,0,1,1,0,10,101, -100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101, -100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49, -0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11, -0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,11,101,100,103,101,48,0,0,1,1,0,11,101,100,103, -101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103, -101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0, -0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115, -109,111,111,116,104,115,116,101,112,0,1,1,0,12,101,100,103,101,48,0,0,1,1,0,12,101,100,103,101,49, -0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48, -0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0, -0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111, -111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0, -10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18, -101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18, -116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116, -104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,11,118,0, -0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103, -101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116, -0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116, -101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0, -12,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18, -101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51, -0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,9,120,0,0,0, -1,8,58,97,98,115,0,18,120,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,10,118,0,0,0,1,3,2,0,9, -1,114,0,0,0,3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95, -114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,11,118,0,0,0,1,3,2,0,9, -1,114,0,0,0,3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95, -114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,114,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,12,118,0,0,0,1,3,2,0,9, -1,114,0,0,0,3,2,1,9,1,112,0,2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95, -114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,114,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9, -121,0,0,0,1,3,2,1,9,1,100,0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0, -0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0, -2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116, -97,110,99,101,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0, -8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12, -118,0,0,1,1,0,12,117,0,0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116, -104,0,18,100,0,0,0,0,0,1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, -101,99,51,95,99,114,111,115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, -18,117,0,0,0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1, -1,0,9,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0, -0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18, -100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102, -111,114,119,97,114,100,0,1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1, -100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52, -95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0, -18,78,0,0,18,115,0,0,0,0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1, -0,11,73,0,0,1,1,0,11,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0, -0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0, -48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97, -99,101,102,111,114,119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0, -1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4, -118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120, -0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1, -0,9,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0, -0,1,0,10,0,114,101,102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0, -0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116, -0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0, -0,0,48,18,78,0,48,47,0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1, -8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114, -101,102,114,97,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2, -17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73, -0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17, -48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73, -0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116, -0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18, -101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111, -116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9, -14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115, -113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0, -0,1,1,0,11,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18, -101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0, -18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116, -97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18, -107,0,0,0,46,18,78,0,48,47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0, -0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48, -17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47, -48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48, -18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18, -78,0,48,47,0,0,1,0,13,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1, -0,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77, -117,108,116,0,1,0,0,14,109,0,0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57, -18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, -1,0,0,15,109,0,0,1,0,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84, -104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110, -0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1, -0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, -0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117, -0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0, -0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118, -101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, -0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52, -95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115, -115,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115, -103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108, -101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, -52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0, -1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4, -118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2, -0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101, -99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, -0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118, -101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, -0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0, -1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1, -0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, -101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0, -103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, -115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0, -103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95, -115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4, -0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52, -95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101, -97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, -99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118, -0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12, -118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1, -0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113, -117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84, -104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101, -0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0, -10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11, -117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, +105,120,0,1,1,0,10,120,0,0,1,1,0,10,121,0,0,1,1,0,10,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,11,0,109,105,120,0,1,1, +0,11,120,0,0,1,1,0,11,121,0,0,1,1,0,11,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,12,0,109,105,120,0,1,1,0,12,120,0,0, +1,1,0,12,121,0,0,1,1,0,12,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97, +108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,0,9,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0, +1,1,0,9,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0, +18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,10,101,100,103,101,0,0,1,1, +0,10,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0,11,101,100,103,101,0,0,1,1, +0,11,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, +0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,12,101,100,103,101,0,0, +1,1,0,12,120,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0, +0,18,101,100,103,101,0,0,0,0,1,0,10,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1,0,10,118,0, +0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0, +18,101,100,103,101,0,59,120,120,0,0,0,0,1,0,11,0,115,116,101,112,0,1,1,0,9,101,100,103,101,0,0,1,1, +0,11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, +0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,0,0,0,0,1,0,12,0,115,116,101,112,0,1,1,0,9,101, +100,103,101,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,118,0,0,18,101,100,103,101,0,59,120,120,120,120,0,0,0,0,1,0,9,0,115,109,111,111,116,104, +115,116,101,112,0,1,1,0,9,101,100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,9,120,0,0,0, +1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48,0,47,18,101,100,103,101, +49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0, +48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,104,115,116, +101,112,0,1,1,0,10,101,100,103,101,48,0,0,1,1,0,10,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2, +0,10,1,116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0, +18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17, +51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112, +0,1,1,0,11,101,100,103,101,48,0,0,1,1,0,11,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1, +116,0,2,58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101, +100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48, +0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0, +12,101,100,103,101,48,0,0,1,1,0,12,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2, +58,99,108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103, +101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17, +50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101, +100,103,101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,116,0,2,58,99, +108,97,109,112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48, +0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48, +0,0,18,116,0,48,47,48,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103, +101,48,0,0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,11,118,0,0,0,1,3,2,0,11,1,116,0,2,58,99,108,97,109, +112,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0, +17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18, +116,0,48,47,48,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,9,101,100,103,101,48,0, +0,1,1,0,9,101,100,103,101,49,0,0,1,1,0,12,118,0,0,0,1,3,2,0,12,1,116,0,2,58,99,108,97,109,112,0,18, +118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0, +48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48, +47,48,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,9,120,0,0,0,1,8,58,97,98,115,0,18,120,0,0,0,0,0, +1,0,9,0,108,101,110,103,116,104,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0,2,58, +100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112, +0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0, +0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,11,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0,2, +58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18, +112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, +0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,1,0,12,118,0,0,0,1,3,2,0,9,1,114,0,0,0,3,2,1,9,1,112,0, +2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18, +112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, +0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,3,2,1,9,1,100, +0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115, +116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0,2,18,118,0,18,117,0,47, +0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0, +11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103, +116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12,118,0,0,1,1,0,12,117,0, +0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0, +1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,51,95,99,114,111, +115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,9,0, +102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1,1,0,9,78,114,101,102,0, +0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0, +4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105, +120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114,100,0, +1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0, +18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115, +0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0, +0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1,0,11,73,0,0,1,1,0,11, +78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3, +2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0, +0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97,99,101,102,111,114, +119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2, +58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115, +103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78, +0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,0,1,8,18, +73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101, +102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0, +18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,1,0,11,73,0,0,1, +1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47, +0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48, +0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116, +0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101, +116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0, +18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8, +18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113, +114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,1,0,10,73,0,0,1, +1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101, +116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73, +0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0, +18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0, +0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,1,1, +0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0, +48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0, +0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101, +116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48, +47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,1,1,0,9,101,116,97,0,0, +0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111, +116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17, +48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111, +116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109, +97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109, +97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0, +0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0, +0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15, +110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16, +10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,10,118, +0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0, +11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117, +0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, +0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, +115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0, +108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, +115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, +95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69, +113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97, +110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115, +84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, +101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, +97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84, +104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, +115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95, +115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97, +116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, +116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101, +97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101, +114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101, +114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116, +101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104, +97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, +116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, +52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0, +1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117, +0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0, +0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6, +117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0, +7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113, +117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0, +0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115, +101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108, +0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0, +7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118, 101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0, -101,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1, -0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8, -117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117, -0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -3,0,110,111,116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0, -110,111,116,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117, -97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0, -7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0, -1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0, -18,117,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99, -52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101, +110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,110, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111, +116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69, +113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95, +114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0, +6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1, +0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0, +0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, +100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115, +110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0, +0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, +100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97, +100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101, 99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17, -48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101, +48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101, 99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118, 101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122, -0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109, -0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,115,117,109,0, -0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59, -121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0, -18,118,0,59,122,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0, -59,120,0,0,18,118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,10,118,0,0, -0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112, -114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101, -0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,8, -18,118,0,59,120,0,18,118,0,59,121,0,34,0,0,1,0,1,0,97,108,108,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,112, -114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120, -0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17, -48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0, -18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59, -120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,119, -0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111, -100,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,2,0,110,111,116,0,1,1,0,2,118,0,0,0,1,4,118,101,99,52,95, -115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, -3,0,110,111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0,110,111,116,0,1,1,0,4,118,0,0,0,1, -4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0, -0,1,0,12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99, -111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0, -18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114, -101,49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0, -0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114, -100,0,59,120,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,121,0,20,0,4, -118,101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108, -101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111, -106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52, -95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, +0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18, +118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1, +112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59, +120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,8,18,118,0,59, +120,0,18,118,0,59,121,0,34,0,0,1,0,1,0,97,108,108,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,112,114,111,100, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118, +0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114, +111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115, +110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0, +0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0, +59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0, +18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,119,0,0,0,4, +118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59, +120,0,0,17,48,0,48,0,0,0,0,0,1,0,2,0,110,111,116,0,1,1,0,2,118,0,0,0,1,4,118,101,99,52,95,115,101, +113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,3,0,110, +111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0,110,111,116,0,1,1,0,4,118,0,0,0,1,4,118, +101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, +12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99,111, +111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18, +115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101, +49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1, +3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100, +0,59,120,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,121,0,20,0,4,118, +101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, +114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106, +0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, +116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, +99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, 108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,50,100,0,18,95, 95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0, 12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1, diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 9b932ca71b..cc2a0b2738 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -458,6 +458,7 @@ static slang_asm_info AsmInfo[] = { { "vec4_lrp", IR_LRP, 1, 3 }, { "vec4_min", IR_MIN, 1, 2 }, { "vec4_max", IR_MAX, 1, 2 }, + { "vec4_clamp", IR_CLAMP, 1, 3 }, { "vec4_seq", IR_SEQ, 1, 2 }, { "vec4_sge", IR_SGE, 1, 2 }, { "vec4_sgt", IR_SGT, 1, 2 }, @@ -1394,7 +1395,8 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) tree = new_seq(tree, bra); body = _slang_gen_operation(A, &oper->children[1]); - tree = new_seq(tree, body); + if (body) + tree = new_seq(tree, body); jump = new_jump(startAtom); tree = new_seq(tree, jump); @@ -2167,7 +2169,10 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_block_no_new_scope: /* list of operations */ + /* assert(oper->num_children > 0); + */ + if (oper->num_children > 0) { slang_ir_node *n, *tree = NULL; GLuint i; @@ -2434,6 +2439,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_none: return NULL; + case slang_oper_void: + return NULL; + default: printf("Unhandled node type %d\n", oper->type); abort(); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 8e598bf660..1c945fa0ba 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -68,6 +68,7 @@ static slang_ir_info IrInfo[] = { { IR_LRP, "IR_LRP", OPCODE_LRP, 4, 3 }, { IR_MIN, "IR_MIN", OPCODE_MIN, 4, 2 }, { IR_MAX, "IR_MAX", OPCODE_MAX, 4, 2 }, + { IR_CLAMP, "IR_CLAMP", OPCODE_NOP, 4, 3 }, /* special case: emit_clamp() */ { IR_SEQUAL, "IR_SEQUAL", OPCODE_SEQ, 4, 2 }, { IR_SNEQUAL, "IR_SNEQUAL", OPCODE_SNE, 4, 2 }, { IR_SGE, "IR_SGE", OPCODE_SGE, 4, 2 }, @@ -84,7 +85,7 @@ static slang_ir_info IrInfo[] = { { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, - { IR_NEG, "IR_NEG", OPCODE_NOP/*spec case*/, 4, 1 }, + { IR_NEG, "IR_NEG", OPCODE_NOP, 4, 1 }, /* special case: emit_negation() */ { IR_DDX, "IR_DDX", OPCODE_DDX, 4, 1 }, { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, @@ -298,12 +299,14 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_VAR: printf("VAR %s%s at %s store %p\n", - (char *) n->Var->a_name, swizzle_string(n->Store->Swizzle), + (n->Var ? (char *) n->Var->a_name : "TEMP"), + swizzle_string(n->Store->Swizzle), storage_string(n->Store), (void*) n->Store); break; case IR_VAR_DECL: printf("VAR_DECL %s (%p) at %s store %p\n", - (char *) n->Var->a_name, (void*) n->Var, storage_string(n->Store), + (n->Var ? (char *) n->Var->a_name : "TEMP"), + (void*) n->Var, storage_string(n->Store), (void*) n->Store); break; case IR_FIELD: @@ -447,6 +450,19 @@ new_instruction(struct gl_program *prog, gl_inst_opcode opcode) } +/** + * Return pointer to last instruction in program. + */ +static struct prog_instruction * +prev_instruction(struct gl_program *prog) +{ + if (prog->NumInstructions == 0) + return NULL; + else + return prog->Instructions + prog->NumInstructions - 1; +} + + static struct prog_instruction * emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog); @@ -674,6 +690,73 @@ emit_arith(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +/** + * Generate code for an IR_CLAMP instruction. + */ +static struct prog_instruction * +emit_clamp(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *inst; + + assert(n->Opcode == IR_CLAMP); + /* ch[0] = value + * ch[1] = min limit + * ch[2] = max limit + */ + + inst = emit(vt, n->Children[0], prog); + + /* If lower limit == 0.0 and upper limit == 1.0, + * set prev instruction's SaturateMode field to SATURATE_ZERO_ONE. + * Else, + * emit OPCODE_MIN, OPCODE_MAX sequence. + */ +#if 0 + /* XXX this isn't quite finished yet */ + if (n->Children[1]->Opcode == IR_FLOAT && + n->Children[1]->Value[0] == 0.0 && + n->Children[1]->Value[1] == 0.0 && + n->Children[1]->Value[2] == 0.0 && + n->Children[1]->Value[3] == 0.0 && + n->Children[2]->Opcode == IR_FLOAT && + n->Children[2]->Value[0] == 1.0 && + n->Children[2]->Value[1] == 1.0 && + n->Children[2]->Value[2] == 1.0 && + n->Children[2]->Value[3] == 1.0) { + if (!inst) { + inst = prev_instruction(prog); + } + if (inst && inst->Opcode != OPCODE_NOP) { + /* and prev instruction's DstReg matches n->Children[0]->Store */ + inst->SaturateMode = SATURATE_ZERO_ONE; + n->Store = n->Children[0]->Store; + return inst; + } + } +#endif + + if (!n->Store) + if (!alloc_temp_storage(vt, n, n->Children[0]->Store->Size)) + return NULL; + + emit(vt, n->Children[1], prog); + emit(vt, n->Children[2], prog); + + /* tmp = max(ch[0], ch[1]) */ + inst = new_instruction(prog, OPCODE_MAX); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + + /* tmp = min(tmp, ch[2]) */ + inst = new_instruction(prog, OPCODE_MIN); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[2]->Store); + + return inst; +} + static struct prog_instruction * emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) @@ -800,6 +883,9 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* lhs */ emit(vt, n->Children[0], prog); + assert(!n->Store); + n->Store = n->Children[0]->Store; + #if PEEPHOLE_OPTIMIZATIONS if (inst && _slang_is_temp(vt, n->Children[1]->Store)) { /* Peephole optimization: @@ -850,8 +936,6 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) srcAnnot, NULL, NULL); } free_temp_storage(vt, n->Children[1]); - assert(!n->Store); - n->Store = n->Children[0]->Store; /*XXX new */ return inst; } } @@ -1022,6 +1106,8 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* trinary operators */ case IR_LRP: return emit_arith(vt, n, prog); + case IR_CLAMP: + return emit_clamp(vt, n, prog); case IR_TEX: case IR_TEXB: case IR_TEXP: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 39b4ab65b5..4b696c5c13 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -64,6 +64,7 @@ typedef enum IR_DOT3, IR_CROSS, /* vec3 cross product */ IR_LRP, + IR_CLAMP, IR_MIN, IR_MAX, IR_SEQUAL, /* Set if args are equal */ -- cgit v1.2.3 From b63c100677c76bb20a1871ea15298ca708acd04f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 31 Jan 2007 16:34:54 -0700 Subject: Overhaul handling of writemasks/swizzling. This fixes two problem cases: vec2 v; v.x = v.y = 1.0; // chained assignment vec4 v; v.zx = vec2(a,b); // swizzled writemask --- src/mesa/shader/prog_instruction.h | 1 + src/mesa/shader/prog_print.c | 2 +- src/mesa/shader/slang/slang_assemble_constructor.c | 17 +- src/mesa/shader/slang/slang_codegen.c | 198 +++++++++++++-------- src/mesa/shader/slang/slang_emit.c | 69 +++++-- src/mesa/shader/slang/slang_ir.h | 6 +- 6 files changed, 197 insertions(+), 96 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index 3e88b4e627..f018de82b3 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -49,6 +49,7 @@ #define SWIZZLE_W 3 #define SWIZZLE_ZERO 4 /**< For SWZ instruction only */ #define SWIZZLE_ONE 5 /**< For SWZ instruction only */ +#define SWIZZLE_NIL 7 /**< used during shader code gen (undefined value) */ /*@}*/ #define MAKE_SWIZZLE4(a,b,c,d) (((a)<<0) | ((b)<<3) | ((c)<<6) | ((d)<<9)) diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 78ce752f2a..63ff84e345 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -86,7 +86,7 @@ program_file_string(enum register_file f) static const char * swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended) { - static const char swz[] = "xyzw01"; + static const char swz[] = "xyzw01?!"; static char s[20]; GLuint i = 0; diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c index a411597130..e045f2f6d2 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.c +++ b/src/mesa/shader/slang/slang_assemble_constructor.c @@ -31,7 +31,7 @@ #include "imports.h" #include "slang_assemble.h" #include "slang_storage.h" - +#include "prog_instruction.h" /** @@ -46,9 +46,14 @@ _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) GLuint i; GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; - /* init to default */ + /* init to undefined. + * We rely on undefined/nil values to distinguish between + * regular swizzles and writemasks. + * For example, the swizzle ".xNNN" is the writemask ".x". + * That's different than the swizzle ".xxxx". + */ for (i = 0; i < 4; i++) - swz->swizzle[i] = i; + swz->swizzle[i] = SWIZZLE_NIL; /* the swizzle can be at most 4-component long */ swz->num_components = slang_string_length(field); @@ -113,12 +118,6 @@ _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) return GL_FALSE; - if (swz->num_components == 1) { - /* smear */ - swz->swizzle[3] = - swz->swizzle[2] = - swz->swizzle[1] = swz->swizzle[0]; - } return GL_TRUE; } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index cc2a0b2738..d09883c664 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -609,42 +609,6 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) } -static GLboolean -slang_is_writemask(const char *field, GLuint *mask) -{ - const GLuint n = 4; - GLuint i, bit, c = 0; - - for (i = 0; i < n && field[i]; i++) { - switch (field[i]) { - case 'x': - case 'r': - bit = WRITEMASK_X; - break; - case 'y': - case 'g': - bit = WRITEMASK_Y; - break; - case 'z': - case 'b': - bit = WRITEMASK_Z; - break; - case 'w': - case 'a': - bit = WRITEMASK_W; - break; - default: - return GL_FALSE; - } - if (c & bit) - return GL_FALSE; - c |= bit; - } - *mask = c; - return GL_TRUE; -} - - /** * Check if the given function is really just a wrapper for a * basic assembly instruction. @@ -1960,6 +1924,111 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) } +/** + * Some write-masked assignments are simple, but others are hard. + * Simple example: + * vec3 v; + * v.xy = vec2(a, b); + * Hard example: + * vec3 v; + * v.yz = vec2(a, b); + * this would have to be transformed/swizzled into: + * v.yz = vec2(a, b).*xy* (* = don't care) + * Instead, we'll effectively do this: + * v.y = vec2(a, b).xxxx; + * v.z = vec2(a, b).yyyy; + * + */ +static GLboolean +_slang_simple_writemask(GLuint writemask) +{ + switch (writemask) { + case WRITEMASK_X: + case WRITEMASK_Y: + case WRITEMASK_Z: + case WRITEMASK_W: + case WRITEMASK_XY: + case WRITEMASK_XYZ: + case WRITEMASK_XYZW: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Convert the given swizzle into a writemask. In some cases this + * is trivial, in other cases, we'll need to also swizzle the right + * hand side to put components in the right places. + * \param swizzle the incoming swizzle + * \param writemaskOut returns the writemask + * \param swizzleOut swizzle to apply to the right-hand-side + * \return GL_FALSE for simple writemasks, GL_TRUE for non-simple + */ +static GLboolean +swizzle_to_writemask(GLuint swizzle, + GLuint *writemaskOut, GLuint *swizzleOut) +{ + GLuint mask = 0x0, newSwizzle[4]; + GLint i, size; + + /* make new dst writemask, compute size */ + for (i = 0; i < 4; i++) { + const GLuint swz = GET_SWZ(swizzle, i); + if (swz == SWIZZLE_NIL) { + /* end */ + break; + } + assert(swz >= 0 && swz <= 3); + mask |= (1 << swz); + } + assert(mask <= 0xf); + size = i; /* number of components in mask/swizzle */ + + *writemaskOut = mask; + + /* make new src swizzle, by inversion */ + for (i = 0; i < 4; i++) { + newSwizzle[i] = i; /*identity*/ + } + for (i = 0; i < size; i++) { + const GLuint swz = GET_SWZ(swizzle, i); + newSwizzle[swz] = i; + } + *swizzleOut = MAKE_SWIZZLE4(newSwizzle[0], + newSwizzle[1], + newSwizzle[2], + newSwizzle[3]); + + if (_slang_simple_writemask(mask)) { + if (size >= 1) + assert(GET_SWZ(*swizzleOut, 0) == SWIZZLE_X); + if (size >= 2) + assert(GET_SWZ(*swizzleOut, 1) == SWIZZLE_Y); + if (size >= 3) + assert(GET_SWZ(*swizzleOut, 2) == SWIZZLE_Z); + if (size >= 4) + assert(GET_SWZ(*swizzleOut, 3) == SWIZZLE_W); + return GL_TRUE; + } + else + return GL_FALSE; +} + + +static slang_ir_node * +_slang_gen_swizzle(slang_ir_node *child, GLuint swizzle) +{ + slang_ir_node *n = new_node(IR_SWIZZLE, child, NULL); + if (n) { + n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -1); + n->Store->Swizzle = swizzle; + } + return n; +} + + /** * Generate IR tree for an assignment (=). */ @@ -1982,26 +2051,21 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) return n; } else { - slang_operation *lhs = &oper->children[0]; - slang_ir_node *n, *c0, *c1; - GLuint mask = WRITEMASK_XYZW; - if (lhs->type == slang_oper_field) { - /* XXXX this is a hack! */ - /* writemask */ - if (!slang_is_writemask((char *) lhs->a_id, &mask)) - mask = WRITEMASK_XYZW; - lhs = &lhs->children[0]; - } - c0 = _slang_gen_operation(A, lhs); - c1 = _slang_gen_operation(A, &oper->children[1]); - if (c0 && c1) { - n = new_node(IR_MOVE, c0, c1); - /*assert(c1->Opcode != IR_SEQ);*/ - if (c0->Writemask != WRITEMASK_XYZW) - /* XXX this is a hack! */ - n->Writemask = c0->Writemask; - else - n->Writemask = mask; + slang_ir_node *n, *lhs, *rhs; + lhs = _slang_gen_operation(A, &oper->children[0]); + rhs = _slang_gen_operation(A, &oper->children[1]); + if (lhs && rhs) { + /* convert lhs swizzle into writemask */ + GLuint writemask, newSwizzle; + if (!swizzle_to_writemask(lhs->Store->Swizzle, + &writemask, &newSwizzle)) { + /* Non-simple writemask, need to swizzle right hand side in + * order to put components into the right place. + */ + rhs = _slang_gen_swizzle(rhs, newSwizzle); + } + n = new_node(IR_MOVE, lhs, rhs); + n->Writemask = writemask; return n; } else { @@ -2011,20 +2075,6 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) } -static slang_ir_node * -_slang_gen_swizzle(slang_ir_node *child, GLuint swizzle) -{ - slang_ir_node *n = new_node(IR_SWIZZLE, child, NULL); - if (n) { - n->Store = _slang_new_ir_storage(child->Store->File, - child->Store->Index, - child->Store->Size); - n->Store->Swizzle = swizzle; - } - return n; -} - - /** * Generate IR tree for referencing a field in a struct (or basic vector type) */ @@ -2101,13 +2151,17 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) index = (GLint) oper->children[1].literal[0]; if (oper->children[1].type != slang_oper_literal_int || index >= max) { - RETURN_ERROR("Invalid array index", 0); + RETURN_ERROR("Invalid array index for vector type", 0); } n = _slang_gen_operation(A, &oper->children[0]); if (n) { /* use swizzle to access the element */ - n = _slang_gen_swizzle(n, SWIZZLE_X + index); + GLuint swizzle = MAKE_SWIZZLE4(SWIZZLE_X + index, + SWIZZLE_NIL, + SWIZZLE_NIL, + SWIZZLE_NIL); + n = _slang_gen_swizzle(n, swizzle); /*n->Store = _slang_clone_ir_storage_swz(n->Store, */ n->Writemask = WRITEMASK_X << index; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 1c945fa0ba..0626f7a643 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -424,7 +424,12 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st) if (st->Swizzle != SWIZZLE_NOOP) src->Swizzle = st->Swizzle; else - src->Swizzle = defaultSwizzle[st->Size - 1]; + src->Swizzle = defaultSwizzle[st->Size - 1]; /*XXX really need this?*/ + + assert(GET_SWZ(src->Swizzle, 0) != SWIZZLE_NIL); + assert(GET_SWZ(src->Swizzle, 1) != SWIZZLE_NIL); + assert(GET_SWZ(src->Swizzle, 2) != SWIZZLE_NIL); + assert(GET_SWZ(src->Swizzle, 3) != SWIZZLE_NIL); } @@ -975,6 +980,57 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +/** + * Remove any SWIZZLE_NIL terms from given swizzle mask (smear prev term). + * Ex: fix_swizzle("zyNN") -> "zyyy" + */ +static GLuint +fix_swizzle(GLuint swizzle) +{ + GLuint swz[4], i; + for (i = 0; i < 4; i++) { + swz[i] = GET_SWZ(swizzle, i); + if (swz[i] == SWIZZLE_NIL) { + swz[i] = swz[i - 1]; + } + } + return MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); +} + + +static struct prog_instruction * +emit_swizzle(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + GLuint swizzle; + + /* swizzled storage access */ + (void) emit(vt, n->Children[0], prog); + + /* "pull-up" the child's storage info, applying our swizzle info */ + n->Store->File = n->Children[0]->Store->File; + n->Store->Index = n->Children[0]->Store->Index; + n->Store->Size = n->Children[0]->Store->Size; + /*n->Var = n->Children[0]->Var; XXX for debug */ + assert(n->Store->Index >= 0); + + swizzle = fix_swizzle(n->Store->Swizzle); +#ifdef DEBUG + { + GLuint s = n->Children[0]->Store->Swizzle; + assert(GET_SWZ(s, 0) != SWIZZLE_NIL); + assert(GET_SWZ(s, 1) != SWIZZLE_NIL); + assert(GET_SWZ(s, 2) != SWIZZLE_NIL); + assert(GET_SWZ(s, 3) != SWIZZLE_NIL); + } +#endif + + /* apply this swizzle to child's swizzle to get composed swizzle */ + n->Store->Swizzle = swizzle_swizzle(n->Children[0]->Store->Swizzle, + swizzle); + return NULL; +} + + static struct prog_instruction * emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { @@ -1060,16 +1116,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return NULL; /* no instruction */ case IR_SWIZZLE: - /* swizzled storage access */ - (void) emit(vt, n->Children[0], prog); - /* "pull-up" the child's storage info, applying our swizzle info */ - n->Store->File = n->Children[0]->Store->File; - n->Store->Index = n->Children[0]->Store->Index; - n->Store->Size = n->Children[0]->Store->Size; - assert(n->Store->Index >= 0); - n->Store->Swizzle = swizzle_swizzle(n->Children[0]->Store->Swizzle, - n->Store->Swizzle); - return NULL; + return emit_swizzle(vt, n, prog); /* Simple arithmetic */ /* unary */ diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 4b696c5c13..5fd72be36a 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -121,17 +121,17 @@ typedef struct _slang_ir_storage slang_ir_storage; /** * Intermediate Representation (IR) tree node - * Basically a binary tree, but IR_LRP has three children. + * Basically a binary tree, but IR_LRP and IR_CLAMP have three children. */ typedef struct slang_ir_node_ { slang_ir_opcode Opcode; struct slang_ir_node_ *Children[3]; const char *Comment; - const char *Target; + const char *Target; /**< Branch target string */ GLuint Writemask; /**< If Opcode == IR_MOVE */ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ - slang_variable *Var; + slang_variable *Var; /**< If Opcode == IR_VAR or IR_VAR_DECL */ slang_ir_storage *Store; /**< location of result of this operation */ } slang_ir_node; -- cgit v1.2.3 From d9d33b6fc883ede7ef231965e0b27792c8e58299 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 31 Jan 2007 17:01:52 -0700 Subject: disable all x86 code, broken and will eventually be removed --- src/mesa/shader/slang/slang_assemble.c | 4 ++-- src/mesa/shader/slang/slang_assemble_assignment.c | 2 +- src/mesa/shader/slang/slang_compile.c | 5 ++--- src/mesa/shader/slang/slang_compile.h | 2 +- src/mesa/shader/slang/slang_execute.c | 6 +++--- src/mesa/shader/slang/slang_execute.h | 6 +++--- src/mesa/shader/slang/slang_execute_x86.c | 4 +++- src/mesa/shader/slang/slang_storage.c | 4 ++-- 8 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index a9d2baedb9..27249078b3 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -481,7 +481,7 @@ dereference_basic(slang_assemble_ctx * A, slang_storage_type type, case slang_stor_float: ty = slang_asm_float_deref; break; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ case slang_stor_vec4: ty = slang_asm_vec4_deref; break; @@ -829,7 +829,7 @@ equality_aggregate(slang_assemble_ctx * A, return GL_FALSE; } else { -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ if (arr->type == slang_stor_vec4) { if (!PLAB2(A->file, slang_asm_vec4_equal_int, size + *index, *index)) diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c index dbcc4bcf9d..bfce04ec88 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.c +++ b/src/mesa/shader/slang/slang_assemble_assignment.c @@ -79,7 +79,7 @@ assign_basic(slang_assemble_ctx * A, slang_storage_type type, GLuint * index, case slang_stor_float: ty = slang_asm_float_copy; break; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ case slang_stor_vec4: ty = slang_asm_vec4_copy; break; diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 43f8a30369..65329c9db1 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2137,8 +2137,7 @@ static const byte slang_vertex_builtin_gc[] = { #include "library/slang_vertex_builtin_gc.h" }; -#if defined(USE_X86_ASM) || defined(SLANG_X86) -foo +#if 0 /*defined(USE_X86_ASM) || defined(SLANG_X86)*/ static const byte slang_builtin_vec4_gc[] = { #include "library/slang_builtin_vec4_gc.h" }; @@ -2204,7 +2203,7 @@ compile_object(grammar * id, const char *source, slang_code_object * object, return GL_FALSE; } -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ /* compile x86 4-component vector overrides, link to target */ if (!compile_binary(slang_builtin_vec4_gc, &object->builtin[SLANG_BUILTIN_VEC4], diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index ba129df8e3..a8311e8546 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -70,7 +70,7 @@ _slang_code_unit_dtr (slang_code_unit *); #define SLANG_BUILTIN_COMMON 1 #define SLANG_BUILTIN_TARGET 2 -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ #define SLANG_BUILTIN_VEC4 3 #define SLANG_BUILTIN_TOTAL 4 #else diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c index 09401b8910..1561df1945 100644 --- a/src/mesa/shader/slang/slang_execute.c +++ b/src/mesa/shader/slang/slang_execute.c @@ -41,7 +41,7 @@ slang_machine_ctr(slang_machine * self) { slang_machine_init(self); self->infolog = NULL; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ self->x86.compiled_func = NULL; #endif } @@ -53,7 +53,7 @@ slang_machine_dtr(slang_machine * self) slang_info_log_destruct(self->infolog); slang_alloc_free(self->infolog); } -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ if (self->x86.compiled_func != NULL) _mesa_exec_free(self->x86.compiled_func); #endif @@ -357,7 +357,7 @@ _slang_execute2(const slang_assembly_file * file, slang_machine * mach) f = fopen(filename, "w"); #endif -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ if (mach->x86.compiled_func != NULL) { mach->x86.compiled_func(mach); return GL_TRUE; diff --git a/src/mesa/shader/slang/slang_execute.h b/src/mesa/shader/slang/slang_execute.h index 138f139308..1f8c3781a1 100644 --- a/src/mesa/shader/slang/slang_execute.h +++ b/src/mesa/shader/slang/slang_execute.h @@ -46,7 +46,7 @@ typedef union slang_machine_slot_ #define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE) -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ /** * Extra machine state for x86 execution. */ @@ -73,7 +73,7 @@ typedef struct slang_machine_ /** Machine memory */ slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE]; struct slang_info_log_ *infolog; /**< printMESA() support */ -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ slang_machine_x86 x86; #endif } slang_machine; @@ -92,7 +92,7 @@ extern GLboolean _slang_execute2(const slang_assembly_file *, slang_machine *); -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ extern GLboolean _slang_x86_codegen(slang_machine *, slang_assembly_file *, GLuint); #endif diff --git a/src/mesa/shader/slang/slang_execute_x86.c b/src/mesa/shader/slang/slang_execute_x86.c index 958086ff07..c48c9667c7 100644 --- a/src/mesa/shader/slang/slang_execute_x86.c +++ b/src/mesa/shader/slang/slang_execute_x86.c @@ -34,7 +34,7 @@ #include "slang_library_noise.h" #include "slang_library_texsample.h" -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ #include "x86/rtasm/x86sse.h" @@ -353,10 +353,12 @@ codegen_assem(codegen_ctx * G, slang_assembly * a, slang_info_log ** infolog) x87_fyl2x(&G->f); x87_fstp(&G->f, x86_deref(G->r_esp)); break; +#if 00 case slang_asm_float_floor: x86_call(&G->f, (GLubyte *) do_floorf); x87_fstp(&G->f, x86_deref(G->r_esp)); break; +#endif case slang_asm_float_ceil: x86_call(&G->f, (GLubyte *) do_ceilf); x87_fstp(&G->f, x86_deref(G->r_esp)); diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 71ac0692e1..dcfb3a0e5f 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -212,7 +212,7 @@ GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_sp case slang_spec_vec3: return aggregate_vector (agg, slang_stor_float, 3); case slang_spec_vec4: -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ return aggregate_vector (agg, slang_stor_vec4, 1); #else return aggregate_vector (agg, slang_stor_float, 4); @@ -222,7 +222,7 @@ GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_sp case slang_spec_mat3: return aggregate_matrix (agg, slang_stor_float, 3); case slang_spec_mat4: -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ return aggregate_vector (agg, slang_stor_vec4, 4); #else return aggregate_matrix (agg, slang_stor_float, 4); -- cgit v1.2.3 From f673b24017b8b5e850a1be5c04bd28cefa811329 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 08:18:03 -0700 Subject: additional assertions, bump up MAX_EXEC --- src/mesa/swrast/s_fragprog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index ab1e586f35..12afb5ea0e 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -207,6 +207,10 @@ fetch_vector4( GLcontext *ctx, COPY_4V(result, src); } else { + ASSERT(GET_SWZ(source->Swizzle, 0) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 1) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 2) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 3) <= 3); result[0] = src[GET_SWZ(source->Swizzle, 0)]; result[1] = src[GET_SWZ(source->Swizzle, 1)]; result[2] = src[GET_SWZ(source->Swizzle, 2)]; @@ -664,7 +668,7 @@ execute_program( GLcontext *ctx, struct fp_machine *machine, const SWspan *span, GLuint column ) { - const GLuint MAX_EXEC = 5000; + const GLuint MAX_EXEC = 10000; GLuint pc, total = 0; if (DEBUG_FRAG) { @@ -1659,6 +1663,7 @@ execute_program( GLcontext *ctx, total++; if (total > MAX_EXEC) { _mesa_problem(ctx, "Infinite loop detected in fragment program"); + return GL_TRUE; abort(); } } -- cgit v1.2.3 From 3866558c9840f9c4fed6ac0bd2994ccc67f40f7f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 08:24:02 -0700 Subject: move span-related types/tokens into s_span.h --- src/mesa/swrast/s_context.h | 203 +------------------------------------------- src/mesa/swrast/s_span.h | 201 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+), 200 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index c9f6ec6bb8..b15a22dbf0 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -45,205 +45,7 @@ #include "mtypes.h" #include "swrast.h" - - -/** - * \defgroup SpanFlags SPAN_XXX-flags - * Bitmasks to indicate which sw_span_arrays need to be computed - * (sw_span::interpMask) or have already been filled in (sw_span::arrayMask) - */ -/*@{*/ -#define SPAN_RGBA 0x001 -#define SPAN_SPEC 0x002 -#define SPAN_INDEX 0x004 -#define SPAN_Z 0x008 -#define SPAN_W 0x010 -#define SPAN_FOG 0x020 -#define SPAN_TEXTURE 0x040 -#define SPAN_INT_TEXTURE 0x080 -#define SPAN_LAMBDA 0x100 -#define SPAN_COVERAGE 0x200 -#define SPAN_FLAT 0x400 /**< flat shading? */ -#define SPAN_XY 0x800 -#define SPAN_MASK 0x1000 -#define SPAN_VARYING 0x2000 -/*@}*/ - -#if 0 -/* alternate arrangement for code below */ -struct arrays2 { - union { - GLubyte sz1[MAX_WIDTH][4]; /* primary color */ - GLushort sz2[MAX_WIDTH][4]; - GLfloat sz4[MAX_WIDTH][4]; - } rgba; - union { - GLubyte sz1[MAX_WIDTH][4]; /* specular color and temp storage */ - GLushort sz2[MAX_WIDTH][4]; - GLfloat sz4[MAX_WIDTH][4]; - } spec; -}; -#endif - - - -/** - * \sw_span_arrays - * \brief Arrays of fragment values. - * - * These will either be computed from the span x/xStep values or - * filled in by glDraw/CopyPixels, etc. - * These arrays are separated out of sw_span to conserve memory. - */ -typedef struct sw_span_arrays { - GLenum ChanType; /**< Color channel type, GL_UNSIGNED_BYTE, GL_FLOAT */ - union { - struct { - GLubyte rgba[MAX_WIDTH][4]; /**< primary color */ - GLubyte spec[MAX_WIDTH][4]; /**< specular color and temp storage */ - } sz1; - struct { - GLushort rgba[MAX_WIDTH][4]; - GLushort spec[MAX_WIDTH][4]; - } sz2; - struct { - GLfloat rgba[MAX_WIDTH][4]; - GLfloat spec[MAX_WIDTH][4]; - } sz4; - } color; - /** XXX these are temporary fields, pointing into above color arrays */ - GLchan (*rgba)[4]; - GLchan (*spec)[4]; - -#if 0 - /* XXX rearrange and unify these arrays to so that we can - * index all fragment inputs with the FRAG_ATTRIB_* values: - */ - GLfloat attribs[FRAG_ATTRIB_MAX][MAX_WIDTH][4]; - /*OR*/ - typedef GLfloat (*array4f)[4]; - array4f attribs[FRAG_ATTRIB_MAX]; -#endif - - GLint x[MAX_WIDTH]; /**< fragment X coords */ - GLint y[MAX_WIDTH]; /**< fragment Y coords */ - GLuint z[MAX_WIDTH]; /**< fragment Z coords */ - GLuint index[MAX_WIDTH]; /**< Color indexes */ - GLfloat fog[MAX_WIDTH]; - GLfloat texcoords[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH][4]; - GLfloat lambda[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH]; - GLfloat coverage[MAX_WIDTH]; /**< Fragment coverage for AA/smoothing */ - GLfloat varying[MAX_VARYING][MAX_WIDTH][4]; /**< For shaders */ - - /** This mask indicates which fragments are alive or culled */ - GLubyte mask[MAX_WIDTH]; -} SWspanarrays; - - -/** - * The SWspan structure describes the colors, Z, fogcoord, texcoords, - * etc for either a horizontal run or an array of independent pixels. - * We can either specify a base/step to indicate interpolated values, or - * fill in explicit arrays of values. The interpMask and arrayMask bitfields - * indicate which attributes are active interpolants or arrays, respectively. - * - * It would be interesting to experiment with multiprocessor rasterization - * with this structure. The triangle rasterizer could simply emit a - * stream of these structures which would be consumed by one or more - * span-processing threads which could run in parallel. - */ -typedef struct sw_span { - GLint x, y; - - /** Only need to process pixels between start <= i < end */ - /** At this time, start is always zero. */ - GLuint start, end; - - /** This flag indicates that mask[] array is effectively filled with ones */ - GLboolean writeAll; - - /** either GL_POLYGON, GL_LINE, GL_POLYGON, GL_BITMAP */ - GLenum primitive; - - /** 0 = front-facing span, 1 = back-facing span (for two-sided stencil) */ - GLuint facing; - - /** - * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates - * which of the x/xStep variables are relevant. - */ - GLbitfield interpMask; - - /* For horizontal spans, step is the partial derivative wrt X. - * For lines, step is the delta from one fragment to the next. - */ -#if CHAN_TYPE == GL_FLOAT - GLfloat red, redStep; - GLfloat green, greenStep; - GLfloat blue, blueStep; - GLfloat alpha, alphaStep; - GLfloat specRed, specRedStep; - GLfloat specGreen, specGreenStep; - GLfloat specBlue, specBlueStep; -#else /* CHAN_TYPE == GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT */ - GLfixed red, redStep; - GLfixed green, greenStep; - GLfixed blue, blueStep; - GLfixed alpha, alphaStep; - GLfixed specRed, specRedStep; - GLfixed specGreen, specGreenStep; - GLfixed specBlue, specBlueStep; -#endif - GLfixed index, indexStep; - GLfixed z, zStep; /* XXX z should probably be GLuint */ - GLfloat fog, fogStep; - GLfloat tex[MAX_TEXTURE_COORD_UNITS][4]; /* s, t, r, q */ - GLfloat texStepX[MAX_TEXTURE_COORD_UNITS][4]; - GLfloat texStepY[MAX_TEXTURE_COORD_UNITS][4]; - GLfixed intTex[2], intTexStep[2]; /* s, t only */ - GLfloat var[MAX_VARYING][4]; - GLfloat varStepX[MAX_VARYING][4]; - GLfloat varStepY[MAX_VARYING][4]; - - /* partial derivatives wrt X and Y. */ - GLfloat dzdx, dzdy; - GLfloat w, dwdx, dwdy; - GLfloat drdx, drdy; - GLfloat dgdx, dgdy; - GLfloat dbdx, dbdy; - GLfloat dadx, dady; - GLfloat dsrdx, dsrdy; - GLfloat dsgdx, dsgdy; - GLfloat dsbdx, dsbdy; - GLfloat dfogdx, dfogdy; - - /** - * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates - * which of the fragment arrays in the span_arrays struct are relevant. - */ - GLbitfield arrayMask; - - /** - * We store the arrays of fragment values in a separate struct so - * that we can allocate sw_span structs on the stack without using - * a lot of memory. The span_arrays struct is about 1.4MB while the - * sw_span struct is only about 512 bytes. - */ - SWspanarrays *array; -} SWspan; - - - -#define INIT_SPAN(S, PRIMITIVE, END, INTERP_MASK, ARRAY_MASK) \ -do { \ - (S).primitive = (PRIMITIVE); \ - (S).interpMask = (INTERP_MASK); \ - (S).arrayMask = (ARRAY_MASK); \ - (S).start = 0; \ - (S).end = (END); \ - (S).facing = 0; \ - (S).array = SWRAST_CONTEXT(ctx)->SpanArrays; \ -} while (0) +#include "s_span.h" typedef void (*texture_sample_func)(GLcontext *ctx, @@ -270,7 +72,8 @@ typedef void (*validate_texture_image_func)(GLcontext *ctx, GLuint face, GLuint level); -/** \defgroup Bitmasks +/** + * \defgroup Bitmasks * Bitmasks to indicate which rasterization options are enabled * (RasterMask) */ diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index c441106aba..7c514afb0b 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -31,6 +31,207 @@ #include "swrast.h" +/** + * \defgroup SpanFlags SPAN_*-flags + * Bitflags used for interpMask and arrayMask fields below to indicate + * which interpolant values and fragment arrays are in use, respectively. + */ +/*@{*/ +#define SPAN_RGBA 0x001 +#define SPAN_SPEC 0x002 +#define SPAN_INDEX 0x004 +#define SPAN_Z 0x008 +#define SPAN_W 0x010 +#define SPAN_FOG 0x020 +#define SPAN_TEXTURE 0x040 +#define SPAN_INT_TEXTURE 0x080 +#define SPAN_LAMBDA 0x100 +#define SPAN_COVERAGE 0x200 +#define SPAN_FLAT 0x400 /**< flat shading? */ +#define SPAN_XY 0x800 +#define SPAN_MASK 0x1000 +#define SPAN_VARYING 0x2000 +/*@}*/ + + +#if 0 +/* alternate arrangement for code below */ +struct arrays2 { + union { + GLubyte sz1[MAX_WIDTH][4]; /* primary color */ + GLushort sz2[MAX_WIDTH][4]; + GLfloat sz4[MAX_WIDTH][4]; + } rgba; + union { + GLubyte sz1[MAX_WIDTH][4]; /* specular color and temp storage */ + GLushort sz2[MAX_WIDTH][4]; + GLfloat sz4[MAX_WIDTH][4]; + } spec; +}; +#endif + + + +/** + * \sw_span_arrays + * \brief Arrays of fragment values. + * + * These will either be computed from the span x/xStep values or + * filled in by glDraw/CopyPixels, etc. + * These arrays are separated out of sw_span to conserve memory. + */ +typedef struct sw_span_arrays { + GLenum ChanType; /**< Color channel type, GL_UNSIGNED_BYTE, GL_FLOAT */ + union { + struct { + GLubyte rgba[MAX_WIDTH][4]; /**< primary color */ + GLubyte spec[MAX_WIDTH][4]; /**< specular color and temp storage */ + } sz1; + struct { + GLushort rgba[MAX_WIDTH][4]; + GLushort spec[MAX_WIDTH][4]; + } sz2; + struct { + GLfloat rgba[MAX_WIDTH][4]; + GLfloat spec[MAX_WIDTH][4]; + } sz4; + } color; + /** XXX these are temporary fields, pointing into above color arrays */ + GLchan (*rgba)[4]; + GLchan (*spec)[4]; + +#if 0 + /* XXX rearrange and unify these arrays to so that we can + * index all fragment inputs with the FRAG_ATTRIB_* values: + */ + GLfloat attribs[FRAG_ATTRIB_MAX][MAX_WIDTH][4]; + /*OR*/ + typedef GLfloat (*array4f)[4]; + array4f attribs[FRAG_ATTRIB_MAX]; +#endif + + GLint x[MAX_WIDTH]; /**< fragment X coords */ + GLint y[MAX_WIDTH]; /**< fragment Y coords */ + GLuint z[MAX_WIDTH]; /**< fragment Z coords */ + GLuint index[MAX_WIDTH]; /**< Color indexes */ + GLfloat fog[MAX_WIDTH]; + GLfloat texcoords[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH][4]; + GLfloat lambda[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH]; + GLfloat coverage[MAX_WIDTH]; /**< Fragment coverage for AA/smoothing */ + GLfloat varying[MAX_VARYING][MAX_WIDTH][4]; /**< For shaders */ + + /** This mask indicates which fragments are alive or culled */ + GLubyte mask[MAX_WIDTH]; +} SWspanarrays; + + +/** + * The SWspan structure describes the colors, Z, fogcoord, texcoords, + * etc for either a horizontal run or an array of independent pixels. + * We can either specify a base/step to indicate interpolated values, or + * fill in explicit arrays of values. The interpMask and arrayMask bitfields + * indicate which attributes are active interpolants or arrays, respectively. + * + * It would be interesting to experiment with multiprocessor rasterization + * with this structure. The triangle rasterizer could simply emit a + * stream of these structures which would be consumed by one or more + * span-processing threads which could run in parallel. + */ +typedef struct sw_span { + GLint x, y; + + /** Only need to process pixels between start <= i < end */ + /** At this time, start is always zero. */ + GLuint start, end; + + /** This flag indicates that mask[] array is effectively filled with ones */ + GLboolean writeAll; + + /** either GL_POLYGON, GL_LINE, GL_POLYGON, GL_BITMAP */ + GLenum primitive; + + /** 0 = front-facing span, 1 = back-facing span (for two-sided stencil) */ + GLuint facing; + + /** + * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates + * which of the x/xStep variables are relevant. + */ + GLbitfield interpMask; + + /* For horizontal spans, step is the partial derivative wrt X. + * For lines, step is the delta from one fragment to the next. + */ +#if CHAN_TYPE == GL_FLOAT + GLfloat red, redStep; + GLfloat green, greenStep; + GLfloat blue, blueStep; + GLfloat alpha, alphaStep; + GLfloat specRed, specRedStep; + GLfloat specGreen, specGreenStep; + GLfloat specBlue, specBlueStep; +#else /* CHAN_TYPE == GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT */ + GLfixed red, redStep; + GLfixed green, greenStep; + GLfixed blue, blueStep; + GLfixed alpha, alphaStep; + GLfixed specRed, specRedStep; + GLfixed specGreen, specGreenStep; + GLfixed specBlue, specBlueStep; +#endif + GLfixed index, indexStep; + GLfixed z, zStep; /* XXX z should probably be GLuint */ + GLfloat fog, fogStep; + GLfloat tex[MAX_TEXTURE_COORD_UNITS][4]; /* s, t, r, q */ + GLfloat texStepX[MAX_TEXTURE_COORD_UNITS][4]; + GLfloat texStepY[MAX_TEXTURE_COORD_UNITS][4]; + GLfixed intTex[2], intTexStep[2]; /* s, t only */ + GLfloat var[MAX_VARYING][4]; + GLfloat varStepX[MAX_VARYING][4]; + GLfloat varStepY[MAX_VARYING][4]; + + /* partial derivatives wrt X and Y. */ + GLfloat dzdx, dzdy; + GLfloat w, dwdx, dwdy; + GLfloat drdx, drdy; + GLfloat dgdx, dgdy; + GLfloat dbdx, dbdy; + GLfloat dadx, dady; + GLfloat dsrdx, dsrdy; + GLfloat dsgdx, dsgdy; + GLfloat dsbdx, dsbdy; + GLfloat dfogdx, dfogdy; + + /** + * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates + * which of the fragment arrays in the span_arrays struct are relevant. + */ + GLbitfield arrayMask; + + /** + * We store the arrays of fragment values in a separate struct so + * that we can allocate sw_span structs on the stack without using + * a lot of memory. The span_arrays struct is about 1.4MB while the + * sw_span struct is only about 512 bytes. + */ + SWspanarrays *array; +} SWspan; + + + +#define INIT_SPAN(S, PRIMITIVE, END, INTERP_MASK, ARRAY_MASK) \ +do { \ + (S).primitive = (PRIMITIVE); \ + (S).interpMask = (INTERP_MASK); \ + (S).arrayMask = (ARRAY_MASK); \ + (S).start = 0; \ + (S).end = (END); \ + (S).facing = 0; \ + (S).array = SWRAST_CONTEXT(ctx)->SpanArrays; \ +} while (0) + + + extern void _swrast_span_default_z( GLcontext *ctx, SWspan *span ); -- cgit v1.2.3 From 8fa6f7363e79740bafba5fb97e4d28f531fbf6d6 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 09:24:41 -0700 Subject: silence uninitialized var warning --- src/mesa/shader/arbprogparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 991378f6d4..e240d88aaa 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1461,7 +1461,7 @@ parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst, break; case FRAGMENT_ATTRIB_TEXCOORD: { - GLuint texcoord; + GLuint texcoord = 0; err = parse_texcoord_num (ctx, inst, Program, &texcoord); *inputReg = FRAG_ATTRIB_TEX0 + texcoord; } @@ -1522,7 +1522,7 @@ parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst, case VERTEX_ATTRIB_TEXCOORD: { - GLuint unit; + GLuint unit = 0; err = parse_texcoord_num (ctx, inst, Program, &unit); *inputReg = VERT_ATTRIB_TEX0 + unit; } -- cgit v1.2.3 From 81ef03be65f1458d627528a13cb86feb992d758f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 09:25:55 -0700 Subject: silence uninitialized var warning --- src/mesa/shader/nvvertexec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 75dfd7383c..f8cdfbf17a 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -773,6 +773,7 @@ _mesa_exec_vertex_program(GLcontext *ctx, cross[0] = t[1] * u[2] - t[2] * u[1]; cross[1] = t[2] * u[0] - t[0] * u[2]; cross[2] = t[0] * u[1] - t[1] * u[0]; + cross[3] = 0.0; store_vector4( inst, machine, cross ); } break; -- cgit v1.2.3 From f3e507ef9f75dbfc58ccd07b5fe8cfca10d9a9e3 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 09:51:48 -0700 Subject: New SWspanarrays attribs[] array. Replace texcoord[], varying[], etc. arrays with single attribs[] array, indexed by FRAG_ATTRIB_* values. Eliminates need to copy data into fragment program machine input registers. Will lead to future clean-ups. --- src/mesa/swrast/s_aalinetemp.h | 14 +++---- src/mesa/swrast/s_aatritemp.h | 39 +++++++++--------- src/mesa/swrast/s_alpha.c | 2 +- src/mesa/swrast/s_atifragshader.c | 11 ++--- src/mesa/swrast/s_copypix.c | 2 +- src/mesa/swrast/s_drawpix.c | 2 +- src/mesa/swrast/s_fog.c | 18 ++++----- src/mesa/swrast/s_fragprog.c | 84 ++++++++------------------------------- src/mesa/swrast/s_logic.c | 2 +- src/mesa/swrast/s_masking.c | 2 +- src/mesa/swrast/s_pointtemp.h | 14 +++---- src/mesa/swrast/s_readpix.c | 2 +- src/mesa/swrast/s_span.c | 65 ++++++++++++++++++++++-------- src/mesa/swrast/s_span.h | 38 ++++++------------ src/mesa/swrast/s_texcombine.c | 6 ++- src/mesa/swrast/s_zoom.c | 10 ++--- 16 files changed, 140 insertions(+), 171 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index 68291afeea..b977ab8325 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -61,7 +61,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) line->span.array->z[i] = (GLuint) solve_plane(fx, fy, line->zPlane); #endif #ifdef DO_FOG - line->span.array->fog[i] = solve_plane(fx, fy, line->fPlane); + line->span.array->attribs[FRAG_ATTRIB_FOGC][i][0] = solve_plane(fx, fy, line->fPlane); #endif #ifdef DO_RGBA line->span.array->rgba[i][RCOMP] = solve_plane_chan(fx, fy, line->rPlane); @@ -86,9 +86,9 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) else { invQ = solve_plane_recip(fx, fy, line->vPlane[0]); } - line->span.array->texcoords[0][i][0] = solve_plane(fx, fy, line->sPlane[0]) * invQ; - line->span.array->texcoords[0][i][1] = solve_plane(fx, fy, line->tPlane[0]) * invQ; - line->span.array->texcoords[0][i][2] = solve_plane(fx, fy, line->uPlane[0]) * invQ; + line->span.array->attribs[FRAG_ATTRIB_TEX0][i][0] = solve_plane(fx, fy, line->sPlane[0]) * invQ; + line->span.array->attribs[FRAG_ATTRIB_TEX0][i][1] = solve_plane(fx, fy, line->tPlane[0]) * invQ; + line->span.array->attribs[FRAG_ATTRIB_TEX0][i][2] = solve_plane(fx, fy, line->uPlane[0]) * invQ; line->span.array->lambda[0][i] = compute_lambda(line->sPlane[0], line->tPlane[0], invQ, line->texWidth[0], @@ -106,9 +106,9 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) else { invQ = solve_plane_recip(fx, fy, line->vPlane[unit]); } - line->span.array->texcoords[unit][i][0] = solve_plane(fx, fy, line->sPlane[unit]) * invQ; - line->span.array->texcoords[unit][i][1] = solve_plane(fx, fy, line->tPlane[unit]) * invQ; - line->span.array->texcoords[unit][i][2] = solve_plane(fx, fy, line->uPlane[unit]) * invQ; + line->span.array->attribs[FRAG_ATTRIB_TEX0 + unit][i][0] = solve_plane(fx, fy, line->sPlane[unit]) * invQ; + line->span.array->attribs[FRAG_ATTRIB_TEX0 + unit][i][1] = solve_plane(fx, fy, line->tPlane[unit]) * invQ; + line->span.array->attribs[FRAG_ATTRIB_TEX0 + unit][i][2] = solve_plane(fx, fy, line->uPlane[unit]) * invQ; line->span.array->lambda[unit][i] = compute_lambda(line->sPlane[unit], line->tPlane[unit], invQ, line->texWidth[unit], line->texHeight[unit]); diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h index b5470a0298..3359a919e5 100644 --- a/src/mesa/swrast/s_aatritemp.h +++ b/src/mesa/swrast/s_aatritemp.h @@ -289,7 +289,7 @@ array->z[count] = (GLuint) solve_plane(cx, cy, zPlane); #endif #ifdef DO_FOG - array->fog[count] = solve_plane(cx, cy, fogPlane); + array->attribs[FRAG_ATTRIB_FOGC][count][0] = solve_plane(cx, cy, fogPlane); #endif #ifdef DO_RGBA array->rgba[count][RCOMP] = solve_plane_chan(cx, cy, rPlane); @@ -308,9 +308,9 @@ #ifdef DO_TEX { const GLfloat invQ = solve_plane_recip(cx, cy, vPlane); - array->texcoords[0][count][0] = solve_plane(cx, cy, sPlane) * invQ; - array->texcoords[0][count][1] = solve_plane(cx, cy, tPlane) * invQ; - array->texcoords[0][count][2] = solve_plane(cx, cy, uPlane) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + 0][count][0] = solve_plane(cx, cy, sPlane) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + 0][count][1] = solve_plane(cx, cy, tPlane) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + 0][count][2] = solve_plane(cx, cy, uPlane) * invQ; array->lambda[0][count] = compute_lambda(sPlane, tPlane, vPlane, cx, cy, invQ, texWidth, texHeight); @@ -321,9 +321,9 @@ for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { if (ctx->Texture.Unit[unit]._ReallyEnabled) { GLfloat invQ = solve_plane_recip(cx, cy, vPlane[unit]); - array->texcoords[unit][count][0] = solve_plane(cx, cy, sPlane[unit]) * invQ; - array->texcoords[unit][count][1] = solve_plane(cx, cy, tPlane[unit]) * invQ; - array->texcoords[unit][count][2] = solve_plane(cx, cy, uPlane[unit]) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + unit][count][0] = solve_plane(cx, cy, sPlane[unit]) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + unit][count][1] = solve_plane(cx, cy, tPlane[unit]) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + unit][count][2] = solve_plane(cx, cy, uPlane[unit]) * invQ; array->lambda[unit][count] = compute_lambda(sPlane[unit], tPlane[unit], vPlane[unit], cx, cy, invQ, texWidth[unit], texHeight[unit]); @@ -393,7 +393,7 @@ array->z[ix] = (GLuint) solve_plane(cx, cy, zPlane); #endif #ifdef DO_FOG - array->fog[ix] = solve_plane(cx, cy, fogPlane); + array->attribs[FRAG_ATTRIB_FOGC][ix][0] = solve_plane(cx, cy, fogPlane); #endif #ifdef DO_RGBA array->rgba[ix][RCOMP] = solve_plane_chan(cx, cy, rPlane); @@ -412,9 +412,9 @@ #ifdef DO_TEX { const GLfloat invQ = solve_plane_recip(cx, cy, vPlane); - array->texcoords[0][ix][0] = solve_plane(cx, cy, sPlane) * invQ; - array->texcoords[0][ix][1] = solve_plane(cx, cy, tPlane) * invQ; - array->texcoords[0][ix][2] = solve_plane(cx, cy, uPlane) * invQ; + array->attribs[FRAG_ATTRIB_TEX0][ix][0] = solve_plane(cx, cy, sPlane) * invQ; + array->attribs[FRAG_ATTRIB_TEX0][ix][1] = solve_plane(cx, cy, tPlane) * invQ; + array->attribs[FRAG_ATTRIB_TEX0][ix][2] = solve_plane(cx, cy, uPlane) * invQ; array->lambda[0][ix] = compute_lambda(sPlane, tPlane, vPlane, cx, cy, invQ, texWidth, texHeight); } @@ -424,9 +424,9 @@ for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { if (ctx->Texture.Unit[unit]._ReallyEnabled) { GLfloat invQ = solve_plane_recip(cx, cy, vPlane[unit]); - array->texcoords[unit][ix][0] = solve_plane(cx, cy, sPlane[unit]) * invQ; - array->texcoords[unit][ix][1] = solve_plane(cx, cy, tPlane[unit]) * invQ; - array->texcoords[unit][ix][2] = solve_plane(cx, cy, uPlane[unit]) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + unit][ix][0] = solve_plane(cx, cy, sPlane[unit]) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + unit][ix][1] = solve_plane(cx, cy, tPlane[unit]) * invQ; + array->attribs[FRAG_ATTRIB_TEX0 + unit][ix][2] = solve_plane(cx, cy, uPlane[unit]) * invQ; array->lambda[unit][ix] = compute_lambda(sPlane[unit], tPlane[unit], vPlane[unit], @@ -468,10 +468,11 @@ array->z[j] = array->z[j + left]; #endif #ifdef DO_FOG - array->fog[j] = array->fog[j + left]; + array->attribs[FRAG_ATTRIB_FOGC][j][0] + = array->attribs[FRAG_ATTRIB_FOGC][j + left][0]; #endif #ifdef DO_TEX - COPY_4V(array->texcoords[0][j], array->texcoords[0][j + left]); + COPY_4V(array->attribs[FRAG_ATTRIB_TEX0 + 0][j], array->attribs[FRAG_ATTRIB_TEX0 + 0][j + left]); #endif #if defined(DO_MULTITEX) || defined(DO_TEX) array->lambda[0][j] = array->lambda[0][j + left]; @@ -488,9 +489,9 @@ if (ctx->Texture.Unit[unit]._ReallyEnabled) { GLint j; for (j = 0; j < (GLint) n; j++) { - array->texcoords[unit][j][0] = array->texcoords[unit][j + left][0]; - array->texcoords[unit][j][1] = array->texcoords[unit][j + left][1]; - array->texcoords[unit][j][2] = array->texcoords[unit][j + left][2]; + array->attribs[FRAG_ATTRIB_TEX0 + unit][j][0] = array->attribs[FRAG_ATTRIB_TEX0 + unit][j + left][0]; + array->attribs[FRAG_ATTRIB_TEX0 + unit][j][1] = array->attribs[FRAG_ATTRIB_TEX0 + unit][j + left][1]; + array->attribs[FRAG_ATTRIB_TEX0 + unit][j][2] = array->attribs[FRAG_ATTRIB_TEX0 + unit][j + left][2]; array->lambda[unit][j] = array->lambda[unit][j + left]; } } diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c index 87a016512c..af8a6baddc 100644 --- a/src/mesa/swrast/s_alpha.c +++ b/src/mesa/swrast/s_alpha.c @@ -123,7 +123,7 @@ _swrast_alpha_test(const GLcontext *ctx, SWspan *span) ALPHA_TEST(rgba[i][ACOMP], ;); } else { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; const GLfloat ref = ctx->Color.AlphaRef; ALPHA_TEST(rgba[i][ACOMP], ;); } diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c index 75df50b0ba..1ac6528a91 100644 --- a/src/mesa/swrast/s_atifragshader.c +++ b/src/mesa/swrast/s_atifragshader.c @@ -268,7 +268,7 @@ handle_pass_op(struct atifs_machine *machine, struct atifs_setupinst *texinst, if (pass_tex >= GL_TEXTURE0_ARB && pass_tex <= GL_TEXTURE7_ARB) { pass_tex -= GL_TEXTURE0_ARB; COPY_4V(machine->Registers[idx], - span->array->texcoords[pass_tex][column]); + span->array->attribs[FRAG_ATTRIB_TEX0 + pass_tex][column]); } else if (pass_tex >= GL_REG_0_ATI && pass_tex <= GL_REG_5_ATI) { pass_tex -= GL_REG_0_ATI; @@ -290,7 +290,8 @@ handle_sample_op(GLcontext * ctx, struct atifs_machine *machine, if (coord_source >= GL_TEXTURE0_ARB && coord_source <= GL_TEXTURE7_ARB) { coord_source -= GL_TEXTURE0_ARB; - COPY_4V(tex_coords, span->array->texcoords[coord_source][column]); + COPY_4V(tex_coords, + span->array->attribs[FRAG_ATTRIB_TEX0 + coord_source][column]); } else if (coord_source >= GL_REG_0_ATI && coord_source <= GL_REG_5_ATI) { coord_source -= GL_REG_0_ATI; @@ -572,8 +573,8 @@ init_machine(GLcontext * ctx, struct atifs_machine *machine, machine->Registers[i][j] = 0.0; } - COPY_4V(inputs[ATI_FS_INPUT_PRIMARY], span->array->color.sz4.rgba[col]); - COPY_4V(inputs[ATI_FS_INPUT_SECONDARY], span->array->color.sz4.spec[col]); + COPY_4V(inputs[ATI_FS_INPUT_PRIMARY], span->array->attribs[FRAG_ATTRIB_COL0][col]); + COPY_4V(inputs[ATI_FS_INPUT_SECONDARY], span->array->attribs[FRAG_ATTRIB_COL1][col]); } @@ -604,7 +605,7 @@ _swrast_exec_fragment_shader(GLcontext * ctx, SWspan *span) const GLfloat *colOut = machine.Registers[0]; /*fprintf(stderr,"outputs %f %f %f %f\n", colOut[0], colOut[1], colOut[2], colOut[3]); */ - COPY_4V(span->array->color.sz4.rgba[i], colOut); + COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], colOut); } } } diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 761ab724e9..a9bc6433de 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -263,7 +263,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, ASSERT(width < MAX_WIDTH); for (row = 0; row < height; row++, sy += stepy, dy += stepy) { - GLvoid *rgba = span.array->color.sz4.rgba; + GLvoid *rgba = span.array->attribs[FRAG_ATTRIB_COL0]; /* Get row/span of source pixels */ if (overlapping) { diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index bdb2558351..dd2b57c7d3 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -635,7 +635,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, = _mesa_image_row_stride(unpack, width, format, type); GLint skipPixels = 0; /* use span array for temp color storage */ - GLfloat *rgba = (GLfloat *) span.array->color.sz4.rgba; + GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL0]; /* if the span is wider than MAX_WIDTH we have to do it in chunks */ while (skipPixels < width) { diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index f4c3fe4f2d..93d2ab469f 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -154,7 +154,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) FOG_LOOP(GLushort, COMPUTE_F); } else { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; ASSERT(span->array->ChanType == GL_FLOAT); FOG_LOOP(GLfloat, COMPUTE_F); } @@ -172,7 +172,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) FOG_LOOP(GLushort, COMPUTE_F); } else { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; ASSERT(span->array->ChanType == GL_FLOAT); FOG_LOOP(GLfloat, COMPUTE_F); } @@ -194,7 +194,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) FOG_LOOP(GLushort, COMPUTE_F); } else { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; ASSERT(span->array->ChanType == GL_FLOAT); FOG_LOOP(GLfloat, COMPUTE_F); } @@ -214,7 +214,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) if (span->array->ChanType == GL_UNSIGNED_BYTE) { GLubyte (*rgba)[4] = span->array->color.sz1.rgba; for (i = 0; i < span->end; i++) { - const GLfloat f = span->array->fog[i]; + const GLfloat f = span->array->attribs[FRAG_ATTRIB_FOGC][i][0]; const GLfloat oneMinusF = 1.0F - f; rgba[i][RCOMP] = (GLubyte) (f * rgba[i][RCOMP] + oneMinusF * rFog); rgba[i][GCOMP] = (GLubyte) (f * rgba[i][GCOMP] + oneMinusF * gFog); @@ -224,7 +224,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) else if (span->array->ChanType == GL_UNSIGNED_SHORT) { GLushort (*rgba)[4] = span->array->color.sz2.rgba; for (i = 0; i < span->end; i++) { - const GLfloat f = span->array->fog[i]; + const GLfloat f = span->array->attribs[FRAG_ATTRIB_FOGC][i][0]; const GLfloat oneMinusF = 1.0F - f; rgba[i][RCOMP] = (GLushort) (f * rgba[i][RCOMP] + oneMinusF * rFog); rgba[i][GCOMP] = (GLushort) (f * rgba[i][GCOMP] + oneMinusF * gFog); @@ -232,10 +232,10 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) } } else { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; ASSERT(span->array->ChanType == GL_FLOAT); for (i = 0; i < span->end; i++) { - const GLfloat f = span->array->fog[i]; + const GLfloat f = span->array->attribs[FRAG_ATTRIB_FOGC][i][0]; const GLfloat oneMinusF = 1.0F - f; rgba[i][RCOMP] = f * rgba[i][RCOMP] + oneMinusF * rFog; rgba[i][GCOMP] = f * rgba[i][GCOMP] + oneMinusF * gFog; @@ -258,7 +258,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) FOG_LOOP(GLushort, COMPUTE_F); } else { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; ASSERT(span->array->ChanType == GL_FLOAT); FOG_LOOP(GLfloat, COMPUTE_F); } @@ -360,7 +360,7 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) */ GLuint i; for (i = 0; i < span->end; i++) { - const GLfloat f = span->array->fog[i]; + const GLfloat f = span->array->attribs[FRAG_ATTRIB_FOGC][i][0]; index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * fogIndex); } } diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 12afb5ea0e..9ae423dde9 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -47,8 +47,11 @@ */ struct fp_machine { + /** Fragment Input attributes */ + GLfloat (*Attribs)[MAX_WIDTH][4]; + GLuint CurFrag; /**< Index into Attribs arrays */ + GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; - GLfloat Inputs[FRAG_ATTRIB_MAX][4]; GLfloat Outputs[FRAG_RESULT_MAX][4]; GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ @@ -72,7 +75,7 @@ _swrast_get_program_register(GLcontext *ctx, enum register_file file, if (CurrentMachine) { switch (file) { case PROGRAM_INPUT: - COPY_4V(val, CurrentMachine->Inputs[index]); + COPY_4V(val, CurrentMachine->Attribs[index][CurrentMachine->CurFrag]); break; case PROGRAM_OUTPUT: COPY_4V(val, CurrentMachine->Outputs[index]); @@ -160,7 +163,7 @@ get_register_pointer( GLcontext *ctx, return machine->Temporaries[source->Index]; case PROGRAM_INPUT: ASSERT(source->Index < FRAG_ATTRIB_MAX); - return machine->Inputs[source->Index]; + return machine->Attribs[source->Index][machine->CurFrag]; case PROGRAM_OUTPUT: /* This is only for PRINT */ ASSERT(source->Index < FRAG_RESULT_MAX); @@ -554,7 +557,7 @@ init_machine_deriv( GLcontext *ctx, /* Add derivatives */ if (program->Base.InputsRead & FRAG_BIT_WPOS) { - GLfloat *wpos = (GLfloat*) machine->Inputs[FRAG_ATTRIB_WPOS]; + GLfloat *wpos = machine->Attribs[FRAG_ATTRIB_WPOS][machine->CurFrag]; if (xOrY == 'X') { wpos[0] += 1.0F; wpos[1] += 0.0F; @@ -569,7 +572,7 @@ init_machine_deriv( GLcontext *ctx, } } if (program->Base.InputsRead & FRAG_BIT_COL0) { - GLfloat *col0 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL0]; + GLfloat *col0 = machine->Attribs[FRAG_ATTRIB_COL0][machine->CurFrag]; if (xOrY == 'X') { col0[0] += span->drdx * (1.0F / CHAN_MAXF); col0[1] += span->dgdx * (1.0F / CHAN_MAXF); @@ -584,7 +587,7 @@ init_machine_deriv( GLcontext *ctx, } } if (program->Base.InputsRead & FRAG_BIT_COL1) { - GLfloat *col1 = (GLfloat*) machine->Inputs[FRAG_ATTRIB_COL1]; + GLfloat *col1 = machine->Attribs[FRAG_ATTRIB_COL1][machine->CurFrag]; if (xOrY == 'X') { col1[0] += span->dsrdx * (1.0F / CHAN_MAXF); col1[1] += span->dsgdx * (1.0F / CHAN_MAXF); @@ -599,7 +602,7 @@ init_machine_deriv( GLcontext *ctx, } } if (program->Base.InputsRead & FRAG_BIT_FOGC) { - GLfloat *fogc = (GLfloat*) machine->Inputs[FRAG_ATTRIB_FOGC]; + GLfloat *fogc = machine->Attribs[FRAG_ATTRIB_FOGC][machine->CurFrag]; if (xOrY == 'X') { fogc[0] += span->dfogdx; } @@ -609,7 +612,7 @@ init_machine_deriv( GLcontext *ctx, } for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { if (program->Base.InputsRead & FRAG_BIT_TEX(u)) { - GLfloat *tex = (GLfloat*) machine->Inputs[FRAG_ATTRIB_TEX0 + u]; + GLfloat *tex = machine->Attribs[FRAG_ATTRIB_TEX0 + u][machine->CurFrag]; /* XXX perspective-correct interpolation */ if (xOrY == 'X') { tex[0] += span->texStepX[u][0]; @@ -628,7 +631,7 @@ init_machine_deriv( GLcontext *ctx, for (v = 0; v < ctx->Const.MaxVarying; v++) { if (program->Base.InputsRead & FRAG_BIT_VAR(v)) { - GLfloat *var = (GLfloat*) machine->Inputs[FRAG_ATTRIB_VAR0 + v]; + GLfloat *var = machine->Attribs[FRAG_ATTRIB_VAR0 + v][machine->CurFrag]; if (xOrY == 'X') { var[0] += span->varStepX[v][0]; var[1] += span->varStepX[v][1]; @@ -1686,7 +1689,6 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, const SWspan *span, GLuint col ) { GLuint inputsRead = program->Base.InputsRead; - GLuint u, v; if (ctx->FragmentProgram.CallbackEnabled) inputsRead = ~0; @@ -1697,63 +1699,9 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); } - /* Load input registers */ - if (inputsRead & FRAG_BIT_WPOS) { - GLfloat *wpos = machine->Inputs[FRAG_ATTRIB_WPOS]; - ASSERT(span->arrayMask & SPAN_Z); - if (span->arrayMask & SPAN_XY) { - wpos[0] = (GLfloat) span->array->x[col]; - wpos[1] = (GLfloat) span->array->y[col]; - } - else { - wpos[0] = (GLfloat) span->x + col; - wpos[1] = (GLfloat) span->y; - } - wpos[2] = (GLfloat) span->array->z[col] / ctx->DrawBuffer->_DepthMaxF; - wpos[3] = span->w + col * span->dwdx; - } - if (inputsRead & FRAG_BIT_COL0) { - ASSERT(span->arrayMask & SPAN_RGBA); - COPY_4V(machine->Inputs[FRAG_ATTRIB_COL0], - span->array->color.sz4.rgba[col]); - } - if (inputsRead & FRAG_BIT_COL1) { - ASSERT(span->arrayMask & SPAN_SPEC); - COPY_4V(machine->Inputs[FRAG_ATTRIB_COL1], - span->array->color.sz4.spec[col]); - } - if (inputsRead & FRAG_BIT_FOGC) { - GLfloat *fogc = machine->Inputs[FRAG_ATTRIB_FOGC]; - ASSERT(span->arrayMask & SPAN_FOG); - fogc[0] = span->array->fog[col]; - fogc[1] = 0.0F; - fogc[2] = 0.0F; - fogc[3] = 0.0F; - } - for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - if (inputsRead & FRAG_BIT_TEX(u)) { - GLfloat *tex = machine->Inputs[FRAG_ATTRIB_TEX0 + u]; - /*ASSERT(ctx->Texture._EnabledCoordUnits & (1 << u));*/ - COPY_4V(tex, span->array->texcoords[u][col]); - /*ASSERT(tex[0] != 0 || tex[1] != 0 || tex[2] != 0);*/ -#if 0 - printf("Texcoord %d: %g %g %g %g\n", u, - tex[0], tex[1], tex[2], tex[3]); -#endif - } - } - for (v = 0; v < ctx->Const.MaxVarying; v++) { - if (inputsRead & FRAG_BIT_VAR(v)) { -#if 0 - printf("Frag Var %d at y=%d: %f %f %f\n", v, col, - span->array->varying[v][col][0], - span->array->varying[v][col][1], - span->array->varying[v][col][2]); -#endif - COPY_4V(machine->Inputs[FRAG_ATTRIB_VAR0 + v], - span->array->varying[v][col]); - } - } + /* Setup pointer to input attributes */ + machine->Attribs = span->array->attribs; + machine->CurFrag = col; /* init condition codes */ machine->CondCodes[0] = COND_EQ; @@ -1784,7 +1732,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) if (execute_program(ctx, program, ~0, &machine, span, i)) { /* Store result color */ - COPY_4V(span->array->color.sz4.rgba[i], + COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], machine.Outputs[FRAG_RESULT_COLR]); /* Store result depth/z */ diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c index 719b17962d..e680732bee 100644 --- a/src/mesa/swrast/s_logic.c +++ b/src/mesa/swrast/s_logic.c @@ -240,7 +240,7 @@ _swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, } else { logicop_uint4(ctx, 4 * span->end, - (GLuint *) span->array->color.sz4.rgba, + (GLuint *) span->array->attribs[FRAG_ATTRIB_COL0], (const GLuint *) rbPixels, span->array->mask); } } diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c index 65c984dd3e..8800f7d8e3 100644 --- a/src/mesa/swrast/s_masking.c +++ b/src/mesa/swrast/s_masking.c @@ -91,7 +91,7 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, const GLuint bMask = ctx->Color.ColorMask[BCOMP] ? ~0x0 : 0x0; const GLuint aMask = ctx->Color.ColorMask[ACOMP] ? ~0x0 : 0x0; const GLuint (*dst)[4] = (const GLuint (*)[4]) rbPixels; - GLuint (*src)[4] = (GLuint (*)[4]) span->array->color.sz4.rgba; + GLuint (*src)[4] = (GLuint (*)[4]) span->array->attribs[FRAG_ATTRIB_COL0]; GLuint i; for (i = 0; i < n; i++) { src[i][RCOMP] = (src[i][RCOMP] & rMask) | (dst[i][RCOMP] & ~rMask); diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index b41776b017..f68630af93 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -280,7 +280,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #if FLAGS & TEXTURE for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture._EnabledCoordUnits & (1 << u)) { - COPY_4V(span->array->texcoords[u][count], texcoord[u]); + COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], texcoord[u]); span->array->lambda[u][count] = 0.0; } } @@ -342,14 +342,14 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) r = vert->texcoord[u][0]; else /* GL_R */ r = vert->texcoord[u][2]; - span->array->texcoords[u][count][0] = s; - span->array->texcoords[u][count][1] = t; - span->array->texcoords[u][count][2] = r; - span->array->texcoords[u][count][3] = 1.0F; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][0] = s; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][1] = t; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][2] = r; + span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][3] = 1.0F; span->array->lambda[u][count] = 0.0; /* XXX fix? */ } else { - COPY_4V(span->array->texcoords[u][count], vert->texcoord[u]); + COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], vert->texcoord[u]); } } } @@ -402,7 +402,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #if FLAGS & TEXTURE for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture.Unit[u]._ReallyEnabled) { - COPY_4V(span->array->texcoords[u][count], texcoord[u]); + COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], texcoord[u]); } } #endif diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 128ce0afb3..75134ab462 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -394,7 +394,7 @@ read_rgba_pixels( GLcontext *ctx, /* no convolution */ const GLint dstStride = _mesa_image_row_stride(packing, width, format, type); - GLfloat (*rgba)[4] = swrast->SpanArrays->color.sz4.rgba; + GLfloat (*rgba)[4] = swrast->SpanArrays->attribs[FRAG_ATTRIB_COL0]; GLint row; GLubyte *dst = _mesa_image_address2d(packing, pixels, width, height, format, type, 0, 0); diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index d97c1672c2..5c552e6288 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -239,7 +239,7 @@ interpolate_colors(SWspan *span) #endif case GL_FLOAT: { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; GLfloat r, g, b, a, dr, dg, db, da; r = span->red; g = span->green; @@ -351,7 +351,7 @@ interpolate_specular(SWspan *span) #endif case GL_FLOAT: { - GLfloat (*spec)[4] = span->array->color.sz4.spec; + GLfloat (*spec)[4] = span->array->attribs[FRAG_ATTRIB_COL1]; #if CHAN_BITS <= 16 GLfloat r = CHAN_TO_FLOAT(FixedToChan(span->specRed)); GLfloat g = CHAN_TO_FLOAT(FixedToChan(span->specGreen)); @@ -430,7 +430,7 @@ interpolate_indexes(GLcontext *ctx, SWspan *span) static INLINE void interpolate_fog(const GLcontext *ctx, SWspan *span) { - GLfloat *fog = span->array->fog; + GLfloat (*fog)[4] = span->array->attribs[FRAG_ATTRIB_FOGC]; const GLfloat fogStep = span->fogStep; GLfloat fogCoord = span->fog; const GLuint haveW = (span->interpMask & SPAN_W); @@ -438,7 +438,7 @@ interpolate_fog(const GLcontext *ctx, SWspan *span) GLfloat w = haveW ? span->w : 1.0F; GLuint i; for (i = 0; i < span->end; i++) { - fog[i] = fogCoord / w; + fog[i][0] = fogCoord / w; fogCoord += fogStep; w += wStep; } @@ -565,7 +565,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) needLambda = GL_FALSE; } if (needLambda) { - GLfloat (*texcoord)[4] = span->array->texcoords[u]; + GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0 + u]; GLfloat *lambda = span->array->lambda[u]; const GLfloat dsdx = span->texStepX[u][0]; const GLfloat dsdy = span->texStepY[u][0]; @@ -620,7 +620,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) span->arrayMask |= SPAN_LAMBDA; } else { - GLfloat (*texcoord)[4] = span->array->texcoords[u]; + GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0 + u]; GLfloat *lambda = span->array->lambda[u]; const GLfloat dsdx = span->texStepX[u][0]; const GLfloat dtdx = span->texStepX[u][1]; @@ -701,7 +701,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) span->arrayMask |= SPAN_TEXTURE; if (needLambda) { /* just texture unit 0, with lambda */ - GLfloat (*texcoord)[4] = span->array->texcoords[0]; + GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0]; GLfloat *lambda = span->array->lambda[0]; const GLfloat dsdx = span->texStepX[0][0]; const GLfloat dsdy = span->texStepY[0][0]; @@ -757,7 +757,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) } else { /* just texture 0, without lambda */ - GLfloat (*texcoord)[4] = span->array->texcoords[0]; + GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0]; const GLfloat dsdx = span->texStepX[0][0]; const GLfloat dtdx = span->texStepX[0][1]; const GLfloat drdx = span->texStepX[0][2]; @@ -841,7 +841,7 @@ interpolate_varying(GLcontext *ctx, SWspan *span) GLuint k; for (k = 0; k < span->end; k++) { GLfloat invW = 1.0f / w; - span->array->varying[var][k][j] = v * invW; + span->array->attribs[FRAG_ATTRIB_VAR0 + var][k][j] = v * invW; v += dvdx; w += dwdx; } @@ -851,6 +851,33 @@ interpolate_varying(GLcontext *ctx, SWspan *span) } +/** + * Fill in the arrays->attribs[FRAG_ATTRIB_WPOS] array. + */ +static INLINE void +interpolate_wpos(GLcontext *ctx, SWspan *span) +{ + GLfloat (*wpos)[4] = span->array->attribs[FRAG_ATTRIB_WPOS]; + GLuint i; + if (span->arrayMask & SPAN_XY) { + for (i = 0; i < span->end; i++) { + wpos[i][0] = (GLfloat) span->array->x[i]; + wpos[i][1] = (GLfloat) span->array->y[i]; + } + } + else { + for (i = 0; i < span->end; i++) { + wpos[i][0] = (GLfloat) span->x + i; + wpos[i][1] = (GLfloat) span->y; + } + } + for (i = 0; i < span->end; i++) { + wpos[i][2] = (GLfloat) span->array->z[i] / ctx->DrawBuffer->_DepthMaxF; + wpos[i][3] = span->w + i * span->dwdx; + } +} + + /** * Apply the current polygon stipple pattern to a span of pixels. */ @@ -1238,8 +1265,8 @@ add_specular(GLcontext *ctx, SWspan *span) break; case GL_FLOAT: { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; - GLfloat (*spec)[4] = span->array->color.sz4.spec; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; + GLfloat (*spec)[4] = span->array->attribs[FRAG_ATTRIB_COL1]; GLuint i; for (i = 0; i < span->end; i++) { rgba[i][RCOMP] += spec[i][RCOMP]; @@ -1280,7 +1307,7 @@ apply_aa_coverage(SWspan *span) } } else { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; for (i = 0; i < span->end; i++) { rgba[i][ACOMP] = rgba[i][ACOMP] * coverage[i]; } @@ -1294,7 +1321,7 @@ apply_aa_coverage(SWspan *span) static INLINE void clamp_colors(SWspan *span) { - GLfloat (*rgba)[4] = span->array->color.sz4.rgba; + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; GLuint i; ASSERT(span->array->ChanType == GL_FLOAT); for (i = 0; i < span->end; i++) { @@ -1320,7 +1347,7 @@ convert_color_type(SWspan *span, GLenum newType) src = span->array->color.sz2.rgba; } else { - src = span->array->color.sz4.rgba; + src = span->array->attribs[FRAG_ATTRIB_COL0]; } if (newType == GL_UNSIGNED_BYTE) { dst = span->array->color.sz1.rgba; @@ -1329,7 +1356,7 @@ convert_color_type(SWspan *span, GLenum newType) dst = span->array->color.sz2.rgba; } else { - dst = span->array->color.sz4.rgba; + dst = span->array->attribs[FRAG_ATTRIB_COL0]; } _mesa_convert_colors(span->array->ChanType, src, @@ -1365,7 +1392,7 @@ shade_texture_span(GLcontext *ctx, SWspan *span) ? (GLvoid *) span->array->color.sz1.rgba : (GLvoid *) span->array->color.sz2.rgba; _mesa_convert_colors(oldType, src, - newType, span->array->color.sz4.rgba, + newType, span->array->attribs[FRAG_ATTRIB_COL0], span->end, span->array->mask); span->array->ChanType = newType; } @@ -1383,6 +1410,10 @@ shade_texture_span(GLcontext *ctx, SWspan *span) if (ctx->Shader.CurrentProgram && span->interpMask & SPAN_VARYING) interpolate_varying(ctx, span); + if (ctx->FragmentProgram._Current && + (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_WPOS)) + interpolate_wpos(ctx, span); + /* Run fragment program/shader now */ if (ctx->FragmentProgram._Current) { _swrast_exec_fragment_program(ctx, span); @@ -1938,7 +1969,7 @@ _swrast_get_dest_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, rbPixels = span->array->color.sz2.spec; } else { - rbPixels = span->array->color.sz4.spec; + rbPixels = span->array->attribs[FRAG_ATTRIB_COL1]; } /* Get destination values from renderbuffer */ diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index 7c514afb0b..292679bda1 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -32,7 +32,7 @@ /** - * \defgroup SpanFlags SPAN_*-flags + * \defgroup SpanFlags * Bitflags used for interpMask and arrayMask fields below to indicate * which interpolant values and fragment arrays are in use, respectively. */ @@ -60,12 +60,10 @@ struct arrays2 { union { GLubyte sz1[MAX_WIDTH][4]; /* primary color */ GLushort sz2[MAX_WIDTH][4]; - GLfloat sz4[MAX_WIDTH][4]; } rgba; union { GLubyte sz1[MAX_WIDTH][4]; /* specular color and temp storage */ GLushort sz2[MAX_WIDTH][4]; - GLfloat sz4[MAX_WIDTH][4]; } spec; }; #endif @@ -80,7 +78,14 @@ struct arrays2 { * filled in by glDraw/CopyPixels, etc. * These arrays are separated out of sw_span to conserve memory. */ -typedef struct sw_span_arrays { +typedef struct sw_span_arrays +{ + /** Per-fragment attributes (indexed by FRAG_ATTRIB_* tokens) */ + GLfloat attribs[FRAG_ATTRIB_MAX][MAX_WIDTH][4]; + + /** This mask indicates which fragments are alive or culled */ + GLubyte mask[MAX_WIDTH]; + GLenum ChanType; /**< Color channel type, GL_UNSIGNED_BYTE, GL_FLOAT */ union { struct { @@ -91,37 +96,17 @@ typedef struct sw_span_arrays { GLushort rgba[MAX_WIDTH][4]; GLushort spec[MAX_WIDTH][4]; } sz2; - struct { - GLfloat rgba[MAX_WIDTH][4]; - GLfloat spec[MAX_WIDTH][4]; - } sz4; } color; /** XXX these are temporary fields, pointing into above color arrays */ GLchan (*rgba)[4]; GLchan (*spec)[4]; -#if 0 - /* XXX rearrange and unify these arrays to so that we can - * index all fragment inputs with the FRAG_ATTRIB_* values: - */ - GLfloat attribs[FRAG_ATTRIB_MAX][MAX_WIDTH][4]; - /*OR*/ - typedef GLfloat (*array4f)[4]; - array4f attribs[FRAG_ATTRIB_MAX]; -#endif - GLint x[MAX_WIDTH]; /**< fragment X coords */ GLint y[MAX_WIDTH]; /**< fragment Y coords */ GLuint z[MAX_WIDTH]; /**< fragment Z coords */ GLuint index[MAX_WIDTH]; /**< Color indexes */ - GLfloat fog[MAX_WIDTH]; - GLfloat texcoords[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH][4]; - GLfloat lambda[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH]; + GLfloat lambda[MAX_TEXTURE_COORD_UNITS][MAX_WIDTH]; /**< Texture LOD */ GLfloat coverage[MAX_WIDTH]; /**< Fragment coverage for AA/smoothing */ - GLfloat varying[MAX_VARYING][MAX_WIDTH][4]; /**< For shaders */ - - /** This mask indicates which fragments are alive or culled */ - GLubyte mask[MAX_WIDTH]; } SWspanarrays; @@ -137,7 +122,8 @@ typedef struct sw_span_arrays { * stream of these structures which would be consumed by one or more * span-processing threads which could run in parallel. */ -typedef struct sw_span { +typedef struct sw_span +{ GLint x, y; /** Only need to process pixels between start <= i < end */ diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index 2a3455f35e..ebb4c0d936 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/s_texcombine.c @@ -1094,6 +1094,9 @@ _swrast_texture_span( GLcontext *ctx, SWspan *span ) */ for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { if (ctx->Texture.Unit[unit]._ReallyEnabled) { + const GLfloat (*texcoords)[4] + = (const GLfloat (*)[4]) + span->array->attribs[FRAG_ATTRIB_TEX0 + unit]; const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; const struct gl_texture_object *curObj = texUnit->_Current; GLfloat *lambda = span->array->lambda[unit]; @@ -1127,8 +1130,7 @@ _swrast_texture_span( GLcontext *ctx, SWspan *span ) /* Sample the texture (span->end = number of fragments) */ swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end, - (const GLfloat (*)[4]) span->array->texcoords[unit], - lambda, texels ); + texcoords, lambda, texels ); /* GL_SGI_texture_color_table */ if (texUnit->ColorTableEnabled) { diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index 29b8df41b7..34732a67e6 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -230,7 +230,7 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, GLint j = unzoom_x(ctx->Pixel.ZoomX, imgX, x0 + i) - span->x; ASSERT(j >= 0); ASSERT(j < span->end); - COPY_4V(zoomed.array->color.sz4.rgba[i], rgba[j]); + COPY_4V(zoomed.array->attribs[FRAG_ATTRIB_COL0][i], rgba[j]); } } } @@ -268,10 +268,10 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, GLint j = unzoom_x(ctx->Pixel.ZoomX, imgX, x0 + i) - span->x; ASSERT(j >= 0); ASSERT(j < span->end); - zoomed.array->color.sz4.rgba[i][0] = rgb[j][0]; - zoomed.array->color.sz4.rgba[i][1] = rgb[j][1]; - zoomed.array->color.sz4.rgba[i][2] = rgb[j][2]; - zoomed.array->color.sz4.rgba[i][3] = 1.0F; + zoomed.array->attribs[FRAG_ATTRIB_COL0][i][0] = rgb[j][0]; + zoomed.array->attribs[FRAG_ATTRIB_COL0][i][1] = rgb[j][1]; + zoomed.array->attribs[FRAG_ATTRIB_COL0][i][2] = rgb[j][2]; + zoomed.array->attribs[FRAG_ATTRIB_COL0][i][3] = 1.0F; } } } -- cgit v1.2.3 From 496aa47042527852ec232c712168fb7fe3c645c3 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 09:52:26 -0700 Subject: remove slang_label.c until it's ready --- src/mesa/sources | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index d0b7246ed6..1b0474c14b 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -182,7 +182,6 @@ SLANG_SOURCES = \ shader/slang/slang_error.c \ shader/slang/slang_execute.c \ shader/slang/slang_export.c \ - shader/slang/slang_label.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ shader/slang/slang_link.c \ -- cgit v1.2.3 From abeca8d17d0728e68ec0c7cb9d9ca91b06b560d0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 10:08:07 -0700 Subject: comments --- src/mesa/swrast/s_span.c | 6 ++++-- src/mesa/swrast/s_span.h | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 5c552e6288..4a562752a8 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -599,7 +599,6 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) q += dqdx; w += dwdx; } - } else { for (i = 0; i < span->end; i++) { @@ -817,7 +816,10 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) /** - * Fill in the span.varying array from the interpolation values. + * Fill in the arrays->attribs[FRAG_ATTRIB_VARx] arrays from the + * interpolation values. + * XXX since interpolants/arrays are getting uniformed, we might merge + * this with interpolate_texcoords(), interpolate_Fog(), etc. someday. */ static INLINE void interpolate_varying(GLcontext *ctx, SWspan *span) diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index 292679bda1..ff91768001 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -81,6 +81,9 @@ struct arrays2 { typedef struct sw_span_arrays { /** Per-fragment attributes (indexed by FRAG_ATTRIB_* tokens) */ + /* XXX someday look at transposing first two indexes for better memory + * access pattern. + */ GLfloat attribs[FRAG_ATTRIB_MAX][MAX_WIDTH][4]; /** This mask indicates which fragments are alive or culled */ -- cgit v1.2.3 From 9742547245f3dc4850faa9e83d178d17669d4c09 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Feb 2007 18:11:19 -0700 Subject: Fix logic in _slang_simplify(): vec2() constructor case wasn't getting used. --- src/mesa/shader/slang/slang_codegen.c | 7 +++-- src/mesa/shader/slang/slang_simplify.c | 57 +++++++++++++++++++++++----------- src/mesa/shader/slang/slang_simplify.h | 6 ++-- 3 files changed, 47 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d09883c664..ee1d6cbabc 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1891,6 +1891,9 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) RETURN_ERROR2("Undefined variable:", varName, 0); } /* XXX make copy of this initializer? */ + + /* XXX try to simplify initializer here */foo + rhs = _slang_gen_operation(A, v->initializer); assert(rhs); init = new_node(IR_MOVE, var, rhs); @@ -2649,7 +2652,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, lhs->Store = n->Store; /* constant folding, etc */ - slang_simplify(var->initializer, &A->space, A->atoms); + _slang_simplify(var->initializer, &A->space, A->atoms); rhs = _slang_gen_operation(A, var->initializer); assert(rhs); @@ -2703,7 +2706,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) assert(A->vartable); /* fold constant expressions, etc. */ - slang_simplify(fun->body, &A->space, A->atoms); + _slang_simplify(fun->body, &A->space, A->atoms); A->CurFunction = fun; diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index 821a716f58..c71313a7bb 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -44,9 +44,9 @@ * declarations. I.e.: float foo[3 + 5]; */ void -slang_simplify(slang_operation *oper, - const slang_assembly_name_space * space, - slang_atom_pool * atoms) +_slang_simplify(slang_operation *oper, + const slang_assembly_name_space * space, + slang_atom_pool * atoms) { GLboolean isFloat[4]; GLboolean isBool[4]; @@ -54,7 +54,7 @@ slang_simplify(slang_operation *oper, /* first, simplify children */ for (i = 0; i < oper->num_children; i++) { - slang_simplify(&oper->children[i], space, atoms); + _slang_simplify(&oper->children[i], space, atoms); } /* examine children */ @@ -75,7 +75,7 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_float; - break; + return; case slang_oper_subtract: for (i = 0; i < 4; i++) { oper->literal[i] @@ -83,7 +83,7 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_float; - break; + return; case slang_oper_multiply: for (i = 0; i < 4; i++) { oper->literal[i] @@ -91,7 +91,7 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_float; - break; + return; case slang_oper_divide: for (i = 0; i < 4; i++) { oper->literal[i] @@ -99,12 +99,13 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_float; - break; + return; default: ; /* nothing */ } } - else if (n == 1 && isFloat[0]) { + + if (n == 1 && isFloat[0]) { switch (oper->type) { case slang_oper_minus: for (i = 0; i < 4; i++) { @@ -112,17 +113,18 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_float; - break; + return; case slang_oper_plus: COPY_4V(oper->literal, oper->children[0].literal); slang_operation_destruct(oper); oper->type = slang_oper_literal_float; - break; + return; default: ; /* nothing */ } } - else if (n == 2 && isBool[0] && isBool[1]) { + + if (n == 2 && isBool[0] && isBool[1]) { /* simple boolean expression */ switch (oper->type) { case slang_oper_logicaland: @@ -133,7 +135,7 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_bool; - break; + return; case slang_oper_logicalor: for (i = 0; i < 4; i++) { const GLint a = oper->children[0].literal[i] ? 1 : 0; @@ -142,7 +144,7 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_bool; - break; + return; case slang_oper_logicalxor: for (i = 0; i < 4; i++) { const GLint a = oper->children[0].literal[i] ? 1 : 0; @@ -151,12 +153,13 @@ slang_simplify(slang_operation *oper, } slang_operation_destruct(oper); oper->type = slang_oper_literal_bool; - break; + return; default: ; /* nothing */ } } - else if (n == 4 && isFloat[0] && isFloat[1] && isFloat[2] && isFloat[3]) { + + if (n == 4 && isFloat[0] && isFloat[1] && isFloat[2] && isFloat[3]) { /* vec4(flt, flt, flt, flt) constructor */ if (oper->type == slang_oper_call) { if (strcmp((char *) oper->a_id, "vec4") == 0) { @@ -166,19 +169,37 @@ slang_simplify(slang_operation *oper, oper->literal[3] = oper->children[3].literal[0]; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; + return; } } } - else if (n == 3 && isFloat[0] && isFloat[1] && isFloat[2]) { + + if (n == 3 && isFloat[0] && isFloat[1] && isFloat[2]) { /* vec3(flt, flt, flt) constructor */ if (oper->type == slang_oper_call) { if (strcmp((char *) oper->a_id, "vec3") == 0) { oper->literal[0] = oper->children[0].literal[0]; oper->literal[1] = oper->children[1].literal[0]; oper->literal[2] = oper->children[2].literal[0]; - oper->literal[3] = 0.0; + oper->literal[3] = oper->literal[2]; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; + return; + } + } + } + + if (n == 2 && isFloat[0] && isFloat[1]) { + /* vec4(flt, flt) constructor */ + if (oper->type == slang_oper_call) { + if (strcmp((char *) oper->a_id, "vec2") == 0) { + oper->literal[0] = oper->children[0].literal[0]; + oper->literal[1] = oper->children[1].literal[0]; + oper->literal[2] = oper->literal[1]; + oper->literal[3] = oper->literal[1]; + slang_operation_destruct(oper); /* XXX oper->locals goes NULL! */ + oper->type = slang_oper_literal_float; + return; } } } diff --git a/src/mesa/shader/slang/slang_simplify.h b/src/mesa/shader/slang/slang_simplify.h index 0ca1fa2f0d..5ff7292f0f 100644 --- a/src/mesa/shader/slang/slang_simplify.h +++ b/src/mesa/shader/slang/slang_simplify.h @@ -3,9 +3,9 @@ #define SLANG_SIMPLIFY_H extern void -slang_simplify(slang_operation *oper, - const slang_assembly_name_space * space, - slang_atom_pool * atoms); +_slang_simplify(slang_operation *oper, + const slang_assembly_name_space * space, + slang_atom_pool * atoms); extern GLboolean -- cgit v1.2.3 From 4e7fd7ad9604f6b9700a6011338c2bf1381b28da Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 09:09:13 -0700 Subject: get rid of unused span->start field --- src/mesa/swrast/s_context.c | 1 - src/mesa/swrast/s_span.h | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 6e3475b130..ec2f3d68b8 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -704,7 +704,6 @@ _swrast_CreateContext( GLcontext *ctx ) /* init point span buffer */ swrast->PointSpan.primitive = GL_POINT; - swrast->PointSpan.start = 0; swrast->PointSpan.end = 0; swrast->PointSpan.facing = 0; swrast->PointSpan.array = swrast->SpanArrays; diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index ff91768001..c5f79871f1 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -129,9 +129,8 @@ typedef struct sw_span { GLint x, y; - /** Only need to process pixels between start <= i < end */ - /** At this time, start is always zero. */ - GLuint start, end; + /** Number of fragments in the span */ + GLuint end; /** This flag indicates that mask[] array is effectively filled with ones */ GLboolean writeAll; @@ -213,7 +212,6 @@ do { \ (S).primitive = (PRIMITIVE); \ (S).interpMask = (INTERP_MASK); \ (S).arrayMask = (ARRAY_MASK); \ - (S).start = 0; \ (S).end = (END); \ (S).facing = 0; \ (S).array = SWRAST_CONTEXT(ctx)->SpanArrays; \ -- cgit v1.2.3 From 462d8f5fafcc5ac69ea89cac1222abadded642e2 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 09:46:43 -0700 Subject: New span attrStart/attrStepX/attrStepY fields to replace fog, specular, etc. fields. More to come. --- src/mesa/swrast/s_fog.c | 20 +++++------ src/mesa/swrast/s_fragprog.c | 57 +++++++++++++++--------------- src/mesa/swrast/s_linetemp.h | 37 ++++++++++---------- src/mesa/swrast/s_pointtemp.h | 5 +-- src/mesa/swrast/s_span.c | 16 +++++---- src/mesa/swrast/s_span.h | 13 +++---- src/mesa/swrast/s_tritemp.h | 80 +++++++++++++++++++++---------------------- src/mesa/swrast/s_zoom.c | 5 +-- 8 files changed, 118 insertions(+), 115 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index 93d2ab469f..a2bf4c620c 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -72,8 +72,8 @@ _swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z) */ #define FOG_LOOP(TYPE, COMPUTE_F) \ do { \ - const GLfloat fogStep = span->fogStep; \ - GLfloat fogCoord = span->fog; \ + const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; \ + GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; \ const GLfloat wStep = haveW ? span->dwdx : 0.0F; \ GLfloat w = haveW ? span->w : 1.0F; \ GLuint i; \ @@ -293,8 +293,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) const GLfloat fogEnd = ctx->Fog.End; const GLfloat fogScale = (ctx->Fog.Start == ctx->Fog.End) ? 1.0F : 1.0F / (ctx->Fog.End - ctx->Fog.Start); - const GLfloat fogStep = span->fogStep; - GLfloat fogCoord = span->fog; + const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; + GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; const GLfloat wStep = haveW ? span->dwdx : 0.0F; GLfloat w = haveW ? span->w : 1.0F; GLuint i; @@ -310,8 +310,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) case GL_EXP: { const GLfloat density = -ctx->Fog.Density; - const GLfloat fogStep = span->fogStep; - GLfloat fogCoord = span->fog; + const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; + GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; const GLfloat wStep = haveW ? span->dwdx : 0.0F; GLfloat w = haveW ? span->w : 1.0F; GLuint i; @@ -327,8 +327,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) case GL_EXP2: { const GLfloat negDensitySquared = -ctx->Fog.Density * ctx->Fog.Density; - const GLfloat fogStep = span->fogStep; - GLfloat fogCoord = span->fog; + const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; + GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; const GLfloat wStep = haveW ? span->dwdx : 0.0F; GLfloat w = haveW ? span->w : 1.0F; GLuint i; @@ -368,8 +368,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) /* The span's fog start/step values are blend factors. * They were previously computed per-vertex. */ - const GLfloat fogStep = span->fogStep; - GLfloat fog = span->fog; + const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; + GLfloat fog = span->attrStart[FRAG_ATTRIB_FOGC][0]; const GLfloat wStep = haveW ? span->dwdx : 0.0F; GLfloat w = haveW ? span->w : 1.0F; GLuint i; diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 9ae423dde9..22483c56a6 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -287,27 +287,27 @@ fetch_vector4_deriv( GLcontext *ctx, break; case FRAG_ATTRIB_COL1: if (xOrY == 'X') { - src[0] = span->dsrdx * (1.0F / CHAN_MAXF); - src[1] = span->dsgdx * (1.0F / CHAN_MAXF); - src[2] = span->dsbdx * (1.0F / CHAN_MAXF); - src[3] = 0.0; /* XXX need this */ + src[0] = span->attrStepX[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepX[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepX[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepX[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); } else { - src[0] = span->dsrdy * (1.0F / CHAN_MAXF); - src[1] = span->dsgdy * (1.0F / CHAN_MAXF); - src[2] = span->dsbdy * (1.0F / CHAN_MAXF); - src[3] = 0.0; /* XXX need this */ + src[0] = span->attrStepY[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepY[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepY[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepY[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); } break; case FRAG_ATTRIB_FOGC: if (xOrY == 'X') { - src[0] = span->dfogdx; + src[0] = span->attrStepX[FRAG_ATTRIB_FOGC][0] * (1.0F / CHAN_MAXF); src[1] = 0.0; src[2] = 0.0; src[3] = 0.0; } else { - src[0] = span->dfogdy; + src[0] = span->attrStepY[FRAG_ATTRIB_FOGC][0] * (1.0F / CHAN_MAXF); src[1] = 0.0; src[2] = 0.0; src[3] = 0.0; @@ -589,25 +589,25 @@ init_machine_deriv( GLcontext *ctx, if (program->Base.InputsRead & FRAG_BIT_COL1) { GLfloat *col1 = machine->Attribs[FRAG_ATTRIB_COL1][machine->CurFrag]; if (xOrY == 'X') { - col1[0] += span->dsrdx * (1.0F / CHAN_MAXF); - col1[1] += span->dsgdx * (1.0F / CHAN_MAXF); - col1[2] += span->dsbdx * (1.0F / CHAN_MAXF); - col1[3] += 0.0; /*XXX fix */ + col1[0] += span->attrStepX[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); + col1[1] += span->attrStepX[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); + col1[2] += span->attrStepX[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); + col1[3] += span->attrStepX[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); } else { - col1[0] += span->dsrdy * (1.0F / CHAN_MAXF); - col1[1] += span->dsgdy * (1.0F / CHAN_MAXF); - col1[2] += span->dsbdy * (1.0F / CHAN_MAXF); - col1[3] += 0.0; /*XXX fix */ + col1[0] += span->attrStepY[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); + col1[1] += span->attrStepY[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); + col1[2] += span->attrStepY[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); + col1[3] += span->attrStepY[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); } } if (program->Base.InputsRead & FRAG_BIT_FOGC) { GLfloat *fogc = machine->Attribs[FRAG_ATTRIB_FOGC][machine->CurFrag]; if (xOrY == 'X') { - fogc[0] += span->dfogdx; + fogc[0] += span->attrStepX[FRAG_ATTRIB_FOGC][0]; } else { - fogc[0] += span->dfogdy; + fogc[0] += span->attrStepY[FRAG_ATTRIB_FOGC][0]; } } for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { @@ -632,17 +632,18 @@ init_machine_deriv( GLcontext *ctx, for (v = 0; v < ctx->Const.MaxVarying; v++) { if (program->Base.InputsRead & FRAG_BIT_VAR(v)) { GLfloat *var = machine->Attribs[FRAG_ATTRIB_VAR0 + v][machine->CurFrag]; + GLuint attr = FRAG_ATTRIB_VAR0 + v; if (xOrY == 'X') { - var[0] += span->varStepX[v][0]; - var[1] += span->varStepX[v][1]; - var[2] += span->varStepX[v][2]; - var[3] += span->varStepX[v][3]; + var[0] += span->attrStepX[attr][0]; + var[1] += span->attrStepX[attr][1]; + var[2] += span->attrStepX[attr][2]; + var[3] += span->attrStepX[attr][3]; } else { - var[0] += span->varStepY[v][0]; - var[1] += span->varStepY[v][1]; - var[2] += span->varStepY[v][2]; - var[3] += span->varStepY[v][3]; + var[0] += span->attrStepY[attr][0]; + var[1] += span->attrStepY[attr][1]; + var[2] += span->attrStepY[attr][2]; + var[3] += span->attrStepY[attr][3]; } } } diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index b7b434771e..d68868ded9 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -276,8 +276,8 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) #endif #ifdef INTERP_FOG interpFlags |= SPAN_FOG; - span.fog = vert0->fog; - span.fogStep = (vert1->fog - vert0->fog) / numPixels; + span.attrStart[FRAG_ATTRIB_FOGC][0] = vert0->fog; + span.attrStepX[FRAG_ATTRIB_FOGC][0] = (vert1->fog - vert0->fog) / numPixels; #endif #ifdef INTERP_TEX interpFlags |= SPAN_TEXTURE; @@ -345,23 +345,24 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) GLuint v; for (v = 0; v < MAX_VARYING; v++) { if (inputsUsed & FRAG_BIT_VAR(v)) { + GLuint attr = FRAG_ATTRIB_VAR0 + v; GLfloat ds, dt, dr, dq; - span.var[v][0] = invw0 * vert0->varying[v][0]; - span.var[v][1] = invw0 * vert0->varying[v][1]; - span.var[v][2] = invw0 * vert0->varying[v][2]; - span.var[v][3] = invw0 * vert0->varying[v][3]; - ds = (invw1 * vert1->varying[v][0]) - span.var[v][0]; - dt = (invw1 * vert1->varying[v][1]) - span.var[v][1]; - dr = (invw1 * vert1->varying[v][2]) - span.var[v][2]; - dq = (invw1 * vert1->varying[v][3]) - span.var[v][3]; - span.varStepX[v][0] = ds * invLen; - span.varStepX[v][1] = dt * invLen; - span.varStepX[v][2] = dr * invLen; - span.varStepX[v][3] = dq * invLen; - span.varStepY[v][0] = 0.0F; - span.varStepY[v][1] = 0.0F; - span.varStepY[v][2] = 0.0F; - span.varStepY[v][3] = 0.0F; + span.attrStart[attr][0] = invw0 * vert0->varying[v][0]; + span.attrStart[attr][1] = invw0 * vert0->varying[v][1]; + span.attrStart[attr][2] = invw0 * vert0->varying[v][2]; + span.attrStart[attr][3] = invw0 * vert0->varying[v][3]; + ds = (invw1 * vert1->varying[v][0]) - span.attrStart[attr][0]; + dt = (invw1 * vert1->varying[v][1]) - span.attrStart[attr][1]; + dr = (invw1 * vert1->varying[v][2]) - span.attrStart[attr][2]; + dq = (invw1 * vert1->varying[v][3]) - span.attrStart[attr][3]; + span.attrStepX[attr][0] = ds * invLen; + span.attrStepX[attr][1] = dt * invLen; + span.attrStepX[attr][2] = dr * invLen; + span.attrStepX[attr][3] = dq * invLen; + span.attrStepY[attr][0] = 0.0F; + span.attrStepY[attr][1] = 0.0F; + span.attrStepY[attr][2] = 0.0F; + span.attrStepY[attr][3] = 0.0F; } } } diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index f68630af93..f769f524a0 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -107,8 +107,9 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) */ span->interpMask = SPAN_FOG; span->arrayMask = SPAN_XY | SPAN_Z; - span->fog = vert->fog; - span->fogStep = 0.0; + span->attrStart[FRAG_ATTRIB_FOGC][0] = vert->fog; + span->attrStepX[FRAG_ATTRIB_FOGC][0] = 0.0; + span->attrStepY[FRAG_ATTRIB_FOGC][0] = 0.0; #if FLAGS & RGBA span->arrayMask |= SPAN_RGBA; #endif diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 4a562752a8..52c7501df8 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -75,8 +75,9 @@ _swrast_span_default_z( GLcontext *ctx, SWspan *span ) void _swrast_span_default_fog( GLcontext *ctx, SWspan *span ) { - span->fog = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance); - span->fogStep = span->dfogdx = span->dfogdy = 0.0F; + span->attrStart[FRAG_ATTRIB_FOGC][0] = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance); + span->attrStepX[FRAG_ATTRIB_FOGC][0] = 0.0; + span->attrStepY[FRAG_ATTRIB_FOGC][0] = 0.0; span->interpMask |= SPAN_FOG; } @@ -431,8 +432,8 @@ static INLINE void interpolate_fog(const GLcontext *ctx, SWspan *span) { GLfloat (*fog)[4] = span->array->attribs[FRAG_ATTRIB_FOGC]; - const GLfloat fogStep = span->fogStep; - GLfloat fogCoord = span->fog; + const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; + GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; const GLuint haveW = (span->interpMask & SPAN_W); const GLfloat wStep = haveW ? span->dwdx : 0.0F; GLfloat w = haveW ? span->w : 1.0F; @@ -834,16 +835,17 @@ interpolate_varying(GLcontext *ctx, SWspan *span) for (var = 0; var < MAX_VARYING; var++) { if (inputsUsed & FRAG_BIT_VAR(var)) { + const GLuint attr = FRAG_ATTRIB_VAR0 + var; GLuint j; for (j = 0; j < 4; j++) { - const GLfloat dvdx = span->varStepX[var][j]; - GLfloat v = span->var[var][j]; + const GLfloat dvdx = span->attrStepX[attr][j]; + GLfloat v = span->attrStart[attr][j]; const GLfloat dwdx = span->dwdx; GLfloat w = span->w; GLuint k; for (k = 0; k < span->end; k++) { GLfloat invW = 1.0f / w; - span->array->attribs[FRAG_ATTRIB_VAR0 + var][k][j] = v * invW; + span->array->attribs[attr][k][j] = v * invW; v += dvdx; w += dwdx; } diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index c5f79871f1..f60d4279e1 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -169,14 +169,15 @@ typedef struct sw_span #endif GLfixed index, indexStep; GLfixed z, zStep; /* XXX z should probably be GLuint */ - GLfloat fog, fogStep; GLfloat tex[MAX_TEXTURE_COORD_UNITS][4]; /* s, t, r, q */ GLfloat texStepX[MAX_TEXTURE_COORD_UNITS][4]; GLfloat texStepY[MAX_TEXTURE_COORD_UNITS][4]; GLfixed intTex[2], intTexStep[2]; /* s, t only */ - GLfloat var[MAX_VARYING][4]; - GLfloat varStepX[MAX_VARYING][4]; - GLfloat varStepY[MAX_VARYING][4]; + + /** Fragment attribute interpolants */ + GLfloat attrStart[FRAG_ATTRIB_MAX][4]; /**< initial value */ + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; /**< dvalue/dx */ + GLfloat attrStepY[FRAG_ATTRIB_MAX][4]; /**< dvalue/dy */ /* partial derivatives wrt X and Y. */ GLfloat dzdx, dzdy; @@ -185,10 +186,6 @@ typedef struct sw_span GLfloat dgdx, dgdy; GLfloat dbdx, dbdy; GLfloat dadx, dady; - GLfloat dsrdx, dsrdy; - GLfloat dsgdx, dsgdy; - GLfloat dsbdx, dsbdy; - GLfloat dfogdx, dfogdy; /** * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index 6ff52b5e4a..c8fe4b6e9e 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -150,6 +150,7 @@ GLuint iv, ic; \ for (iv = 0; iv < MAX_VARYING; iv++) { \ if (inputsUsed & FRAG_BIT_VAR(iv)) { \ + GLuint attr = FRAG_ATTRIB_VAR0 + iv; \ for (ic = 0; ic < 4; ic++) { \ CODE \ } \ @@ -507,9 +508,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, const GLfloat eMaj_dfog = vMax->fog - vMin->fog; const GLfloat eBot_dfog = vMid->fog - vMin->fog; # endif - span.dfogdx = oneOverArea * (eMaj_dfog * eBot.dy - eMaj.dy * eBot_dfog); - span.dfogdy = oneOverArea * (eMaj.dx * eBot_dfog - eMaj_dfog * eBot.dx); - span.fogStep = span.dfogdx; + span.attrStepX[FRAG_ATTRIB_FOGC][0] = oneOverArea * (eMaj_dfog * eBot.dy - eMaj.dy * eBot_dfog); + span.attrStepY[FRAG_ATTRIB_FOGC][0] = oneOverArea * (eMaj.dx * eBot_dfog - eMaj_dfog * eBot.dx); } #endif #ifdef INTERP_RGB @@ -584,26 +584,26 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLfloat eBot_dsg = (GLfloat) ((ColorTemp) vMid->specular[GCOMP] - (ColorTemp) vMin->specular[GCOMP]); GLfloat eMaj_dsb = (GLfloat) ((ColorTemp) vMax->specular[BCOMP] - (ColorTemp) vMin->specular[BCOMP]); GLfloat eBot_dsb = (GLfloat) ((ColorTemp) vMid->specular[BCOMP] - (ColorTemp) vMin->specular[BCOMP]); - span.dsrdx = oneOverArea * (eMaj_dsr * eBot.dy - eMaj.dy * eBot_dsr); - span.dsrdy = oneOverArea * (eMaj.dx * eBot_dsr - eMaj_dsr * eBot.dx); - span.dsgdx = oneOverArea * (eMaj_dsg * eBot.dy - eMaj.dy * eBot_dsg); - span.dsgdy = oneOverArea * (eMaj.dx * eBot_dsg - eMaj_dsg * eBot.dx); - span.dsbdx = oneOverArea * (eMaj_dsb * eBot.dy - eMaj.dy * eBot_dsb); - span.dsbdy = oneOverArea * (eMaj.dx * eBot_dsb - eMaj_dsb * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL1][0] = oneOverArea * (eMaj_dsr * eBot.dy - eMaj.dy * eBot_dsr); + span.attrStepY[FRAG_ATTRIB_COL1][0] = oneOverArea * (eMaj.dx * eBot_dsr - eMaj_dsr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL1][1] = oneOverArea * (eMaj_dsg * eBot.dy - eMaj.dy * eBot_dsg); + span.attrStepY[FRAG_ATTRIB_COL1][1] = oneOverArea * (eMaj.dx * eBot_dsg - eMaj_dsg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL1][2] = oneOverArea * (eMaj_dsb * eBot.dy - eMaj.dy * eBot_dsb); + span.attrStepY[FRAG_ATTRIB_COL1][2] = oneOverArea * (eMaj.dx * eBot_dsb - eMaj_dsb * eBot.dx); # if CHAN_TYPE == GL_FLOAT - span.specRedStep = span.dsrdx; + span.specRedStep = span.attrStep[FRAG_ATTRIB_COL1][0]; span.specGreenStep = span.dsgdx; span.specBlueStep = span.dsbdx; # else - span.specRedStep = SignedFloatToFixed(span.dsrdx); - span.specGreenStep = SignedFloatToFixed(span.dsgdx); - span.specBlueStep = SignedFloatToFixed(span.dsbdx); + span.specRedStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL1][0]); + span.specGreenStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL1][1]); + span.specBlueStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL1][2]); # endif } else { - span.dsrdx = span.dsrdy = 0.0F; - span.dsgdx = span.dsgdy = 0.0F; - span.dsbdx = span.dsbdy = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL1][0] = span.attrStepY[FRAG_ATTRIB_COL1][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL1][1] = span.attrStepY[FRAG_ATTRIB_COL1][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL1][2] = span.attrStepY[FRAG_ATTRIB_COL1][2] = 0.0F; # if CHAN_TYPE == GL_FLOAT span.specRedStep = 0.0F; span.specGreenStep = 0.0F; @@ -678,8 +678,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, VARYING_LOOP( GLfloat eMaj_dvar = vMax->varying[iv][ic] * wMax - vMin->varying[iv][ic] * wMin; GLfloat eBot_dvar = vMid->varying[iv][ic] * wMid - vMin->varying[iv][ic] * wMin; - span.varStepX[iv][ic] = oneOverArea * (eMaj_dvar * eBot.dy - eMaj.dy * eBot_dvar); - span.varStepY[iv][ic] = oneOverArea * (eMaj.dx * eBot_dvar - eMaj_dvar * eBot.dx); + span.attrStepX[attr][ic] = oneOverArea * (eMaj_dvar * eBot.dy - eMaj.dy * eBot_dvar); + span.attrStepY[attr][ic] = oneOverArea * (eMaj.dx * eBot_dvar - eMaj_dvar * eBot.dx); ) } #endif @@ -928,11 +928,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #endif #ifdef INTERP_FOG # ifdef INTERP_W - fogLeft = vLower->fog * vLower->win[3] + (span.dfogdx * adjx + span.dfogdy * adjy) * (1.0F/FIXED_SCALE); + fogLeft = vLower->fog * vLower->win[3] + (span.attrStepX[FRAG_ATTRIB_FOGC][0] * adjx + span.attrStepY[FRAG_ATTRIB_FOGC][0] * adjy) * (1.0F/FIXED_SCALE); # else - fogLeft = vLower->fog + (span.dfogdx * adjx + span.dfogdy * adjy) * (1.0F/FIXED_SCALE); + fogLeft = vLower->fog + (span.attrStepX[FRAG_ATTRIB_FOGC][0] * adjx + span.attrStepY[FRAG_ATTRIB_FOGC][0] * adjy) * (1.0F/FIXED_SCALE); # endif - dfogOuter = span.dfogdy + dxOuter * span.dfogdx; + dfogOuter = span.attrStepY[FRAG_ATTRIB_FOGC][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_FOGC][0]; #endif #ifdef INTERP_RGB if (ctx->Light.ShadeModel == GL_SMOOTH) { @@ -990,19 +990,19 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_SPEC if (ctx->Light.ShadeModel == GL_SMOOTH) { # if CHAN_TYPE == GL_FLOAT - srLeft = vLower->specular[RCOMP] + (span.dsrdx * adjx + span.dsrdy * adjy) * (1.0F / FIXED_SCALE); - sgLeft = vLower->specular[GCOMP] + (span.dsgdx * adjx + span.dsgdy * adjy) * (1.0F / FIXED_SCALE); - sbLeft = vLower->specular[BCOMP] + (span.dsbdx * adjx + span.dsbdy * adjy) * (1.0F / FIXED_SCALE); - dsrOuter = span.dsrdy + dxOuter * span.dsrdx; - dsgOuter = span.dsgdy + dxOuter * span.dsgdx; - dsbOuter = span.dsbdy + dxOuter * span.dsbdx; + srLeft = vLower->specular[RCOMP] + (span.attrStepX[FRAG_ATTRIB_COL1][0] * adjx + span.attrStepY[FRAG_ATTRIB_COL1][0] * adjy) * (1.0F / FIXED_SCALE); + sgLeft = vLower->specular[GCOMP] + (span.attrStepX[FRAG_ATTRIB_COL1][1] * adjx + span.attrStepY[FRAG_ATTRIB_COL1][1] * adjy) * (1.0F / FIXED_SCALE); + sbLeft = vLower->specular[BCOMP] + (span.attrStepX[FRAG_ATTRIB_COL1][2] * adjx + span.attrStepY[FRAG_ATTRIB_COL1][2] * adjy) * (1.0F / FIXED_SCALE); + dsrOuter = span.attrStepY[FRAG_ATTRIB_COL1][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL1][0]; + dsgOuter = span.attrStepY[FRAG_ATTRIB_COL1][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL1][1]; + dsbOuter = span.attrStepY[FRAG_ATTRIB_COL1][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL1][2]; # else - srLeft = (GLfixed) (ChanToFixed(vLower->specular[RCOMP]) + span.dsrdx * adjx + span.dsrdy * adjy) + FIXED_HALF; - sgLeft = (GLfixed) (ChanToFixed(vLower->specular[GCOMP]) + span.dsgdx * adjx + span.dsgdy * adjy) + FIXED_HALF; - sbLeft = (GLfixed) (ChanToFixed(vLower->specular[BCOMP]) + span.dsbdx * adjx + span.dsbdy * adjy) + FIXED_HALF; - dsrOuter = SignedFloatToFixed(span.dsrdy + dxOuter * span.dsrdx); - dsgOuter = SignedFloatToFixed(span.dsgdy + dxOuter * span.dsgdx); - dsbOuter = SignedFloatToFixed(span.dsbdy + dxOuter * span.dsbdx); + srLeft = (GLfixed) (ChanToFixed(vLower->specular[RCOMP]) + span.attrStepX[FRAG_ATTRIB_COL1][0] * adjx + span.attrStepY[FRAG_ATTRIB_COL1][0] * adjy) + FIXED_HALF; + sgLeft = (GLfixed) (ChanToFixed(vLower->specular[GCOMP]) + span.attrStepX[FRAG_ATTRIB_COL1][1] * adjx + span.attrStepY[FRAG_ATTRIB_COL1][1] * adjy) + FIXED_HALF; + sbLeft = (GLfixed) (ChanToFixed(vLower->specular[BCOMP]) + span.attrStepX[FRAG_ATTRIB_COL1][2] * adjx + span.attrStepY[FRAG_ATTRIB_COL1][2] * adjy) + FIXED_HALF; + dsrOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL1][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL1][0]); + dsgOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL1][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL1][1]); + dsbOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL1][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL1][2]); # endif } else { @@ -1068,9 +1068,9 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, VARYING_LOOP( const GLfloat invW = vLower->win[3]; const GLfloat var0 = vLower->varying[iv][ic] * invW; - varLeft[iv][ic] = var0 + (span.varStepX[iv][ic] * adjx + - span.varStepY[iv][ic] * adjy) * (1.0f / FIXED_SCALE); - dvarOuter[iv][ic] = span.varStepY[iv][ic] + dxOuter * span.varStepX[iv][ic]; + varLeft[iv][ic] = var0 + (span.attrStepX[attr][ic] * adjx + + span.attrStepY[attr][ic] * adjy) * (1.0f / FIXED_SCALE); + dvarOuter[iv][ic] = span.attrStepY[attr][ic] + dxOuter * span.attrStepX[attr][ic]; ) #endif } /*if setupLeft*/ @@ -1105,7 +1105,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, dwInner = dwOuter + span.dwdx; #endif #ifdef INTERP_FOG - dfogInner = dfogOuter + span.dfogdx; + dfogInner = dfogOuter + span.attrStepX[FRAG_ATTRIB_FOGC][0]; #endif #ifdef INTERP_RGB fdrInner = fdrOuter + span.redStep; @@ -1137,7 +1137,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #endif #ifdef INTERP_VARYING VARYING_LOOP( - dvarInner[iv][ic] = dvarOuter[iv][ic] + span.varStepX[iv][ic]; + dvarInner[iv][ic] = dvarOuter[iv][ic] + span.attrStepX[attr][ic]; ) #endif @@ -1158,7 +1158,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, span.w = wLeft; #endif #ifdef INTERP_FOG - span.fog = fogLeft; + span.attrStart[FRAG_ATTRIB_FOGC][0] = fogLeft; #endif #ifdef INTERP_RGB span.red = rLeft; @@ -1191,7 +1191,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #endif #ifdef INTERP_VARYING VARYING_LOOP( - span.var[iv][ic] = varLeft[iv][ic]; + span.attrStart[attr][ic] = varLeft[iv][ic]; ) #endif diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index 34732a67e6..a4e8d9a36f 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -159,8 +159,9 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, /* copy fog interp info */ - zoomed.fog = span->fog; - zoomed.fogStep = span->fogStep; + zoomed.attrStart[FRAG_ATTRIB_FOGC][0] = span->attrStart[FRAG_ATTRIB_FOGC][0]; + zoomed.attrStepX[FRAG_ATTRIB_FOGC][0] = span->attrStepX[FRAG_ATTRIB_FOGC][0]; + zoomed.attrStepY[FRAG_ATTRIB_FOGC][0] = span->attrStepY[FRAG_ATTRIB_FOGC][0]; /* XXX copy texcoord info? */ if (format == GL_RGBA || format == GL_RGB) { -- cgit v1.2.3 From 9ab512ad8cf3a12f4f7f8494fa99bc9389f217db Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 11:01:01 -0700 Subject: Replace color, z, w, texture interpolants with new generic attrib interpolants. --- src/mesa/swrast/s_fog.c | 20 ++-- src/mesa/swrast/s_fragprog.c | 91 +++++++++--------- src/mesa/swrast/s_linetemp.h | 71 +++++++------- src/mesa/swrast/s_pointtemp.h | 6 +- src/mesa/swrast/s_span.c | 121 ++++++++++++------------ src/mesa/swrast/s_span.h | 26 ++---- src/mesa/swrast/s_triangle.c | 14 +-- src/mesa/swrast/s_tritemp.h | 208 ++++++++++++++++++++++-------------------- 8 files changed, 280 insertions(+), 277 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index a2bf4c620c..433fc4a4d0 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -74,8 +74,8 @@ _swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z) do { \ const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; \ GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; \ - const GLfloat wStep = haveW ? span->dwdx : 0.0F; \ - GLfloat w = haveW ? span->w : 1.0F; \ + const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F;\ + GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F; \ GLuint i; \ for (i = 0; i < span->end; i++) { \ GLfloat f, oneMinusF; \ @@ -295,8 +295,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) ? 1.0F : 1.0F / (ctx->Fog.End - ctx->Fog.Start); const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; - const GLfloat wStep = haveW ? span->dwdx : 0.0F; - GLfloat w = haveW ? span->w : 1.0F; + const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F; + GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F; GLuint i; for (i = 0; i < span->end; i++) { GLfloat f = (fogEnd - fogCoord / w) * fogScale; @@ -312,8 +312,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) const GLfloat density = -ctx->Fog.Density; const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; - const GLfloat wStep = haveW ? span->dwdx : 0.0F; - GLfloat w = haveW ? span->w : 1.0F; + const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F; + GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F; GLuint i; for (i = 0; i < span->end; i++) { GLfloat f = EXPF(density * fogCoord / w); @@ -329,8 +329,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) const GLfloat negDensitySquared = -ctx->Fog.Density * ctx->Fog.Density; const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; - const GLfloat wStep = haveW ? span->dwdx : 0.0F; - GLfloat w = haveW ? span->w : 1.0F; + const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F; + GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F; GLuint i; for (i = 0; i < span->end; i++) { const GLfloat coord = fogCoord / w; @@ -370,8 +370,8 @@ _swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) */ const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; GLfloat fog = span->attrStart[FRAG_ATTRIB_FOGC][0]; - const GLfloat wStep = haveW ? span->dwdx : 0.0F; - GLfloat w = haveW ? span->w : 1.0F; + const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F; + GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F; GLuint i; ASSERT(span->interpMask & SPAN_FOG); for (i = 0; i < span->end; i++) { diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 22483c56a6..090fd6dd97 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -261,28 +261,30 @@ fetch_vector4_deriv( GLcontext *ctx, if (xOrY == 'X') { src[0] = 1.0; src[1] = 0.0; - src[2] = span->dzdx / ctx->DrawBuffer->_DepthMaxF; - src[3] = span->dwdx; + src[2] = span->attrStepX[FRAG_ATTRIB_WPOS][2] + / ctx->DrawBuffer->_DepthMaxF; + src[3] = span->attrStepX[FRAG_ATTRIB_WPOS][3]; } else { src[0] = 0.0; src[1] = 1.0; - src[2] = span->dzdy / ctx->DrawBuffer->_DepthMaxF; - src[3] = span->dwdy; + src[2] = span->attrStepY[FRAG_ATTRIB_WPOS][2] + / ctx->DrawBuffer->_DepthMaxF; + src[3] = span->attrStepY[FRAG_ATTRIB_WPOS][3]; } break; case FRAG_ATTRIB_COL0: if (xOrY == 'X') { - src[0] = span->drdx * (1.0F / CHAN_MAXF); - src[1] = span->dgdx * (1.0F / CHAN_MAXF); - src[2] = span->dbdx * (1.0F / CHAN_MAXF); - src[3] = span->dadx * (1.0F / CHAN_MAXF); + src[0] = span->attrStepX[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepX[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepX[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepX[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); } else { - src[0] = span->drdy * (1.0F / CHAN_MAXF); - src[1] = span->dgdy * (1.0F / CHAN_MAXF); - src[2] = span->dbdy * (1.0F / CHAN_MAXF); - src[3] = span->dady * (1.0F / CHAN_MAXF); + src[0] = span->attrStepY[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepY[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepY[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepY[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); } break; case FRAG_ATTRIB_COL1: @@ -322,23 +324,22 @@ fetch_vector4_deriv( GLcontext *ctx, case FRAG_ATTRIB_TEX6: case FRAG_ATTRIB_TEX7: if (xOrY == 'X') { - const GLuint u = source->Index - FRAG_ATTRIB_TEX0; /* this is a little tricky - I think I've got it right */ - const GLfloat invQ = 1.0f / (span->tex[u][3] - + span->texStepX[u][3] * column); - src[0] = span->texStepX[u][0] * invQ; - src[1] = span->texStepX[u][1] * invQ; - src[2] = span->texStepX[u][2] * invQ; - src[3] = span->texStepX[u][3] * invQ; + const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] + + span->attrStepX[source->Index][3] * column); + src[0] = span->attrStepX[source->Index][0] * invQ; + src[1] = span->attrStepX[source->Index][1] * invQ; + src[2] = span->attrStepX[source->Index][2] * invQ; + src[3] = span->attrStepX[source->Index][3] * invQ; } else { - const GLuint u = source->Index - FRAG_ATTRIB_TEX0; /* Tricky, as above, but in Y direction */ - const GLfloat invQ = 1.0f / (span->tex[u][3] + span->texStepY[u][3]); - src[0] = span->texStepY[u][0] * invQ; - src[1] = span->texStepY[u][1] * invQ; - src[2] = span->texStepY[u][2] * invQ; - src[3] = span->texStepY[u][3] * invQ; + const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] + + span->attrStepY[source->Index][3]); + src[0] = span->attrStepY[source->Index][0] * invQ; + src[1] = span->attrStepY[source->Index][1] * invQ; + src[2] = span->attrStepY[source->Index][2] * invQ; + src[3] = span->attrStepY[source->Index][3] * invQ; } break; default: @@ -561,29 +562,29 @@ init_machine_deriv( GLcontext *ctx, if (xOrY == 'X') { wpos[0] += 1.0F; wpos[1] += 0.0F; - wpos[2] += span->dzdx; - wpos[3] += span->dwdx; + wpos[2] += span->attrStepX[FRAG_ATTRIB_WPOS][2]; + wpos[3] += span->attrStepX[FRAG_ATTRIB_WPOS][3]; } else { wpos[0] += 0.0F; wpos[1] += 1.0F; - wpos[2] += span->dzdy; - wpos[3] += span->dwdy; + wpos[2] += span->attrStepY[FRAG_ATTRIB_WPOS][2]; + wpos[3] += span->attrStepY[FRAG_ATTRIB_WPOS][3]; } } if (program->Base.InputsRead & FRAG_BIT_COL0) { GLfloat *col0 = machine->Attribs[FRAG_ATTRIB_COL0][machine->CurFrag]; if (xOrY == 'X') { - col0[0] += span->drdx * (1.0F / CHAN_MAXF); - col0[1] += span->dgdx * (1.0F / CHAN_MAXF); - col0[2] += span->dbdx * (1.0F / CHAN_MAXF); - col0[3] += span->dadx * (1.0F / CHAN_MAXF); + col0[0] += span->attrStepX[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); + col0[1] += span->attrStepX[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); + col0[2] += span->attrStepX[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); + col0[3] += span->attrStepX[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); } else { - col0[0] += span->drdy * (1.0F / CHAN_MAXF); - col0[1] += span->dgdy * (1.0F / CHAN_MAXF); - col0[2] += span->dbdy * (1.0F / CHAN_MAXF); - col0[3] += span->dady * (1.0F / CHAN_MAXF); + col0[0] += span->attrStepY[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); + col0[1] += span->attrStepY[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); + col0[2] += span->attrStepY[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); + col0[3] += span->attrStepY[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); } } if (program->Base.InputsRead & FRAG_BIT_COL1) { @@ -615,16 +616,16 @@ init_machine_deriv( GLcontext *ctx, GLfloat *tex = machine->Attribs[FRAG_ATTRIB_TEX0 + u][machine->CurFrag]; /* XXX perspective-correct interpolation */ if (xOrY == 'X') { - tex[0] += span->texStepX[u][0]; - tex[1] += span->texStepX[u][1]; - tex[2] += span->texStepX[u][2]; - tex[3] += span->texStepX[u][3]; + tex[0] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][0]; + tex[1] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][1]; + tex[2] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][2]; + tex[3] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][3]; } else { - tex[0] += span->texStepY[u][0]; - tex[1] += span->texStepY[u][1]; - tex[2] += span->texStepY[u][2]; - tex[3] += span->texStepY[u][3]; + tex[0] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][0]; + tex[1] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][1]; + tex[2] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][2]; + tex[3] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][3]; } } } diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index d68868ded9..e3ca4bd0ac 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -286,22 +286,22 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) const GLfloat invw1 = vert1->win[3]; const GLfloat invLen = 1.0F / numPixels; GLfloat ds, dt, dr, dq; - span.tex[0][0] = invw0 * vert0->texcoord[0][0]; - span.tex[0][1] = invw0 * vert0->texcoord[0][1]; - span.tex[0][2] = invw0 * vert0->texcoord[0][2]; - span.tex[0][3] = invw0 * vert0->texcoord[0][3]; - ds = (invw1 * vert1->texcoord[0][0]) - span.tex[0][0]; - dt = (invw1 * vert1->texcoord[0][1]) - span.tex[0][1]; - dr = (invw1 * vert1->texcoord[0][2]) - span.tex[0][2]; - dq = (invw1 * vert1->texcoord[0][3]) - span.tex[0][3]; - span.texStepX[0][0] = ds * invLen; - span.texStepX[0][1] = dt * invLen; - span.texStepX[0][2] = dr * invLen; - span.texStepX[0][3] = dq * invLen; - span.texStepY[0][0] = 0.0F; - span.texStepY[0][1] = 0.0F; - span.texStepY[0][2] = 0.0F; - span.texStepY[0][3] = 0.0F; + span.attrStart[FRAG_ATTRIB_TEX0][0] = invw0 * vert0->texcoord[0][0]; + span.attrStart[FRAG_ATTRIB_TEX0][1] = invw0 * vert0->texcoord[0][1]; + span.attrStart[FRAG_ATTRIB_TEX0][2] = invw0 * vert0->texcoord[0][2]; + span.attrStart[FRAG_ATTRIB_TEX0][3] = invw0 * vert0->texcoord[0][3]; + ds = (invw1 * vert1->texcoord[0][0]) - span.attrStart[FRAG_ATTRIB_TEX0][0]; + dt = (invw1 * vert1->texcoord[0][1]) - span.attrStart[FRAG_ATTRIB_TEX0][1]; + dr = (invw1 * vert1->texcoord[0][2]) - span.attrStart[FRAG_ATTRIB_TEX0][2]; + dq = (invw1 * vert1->texcoord[0][3]) - span.attrStart[FRAG_ATTRIB_TEX0][3]; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = ds * invLen; + span.attrStepX[FRAG_ATTRIB_TEX0][1] = dt * invLen; + span.attrStepX[FRAG_ATTRIB_TEX0][2] = dr * invLen; + span.attrStepX[FRAG_ATTRIB_TEX0][3] = dq * invLen; + span.attrStepY[FRAG_ATTRIB_TEX0][0] = 0.0F; + span.attrStepY[FRAG_ATTRIB_TEX0][1] = 0.0F; + span.attrStepY[FRAG_ATTRIB_TEX0][2] = 0.0F; + span.attrStepY[FRAG_ATTRIB_TEX0][3] = 0.0F; } #endif #ifdef INTERP_MULTITEX @@ -311,25 +311,26 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) GLuint u; for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture.Unit[u]._ReallyEnabled) { + const GLuint attr = FRAG_ATTRIB_TEX0 + u; const GLfloat invw0 = vert0->win[3]; const GLfloat invw1 = vert1->win[3]; GLfloat ds, dt, dr, dq; - span.tex[u][0] = invw0 * vert0->texcoord[u][0]; - span.tex[u][1] = invw0 * vert0->texcoord[u][1]; - span.tex[u][2] = invw0 * vert0->texcoord[u][2]; - span.tex[u][3] = invw0 * vert0->texcoord[u][3]; - ds = (invw1 * vert1->texcoord[u][0]) - span.tex[u][0]; - dt = (invw1 * vert1->texcoord[u][1]) - span.tex[u][1]; - dr = (invw1 * vert1->texcoord[u][2]) - span.tex[u][2]; - dq = (invw1 * vert1->texcoord[u][3]) - span.tex[u][3]; - span.texStepX[u][0] = ds * invLen; - span.texStepX[u][1] = dt * invLen; - span.texStepX[u][2] = dr * invLen; - span.texStepX[u][3] = dq * invLen; - span.texStepY[u][0] = 0.0F; - span.texStepY[u][1] = 0.0F; - span.texStepY[u][2] = 0.0F; - span.texStepY[u][3] = 0.0F; + span.attrStart[attr][0] = invw0 * vert0->texcoord[u][0]; + span.attrStart[attr][1] = invw0 * vert0->texcoord[u][1]; + span.attrStart[attr][2] = invw0 * vert0->texcoord[u][2]; + span.attrStart[attr][3] = invw0 * vert0->texcoord[u][3]; + ds = (invw1 * vert1->texcoord[u][0]) - span.attrStart[attr][0]; + dt = (invw1 * vert1->texcoord[u][1]) - span.attrStart[attr][1]; + dr = (invw1 * vert1->texcoord[u][2]) - span.attrStart[attr][2]; + dq = (invw1 * vert1->texcoord[u][3]) - span.attrStart[attr][3]; + span.attrStepX[attr][0] = ds * invLen; + span.attrStepX[attr][1] = dt * invLen; + span.attrStepX[attr][2] = dr * invLen; + span.attrStepX[attr][3] = dq * invLen; + span.attrStepY[attr][0] = 0.0F; + span.attrStepY[attr][1] = 0.0F; + span.attrStepY[attr][2] = 0.0F; + span.attrStepY[attr][3] = 0.0F; } } } @@ -371,9 +372,9 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) INIT_SPAN(span, GL_LINE, numPixels, interpFlags, SPAN_XY); /* Need these for fragment prog texcoord interpolation */ - span.w = 1.0F; - span.dwdx = 0.0F; - span.dwdy = 0.0F; + span.attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F; + span.attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0F; + span.attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0F; /* * Draw diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index f769f524a0..d211a5a3a2 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -143,9 +143,9 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) } } /* need these for fragment programs */ - span->w = 1.0F; - span->dwdx = 0.0F; - span->dwdy = 0.0F; + span->attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F; + span->attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0F; + span->attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0F; #endif #if FLAGS & SMOOTH span->arrayMask |= SPAN_COVERAGE; diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 52c7501df8..ddc63594f2 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -129,22 +129,23 @@ _swrast_span_default_texcoords( GLcontext *ctx, SWspan *span ) { GLuint i; for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + const GLuint attr = FRAG_ATTRIB_TEX0 + i; const GLfloat *tc = ctx->Current.RasterTexCoords[i]; if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { - COPY_4V(span->tex[i], tc); + COPY_4V(span->attrStart[attr], tc); } else if (tc[3] > 0.0F) { /* use (s/q, t/q, r/q, 1) */ - span->tex[i][0] = tc[0] / tc[3]; - span->tex[i][1] = tc[1] / tc[3]; - span->tex[i][2] = tc[2] / tc[3]; - span->tex[i][3] = 1.0; + span->attrStart[attr][0] = tc[0] / tc[3]; + span->attrStart[attr][1] = tc[1] / tc[3]; + span->attrStart[attr][2] = tc[2] / tc[3]; + span->attrStart[attr][3] = 1.0; } else { - ASSIGN_4V(span->tex[i], 0.0F, 0.0F, 0.0F, 1.0F); + ASSIGN_4V(span->attrStart[attr], 0.0F, 0.0F, 0.0F, 1.0F); } - ASSIGN_4V(span->texStepX[i], 0.0F, 0.0F, 0.0F, 0.0F); - ASSIGN_4V(span->texStepY[i], 0.0F, 0.0F, 0.0F, 0.0F); + ASSIGN_4V(span->attrStepX[attr], 0.0F, 0.0F, 0.0F, 0.0F); + ASSIGN_4V(span->attrStepY[attr], 0.0F, 0.0F, 0.0F, 0.0F); } span->interpMask |= SPAN_TEXTURE; } @@ -435,8 +436,8 @@ interpolate_fog(const GLcontext *ctx, SWspan *span) const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; const GLuint haveW = (span->interpMask & SPAN_W); - const GLfloat wStep = haveW ? span->dwdx : 0.0F; - GLfloat w = haveW ? span->w : 1.0F; + const GLfloat wStep = haveW ? span->attrStepX[FRAG_ATTRIB_WPOS][3] : 0.0F; + GLfloat w = haveW ? span->attrStart[FRAG_ATTRIB_WPOS][3] : 1.0F; GLuint i; for (i = 0; i < span->end; i++) { fog[i][0] = fogCoord / w; @@ -549,6 +550,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) /* XXX CoordUnits vs. ImageUnits */ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { if (ctx->Texture._EnabledCoordUnits & (1 << u)) { + const GLuint attr = FRAG_ATTRIB_TEX0 + u; const struct gl_texture_object *obj =ctx->Texture.Unit[u]._Current; GLfloat texW, texH; GLboolean needLambda; @@ -568,23 +570,23 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) if (needLambda) { GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0 + u]; GLfloat *lambda = span->array->lambda[u]; - const GLfloat dsdx = span->texStepX[u][0]; - const GLfloat dsdy = span->texStepY[u][0]; - const GLfloat dtdx = span->texStepX[u][1]; - const GLfloat dtdy = span->texStepY[u][1]; - const GLfloat drdx = span->texStepX[u][2]; - const GLfloat dqdx = span->texStepX[u][3]; - const GLfloat dqdy = span->texStepY[u][3]; - GLfloat s = span->tex[u][0]; - GLfloat t = span->tex[u][1]; - GLfloat r = span->tex[u][2]; - GLfloat q = span->tex[u][3]; + const GLfloat dsdx = span->attrStepX[attr][0]; + const GLfloat dsdy = span->attrStepY[attr][0]; + const GLfloat dtdx = span->attrStepX[attr][1]; + const GLfloat dtdy = span->attrStepY[attr][1]; + const GLfloat drdx = span->attrStepX[attr][2]; + const GLfloat dqdx = span->attrStepX[attr][3]; + const GLfloat dqdy = span->attrStepY[attr][3]; + GLfloat s = span->attrStart[attr][0]; + GLfloat t = span->attrStart[attr][1]; + GLfloat r = span->attrStart[attr][2]; + GLfloat q = span->attrStart[attr][3]; GLuint i; if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->dwdx; - GLfloat w = span->w; + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; for (i = 0; i < span->end; i++) { const GLfloat invW = 1.0F / w; texcoord[i][0] = s * invW; @@ -622,20 +624,20 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) else { GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0 + u]; GLfloat *lambda = span->array->lambda[u]; - const GLfloat dsdx = span->texStepX[u][0]; - const GLfloat dtdx = span->texStepX[u][1]; - const GLfloat drdx = span->texStepX[u][2]; - const GLfloat dqdx = span->texStepX[u][3]; - GLfloat s = span->tex[u][0]; - GLfloat t = span->tex[u][1]; - GLfloat r = span->tex[u][2]; - GLfloat q = span->tex[u][3]; + const GLfloat dsdx = span->attrStepX[attr][0]; + const GLfloat dtdx = span->attrStepX[attr][1]; + const GLfloat drdx = span->attrStepX[attr][2]; + const GLfloat dqdx = span->attrStepX[attr][3]; + GLfloat s = span->attrStart[attr][0]; + GLfloat t = span->attrStart[attr][1]; + GLfloat r = span->attrStart[attr][2]; + GLfloat q = span->attrStart[attr][3]; GLuint i; if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->dwdx; - GLfloat w = span->w; + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; for (i = 0; i < span->end; i++) { const GLfloat invW = 1.0F / w; texcoord[i][0] = s * invW; @@ -703,23 +705,23 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) /* just texture unit 0, with lambda */ GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0]; GLfloat *lambda = span->array->lambda[0]; - const GLfloat dsdx = span->texStepX[0][0]; - const GLfloat dsdy = span->texStepY[0][0]; - const GLfloat dtdx = span->texStepX[0][1]; - const GLfloat dtdy = span->texStepY[0][1]; - const GLfloat drdx = span->texStepX[0][2]; - const GLfloat dqdx = span->texStepX[0][3]; - const GLfloat dqdy = span->texStepY[0][3]; - GLfloat s = span->tex[0][0]; - GLfloat t = span->tex[0][1]; - GLfloat r = span->tex[0][2]; - GLfloat q = span->tex[0][3]; + const GLfloat dsdx = span->attrStepX[FRAG_ATTRIB_TEX0][0]; + const GLfloat dsdy = span->attrStepY[FRAG_ATTRIB_TEX0][0]; + const GLfloat dtdx = span->attrStepX[FRAG_ATTRIB_TEX0][1]; + const GLfloat dtdy = span->attrStepY[FRAG_ATTRIB_TEX0][1]; + const GLfloat drdx = span->attrStepX[FRAG_ATTRIB_TEX0][2]; + const GLfloat dqdx = span->attrStepX[FRAG_ATTRIB_TEX0][3]; + const GLfloat dqdy = span->attrStepY[FRAG_ATTRIB_TEX0][3]; + GLfloat s = span->attrStart[FRAG_ATTRIB_TEX0][0]; + GLfloat t = span->attrStart[FRAG_ATTRIB_TEX0][1]; + GLfloat r = span->attrStart[FRAG_ATTRIB_TEX0][2]; + GLfloat q = span->attrStart[FRAG_ATTRIB_TEX0][3]; GLuint i; if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->dwdx; - GLfloat w = span->w; + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; for (i = 0; i < span->end; i++) { const GLfloat invW = 1.0F / w; texcoord[i][0] = s * invW; @@ -758,20 +760,20 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) else { /* just texture 0, without lambda */ GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0]; - const GLfloat dsdx = span->texStepX[0][0]; - const GLfloat dtdx = span->texStepX[0][1]; - const GLfloat drdx = span->texStepX[0][2]; - const GLfloat dqdx = span->texStepX[0][3]; - GLfloat s = span->tex[0][0]; - GLfloat t = span->tex[0][1]; - GLfloat r = span->tex[0][2]; - GLfloat q = span->tex[0][3]; + const GLfloat dsdx = span->attrStepX[FRAG_ATTRIB_TEX0][0]; + const GLfloat dtdx = span->attrStepX[FRAG_ATTRIB_TEX0][1]; + const GLfloat drdx = span->attrStepX[FRAG_ATTRIB_TEX0][2]; + const GLfloat dqdx = span->attrStepX[FRAG_ATTRIB_TEX0][3]; + GLfloat s = span->attrStart[FRAG_ATTRIB_TEX0][0]; + GLfloat t = span->attrStart[FRAG_ATTRIB_TEX0][1]; + GLfloat r = span->attrStart[FRAG_ATTRIB_TEX0][2]; + GLfloat q = span->attrStart[FRAG_ATTRIB_TEX0][3]; GLuint i; if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->dwdx; - GLfloat w = span->w; + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; for (i = 0; i < span->end; i++) { const GLfloat invW = 1.0F / w; texcoord[i][0] = s * invW; @@ -840,8 +842,8 @@ interpolate_varying(GLcontext *ctx, SWspan *span) for (j = 0; j < 4; j++) { const GLfloat dvdx = span->attrStepX[attr][j]; GLfloat v = span->attrStart[attr][j]; - const GLfloat dwdx = span->dwdx; - GLfloat w = span->w; + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; GLuint k; for (k = 0; k < span->end; k++) { GLfloat invW = 1.0f / w; @@ -877,7 +879,8 @@ interpolate_wpos(GLcontext *ctx, SWspan *span) } for (i = 0; i < span->end; i++) { wpos[i][2] = (GLfloat) span->array->z[i] / ctx->DrawBuffer->_DepthMaxF; - wpos[i][3] = span->w + i * span->dwdx; + wpos[i][3] = span->attrStart[FRAG_ATTRIB_WPOS][3] + + i * span->attrStepX[FRAG_ATTRIB_WPOS][3]; } } diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index f60d4279e1..26ef399df3 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -127,6 +127,7 @@ typedef struct sw_span_arrays */ typedef struct sw_span { + /** Coord of first fragment in horizontal span/run */ GLint x, y; /** Number of fragments in the span */ @@ -143,10 +144,17 @@ typedef struct sw_span /** * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates - * which of the x/xStep variables are relevant. + * which of the attrStart/StepX/StepY variables are relevant. */ GLbitfield interpMask; + /** Fragment attribute interpolants */ + GLfloat attrStart[FRAG_ATTRIB_MAX][4]; /**< initial value */ + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; /**< dvalue/dx */ + GLfloat attrStepY[FRAG_ATTRIB_MAX][4]; /**< dvalue/dy */ + + /* XXX the rest of these will go away eventually... */ + /* For horizontal spans, step is the partial derivative wrt X. * For lines, step is the delta from one fragment to the next. */ @@ -169,24 +177,8 @@ typedef struct sw_span #endif GLfixed index, indexStep; GLfixed z, zStep; /* XXX z should probably be GLuint */ - GLfloat tex[MAX_TEXTURE_COORD_UNITS][4]; /* s, t, r, q */ - GLfloat texStepX[MAX_TEXTURE_COORD_UNITS][4]; - GLfloat texStepY[MAX_TEXTURE_COORD_UNITS][4]; GLfixed intTex[2], intTexStep[2]; /* s, t only */ - /** Fragment attribute interpolants */ - GLfloat attrStart[FRAG_ATTRIB_MAX][4]; /**< initial value */ - GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; /**< dvalue/dx */ - GLfloat attrStepY[FRAG_ATTRIB_MAX][4]; /**< dvalue/dy */ - - /* partial derivatives wrt X and Y. */ - GLfloat dzdx, dzdy; - GLfloat w, dwdx, dwdy; - GLfloat drdx, drdy; - GLfloat dgdx, dgdy; - GLfloat dbdx, dbdy; - GLfloat dadx, dady; - /** * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates * which of the fragment arrays in the span_arrays struct are relevant. diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 9b775928cd..6c2e3862a3 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -676,13 +676,13 @@ fast_persp_span(GLcontext *ctx, SWspan *span, const GLuint savedTexEnable = ctx->Texture._EnabledUnits; ctx->Texture._EnabledUnits = 0; - tex_coord[0] = span->tex[0][0] * (info->smask + 1); - tex_step[0] = span->texStepX[0][0] * (info->smask + 1); - tex_coord[1] = span->tex[0][1] * (info->tmask + 1); - tex_step[1] = span->texStepX[0][1] * (info->tmask + 1); - /* span->tex[0][2] only if 3D-texturing, here only 2D */ - tex_coord[2] = span->tex[0][3]; - tex_step[2] = span->texStepX[0][3]; + tex_coord[0] = span->attrStart[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_step[0] = span->attrStepX[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_coord[1] = span->attrStart[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + tex_step[1] = span->attrStepX[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + /* span->attrStart[FRAG_ATTRIB_TEX0][2] only if 3D-texturing, here only 2D */ + tex_coord[2] = span->attrStart[FRAG_ATTRIB_TEX0][3]; + tex_step[2] = span->attrStepX[FRAG_ATTRIB_TEX0][3]; switch (info->filter) { case GL_NEAREST: diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index c8fe4b6e9e..83b2f03781 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -128,6 +128,8 @@ GLuint u; \ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { \ if (ctx->Texture._EnabledCoordUnits & (1 << u)) { \ + const GLuint attr = FRAG_ATTRIB_TEX0 + u; \ + (void) attr; \ CODE \ } \ } \ @@ -137,6 +139,8 @@ #define TEX_UNIT_LOOP(CODE) \ { \ const GLuint u = 0; \ + const GLuint attr = FRAG_ATTRIB_TEX0 + u; \ + (void) attr; \ CODE \ } #endif @@ -145,17 +149,18 @@ #ifdef INTERP_VARYING -#define VARYING_LOOP(CODE) \ - { \ - GLuint iv, ic; \ - for (iv = 0; iv < MAX_VARYING; iv++) { \ - if (inputsUsed & FRAG_BIT_VAR(iv)) { \ +#define VARYING_LOOP(CODE) \ + { \ + GLuint iv, ic; \ + for (iv = 0; iv < MAX_VARYING; iv++) { \ + if (inputsUsed & FRAG_BIT_VAR(iv)) { \ GLuint attr = FRAG_ATTRIB_VAR0 + iv; \ - for (ic = 0; ic < 4; ic++) { \ - CODE \ - } \ - } \ - } \ + (void) attr; \ + for (ic = 0; ic < 4; ic++) { \ + CODE \ + } \ + } \ + } \ } #endif @@ -473,19 +478,19 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, { GLfloat eMaj_dz = vMax->win[2] - vMin->win[2]; GLfloat eBot_dz = vMid->win[2] - vMin->win[2]; - span.dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); - if (span.dzdx > maxDepth || span.dzdx < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { /* probably a sliver triangle */ - span.dzdx = 0.0; - span.dzdy = 0.0; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; } else { - span.dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); } if (depthBits <= 16) - span.zStep = SignedFloatToFixed(span.dzdx); + span.zStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_WPOS][2]); else - span.zStep = (GLint) span.dzdx; + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; } #endif #ifdef INTERP_W @@ -493,8 +498,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, { const GLfloat eMaj_dw = vMax->win[3] - vMin->win[3]; const GLfloat eBot_dw = vMid->win[3] - vMin->win[3]; - span.dwdx = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); - span.dwdy = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); + span.attrStepX[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); + span.attrStepY[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); } #endif #ifdef INTERP_FOG @@ -525,37 +530,37 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLfloat eMaj_da = (GLfloat) ((ColorTemp) vMax->color[ACOMP] - (ColorTemp) vMin->color[ACOMP]); GLfloat eBot_da = (GLfloat) ((ColorTemp) vMid->color[ACOMP] - (ColorTemp) vMin->color[ACOMP]); # endif - span.drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); - span.drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); - span.dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); - span.dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); - span.dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); - span.dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); # if CHAN_TYPE == GL_FLOAT - span.redStep = span.drdx; - span.greenStep = span.dgdx; - span.blueStep = span.dbdx; + span.redStep = span.attrStepX[FRAG_ATTRIB_COL0][0]; + span.greenStep = span.attrStepX[FRAG_ATTRIB_COL0][1]; + span.blueStep = span.attrStepX[FRAG_ATTRIB_COL0][2]; # else - span.redStep = SignedFloatToFixed(span.drdx); - span.greenStep = SignedFloatToFixed(span.dgdx); - span.blueStep = SignedFloatToFixed(span.dbdx); + span.redStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][0]); + span.greenStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][1]); + span.blueStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][2]); # endif /* GL_FLOAT */ # ifdef INTERP_ALPHA - span.dadx = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); - span.dady = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); # if CHAN_TYPE == GL_FLOAT - span.alphaStep = span.dadx; + span.alphaStep = span.attrStepX[FRAG_ATTRIB_COL0][3]; # else - span.alphaStep = SignedFloatToFixed(span.dadx); + span.alphaStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][3]); # endif /* GL_FLOAT */ # endif /* INTERP_ALPHA */ } else { ASSERT(ctx->Light.ShadeModel == GL_FLAT); span.interpMask |= SPAN_FLAT; - span.drdx = span.drdy = 0.0F; - span.dgdx = span.dgdy = 0.0F; - span.dbdx = span.dbdy = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; # if CHAN_TYPE == GL_FLOAT span.redStep = 0.0F; span.greenStep = 0.0F; @@ -566,7 +571,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, span.blueStep = 0; # endif /* GL_FLOAT */ # ifdef INTERP_ALPHA - span.dadx = span.dady = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepX[FRAG_ATTRIB_COL0][3] = 0.0F; # if CHAN_TYPE == GL_FLOAT span.alphaStep = 0.0F; # else @@ -637,12 +642,12 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLfloat eBot_ds = (vMid->texcoord[0][0] - vMin->texcoord[0][0]) * S_SCALE; GLfloat eMaj_dt = (vMax->texcoord[0][1] - vMin->texcoord[0][1]) * T_SCALE; GLfloat eBot_dt = (vMid->texcoord[0][1] - vMin->texcoord[0][1]) * T_SCALE; - span.texStepX[0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); - span.texStepY[0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); - span.texStepX[0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); - span.texStepY[0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); - span.intTexStep[0] = SignedFloatToFixed(span.texStepX[0][0]); - span.intTexStep[1] = SignedFloatToFixed(span.texStepX[0][1]); + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_TEX0][0]); + span.intTexStep[1] = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_TEX0][1]); } #endif #ifdef INTERP_TEX @@ -659,14 +664,14 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLfloat eBot_du = vMid->texcoord[u][2] * wMid - vMin->texcoord[u][2] * wMin; GLfloat eMaj_dv = vMax->texcoord[u][3] * wMax - vMin->texcoord[u][3] * wMin; GLfloat eBot_dv = vMid->texcoord[u][3] * wMid - vMin->texcoord[u][3] * wMin; - span.texStepX[u][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); - span.texStepY[u][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); - span.texStepX[u][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); - span.texStepY[u][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); - span.texStepX[u][2] = oneOverArea * (eMaj_du * eBot.dy - eMaj.dy * eBot_du); - span.texStepY[u][2] = oneOverArea * (eMaj.dx * eBot_du - eMaj_du * eBot.dx); - span.texStepX[u][3] = oneOverArea * (eMaj_dv * eBot.dy - eMaj.dy * eBot_dv); - span.texStepY[u][3] = oneOverArea * (eMaj.dx * eBot_dv - eMaj_dv * eBot.dx); + span.attrStepX[attr][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[attr][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[attr][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[attr][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.attrStepX[attr][2] = oneOverArea * (eMaj_du * eBot.dy - eMaj.dy * eBot_du); + span.attrStepY[attr][2] = oneOverArea * (eMaj.dx * eBot_du - eMaj_du * eBot.dx); + span.attrStepX[attr][3] = oneOverArea * (eMaj_dv * eBot.dy - eMaj.dy * eBot_dv); + span.attrStepY[attr][3] = oneOverArea * (eMaj.dx * eBot_dv - eMaj_dv * eBot.dx); ) } #endif @@ -901,19 +906,20 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLfloat z0 = vLower->win[2]; if (depthBits <= 16) { /* interpolate fixed-pt values */ - GLfloat tmp = (z0 * FIXED_SCALE + span.dzdx * adjx - + span.dzdy * adjy) + FIXED_HALF; + GLfloat tmp = (z0 * FIXED_SCALE + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + FIXED_HALF; if (tmp < MAX_GLUINT / 2) zLeft = (GLfixed) tmp; else zLeft = MAX_GLUINT / 2; - fdzOuter = SignedFloatToFixed(span.dzdy + dxOuter * span.dzdx); + fdzOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); } else { /* interpolate depth values w/out scaling */ - zLeft = (GLuint) (z0 + span.dzdx * FixedToFloat(adjx) - + span.dzdy * FixedToFloat(adjy)); - fdzOuter = (GLint) (span.dzdy + dxOuter * span.dzdx); + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * FixedToFloat(adjx) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * FixedToFloat(adjy)); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); } # ifdef DEPTH_TYPE zRow = (DEPTH_TYPE *) @@ -923,8 +929,8 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, } #endif #ifdef INTERP_W - wLeft = vLower->win[3] + (span.dwdx * adjx + span.dwdy * adjy) * (1.0F/FIXED_SCALE); - dwOuter = span.dwdy + dxOuter * span.dwdx; + wLeft = vLower->win[3] + (span.attrStepX[FRAG_ATTRIB_WPOS][3] * adjx + span.attrStepY[FRAG_ATTRIB_WPOS][3] * adjy) * (1.0F/FIXED_SCALE); + dwOuter = span.attrStepY[FRAG_ATTRIB_WPOS][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][3]; #endif #ifdef INTERP_FOG # ifdef INTERP_W @@ -937,27 +943,27 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_RGB if (ctx->Light.ShadeModel == GL_SMOOTH) { # if CHAN_TYPE == GL_FLOAT - rLeft = vLower->color[RCOMP] + (span.drdx * adjx + span.drdy * adjy) * (1.0F / FIXED_SCALE); - gLeft = vLower->color[GCOMP] + (span.dgdx * adjx + span.dgdy * adjy) * (1.0F / FIXED_SCALE); - bLeft = vLower->color[BCOMP] + (span.dbdx * adjx + span.dbdy * adjy) * (1.0F / FIXED_SCALE); - fdrOuter = span.drdy + dxOuter * span.drdx; - fdgOuter = span.dgdy + dxOuter * span.dgdx; - fdbOuter = span.dbdy + dxOuter * span.dbdx; + rLeft = vLower->color[RCOMP] + (span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) * (1.0F / FIXED_SCALE); + gLeft = vLower->color[GCOMP] + (span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) * (1.0F / FIXED_SCALE); + bLeft = vLower->color[BCOMP] + (span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) * (1.0F / FIXED_SCALE); + fdrOuter = span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]; + fdgOuter = span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]; + fdbOuter = span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]; # else - rLeft = (GLint)(ChanToFixed(vLower->color[RCOMP]) + span.drdx * adjx + span.drdy * adjy) + FIXED_HALF; - gLeft = (GLint)(ChanToFixed(vLower->color[GCOMP]) + span.dgdx * adjx + span.dgdy * adjy) + FIXED_HALF; - bLeft = (GLint)(ChanToFixed(vLower->color[BCOMP]) + span.dbdx * adjx + span.dbdy * adjy) + FIXED_HALF; - fdrOuter = SignedFloatToFixed(span.drdy + dxOuter * span.drdx); - fdgOuter = SignedFloatToFixed(span.dgdy + dxOuter * span.dgdx); - fdbOuter = SignedFloatToFixed(span.dbdy + dxOuter * span.dbdx); + rLeft = (GLint)(ChanToFixed(vLower->color[RCOMP]) + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + FIXED_HALF; + gLeft = (GLint)(ChanToFixed(vLower->color[GCOMP]) + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + FIXED_HALF; + bLeft = (GLint)(ChanToFixed(vLower->color[BCOMP]) + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + FIXED_HALF; + fdrOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]); + fdgOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]); + fdbOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]); # endif # ifdef INTERP_ALPHA # if CHAN_TYPE == GL_FLOAT - aLeft = vLower->color[ACOMP] + (span.dadx * adjx + span.dady * adjy) * (1.0F / FIXED_SCALE); - fdaOuter = span.dady + dxOuter * span.dadx; + aLeft = vLower->color[ACOMP] + (span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjy) * (1.0F / FIXED_SCALE); + fdaOuter = span.attrStepX[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]; # else - aLeft = (GLint)(ChanToFixed(vLower->color[ACOMP]) + span.dadx * adjx + span.dady * adjy) + FIXED_HALF; - fdaOuter = SignedFloatToFixed(span.dady + dxOuter * span.dadx); + aLeft = (GLint)(ChanToFixed(vLower->color[ACOMP]) + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjy) + FIXED_HALF; + fdaOuter = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]); # endif # endif } @@ -1037,14 +1043,14 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, { GLfloat s0, t0; s0 = vLower->texcoord[0][0] * S_SCALE; - sLeft = (GLfixed)(s0 * FIXED_SCALE + span.texStepX[0][0] * adjx - + span.texStepY[0][0] * adjy) + FIXED_HALF; - dsOuter = SignedFloatToFixed(span.texStepY[0][0] + dxOuter * span.texStepX[0][0]); + sLeft = (GLfixed)(s0 * FIXED_SCALE + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + FIXED_HALF; + dsOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]); t0 = vLower->texcoord[0][1] * T_SCALE; - tLeft = (GLfixed)(t0 * FIXED_SCALE + span.texStepX[0][1] * adjx - + span.texStepY[0][1] * adjy) + FIXED_HALF; - dtOuter = SignedFloatToFixed(span.texStepY[0][1] + dxOuter * span.texStepX[0][1]); + tLeft = (GLfixed)(t0 * FIXED_SCALE + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + FIXED_HALF; + dtOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]); } #endif #ifdef INTERP_TEX @@ -1054,14 +1060,14 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, const GLfloat t0 = vLower->texcoord[u][1] * invW; const GLfloat u0 = vLower->texcoord[u][2] * invW; const GLfloat v0 = vLower->texcoord[u][3] * invW; - sLeft[u] = s0 + (span.texStepX[u][0] * adjx + span.texStepY[u][0] * adjy) * (1.0F/FIXED_SCALE); - tLeft[u] = t0 + (span.texStepX[u][1] * adjx + span.texStepY[u][1] * adjy) * (1.0F/FIXED_SCALE); - uLeft[u] = u0 + (span.texStepX[u][2] * adjx + span.texStepY[u][2] * adjy) * (1.0F/FIXED_SCALE); - vLeft[u] = v0 + (span.texStepX[u][3] * adjx + span.texStepY[u][3] * adjy) * (1.0F/FIXED_SCALE); - dsOuter[u] = span.texStepY[u][0] + dxOuter * span.texStepX[u][0]; - dtOuter[u] = span.texStepY[u][1] + dxOuter * span.texStepX[u][1]; - duOuter[u] = span.texStepY[u][2] + dxOuter * span.texStepX[u][2]; - dvOuter[u] = span.texStepY[u][3] + dxOuter * span.texStepX[u][3]; + sLeft[u] = s0 + (span.attrStepX[attr][0] * adjx + span.attrStepY[attr][0] * adjy) * (1.0F/FIXED_SCALE); + tLeft[u] = t0 + (span.attrStepX[attr][1] * adjx + span.attrStepY[attr][1] * adjy) * (1.0F/FIXED_SCALE); + uLeft[u] = u0 + (span.attrStepX[attr][2] * adjx + span.attrStepY[attr][2] * adjy) * (1.0F/FIXED_SCALE); + vLeft[u] = v0 + (span.attrStepX[attr][3] * adjx + span.attrStepY[attr][3] * adjy) * (1.0F/FIXED_SCALE); + dsOuter[u] = span.attrStepY[attr][0] + dxOuter * span.attrStepX[attr][0]; + dtOuter[u] = span.attrStepY[attr][1] + dxOuter * span.attrStepX[attr][1]; + duOuter[u] = span.attrStepY[attr][2] + dxOuter * span.attrStepX[attr][2]; + dvOuter[u] = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; ) #endif #ifdef INTERP_VARYING @@ -1102,7 +1108,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, fdzInner = fdzOuter + span.zStep; #endif #ifdef INTERP_W - dwInner = dwOuter + span.dwdx; + dwInner = dwOuter + span.attrStepX[FRAG_ATTRIB_WPOS][3]; #endif #ifdef INTERP_FOG dfogInner = dfogOuter + span.attrStepX[FRAG_ATTRIB_FOGC][0]; @@ -1129,10 +1135,10 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #endif #ifdef INTERP_TEX TEX_UNIT_LOOP( - dsInner[u] = dsOuter[u] + span.texStepX[u][0]; - dtInner[u] = dtOuter[u] + span.texStepX[u][1]; - duInner[u] = duOuter[u] + span.texStepX[u][2]; - dvInner[u] = dvOuter[u] + span.texStepX[u][3]; + dsInner[u] = dsOuter[u] + span.attrStepX[attr][0]; + dtInner[u] = dtOuter[u] + span.attrStepX[attr][1]; + duInner[u] = duOuter[u] + span.attrStepX[attr][2]; + dvInner[u] = dvOuter[u] + span.attrStepX[attr][3]; ) #endif #ifdef INTERP_VARYING @@ -1155,7 +1161,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, span.z = zLeft; #endif #ifdef INTERP_W - span.w = wLeft; + span.attrStart[FRAG_ATTRIB_WPOS][3] = wLeft; #endif #ifdef INTERP_FOG span.attrStart[FRAG_ATTRIB_FOGC][0] = fogLeft; @@ -1183,10 +1189,10 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_TEX TEX_UNIT_LOOP( - span.tex[u][0] = sLeft[u]; - span.tex[u][1] = tLeft[u]; - span.tex[u][2] = uLeft[u]; - span.tex[u][3] = vLeft[u]; + span.attrStart[attr][0] = sLeft[u]; + span.attrStart[attr][1] = tLeft[u]; + span.attrStart[attr][2] = uLeft[u]; + span.attrStart[attr][3] = vLeft[u]; ) #endif #ifdef INTERP_VARYING -- cgit v1.2.3 From e4f976b8b9d74a74b5816146cb11880c3a493929 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 11:19:43 -0700 Subject: simplify interpolate_texcoords() --- src/mesa/swrast/s_span.c | 388 +++++++++++++++-------------------------------- 1 file changed, 126 insertions(+), 262 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index ddc63594f2..6fb5998627 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -75,7 +75,8 @@ _swrast_span_default_z( GLcontext *ctx, SWspan *span ) void _swrast_span_default_fog( GLcontext *ctx, SWspan *span ) { - span->attrStart[FRAG_ATTRIB_FOGC][0] = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance); + span->attrStart[FRAG_ATTRIB_FOGC][0] + = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance); span->attrStepX[FRAG_ATTRIB_FOGC][0] = 0.0; span->attrStepY[FRAG_ATTRIB_FOGC][0] = 0.0; span->interpMask |= SPAN_FOG; @@ -540,284 +541,147 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, static void interpolate_texcoords(GLcontext *ctx, SWspan *span) { + const GLuint maxUnit + = (ctx->Texture._EnabledCoordUnits > 1) ? ctx->Const.MaxTextureUnits : 1; + GLuint u; + ASSERT(span->interpMask & SPAN_TEXTURE); ASSERT(!(span->arrayMask & SPAN_TEXTURE)); - if (ctx->Texture._EnabledCoordUnits > 1) { - /* multitexture */ - GLuint u; - span->arrayMask |= SPAN_TEXTURE; - /* XXX CoordUnits vs. ImageUnits */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture._EnabledCoordUnits & (1 << u)) { - const GLuint attr = FRAG_ATTRIB_TEX0 + u; - const struct gl_texture_object *obj =ctx->Texture.Unit[u]._Current; - GLfloat texW, texH; - GLboolean needLambda; - if (obj) { - const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; - needLambda = (obj->MinFilter != obj->MagFilter) - || ctx->FragmentProgram._Current; - texW = img->WidthScale; - texH = img->HeightScale; - } - else { - /* using a fragment program */ - texW = 1.0; - texH = 1.0; - needLambda = GL_FALSE; - } - if (needLambda) { - GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0 + u]; - GLfloat *lambda = span->array->lambda[u]; - const GLfloat dsdx = span->attrStepX[attr][0]; - const GLfloat dsdy = span->attrStepY[attr][0]; - const GLfloat dtdx = span->attrStepX[attr][1]; - const GLfloat dtdy = span->attrStepY[attr][1]; - const GLfloat drdx = span->attrStepX[attr][2]; - const GLfloat dqdx = span->attrStepX[attr][3]; - const GLfloat dqdy = span->attrStepY[attr][3]; - GLfloat s = span->attrStart[attr][0]; - GLfloat t = span->attrStart[attr][1]; - GLfloat r = span->attrStart[attr][2]; - GLfloat q = span->attrStart[attr][3]; - GLuint i; - if (ctx->FragmentProgram._Current - || ctx->ATIFragmentShader._Enabled) { - /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; - for (i = 0; i < span->end; i++) { - const GLfloat invW = 1.0F / w; - texcoord[i][0] = s * invW; - texcoord[i][1] = t * invW; - texcoord[i][2] = r * invW; - texcoord[i][3] = q * invW; - lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, - dqdx, dqdy, texW, texH, - s, t, q, invW); - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - w += dwdx; - } - } - else { - for (i = 0; i < span->end; i++) { - const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, - dqdx, dqdy, texW, texH, - s, t, q, invQ); - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - } + span->arrayMask |= SPAN_TEXTURE; + + /* XXX CoordUnits vs. ImageUnits */ + for (u = 0; u < maxUnit; u++) { + if (ctx->Texture._EnabledCoordUnits & (1 << u)) { + const GLuint attr = FRAG_ATTRIB_TEX0 + u; + const struct gl_texture_object *obj =ctx->Texture.Unit[u]._Current; + GLfloat texW, texH; + GLboolean needLambda; + GLfloat (*texcoord)[4] = span->array->attribs[attr]; + GLfloat *lambda = span->array->lambda[u]; + const GLfloat dsdx = span->attrStepX[attr][0]; + const GLfloat dsdy = span->attrStepY[attr][0]; + const GLfloat dtdx = span->attrStepX[attr][1]; + const GLfloat dtdy = span->attrStepY[attr][1]; + const GLfloat drdx = span->attrStepX[attr][2]; + const GLfloat dqdx = span->attrStepX[attr][3]; + const GLfloat dqdy = span->attrStepY[attr][3]; + GLfloat s = span->attrStart[attr][0]; + GLfloat t = span->attrStart[attr][1]; + GLfloat r = span->attrStart[attr][2]; + GLfloat q = span->attrStart[attr][3]; + + if (obj) { + const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; + needLambda = (obj->MinFilter != obj->MagFilter) + || ctx->FragmentProgram._Current; + texW = img->WidthScale; + texH = img->HeightScale; + } + else { + /* using a fragment program */ + texW = 1.0; + texH = 1.0; + needLambda = GL_FALSE; + } + + if (needLambda) { + GLuint i; + if (ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled) { + /* do perspective correction but don't divide s, t, r by q */ + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; + for (i = 0; i < span->end; i++) { + const GLfloat invW = 1.0F / w; + texcoord[i][0] = s * invW; + texcoord[i][1] = t * invW; + texcoord[i][2] = r * invW; + texcoord[i][3] = q * invW; + lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, + dqdx, dqdy, texW, texH, + s, t, q, invW); + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; + w += dwdx; } - span->arrayMask |= SPAN_LAMBDA; } else { - GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0 + u]; - GLfloat *lambda = span->array->lambda[u]; - const GLfloat dsdx = span->attrStepX[attr][0]; - const GLfloat dtdx = span->attrStepX[attr][1]; - const GLfloat drdx = span->attrStepX[attr][2]; - const GLfloat dqdx = span->attrStepX[attr][3]; - GLfloat s = span->attrStart[attr][0]; - GLfloat t = span->attrStart[attr][1]; - GLfloat r = span->attrStart[attr][2]; - GLfloat q = span->attrStart[attr][3]; - GLuint i; - if (ctx->FragmentProgram._Current || - ctx->ATIFragmentShader._Enabled) { - /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; - for (i = 0; i < span->end; i++) { - const GLfloat invW = 1.0F / w; - texcoord[i][0] = s * invW; - texcoord[i][1] = t * invW; - texcoord[i][2] = r * invW; - texcoord[i][3] = q * invW; - lambda[i] = 0.0; - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - w += dwdx; - } - } - else if (dqdx == 0.0F) { - /* Ortho projection or polygon's parallel to window X axis */ + for (i = 0; i < span->end; i++) { const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - for (i = 0; i < span->end; i++) { - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - lambda[i] = 0.0; - s += dsdx; - t += dtdx; - r += drdx; - } - } - else { - for (i = 0; i < span->end; i++) { - const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - lambda[i] = 0.0; - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - } + texcoord[i][0] = s * invQ; + texcoord[i][1] = t * invQ; + texcoord[i][2] = r * invQ; + texcoord[i][3] = q; + lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, + dqdx, dqdy, texW, texH, + s, t, q, invQ); + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; } - } /* lambda */ - } /* if */ - } /* for */ - } - else { - /* single texture */ - const struct gl_texture_object *obj = ctx->Texture.Unit[0]._Current; - GLfloat texW, texH; - GLboolean needLambda; - if (obj) { - const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; - needLambda = (obj->MinFilter != obj->MagFilter) - || ctx->FragmentProgram._Current; - texW = (GLfloat) img->WidthScale; - texH = (GLfloat) img->HeightScale; - } - else { - needLambda = GL_FALSE; - texW = texH = 1.0; - } - span->arrayMask |= SPAN_TEXTURE; - if (needLambda) { - /* just texture unit 0, with lambda */ - GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0]; - GLfloat *lambda = span->array->lambda[0]; - const GLfloat dsdx = span->attrStepX[FRAG_ATTRIB_TEX0][0]; - const GLfloat dsdy = span->attrStepY[FRAG_ATTRIB_TEX0][0]; - const GLfloat dtdx = span->attrStepX[FRAG_ATTRIB_TEX0][1]; - const GLfloat dtdy = span->attrStepY[FRAG_ATTRIB_TEX0][1]; - const GLfloat drdx = span->attrStepX[FRAG_ATTRIB_TEX0][2]; - const GLfloat dqdx = span->attrStepX[FRAG_ATTRIB_TEX0][3]; - const GLfloat dqdy = span->attrStepY[FRAG_ATTRIB_TEX0][3]; - GLfloat s = span->attrStart[FRAG_ATTRIB_TEX0][0]; - GLfloat t = span->attrStart[FRAG_ATTRIB_TEX0][1]; - GLfloat r = span->attrStart[FRAG_ATTRIB_TEX0][2]; - GLfloat q = span->attrStart[FRAG_ATTRIB_TEX0][3]; - GLuint i; - if (ctx->FragmentProgram._Current - || ctx->ATIFragmentShader._Enabled) { - /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; - for (i = 0; i < span->end; i++) { - const GLfloat invW = 1.0F / w; - texcoord[i][0] = s * invW; - texcoord[i][1] = t * invW; - texcoord[i][2] = r * invW; - texcoord[i][3] = q * invW; - lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, - dqdx, dqdy, texW, texH, - s, t, q, invW); - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - w += dwdx; } + span->arrayMask |= SPAN_LAMBDA; } else { - /* tex.c */ - for (i = 0; i < span->end; i++) { - const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, - dqdx, dqdy, texW, texH, - s, t, q, invQ); - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - } - } - span->arrayMask |= SPAN_LAMBDA; - } - else { - /* just texture 0, without lambda */ - GLfloat (*texcoord)[4] = span->array->attribs[FRAG_ATTRIB_TEX0]; - const GLfloat dsdx = span->attrStepX[FRAG_ATTRIB_TEX0][0]; - const GLfloat dtdx = span->attrStepX[FRAG_ATTRIB_TEX0][1]; - const GLfloat drdx = span->attrStepX[FRAG_ATTRIB_TEX0][2]; - const GLfloat dqdx = span->attrStepX[FRAG_ATTRIB_TEX0][3]; - GLfloat s = span->attrStart[FRAG_ATTRIB_TEX0][0]; - GLfloat t = span->attrStart[FRAG_ATTRIB_TEX0][1]; - GLfloat r = span->attrStart[FRAG_ATTRIB_TEX0][2]; - GLfloat q = span->attrStart[FRAG_ATTRIB_TEX0][3]; - GLuint i; - if (ctx->FragmentProgram._Current - || ctx->ATIFragmentShader._Enabled) { - /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; - for (i = 0; i < span->end; i++) { - const GLfloat invW = 1.0F / w; - texcoord[i][0] = s * invW; - texcoord[i][1] = t * invW; - texcoord[i][2] = r * invW; - texcoord[i][3] = q * invW; - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - w += dwdx; - } - } - else if (dqdx == 0.0F) { - /* Ortho projection or polygon's parallel to window X axis */ - const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - for (i = 0; i < span->end; i++) { - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - s += dsdx; - t += dtdx; - r += drdx; + GLuint i; + if (ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled) { + /* do perspective correction but don't divide s, t, r by q */ + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; + for (i = 0; i < span->end; i++) { + const GLfloat invW = 1.0F / w; + texcoord[i][0] = s * invW; + texcoord[i][1] = t * invW; + texcoord[i][2] = r * invW; + texcoord[i][3] = q * invW; + lambda[i] = 0.0; + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; + w += dwdx; + } } - } - else { - for (i = 0; i < span->end; i++) { + else if (dqdx == 0.0F) { + /* Ortho projection or polygon's parallel to window X axis */ const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; + for (i = 0; i < span->end; i++) { + texcoord[i][0] = s * invQ; + texcoord[i][1] = t * invQ; + texcoord[i][2] = r * invQ; + texcoord[i][3] = q; + lambda[i] = 0.0; + s += dsdx; + t += dtdx; + r += drdx; + } } - } - } - } + else { + for (i = 0; i < span->end; i++) { + const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); + texcoord[i][0] = s * invQ; + texcoord[i][1] = t * invQ; + texcoord[i][2] = r * invQ; + texcoord[i][3] = q; + lambda[i] = 0.0; + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; + } + } + } /* lambda */ + } /* if */ + } /* for */ } + /** * Fill in the arrays->attribs[FRAG_ATTRIB_VARx] arrays from the * interpolation values. -- cgit v1.2.3 From 531348e814359a262eb1fe0a294749ab1b88045f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 11:20:08 -0700 Subject: simplify derivative-related code --- src/mesa/swrast/s_fragprog.c | 131 ++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 90 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 090fd6dd97..343cdf5bc5 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -274,31 +274,18 @@ fetch_vector4_deriv( GLcontext *ctx, } break; case FRAG_ATTRIB_COL0: - if (xOrY == 'X') { - src[0] = span->attrStepX[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); - src[1] = span->attrStepX[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); - src[2] = span->attrStepX[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); - src[3] = span->attrStepX[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); - } - else { - src[0] = span->attrStepY[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); - src[1] = span->attrStepY[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); - src[2] = span->attrStepY[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); - src[3] = span->attrStepY[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); - } - break; case FRAG_ATTRIB_COL1: if (xOrY == 'X') { - src[0] = span->attrStepX[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); - src[1] = span->attrStepX[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); - src[2] = span->attrStepX[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); - src[3] = span->attrStepX[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); + src[0] = span->attrStepX[source->Index][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepX[source->Index][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepX[source->Index][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepX[source->Index][3] * (1.0F / CHAN_MAXF); } else { - src[0] = span->attrStepY[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); - src[1] = span->attrStepY[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); - src[2] = span->attrStepY[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); - src[3] = span->attrStepY[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); + src[0] = span->attrStepY[source->Index][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepY[source->Index][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepY[source->Index][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepY[source->Index][3] * (1.0F / CHAN_MAXF); } break; case FRAG_ATTRIB_FOGC: @@ -315,14 +302,9 @@ fetch_vector4_deriv( GLcontext *ctx, src[3] = 0.0; } break; - case FRAG_ATTRIB_TEX0: - case FRAG_ATTRIB_TEX1: - case FRAG_ATTRIB_TEX2: - case FRAG_ATTRIB_TEX3: - case FRAG_ATTRIB_TEX4: - case FRAG_ATTRIB_TEX5: - case FRAG_ATTRIB_TEX6: - case FRAG_ATTRIB_TEX7: + default: + assert(source->Index < FRAG_ATTRIB_MAX); + /* texcoord or varying */ if (xOrY == 'X') { /* this is a little tricky - I think I've got it right */ const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] @@ -342,8 +324,6 @@ fetch_vector4_deriv( GLcontext *ctx, src[3] = span->attrStepY[source->Index][3] * invQ; } break; - default: - return GL_FALSE; } result[0] = src[GET_SWZ(source->Swizzle, 0)]; @@ -543,7 +523,7 @@ init_machine_deriv( GLcontext *ctx, const SWspan *span, char xOrY, struct fp_machine *dMachine ) { - GLuint u, v; + GLuint attr; ASSERT(xOrY == 'X' || xOrY == 'Y'); @@ -572,34 +552,23 @@ init_machine_deriv( GLcontext *ctx, wpos[3] += span->attrStepY[FRAG_ATTRIB_WPOS][3]; } } - if (program->Base.InputsRead & FRAG_BIT_COL0) { - GLfloat *col0 = machine->Attribs[FRAG_ATTRIB_COL0][machine->CurFrag]; - if (xOrY == 'X') { - col0[0] += span->attrStepX[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); - col0[1] += span->attrStepX[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); - col0[2] += span->attrStepX[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); - col0[3] += span->attrStepX[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); - } - else { - col0[0] += span->attrStepY[FRAG_ATTRIB_COL0][0] * (1.0F / CHAN_MAXF); - col0[1] += span->attrStepY[FRAG_ATTRIB_COL0][1] * (1.0F / CHAN_MAXF); - col0[2] += span->attrStepY[FRAG_ATTRIB_COL0][2] * (1.0F / CHAN_MAXF); - col0[3] += span->attrStepY[FRAG_ATTRIB_COL0][3] * (1.0F / CHAN_MAXF); - } - } - if (program->Base.InputsRead & FRAG_BIT_COL1) { - GLfloat *col1 = machine->Attribs[FRAG_ATTRIB_COL1][machine->CurFrag]; - if (xOrY == 'X') { - col1[0] += span->attrStepX[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); - col1[1] += span->attrStepX[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); - col1[2] += span->attrStepX[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); - col1[3] += span->attrStepX[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); - } - else { - col1[0] += span->attrStepY[FRAG_ATTRIB_COL1][0] * (1.0F / CHAN_MAXF); - col1[1] += span->attrStepY[FRAG_ATTRIB_COL1][1] * (1.0F / CHAN_MAXF); - col1[2] += span->attrStepY[FRAG_ATTRIB_COL1][2] * (1.0F / CHAN_MAXF); - col1[3] += span->attrStepY[FRAG_ATTRIB_COL1][3] * (1.0F / CHAN_MAXF); + + /* primary, secondary colors */ + for (attr = FRAG_ATTRIB_COL0; attr <= FRAG_ATTRIB_COL1; attr++) { + if (program->Base.InputsRead & (1 << attr)) { + GLfloat *col = machine->Attribs[attr][machine->CurFrag]; + if (xOrY == 'X') { + col[0] += span->attrStepX[attr][0] * (1.0F / CHAN_MAXF); + col[1] += span->attrStepX[attr][1] * (1.0F / CHAN_MAXF); + col[2] += span->attrStepX[attr][2] * (1.0F / CHAN_MAXF); + col[3] += span->attrStepX[attr][3] * (1.0F / CHAN_MAXF); + } + else { + col[0] += span->attrStepY[attr][0] * (1.0F / CHAN_MAXF); + col[1] += span->attrStepY[attr][1] * (1.0F / CHAN_MAXF); + col[2] += span->attrStepY[attr][2] * (1.0F / CHAN_MAXF); + col[3] += span->attrStepY[attr][3] * (1.0F / CHAN_MAXF); + } } } if (program->Base.InputsRead & FRAG_BIT_FOGC) { @@ -611,40 +580,22 @@ init_machine_deriv( GLcontext *ctx, fogc[0] += span->attrStepY[FRAG_ATTRIB_FOGC][0]; } } - for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - if (program->Base.InputsRead & FRAG_BIT_TEX(u)) { - GLfloat *tex = machine->Attribs[FRAG_ATTRIB_TEX0 + u][machine->CurFrag]; + /* texcoord and varying vars */ + for (attr = FRAG_ATTRIB_TEX0; attr < FRAG_ATTRIB_MAX; attr++) { + if (program->Base.InputsRead & (1 << attr)) { + GLfloat *val = machine->Attribs[attr][machine->CurFrag]; /* XXX perspective-correct interpolation */ if (xOrY == 'X') { - tex[0] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][0]; - tex[1] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][1]; - tex[2] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][2]; - tex[3] += span->attrStepX[FRAG_ATTRIB_TEX0 + u][3]; - } - else { - tex[0] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][0]; - tex[1] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][1]; - tex[2] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][2]; - tex[3] += span->attrStepY[FRAG_ATTRIB_TEX0 + u][3]; - } - } - } - - for (v = 0; v < ctx->Const.MaxVarying; v++) { - if (program->Base.InputsRead & FRAG_BIT_VAR(v)) { - GLfloat *var = machine->Attribs[FRAG_ATTRIB_VAR0 + v][machine->CurFrag]; - GLuint attr = FRAG_ATTRIB_VAR0 + v; - if (xOrY == 'X') { - var[0] += span->attrStepX[attr][0]; - var[1] += span->attrStepX[attr][1]; - var[2] += span->attrStepX[attr][2]; - var[3] += span->attrStepX[attr][3]; + val[0] += span->attrStepX[attr][0]; + val[1] += span->attrStepX[attr][1]; + val[2] += span->attrStepX[attr][2]; + val[3] += span->attrStepX[attr][3]; } else { - var[0] += span->attrStepY[attr][0]; - var[1] += span->attrStepY[attr][1]; - var[2] += span->attrStepY[attr][2]; - var[3] += span->attrStepY[attr][3]; + val[0] += span->attrStepY[attr][0]; + val[1] += span->attrStepY[attr][1]; + val[2] += span->attrStepY[attr][2]; + val[3] += span->attrStepY[attr][3]; } } } -- cgit v1.2.3 From 6147ccba630f42a76666d72ef0425c5166bc4018 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 11:23:16 -0700 Subject: unroll inner loop of interpolate_varying() --- src/mesa/swrast/s_span.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 6fb5998627..724cf616e8 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -702,19 +702,28 @@ interpolate_varying(GLcontext *ctx, SWspan *span) for (var = 0; var < MAX_VARYING; var++) { if (inputsUsed & FRAG_BIT_VAR(var)) { const GLuint attr = FRAG_ATTRIB_VAR0 + var; - GLuint j; - for (j = 0; j < 4; j++) { - const GLfloat dvdx = span->attrStepX[attr][j]; - GLfloat v = span->attrStart[attr][j]; - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; - GLuint k; - for (k = 0; k < span->end; k++) { - GLfloat invW = 1.0f / w; - span->array->attribs[attr][k][j] = v * invW; - v += dvdx; - w += dwdx; - } + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; + const GLfloat dv0dx = span->attrStepX[attr][0]; + const GLfloat dv1dx = span->attrStepX[attr][1]; + const GLfloat dv2dx = span->attrStepX[attr][2]; + const GLfloat dv3dx = span->attrStepX[attr][3]; + GLfloat v0 = span->attrStart[attr][0]; + GLfloat v1 = span->attrStart[attr][1]; + GLfloat v2 = span->attrStart[attr][2]; + GLfloat v3 = span->attrStart[attr][3]; + GLuint k; + for (k = 0; k < span->end; k++) { + GLfloat invW = 1.0f / w; + span->array->attribs[attr][k][0] = v0 * invW; + span->array->attribs[attr][k][1] = v1 * invW; + span->array->attribs[attr][k][2] = v2 * invW; + span->array->attribs[attr][k][3] = v3 * invW; + v0 += dv0dx; + v1 += dv1dx; + v2 += dv2dx; + v3 += dv3dx; + w += dwdx; } } } -- cgit v1.2.3 From e53ec3a862692218437dcdb647e5b88ba68ee05e Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 11:32:59 -0700 Subject: try to simplify variable initializers --- src/mesa/shader/slang/slang_codegen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index ee1d6cbabc..8631c9a21e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1891,9 +1891,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) RETURN_ERROR2("Undefined variable:", varName, 0); } /* XXX make copy of this initializer? */ - - /* XXX try to simplify initializer here */foo - + _slang_simplify(v->initializer, &A->space, A->atoms); rhs = _slang_gen_operation(A, v->initializer); assert(rhs); init = new_node(IR_MOVE, var, rhs); -- cgit v1.2.3 From 2f5b3c9607fd48418a5b3d3dcd6035a3b976b166 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 11:37:58 -0700 Subject: fix maxInst argument --- src/mesa/swrast/s_fragprog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 343cdf5bc5..740360d460 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -1683,7 +1683,8 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) if (span->array->mask[i]) { init_machine(ctx, &machine, program, span, i); - if (execute_program(ctx, program, ~0, &machine, span, i)) { + if (execute_program(ctx, program, program->Base.NumInstructions, + &machine, span, i)) { /* Store result color */ COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], machine.Outputs[FRAG_RESULT_COLR]); -- cgit v1.2.3 From 5c2174778360bd493573951d378e29f7097abf5b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 11:42:04 -0700 Subject: replace abort() with _mesa_problem() --- src/mesa/shader/slang/slang_codegen.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 8631c9a21e..e384022cea 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2124,8 +2124,11 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) return n; } else { - /* the field is a structure member */ - abort(); + /* the field is a structure member (base.field) */ + /* oper->children[0] is the base */ + /* oper->a_id is the field name */ + _mesa_problem(NULL, "glsl structs/fields not supported yet"); + return NULL; } } -- cgit v1.2.3 From 70570d41996a3754be973ffdc34cd3ae4267878d Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 12:01:29 -0700 Subject: Move guts of slang_lookup_constant() into a new function in slang_simplify.c --- src/mesa/shader/slang/slang_codegen.c | 44 ++++++-------------------- src/mesa/shader/slang/slang_simplify.c | 58 ++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_simplify.h | 5 +++ 3 files changed, 73 insertions(+), 34 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index e384022cea..5ce3e46578 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -29,7 +29,6 @@ */ #include "imports.h" -#include "get.h" #include "macros.h" #include "slang_assemble.h" #include "slang_codegen.h" @@ -61,41 +60,17 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); * \return position of the constant in the paramList. */ static GLint -slang_lookup_constant(const char *name, GLint index, +slang_lookup_constant(const char *name, struct gl_program_parameter_list *paramList, GLuint *swizzleOut) { - struct constant_info { - const char *Name; - const GLenum Token; - }; - static const struct constant_info info[] = { - { "gl_MaxLights", GL_MAX_LIGHTS }, - { "gl_MaxClipPlanes", GL_MAX_CLIP_PLANES }, - { "gl_MaxTextureUnits", GL_MAX_TEXTURE_UNITS }, - { "gl_MaxTextureCoords", GL_MAX_TEXTURE_COORDS }, - { "gl_MaxVertexAttribs", GL_MAX_VERTEX_ATTRIBS }, - { "gl_MaxVertexUniformComponents", GL_MAX_VERTEX_UNIFORM_COMPONENTS }, - { "gl_MaxVaryingFloats", GL_MAX_VARYING_FLOATS }, - { "gl_MaxVertexTextureImageUnits", GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS }, - { "gl_MaxTextureImageUnits", GL_MAX_TEXTURE_IMAGE_UNITS }, - { "gl_MaxFragmentUniformComponents", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS }, - { "gl_MaxCombinedTextureImageUnits", GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS }, - { NULL, 0 } - }; - GLuint i; - - for (i = 0; info[i].Name; i++) { - if (strcmp(info[i].Name, name) == 0) { - /* found */ - GLfloat value = -1.0; - GLint pos; - _mesa_GetFloatv(info[i].Token, &value); - ASSERT(value >= 0.0); /* sanity check that glGetFloatv worked */ - /* XXX named constant! */ - pos = _mesa_add_unnamed_constant(paramList, &value, 1, swizzleOut); - return pos; - } + GLint value = _slang_lookup_constant(name); + if (value >= 0) { + /* XXX named constant! */ + GLfloat fvalue = (GLfloat) value; + GLint pos; + pos = _mesa_add_unnamed_constant(paramList, &fvalue, 1, swizzleOut); + return pos; } return -1; } @@ -300,7 +275,8 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) n->Store->Index = i; } else if (n->Store->File == PROGRAM_CONSTANT) { - GLint i = slang_lookup_constant(varName, 0, prog->Parameters, + /* XXX compile-time constants should be converted to literals */ + GLint i = slang_lookup_constant(varName, prog->Parameters, &n->Store->Swizzle); assert(i >= 0); assert(n->Store->Size == 1); diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index c71313a7bb..19e627489f 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -30,12 +30,57 @@ #include "imports.h" #include "macros.h" +#include "get.h" #include "slang_compile.h" #include "slang_codegen.h" #include "slang_simplify.h" #include "slang_print.h" + + +/** + * Lookup the value of named constant, such as gl_MaxLights. + * \return value of constant, or -1 if unknown + */ +GLint +_slang_lookup_constant(const char *name) +{ + struct constant_info { + const char *Name; + const GLenum Token; + }; + static const struct constant_info info[] = { + { "gl_MaxClipPlanes", GL_MAX_CLIP_PLANES }, + { "gl_MaxCombinedTextureImageUnits", GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS }, + { "gl_MaxDrawBuffers", GL_MAX_DRAW_BUFFERS }, + { "gl_MaxFragmentUniformComponents", GL_MAX_FRAGMENT_UNIFORM_COMPONENTS }, + { "gl_MaxLights", GL_MAX_LIGHTS }, + { "gl_MaxTextureUnits", GL_MAX_TEXTURE_UNITS }, + { "gl_MaxTextureCoords", GL_MAX_TEXTURE_COORDS }, + { "gl_MaxVertexAttribs", GL_MAX_VERTEX_ATTRIBS }, + { "gl_MaxVertexUniformComponents", GL_MAX_VERTEX_UNIFORM_COMPONENTS }, + { "gl_MaxVaryingFloats", GL_MAX_VARYING_FLOATS }, + { "gl_MaxVertexTextureImageUnits", GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS }, + { "gl_MaxTextureImageUnits", GL_MAX_TEXTURE_IMAGE_UNITS }, + { NULL, 0 } + }; + GLuint i; + + for (i = 0; info[i].Name; i++) { + if (strcmp(info[i].Name, name) == 0) { + /* found */ + GLint value = -1.0; + _mesa_GetIntegerv(info[i].Token, &value); + ASSERT(value >= 0); /* sanity check that glGetFloatv worked */ + return value; + } + } + return -1; +} + + + /** * Recursively traverse an AST tree, applying simplifications wherever * possible. @@ -52,6 +97,19 @@ _slang_simplify(slang_operation *oper, GLboolean isBool[4]; GLuint i, n; + if (oper->type == slang_oper_identifier) { + /* see if it's a named constant */ + GLint value = _slang_lookup_constant((char *) oper->a_id); + if (value >= 0) { + oper->literal[0] = + oper->literal[1] = + oper->literal[2] = + oper->literal[3] = value; + oper->type = slang_oper_literal_int; + return; + } + } + /* first, simplify children */ for (i = 0; i < oper->num_children; i++) { _slang_simplify(&oper->children[i], space, atoms); diff --git a/src/mesa/shader/slang/slang_simplify.h b/src/mesa/shader/slang/slang_simplify.h index 5ff7292f0f..b29740eaca 100644 --- a/src/mesa/shader/slang/slang_simplify.h +++ b/src/mesa/shader/slang/slang_simplify.h @@ -2,6 +2,11 @@ #ifndef SLANG_SIMPLIFY_H #define SLANG_SIMPLIFY_H + +extern GLint +_slang_lookup_constant(const char *name); + + extern void _slang_simplify(slang_operation *oper, const slang_assembly_name_space * space, -- cgit v1.2.3 From 06daf74a7131fa092139d09ad7d035f737bc3fe1 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 12:02:53 -0700 Subject: use _slang_simplify() to evaluate array sizes --- src/mesa/shader/slang/slang_compile.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 65329c9db1..4203c3cc6f 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -40,6 +40,7 @@ #include "slang_error.h" #include "slang_emit.h" #include "slang_vartable.h" +#include "slang_simplify.h" #include "slang_print.h" @@ -367,8 +368,11 @@ parse_array_len(slang_parse_ctx * C, slang_output_ctx * O, GLuint * len) space.funcs = O->funs; space.structs = O->structs; space.vars = O->vars; - result = _slang_evaluate_int(O->assembly, O->machine, &space, - &array_size, len, C->atoms); + + /* evaluate compile-time expression which is array size */ + _slang_simplify(&array_size, &space, C->atoms); + result = (array_size.type == slang_oper_literal_int); + slang_operation_destruct(&array_size); return result; } -- cgit v1.2.3 From b12b13f832940d3df3447de0fd86775bd74eac79 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 12:07:57 -0700 Subject: _slang_evaluate_int() no longer used --- src/mesa/shader/slang/slang_storage.c | 50 ----------------------------------- src/mesa/shader/slang/slang_storage.h | 8 ------ 2 files changed, 58 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index dcfb3a0e5f..cf3b1b5258 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -132,56 +132,6 @@ static GLboolean aggregate_variables (slang_storage_aggregate *agg, slang_variab return GL_TRUE; } -GLboolean _slang_evaluate_int (slang_assembly_file *file, slang_machine *pmach, - slang_assembly_name_space *space, slang_operation *array_size, GLuint *pint, - slang_atom_pool *atoms) -{ - slang_assembly_file_restore_point point; - slang_machine mach; - slang_assemble_ctx A; - - A.file = file; - A.mach = pmach; - A.atoms = atoms; - A.space = *space; - A.local.ret_size = 0; - A.local.addr_tmp = 0; - A.local.swizzle_tmp = 4; - - /* save the current assembly */ - if (!slang_assembly_file_restore_point_save (file, &point)) - return GL_FALSE; - - /* setup the machine */ - mach = *pmach; - mach.ip = file->count; - - /* allocate local storage for expression */ - if (!slang_assembly_file_push_label (file, slang_asm_local_alloc, 20)) - return GL_FALSE; - if (!slang_assembly_file_push_label (file, slang_asm_enter, 20)) - return GL_FALSE; - - /* insert the actual expression */ - if (!_slang_assemble_operation (&A, array_size, slang_ref_forbid)) - return GL_FALSE; - if (!slang_assembly_file_push (file, slang_asm_exit)) - return GL_FALSE; - - /* execute the expression */ - if (!_slang_execute2 (file, &mach)) - return GL_FALSE; - - /* the evaluated expression is on top of the stack */ - *pint = (GLuint) mach.mem[mach.sp + SLANG_MACHINE_GLOBAL_SIZE]._float; - - /* restore the old assembly */ - if (!slang_assembly_file_restore_point_load (file, &point)) - return GL_FALSE; - - return GL_TRUE; -} - GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_specifier *spec, GLuint array_len, slang_function_scope *funcs, slang_struct_scope *structs, slang_variable_scope *vars, slang_machine *mach, slang_assembly_file *file, diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index 209f8674d9..0137003a9d 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -103,14 +103,6 @@ _slang_aggregate_variable(slang_storage_aggregate *agg, slang_assembly_file *file, slang_atom_pool *atoms); -extern GLboolean -_slang_evaluate_int(slang_assembly_file *file, - slang_machine *pmach, - slang_assembly_name_space *space, - slang_operation *array_size, - GLuint *pint, - slang_atom_pool *atoms); - /* * Returns the size (in machine units) of the given storage type. * It is an error to pass-in slang_stor_aggregate. -- cgit v1.2.3 From aa6866d63c63262d8e2353148337684e62105bf1 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 12:08:26 -0700 Subject: reindent --- src/mesa/shader/slang/slang_storage.c | 329 ++++++++++++++++++---------------- 1 file changed, 175 insertions(+), 154 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index cf3b1b5258..8196975766 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -33,204 +33,225 @@ /* slang_storage_array */ -GLboolean slang_storage_array_construct (slang_storage_array *arr) +GLboolean +slang_storage_array_construct(slang_storage_array * arr) { - arr->type = slang_stor_aggregate; - arr->aggregate = NULL; - arr->length = 0; - return GL_TRUE; + arr->type = slang_stor_aggregate; + arr->aggregate = NULL; + arr->length = 0; + return GL_TRUE; } -GLvoid slang_storage_array_destruct (slang_storage_array *arr) +GLvoid +slang_storage_array_destruct(slang_storage_array * arr) { - if (arr->aggregate != NULL) - { - slang_storage_aggregate_destruct (arr->aggregate); - slang_alloc_free (arr->aggregate); - } + if (arr->aggregate != NULL) { + slang_storage_aggregate_destruct(arr->aggregate); + slang_alloc_free(arr->aggregate); + } } /* slang_storage_aggregate */ -GLboolean slang_storage_aggregate_construct (slang_storage_aggregate *agg) +GLboolean +slang_storage_aggregate_construct(slang_storage_aggregate * agg) { - agg->arrays = NULL; - agg->count = 0; - return GL_TRUE; + agg->arrays = NULL; + agg->count = 0; + return GL_TRUE; } -GLvoid slang_storage_aggregate_destruct (slang_storage_aggregate *agg) +GLvoid +slang_storage_aggregate_destruct(slang_storage_aggregate * agg) { - GLuint i; + GLuint i; - for (i = 0; i < agg->count; i++) - slang_storage_array_destruct (agg->arrays + i); - slang_alloc_free (agg->arrays); + for (i = 0; i < agg->count; i++) + slang_storage_array_destruct(agg->arrays + i); + slang_alloc_free(agg->arrays); } -static slang_storage_array *slang_storage_aggregate_push_new (slang_storage_aggregate *agg) +static slang_storage_array * +slang_storage_aggregate_push_new(slang_storage_aggregate * agg) { - slang_storage_array *arr = NULL; - - agg->arrays = (slang_storage_array *) slang_alloc_realloc (agg->arrays, agg->count * sizeof ( - slang_storage_array), (agg->count + 1) * sizeof (slang_storage_array)); - if (agg->arrays != NULL) - { - arr = agg->arrays + agg->count; - if (!slang_storage_array_construct (arr)) - return NULL; - agg->count++; - } - return arr; + slang_storage_array *arr = NULL; + + agg->arrays = + (slang_storage_array *) slang_alloc_realloc(agg->arrays, + agg->count * + sizeof(slang_storage_array), + (agg->count + + 1) * + sizeof + (slang_storage_array)); + if (agg->arrays != NULL) { + arr = agg->arrays + agg->count; + if (!slang_storage_array_construct(arr)) + return NULL; + agg->count++; + } + return arr; } /* _slang_aggregate_variable() */ -static GLboolean aggregate_vector (slang_storage_aggregate *agg, slang_storage_type basic_type, - GLuint row_count) +static GLboolean +aggregate_vector(slang_storage_aggregate * agg, slang_storage_type basic_type, + GLuint row_count) { - slang_storage_array *arr = slang_storage_aggregate_push_new (agg); - if (arr == NULL) - return GL_FALSE; - arr->type = basic_type; - arr->length = row_count; - return GL_TRUE; + slang_storage_array *arr = slang_storage_aggregate_push_new(agg); + if (arr == NULL) + return GL_FALSE; + arr->type = basic_type; + arr->length = row_count; + return GL_TRUE; } -static GLboolean aggregate_matrix (slang_storage_aggregate *agg, slang_storage_type basic_type, - GLuint dimension) +static GLboolean +aggregate_matrix(slang_storage_aggregate * agg, slang_storage_type basic_type, + GLuint dimension) { - slang_storage_array *arr = slang_storage_aggregate_push_new (agg); - if (arr == NULL) - return GL_FALSE; - arr->type = slang_stor_aggregate; - arr->length = dimension; - arr->aggregate = (slang_storage_aggregate *) slang_alloc_malloc (sizeof (slang_storage_aggregate)); - if (arr->aggregate == NULL) - return GL_FALSE; - if (!slang_storage_aggregate_construct (arr->aggregate)) - { - slang_alloc_free (arr->aggregate); - arr->aggregate = NULL; - return GL_FALSE; - } - if (!aggregate_vector (arr->aggregate, basic_type, dimension)) - return GL_FALSE; - return GL_TRUE; + slang_storage_array *arr = slang_storage_aggregate_push_new(agg); + if (arr == NULL) + return GL_FALSE; + arr->type = slang_stor_aggregate; + arr->length = dimension; + arr->aggregate = + (slang_storage_aggregate *) + slang_alloc_malloc(sizeof(slang_storage_aggregate)); + if (arr->aggregate == NULL) + return GL_FALSE; + if (!slang_storage_aggregate_construct(arr->aggregate)) { + slang_alloc_free(arr->aggregate); + arr->aggregate = NULL; + return GL_FALSE; + } + if (!aggregate_vector(arr->aggregate, basic_type, dimension)) + return GL_FALSE; + return GL_TRUE; } -static GLboolean aggregate_variables (slang_storage_aggregate *agg, slang_variable_scope *vars, - slang_function_scope *funcs, slang_struct_scope *structs, slang_variable_scope *globals, - slang_machine *mach, slang_assembly_file *file, slang_atom_pool *atoms) +static GLboolean +aggregate_variables(slang_storage_aggregate * agg, + slang_variable_scope * vars, slang_function_scope * funcs, + slang_struct_scope * structs, + slang_variable_scope * globals, slang_machine * mach, + slang_assembly_file * file, slang_atom_pool * atoms) { - GLuint i; + GLuint i; - for (i = 0; i < vars->num_variables; i++) - if (!_slang_aggregate_variable (agg, &vars->variables[i]->type.specifier, - vars->variables[i]->array_len, funcs, structs, globals, mach, file, atoms)) - return GL_FALSE; - return GL_TRUE; + for (i = 0; i < vars->num_variables; i++) + if (!_slang_aggregate_variable(agg, &vars->variables[i]->type.specifier, + vars->variables[i]->array_len, funcs, + structs, globals, mach, file, atoms)) + return GL_FALSE; + return GL_TRUE; } -GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_specifier *spec, - GLuint array_len, slang_function_scope *funcs, slang_struct_scope *structs, - slang_variable_scope *vars, slang_machine *mach, slang_assembly_file *file, - slang_atom_pool *atoms) +GLboolean +_slang_aggregate_variable(slang_storage_aggregate * agg, + slang_type_specifier * spec, GLuint array_len, + slang_function_scope * funcs, + slang_struct_scope * structs, + slang_variable_scope * vars, slang_machine * mach, + slang_assembly_file * file, slang_atom_pool * atoms) { - switch (spec->type) - { - case slang_spec_bool: - return aggregate_vector (agg, slang_stor_bool, 1); - case slang_spec_bvec2: - return aggregate_vector (agg, slang_stor_bool, 2); - case slang_spec_bvec3: - return aggregate_vector (agg, slang_stor_bool, 3); - case slang_spec_bvec4: - return aggregate_vector (agg, slang_stor_bool, 4); - case slang_spec_int: - return aggregate_vector (agg, slang_stor_int, 1); - case slang_spec_ivec2: - return aggregate_vector (agg, slang_stor_int, 2); - case slang_spec_ivec3: - return aggregate_vector (agg, slang_stor_int, 3); - case slang_spec_ivec4: - return aggregate_vector (agg, slang_stor_int, 4); - case slang_spec_float: - return aggregate_vector (agg, slang_stor_float, 1); - case slang_spec_vec2: - return aggregate_vector (agg, slang_stor_float, 2); - case slang_spec_vec3: - return aggregate_vector (agg, slang_stor_float, 3); + switch (spec->type) { + case slang_spec_bool: + return aggregate_vector(agg, slang_stor_bool, 1); + case slang_spec_bvec2: + return aggregate_vector(agg, slang_stor_bool, 2); + case slang_spec_bvec3: + return aggregate_vector(agg, slang_stor_bool, 3); + case slang_spec_bvec4: + return aggregate_vector(agg, slang_stor_bool, 4); + case slang_spec_int: + return aggregate_vector(agg, slang_stor_int, 1); + case slang_spec_ivec2: + return aggregate_vector(agg, slang_stor_int, 2); + case slang_spec_ivec3: + return aggregate_vector(agg, slang_stor_int, 3); + case slang_spec_ivec4: + return aggregate_vector(agg, slang_stor_int, 4); + case slang_spec_float: + return aggregate_vector(agg, slang_stor_float, 1); + case slang_spec_vec2: + return aggregate_vector(agg, slang_stor_float, 2); + case slang_spec_vec3: + return aggregate_vector(agg, slang_stor_float, 3); case slang_spec_vec4: -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - return aggregate_vector (agg, slang_stor_vec4, 1); +#if 0 /*defined(USE_X86_ASM) || defined(SLANG_X86) */ + return aggregate_vector(agg, slang_stor_vec4, 1); #else - return aggregate_vector (agg, slang_stor_float, 4); + return aggregate_vector(agg, slang_stor_float, 4); #endif - case slang_spec_mat2: - return aggregate_matrix (agg, slang_stor_float, 2); - case slang_spec_mat3: - return aggregate_matrix (agg, slang_stor_float, 3); + case slang_spec_mat2: + return aggregate_matrix(agg, slang_stor_float, 2); + case slang_spec_mat3: + return aggregate_matrix(agg, slang_stor_float, 3); case slang_spec_mat4: -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - return aggregate_vector (agg, slang_stor_vec4, 4); +#if 0 /*defined(USE_X86_ASM) || defined(SLANG_X86) */ + return aggregate_vector(agg, slang_stor_vec4, 4); #else - return aggregate_matrix (agg, slang_stor_float, 4); + return aggregate_matrix(agg, slang_stor_float, 4); #endif - case slang_spec_sampler1D: - case slang_spec_sampler2D: - case slang_spec_sampler3D: - case slang_spec_samplerCube: - case slang_spec_sampler1DShadow: - case slang_spec_sampler2DShadow: - return aggregate_vector (agg, slang_stor_int, 1); - case slang_spec_struct: - return aggregate_variables (agg, spec->_struct->fields, funcs, structs, vars, mach, - file, atoms); - case slang_spec_array: - { - slang_storage_array *arr; - - arr = slang_storage_aggregate_push_new (agg); - if (arr == NULL) - return GL_FALSE; - arr->type = slang_stor_aggregate; - arr->aggregate = (slang_storage_aggregate *) slang_alloc_malloc (sizeof (slang_storage_aggregate)); - if (arr->aggregate == NULL) - return GL_FALSE; - if (!slang_storage_aggregate_construct (arr->aggregate)) - { - slang_alloc_free (arr->aggregate); - arr->aggregate = NULL; - return GL_FALSE; - } - if (!_slang_aggregate_variable (arr->aggregate, spec->_array, 0, funcs, structs, - vars, mach, file, atoms)) - return GL_FALSE; - arr->length = array_len; - /* TODO: check if 0 < arr->length <= 65535 */ - } - return GL_TRUE; - default: - return GL_FALSE; - } + case slang_spec_sampler1D: + case slang_spec_sampler2D: + case slang_spec_sampler3D: + case slang_spec_samplerCube: + case slang_spec_sampler1DShadow: + case slang_spec_sampler2DShadow: + return aggregate_vector(agg, slang_stor_int, 1); + case slang_spec_struct: + return aggregate_variables(agg, spec->_struct->fields, funcs, structs, + vars, mach, file, atoms); + case slang_spec_array: + { + slang_storage_array *arr; + + arr = slang_storage_aggregate_push_new(agg); + if (arr == NULL) + return GL_FALSE; + arr->type = slang_stor_aggregate; + arr->aggregate = + (slang_storage_aggregate *) + slang_alloc_malloc(sizeof(slang_storage_aggregate)); + if (arr->aggregate == NULL) + return GL_FALSE; + if (!slang_storage_aggregate_construct(arr->aggregate)) { + slang_alloc_free(arr->aggregate); + arr->aggregate = NULL; + return GL_FALSE; + } + if (!_slang_aggregate_variable + (arr->aggregate, spec->_array, 0, funcs, structs, vars, mach, + file, atoms)) + return GL_FALSE; + arr->length = array_len; + /* TODO: check if 0 < arr->length <= 65535 */ + } + return GL_TRUE; + default: + return GL_FALSE; + } } /* _slang_sizeof_type() */ GLuint -_slang_sizeof_type (slang_storage_type type) +_slang_sizeof_type(slang_storage_type type) { if (type == slang_stor_aggregate) return 0; if (type == slang_stor_vec4) - return 4 * sizeof (GLfloat); - return sizeof (GLfloat); + return 4 * sizeof(GLfloat); + return sizeof(GLfloat); } /* _slang_sizeof_aggregate() */ -GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *agg) +GLuint +_slang_sizeof_aggregate(const slang_storage_aggregate * agg) { GLuint i, size = 0; @@ -239,9 +260,9 @@ GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *agg) GLuint element_size; if (arr->type == slang_stor_aggregate) - element_size = _slang_sizeof_aggregate (arr->aggregate); + element_size = _slang_sizeof_aggregate(arr->aggregate); else - element_size = _slang_sizeof_type (arr->type); + element_size = _slang_sizeof_type(arr->type); size += element_size * arr->length; } return size; @@ -250,7 +271,8 @@ GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *agg) /* _slang_flatten_aggregate () */ GLboolean -_slang_flatten_aggregate (slang_storage_aggregate *flat, const slang_storage_aggregate *agg) +_slang_flatten_aggregate(slang_storage_aggregate * flat, + const slang_storage_aggregate * agg) { GLuint i; @@ -259,7 +281,7 @@ _slang_flatten_aggregate (slang_storage_aggregate *flat, const slang_storage_agg for (j = 0; j < agg->arrays[i].length; j++) { if (agg->arrays[i].type == slang_stor_aggregate) { - if (!_slang_flatten_aggregate (flat, agg->arrays[i].aggregate)) + if (!_slang_flatten_aggregate(flat, agg->arrays[i].aggregate)) return GL_FALSE; } else { @@ -278,7 +300,7 @@ _slang_flatten_aggregate (slang_storage_aggregate *flat, const slang_storage_agg for (k = 0; k < count; k++) { slang_storage_array *arr; - arr = slang_storage_aggregate_push_new (flat); + arr = slang_storage_aggregate_push_new(flat); if (arr == NULL) return GL_FALSE; arr->type = type; @@ -289,4 +311,3 @@ _slang_flatten_aggregate (slang_storage_aggregate *flat, const slang_storage_agg } return GL_TRUE; } - -- cgit v1.2.3 From d265bdf81aac9467119f5cbb6c84a0c4df8282d1 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 13:49:07 -0700 Subject: Remove all dependencies on the old slang interpreter/executor. --- src/mesa/shader/slang/slang_assemble.c | 8 +++---- src/mesa/shader/slang/slang_assemble.h | 1 - src/mesa/shader/slang/slang_assemble_assignment.c | 2 +- src/mesa/shader/slang/slang_assemble_constructor.c | 8 +++---- src/mesa/shader/slang/slang_compile.c | 28 +--------------------- src/mesa/shader/slang/slang_compile.h | 3 +-- src/mesa/shader/slang/slang_compile_function.c | 1 - src/mesa/shader/slang/slang_link.c | 2 -- src/mesa/shader/slang/slang_link.h | 1 - src/mesa/shader/slang/slang_storage.c | 13 +++++----- src/mesa/shader/slang/slang_storage.h | 2 -- 11 files changed, 17 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index 27249078b3..e3b65a1238 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -185,7 +185,7 @@ sizeof_variable(const slang_assemble_ctx * A, slang_type_specifier * spec, if (!slang_storage_aggregate_construct(&agg)) return GL_FALSE; if (!_slang_aggregate_variable(&agg, spec, array_len, A->space.funcs, - A->space.structs, A->space.vars, A->mach, + A->space.structs, A->space.vars, A->file, A->atoms)) { slang_storage_aggregate_destruct(&agg); return GL_FALSE; @@ -551,7 +551,7 @@ _slang_dereference(slang_assemble_ctx * A, slang_operation * op) if (!slang_storage_aggregate_construct(&agg)) goto end1; if (!_slang_aggregate_variable(&agg, &ti.spec, ti.array_len, A->space.funcs, - A->space.structs, A->space.vars, A->mach, + A->space.structs, A->space.vars, A->file, A->atoms)) goto end; @@ -871,7 +871,7 @@ equality(slang_assemble_ctx * A, slang_operation * op, GLboolean equal) goto end1; if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + A->file, A->atoms)) goto end; /* compute the size of the agregate - there are two such aggregates @@ -1094,7 +1094,7 @@ handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, if (!_slang_aggregate_variable(&agg, &field->type.specifier, field->array_len, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) { + A->file, A->atoms)) { slang_storage_aggregate_destruct(&agg); RETURN_NIL(); } diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 4f1512afca..7e380b3c33 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -247,7 +247,6 @@ typedef struct slang_assembly_name_space_ typedef struct slang_assemble_ctx_ { slang_assembly_file *file; - struct slang_machine_ *mach; slang_atom_pool *atoms; slang_assembly_name_space space; slang_assembly_flow_control flow; diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c index bfce04ec88..93a1ef3a08 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.c +++ b/src/mesa/shader/slang/slang_assemble_assignment.c @@ -164,7 +164,7 @@ _slang_assemble_assignment(slang_assemble_ctx * A, const slang_operation * op) goto end1; if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + A->file, A->atoms)) goto end; index = 0; diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c index e045f2f6d2..63407580ca 100644 --- a/src/mesa/shader/slang/slang_assemble_constructor.c +++ b/src/mesa/shader/slang/slang_assemble_constructor.c @@ -182,7 +182,7 @@ sizeof_argument(slang_assemble_ctx * A, GLuint * size, slang_operation * op) goto end1; if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + A->file, A->atoms)) goto end; *size = _slang_sizeof_aggregate(&agg); @@ -214,7 +214,7 @@ constructor_aggregate(slang_assemble_ctx * A, goto end1; if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + A->file, A->atoms)) goto end2; if (!slang_storage_aggregate_construct(&flat_agg)) @@ -276,7 +276,7 @@ _slang_assemble_constructor(slang_assemble_ctx * A, const slang_operation * op) goto end1; if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + A->file, A->atoms)) goto end2; /* calculate size of the constructor */ @@ -316,7 +316,7 @@ _slang_assemble_constructor(slang_assemble_ctx * A, const slang_operation * op) goto end1; if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, A->space.structs, A->space.vars, - A->mach, A->file, A->atoms)) + A->file, A->atoms)) goto end2; /* calculate size of the constructor */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 4203c3cc6f..8148c65a55 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -103,7 +103,6 @@ _slang_code_object_ctr(slang_code_object * self) #if 01 _slang_assembly_file_ctr(&self->assembly); #endif - slang_machine_ctr(&self->machine); self->varpool.next_addr = 0; slang_atom_pool_construct(&self->atompool); slang_export_data_table_ctr(&self->expdata); @@ -123,7 +122,6 @@ _slang_code_object_dtr(slang_code_object * self) #if 01 slang_assembly_file_destruct(&self->assembly); #endif - slang_machine_dtr(&self->machine); slang_atom_pool_destruct(&self->atompool); slang_export_data_table_dtr(&self->expdata); slang_export_code_table_ctr(&self->expcode); @@ -252,7 +250,6 @@ typedef struct slang_output_ctx_ slang_struct_scope *structs; slang_assembly_file *assembly; slang_var_pool *global_pool; - slang_machine *machine; struct gl_program *program; slang_var_table *vartable; } slang_output_ctx; @@ -386,7 +383,7 @@ calculate_var_size(slang_parse_ctx * C, slang_output_ctx * O, if (!slang_storage_aggregate_construct(&agg)) return GL_FALSE; if (!_slang_aggregate_variable(&agg, &var->type.specifier, var->array_len, - O->funs, O->structs, O->vars, O->machine, + O->funs, O->structs, O->vars, O->assembly, C->atoms)) { slang_storage_aggregate_destruct(&agg); return GL_FALSE; @@ -1556,7 +1553,6 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) #if 01 slang_assembly_file_restore_point point; #endif - slang_machine mach; slang_assembly_local_info save_local = A->local; slang_operation op_id, op_assign; GLboolean result; @@ -1567,10 +1563,6 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) return GL_FALSE; #endif - /* setup the machine */ - mach = *A->mach; - mach.ip = A->file->count; - /* allocate local storage for expression */ A->local.ret_size = 0; A->local.addr_tmp = 0; @@ -1635,12 +1627,6 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) if (!slang_assembly_file_push(A->file, slang_asm_exit)) return GL_FALSE; - /* execute the expression */ -#if 0 - if (!_slang_execute2(A->file, &mach)) - return GL_FALSE; -#endif - #if 01 /* restore the old assembly */ if (!slang_assembly_file_restore_point_load(A->file, &point)) @@ -1648,10 +1634,6 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) #endif A->local = save_local; - /* now we copy the contents of the initialized variable back to the original machine */ - _mesa_memcpy((GLubyte *) A->mach->mem + var->address, - (GLubyte *) mach.mem + var->address, var->size); - return GL_TRUE; } @@ -1743,7 +1725,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, slang_assemble_ctx A; A.file = O->assembly; - A.mach = O->machine; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -1773,7 +1754,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, slang_assemble_ctx A; A.file = O->assembly; - A.mach = O->machine; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -1781,10 +1761,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (!initialize_global(&A, var)) return 0; } - else { - _mesa_memset((GLubyte *) (O->machine->mem) + var->address, 0, - var->size); - } } return 1; } @@ -1909,7 +1885,6 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, slang_assemble_ctx A; A.file = O->assembly; - A.mach = O->machine; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -2003,7 +1978,6 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, o.vars = &unit->vars; o.assembly = &unit->object->assembly; o.global_pool = &unit->object->varpool; - o.machine = &unit->object->machine; o.program = program; o.vartable = _slang_new_var_table(maxRegs); _slang_push_var_table(o.vartable); diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index a8311e8546..450119d650 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -28,7 +28,7 @@ #include "imports.h" #include "mtypes.h" #include "slang_export.h" -#include "slang_execute.h" +#include "slang_assemble.h" #include "slang_compile_variable.h" #include "slang_compile_struct.h" #include "slang_compile_operation.h" @@ -82,7 +82,6 @@ typedef struct slang_code_object_ slang_code_unit builtin[SLANG_BUILTIN_TOTAL]; slang_code_unit unit; slang_assembly_file assembly; - slang_machine machine; slang_var_pool varpool; slang_atom_pool atompool; slang_export_data_table expdata; diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index 3642b12e92..c9b33f3b2f 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -246,7 +246,6 @@ _slang_build_export_code_table(slang_export_code_table * tbl, return GL_FALSE; A.file = &unit->object->assembly; - A.mach = &unit->object->machine; A.atoms = &unit->object->atompool; A.space.funcs = &unit->funs; A.space.structs = &unit->structs; diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 008b7ab369..8894f78088 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -646,7 +646,6 @@ _slang_program_ctr (slang_program *self) self->common_fixed_entries[i][j] = ~0; for (j = 0; j < SLANG_COMMON_CODE_MAX; j++) self->code[i][j] = ~0; - self->machines[i] = NULL; self->assemblies[i] = NULL; } for (i = 0; i < SLANG_VERTEX_FIXED_MAX; i++) @@ -859,7 +858,6 @@ _slang_link (slang_program *prog, slang_code_object **objects, GLuint count) return GL_FALSE; resolve_common_fixed (prog->common_fixed_entries[index], &objects[i]->expdata); resolve_common_code (prog->code[index], &objects[i]->expcode); - prog->machines[index] = &objects[i]->machine; prog->assemblies[index] = &objects[i]->assembly; } diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index d9819289ca..8c7d0c01cf 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -332,7 +332,6 @@ typedef struct GLuint vertex_fixed_entries[SLANG_VERTEX_FIXED_MAX]; GLuint fragment_fixed_entries[SLANG_FRAGMENT_FIXED_MAX]; GLuint code[SLANG_SHADER_MAX][SLANG_COMMON_CODE_MAX]; - slang_machine *machines[SLANG_SHADER_MAX]; slang_assembly_file *assemblies[SLANG_SHADER_MAX]; } slang_program; diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 8196975766..899c36cbd3 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -135,7 +135,7 @@ static GLboolean aggregate_variables(slang_storage_aggregate * agg, slang_variable_scope * vars, slang_function_scope * funcs, slang_struct_scope * structs, - slang_variable_scope * globals, slang_machine * mach, + slang_variable_scope * globals, slang_assembly_file * file, slang_atom_pool * atoms) { GLuint i; @@ -143,7 +143,7 @@ aggregate_variables(slang_storage_aggregate * agg, for (i = 0; i < vars->num_variables; i++) if (!_slang_aggregate_variable(agg, &vars->variables[i]->type.specifier, vars->variables[i]->array_len, funcs, - structs, globals, mach, file, atoms)) + structs, globals, file, atoms)) return GL_FALSE; return GL_TRUE; } @@ -153,7 +153,7 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, slang_type_specifier * spec, GLuint array_len, slang_function_scope * funcs, slang_struct_scope * structs, - slang_variable_scope * vars, slang_machine * mach, + slang_variable_scope * vars, slang_assembly_file * file, slang_atom_pool * atoms) { switch (spec->type) { @@ -204,7 +204,7 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, return aggregate_vector(agg, slang_stor_int, 1); case slang_spec_struct: return aggregate_variables(agg, spec->_struct->fields, funcs, structs, - vars, mach, file, atoms); + vars, file, atoms); case slang_spec_array: { slang_storage_array *arr; @@ -223,9 +223,8 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, arr->aggregate = NULL; return GL_FALSE; } - if (!_slang_aggregate_variable - (arr->aggregate, spec->_array, 0, funcs, structs, vars, mach, - file, atoms)) + if (!_slang_aggregate_variable(arr->aggregate, spec->_array, 0, + funcs, structs, vars, file, atoms)) return GL_FALSE; arr->length = array_len; /* TODO: check if 0 < arr->length <= 65535 */ diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index 0137003a9d..3fe60c78fe 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -27,7 +27,6 @@ #include "slang_compile.h" #include "slang_assemble.h" -#include "slang_execute.h" #if defined __cplusplus extern "C" { @@ -99,7 +98,6 @@ _slang_aggregate_variable(slang_storage_aggregate *agg, slang_function_scope *funcs, slang_struct_scope *structs, slang_variable_scope *vars, - slang_machine *mach, slang_assembly_file *file, slang_atom_pool *atoms); -- cgit v1.2.3 From 650d46a107f1a3c49cff93521f80ae84d30ecfe0 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 13:49:39 -0700 Subject: remove slang_execute.c, slang_execute_x86.c --- src/mesa/sources | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index 1b0474c14b..db1d5e8e70 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -180,7 +180,6 @@ SLANG_SOURCES = \ shader/slang/slang_compile_variable.c \ shader/slang/slang_emit.c \ shader/slang/slang_error.c \ - shader/slang/slang_execute.c \ shader/slang/slang_export.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ @@ -201,8 +200,7 @@ ASM_C_SOURCES = \ x86/rtasm/x86sse.c \ sparc/sparc.c \ ppc/common_ppc.c \ - x86-64/x86-64.c \ - shader/slang/slang_execute_x86.c + x86-64/x86-64.c X86_SOURCES = \ x86/common_x86_asm.S \ -- cgit v1.2.3 From ccd3e7dcef8ed091a6947b672d87bd4ee72dcde5 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 13:53:28 -0700 Subject: Remove obsolete files. --- src/mesa/shader/slang/slang_execute.c | 808 ------------------------------ src/mesa/shader/slang/slang_execute.h | 105 ---- src/mesa/shader/slang/slang_execute_x86.c | 756 ---------------------------- 3 files changed, 1669 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_execute.c delete mode 100644 src/mesa/shader/slang/slang_execute.h delete mode 100644 src/mesa/shader/slang/slang_execute_x86.c (limited to 'src') diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c deleted file mode 100644 index 1561df1945..0000000000 --- a/src/mesa/shader/slang/slang_execute.c +++ /dev/null @@ -1,808 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_execute.c - * intermediate code interpreter - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_compile.h" -#include "slang_execute.h" -#include "slang_library_noise.h" -#include "slang_library_texsample.h" - -#define DEBUG_SLANG 0 - -GLvoid -slang_machine_ctr(slang_machine * self) -{ - slang_machine_init(self); - self->infolog = NULL; -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - self->x86.compiled_func = NULL; -#endif -} - -GLvoid -slang_machine_dtr(slang_machine * self) -{ - if (self->infolog != NULL) { - slang_info_log_destruct(self->infolog); - slang_alloc_free(self->infolog); - } -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - if (self->x86.compiled_func != NULL) - _mesa_exec_free(self->x86.compiled_func); -#endif -} - - -/** - * Initialize the shader virtual machine. - * NOTE: stack grows downward in memory. - */ -void -slang_machine_init(slang_machine * mach) -{ - mach->ip = 0; - mach->sp = SLANG_MACHINE_STACK_SIZE; - mach->bp = 0; - mach->kill = GL_FALSE; - mach->exit = GL_FALSE; -} - -#if DEBUG_SLANG - -static void -dump_instruction(FILE * f, slang_assembly * a, unsigned int i) -{ - fprintf(f, "%.5u:\t", i); - - switch (a->type) { - /* core */ - case slang_asm_none: - fprintf(f, "none"); - break; - case slang_asm_float_copy: - fprintf(f, "float_copy\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_float_move: - fprintf(f, "float_move\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_float_push: - fprintf(f, "float_push\t%f", a->literal); - break; - case slang_asm_float_deref: - fprintf(f, "float_deref"); - break; - case slang_asm_float_add: - fprintf(f, "float_add"); - break; - case slang_asm_float_multiply: - fprintf(f, "float_multiply"); - break; - case slang_asm_float_divide: - fprintf(f, "float_divide"); - break; - case slang_asm_float_negate: - fprintf(f, "float_negate"); - break; - case slang_asm_float_less: - fprintf(f, "float_less"); - break; - case slang_asm_float_equal_exp: - fprintf(f, "float_equal"); - break; - case slang_asm_float_equal_int: - fprintf(f, "float_equal\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_float_to_int: - fprintf(f, "float_to_int"); - break; - case slang_asm_float_sine: - fprintf(f, "float_sine"); - break; - case slang_asm_float_arcsine: - fprintf(f, "float_arcsine"); - break; - case slang_asm_float_arctan: - fprintf(f, "float_arctan"); - break; - case slang_asm_float_power: - fprintf(f, "float_power"); - break; - case slang_asm_float_log2: - fprintf(f, "float_log2"); - break; - case slang_asm_float_floor: - fprintf(f, "float_floor"); - break; - case slang_asm_float_ceil: - fprintf(f, "float_ceil"); - break; - case slang_asm_float_noise1: - fprintf(f, "float_noise1"); - break; - case slang_asm_float_noise2: - fprintf(f, "float_noise2"); - break; - case slang_asm_float_noise3: - fprintf(f, "float_noise3"); - break; - case slang_asm_float_noise4: - fprintf(f, "float_noise4"); - break; - case slang_asm_int_copy: - fprintf(f, "int_copy\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_int_move: - fprintf(f, "int_move\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_int_push: - fprintf(f, "int_push\t%d", (GLint) a->literal); - break; - case slang_asm_int_deref: - fprintf(f, "int_deref"); - break; - case slang_asm_int_to_float: - fprintf(f, "int_to_float"); - break; - case slang_asm_int_to_addr: - fprintf(f, "int_to_addr"); - break; - case slang_asm_bool_copy: - fprintf(f, "bool_copy\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_bool_move: - fprintf(f, "bool_move\t%d, %d", a->param[0], a->param[1]); - break; - case slang_asm_bool_push: - fprintf(f, "bool_push\t%d", a->literal != 0.0f); - break; - case slang_asm_bool_deref: - fprintf(f, "bool_deref"); - break; - case slang_asm_addr_copy: - fprintf(f, "addr_copy"); - break; - case slang_asm_addr_push: - fprintf(f, "addr_push\t%u", a->param[0]); - break; - case slang_asm_addr_deref: - fprintf(f, "addr_deref"); - break; - case slang_asm_addr_add: - fprintf(f, "addr_add"); - break; - case slang_asm_addr_multiply: - fprintf(f, "addr_multiply"); - break; - case slang_asm_vec4_tex1d: - fprintf(f, "vec4_tex1d"); - break; - case slang_asm_vec4_tex2d: - fprintf(f, "vec4_tex2d"); - break; - case slang_asm_vec4_tex3d: - fprintf(f, "vec4_tex3d"); - break; - case slang_asm_vec4_texcube: - fprintf(f, "vec4_texcube"); - break; - case slang_asm_vec4_shad1d: - fprintf(f, "vec4_shad1d"); - break; - case slang_asm_vec4_shad2d: - fprintf(f, "vec4_shad2d"); - break; - case slang_asm_jump: - fprintf(f, "jump\t%u", a->param[0]); - break; - case slang_asm_jump_if_zero: - fprintf(f, "jump_if_zero\t%u", a->param[0]); - break; - case slang_asm_enter: - fprintf(f, "enter\t%u", a->param[0]); - break; - case slang_asm_leave: - fprintf(f, "leave"); - break; - case slang_asm_local_alloc: - fprintf(f, "local_alloc\t%u", a->param[0]); - break; - case slang_asm_local_free: - fprintf(f, "local_free\t%u", a->param[0]); - break; - case slang_asm_local_addr: - fprintf(f, "local_addr\t%u, %u", a->param[0], a->param[1]); - break; - case slang_asm_global_addr: - fprintf(f, "global_addr\t%u", a->param[0]); - break; - case slang_asm_call: - fprintf(f, "call\t%u", a->param[0]); - break; - case slang_asm_return: - fprintf(f, "return"); - break; - case slang_asm_discard: - fprintf(f, "discard"); - break; - case slang_asm_exit: - fprintf(f, "exit"); - break; - /* GL_MESA_shader_debug */ - case slang_asm_float_print: - fprintf(f, "float_print"); - break; - case slang_asm_int_print: - fprintf(f, "int_print"); - break; - case slang_asm_bool_print: - fprintf(f, "bool_print"); - break; - /* vec4 */ - case slang_asm_float_to_vec4: - fprintf(f, "float_to_vec4"); - break; - case slang_asm_vec4_add: - fprintf(f, "vec4_add"); - break; - case slang_asm_vec4_subtract: - fprintf(f, "vec4_subtract"); - break; - case slang_asm_vec4_multiply: - fprintf(f, "vec4_multiply"); - break; - case slang_asm_vec4_divide: - fprintf(f, "vec4_divide"); - break; - case slang_asm_vec4_negate: - fprintf(f, "vec4_negate"); - break; - case slang_asm_vec4_dot: - fprintf(f, "vec4_dot"); - break; - case slang_asm_vec4_copy: - fprintf(f, "vec4_copy"); - break; - case slang_asm_vec4_deref: - fprintf(f, "vec4_deref"); - break; - case slang_asm_vec4_equal_int: - fprintf(f, "vec4_equal"); - break; - default: - break; - } - - fprintf(f, "\n"); -} - -static void -dump(const slang_assembly_file * file) -{ - unsigned int i; - static unsigned int counter = 0; - FILE *f; - char filename[256]; - - counter++; - _mesa_sprintf(filename, "~mesa-slang-assembly-dump-(%u).txt", counter); - f = fopen(filename, "w"); - if (f == NULL) - return; - - for (i = 0; i < file->count; i++) - dump_instruction(f, file->code + i, i); - - fclose(f); -} - -#endif - -static GLvoid -ensure_infolog_created(slang_info_log ** infolog) -{ - if (*infolog == NULL) { - *infolog = slang_alloc_malloc(sizeof(slang_info_log)); - if (*infolog == NULL) - return; - slang_info_log_construct(*infolog); - } -} - -GLboolean -_slang_execute2(const slang_assembly_file * file, slang_machine * mach) -{ - slang_machine_slot *stack; - -#if DEBUG_SLANG - static unsigned int counter = 0; - char filename[256]; - FILE *f; -#endif - - /* assume 32-bit floats and uints; should work fine also on 64-bit platforms */ - static_assert(sizeof(GLfloat) == 4); - static_assert(sizeof(GLuint) == 4); - -#if DEBUG_SLANG - dump(file); - counter++; - _mesa_sprintf(filename, "~mesa-slang-assembly-exec-(%u).txt", counter); - f = fopen(filename, "w"); -#endif - -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - if (mach->x86.compiled_func != NULL) { - mach->x86.compiled_func(mach); - return GL_TRUE; - } -#endif - - stack = mach->mem + SLANG_MACHINE_GLOBAL_SIZE; - - while (!mach->exit) { - const slang_assembly *a = &file->code[mach->ip]; - -#if DEBUG_SLANG - if (f != NULL && a->type != slang_asm_none) { - unsigned int i; - - dump_instruction(f, file->code + mach->ip, mach->ip); - fprintf(f, "\t\tsp=%u bp=%u\n", mach->sp, mach->bp); - for (i = mach->sp; i < SLANG_MACHINE_STACK_SIZE; i++) - fprintf(f, "\t%.5u\t%6f\t%u\n", i, stack[i]._float, - stack[i]._addr); - fflush(f); - } -#endif - - mach->ip++; - - switch (a->type) { - /* core */ - case slang_asm_none: - break; - case slang_asm_float_copy: - case slang_asm_int_copy: - case slang_asm_bool_copy: - /* store top value on stack to memory */ -#if 0 - { - GLuint address - = (stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / 4; - GLfloat value = stack[mach->sp]._float; - mach->mem[address]._float = value; - } -#else - mach->mem[(stack[mach->sp + a->param[0] / 4]._addr +a->param[1]) / 4]._float = stack[mach->sp]._float; -#endif - mach->sp++; - break; - case slang_asm_float_move: - case slang_asm_int_move: - case slang_asm_bool_move: - stack[mach->sp + a->param[0] / 4]._float = - stack[mach->sp + - (stack[mach->sp]._addr + a->param[1]) / 4]._float; - break; - case slang_asm_float_push: - case slang_asm_int_push: - case slang_asm_bool_push: - /* push float/int/bool literal onto stop of stack */ - mach->sp--; - stack[mach->sp]._float = a->literal; - break; - case slang_asm_float_deref: - case slang_asm_int_deref: - case slang_asm_bool_deref: - /* load value from memory, replace stop of stack with it */ - stack[mach->sp]._float = mach->mem[stack[mach->sp]._addr / 4]._float; - break; - case slang_asm_float_add: - /* pop two top floats, push sum */ - stack[mach->sp + 1]._float += stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_subtract: - stack[mach->sp + 1]._float -= stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_multiply: - stack[mach->sp + 1]._float *= stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_divide: - stack[mach->sp + 1]._float /= stack[mach->sp]._float; - mach->sp++; - break; - case slang_asm_float_negate: - stack[mach->sp]._float = -stack[mach->sp]._float; - break; - case slang_asm_float_less: - stack[mach->sp + 1]._float = - (stack[mach->sp + 1]._float < stack[mach->sp]._float) - ? (GLfloat) 1 : (GLfloat) 0; - mach->sp++; - break; - case slang_asm_float_equal_exp: - stack[mach->sp + 1]._float = - (stack[mach->sp + 1]._float == stack[mach->sp]._float) - ? (GLfloat) 1 : (GLfloat) 0; - mach->sp++; - break; - case slang_asm_float_equal_int: - /* pop top two values, compare, push 0 or 1 */ - mach->sp--; - stack[mach->sp]._float = - (stack[mach->sp + 1 + a->param[0] / 4]._float == - stack[mach->sp + 1 + a->param[1] / 4]._float) - ? (GLfloat) 1 : (GLfloat) 0; - break; - case slang_asm_float_to_int: - stack[mach->sp]._float = (GLfloat) (GLint) stack[mach->sp]._float; - break; - case slang_asm_float_sine: - stack[mach->sp]._float = (GLfloat) _mesa_sin(stack[mach->sp]._float); - break; - case slang_asm_float_arcsine: - stack[mach->sp]._float = _mesa_asinf(stack[mach->sp]._float); - break; - case slang_asm_float_arctan: - stack[mach->sp]._float = _mesa_atanf(stack[mach->sp]._float); - break; - case slang_asm_float_power: - stack[mach->sp + 1]._float = (GLfloat) - _mesa_pow(stack[mach->sp + 1]._float, stack[mach->sp]._float); - mach->sp++; - break; - case slang_asm_float_log2: - stack[mach->sp]._float = LOG2(stack[mach->sp]._float); - break; -#if 0 - case slang_asm_float_floor: - stack[mach->sp]._float = FLOORF(stack[mach->sp]._float); - break; - case slang_asm_float_ceil: - stack[mach->sp]._float = CEILF(stack[mach->sp]._float); - break; -#endif - case slang_asm_float_noise1: - stack[mach->sp]._float = - _slang_library_noise1(stack[mach->sp]._float); - break; - case slang_asm_float_noise2: - stack[mach->sp + 1]._float = - _slang_library_noise2(stack[mach->sp]._float, - stack[mach->sp + 1]._float); - mach->sp++; - break; - case slang_asm_float_noise3: - stack[mach->sp + 2]._float = - _slang_library_noise3(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float); - mach->sp += 2; - break; - case slang_asm_float_noise4: - stack[mach->sp + 3]._float = - _slang_library_noise4(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, - stack[mach->sp + 3]._float); - mach->sp += 3; - break; - case slang_asm_int_to_float: - break; - case slang_asm_int_to_addr: - stack[mach->sp]._addr = (GLuint) (GLint) stack[mach->sp]._float; - break; - case slang_asm_addr_copy: - mach->mem[stack[mach->sp + 1]._addr / 4]._addr = - stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_addr_push: - case slang_asm_global_addr: - mach->sp--; - stack[mach->sp]._addr = a->param[0]; - break; - case slang_asm_addr_deref: - stack[mach->sp]._addr = mach->mem[stack[mach->sp]._addr / 4]._addr; - break; - case slang_asm_addr_add: - stack[mach->sp + 1]._addr += stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_addr_multiply: - stack[mach->sp + 1]._addr *= stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_vec4_tex1d: - _slang_library_tex1d(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, - &mach->mem[stack[mach->sp + 3]._addr / - 4]._float); - mach->sp += 3; - break; - case slang_asm_vec4_tex2d: - _slang_library_tex2d(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, - stack[mach->sp + 3]._float, - &mach->mem[stack[mach->sp + 4]._addr / - 4]._float); - mach->sp += 4; - break; - case slang_asm_vec4_tex3d: - _slang_library_tex3d(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, - stack[mach->sp + 3]._float, - stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / - 4]._float); - mach->sp += 5; - break; - case slang_asm_vec4_texcube: - _slang_library_texcube(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, - stack[mach->sp + 3]._float, - stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / - 4]._float); - mach->sp += 5; - break; - case slang_asm_vec4_shad1d: - _slang_library_shad1d(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, - stack[mach->sp + 3]._float, - stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / - 4]._float); - mach->sp += 5; - break; - case slang_asm_vec4_shad2d: - _slang_library_shad2d(stack[mach->sp]._float, - stack[mach->sp + 1]._float, - stack[mach->sp + 2]._float, - stack[mach->sp + 3]._float, - stack[mach->sp + 4]._float, - &mach->mem[stack[mach->sp + 5]._addr / - 4]._float); - mach->sp += 5; - break; - case slang_asm_jump: - mach->ip = a->param[0]; - break; - case slang_asm_jump_if_zero: - if (stack[mach->sp]._float == 0.0f) - mach->ip = a->param[0]; - mach->sp++; - break; - case slang_asm_enter: - mach->sp--; - stack[mach->sp]._addr = mach->bp; - mach->bp = mach->sp + a->param[0] / 4; - break; - case slang_asm_leave: - mach->bp = stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_local_alloc: - mach->sp -= a->param[0] / 4; - break; - case slang_asm_local_free: - mach->sp += a->param[0] / 4; - break; - case slang_asm_local_addr: - mach->sp--; - stack[mach->sp]._addr = - SLANG_MACHINE_GLOBAL_SIZE * 4 + mach->bp * 4 - (a->param[0] + - a->param[1]) + 4; - break; - case slang_asm_call: - mach->sp--; - stack[mach->sp]._addr = mach->ip; - mach->ip = a->param[0]; - break; - case slang_asm_return: - mach->ip = stack[mach->sp]._addr; - mach->sp++; - break; - case slang_asm_discard: - mach->kill = GL_TRUE; - break; - case slang_asm_exit: - mach->exit = GL_TRUE; - break; - /* GL_MESA_shader_debug */ - case slang_asm_float_print: - _mesa_printf("slang print: %f\n", stack[mach->sp]._float); - ensure_infolog_created(&mach->infolog); - slang_info_log_print(mach->infolog, "%f", stack[mach->sp]._float); - break; - case slang_asm_int_print: - _mesa_printf("slang print: %d\n", (GLint) stack[mach->sp]._float); - ensure_infolog_created(&mach->infolog); - slang_info_log_print(mach->infolog, "%d", - (GLint) (stack[mach->sp]._float)); - break; - case slang_asm_bool_print: - _mesa_printf("slang print: %s\n", - (GLint) stack[mach->sp]._float ? "true" : "false"); - ensure_infolog_created(&mach->infolog); - slang_info_log_print(mach->infolog, "%s", - (GLint) (stack[mach->sp]. - _float) ? "true" : "false"); - break; - /* vec4 */ - case slang_asm_float_to_vec4: - /* [vec4] | float > [vec4] */ - { - GLuint da = stack[mach->sp + 1]._addr; - mach->mem[da / 4]._float = stack[mach->sp]._float; - mach->sp++; - } - break; - case slang_asm_vec4_add: - /* [vec4] | vec4 > [vec4] */ - { - GLuint da = stack[mach->sp + 4]._addr; - mach->mem[da / 4]._float += stack[mach->sp]._float; - mach->mem[(da + 4) / 4]._float += stack[mach->sp + 1]._float; - mach->mem[(da + 8) / 4]._float += stack[mach->sp + 2]._float; - mach->mem[(da + 12) / 4]._float += stack[mach->sp + 3]._float; - mach->sp += 4; - } - break; - case slang_asm_vec4_subtract: - /* [vec4] | vec4 > [vec4] */ - { - GLuint da = stack[mach->sp + 4]._addr; - mach->mem[da / 4]._float -= stack[mach->sp]._float; - mach->mem[(da + 4) / 4]._float -= stack[mach->sp + 1]._float; - mach->mem[(da + 8) / 4]._float -= stack[mach->sp + 2]._float; - mach->mem[(da + 12) / 4]._float -= stack[mach->sp + 3]._float; - mach->sp += 4; - } - break; - case slang_asm_vec4_multiply: - /* [vec4] | vec4 > [vec4] */ - { - GLuint da = stack[mach->sp + 4]._addr; - mach->mem[da / 4]._float *= stack[mach->sp]._float; - mach->mem[(da + 4) / 4]._float *= stack[mach->sp + 1]._float; - mach->mem[(da + 8) / 4]._float *= stack[mach->sp + 2]._float; - mach->mem[(da + 12) / 4]._float *= stack[mach->sp + 3]._float; - mach->sp += 4; - } - break; - case slang_asm_vec4_divide: - /* [vec4] | vec4 > [vec4] */ - { - GLuint da = stack[mach->sp + 4]._addr; - mach->mem[da / 4]._float /= stack[mach->sp]._float; - mach->mem[(da + 4) / 4]._float /= stack[mach->sp + 1]._float; - mach->mem[(da + 8) / 4]._float /= stack[mach->sp + 2]._float; - mach->mem[(da + 12) / 4]._float /= stack[mach->sp + 3]._float; - mach->sp += 4; - } - break; - case slang_asm_vec4_negate: - /* [vec4] > [vec4] */ - { - GLuint da = stack[mach->sp]._addr; - mach->mem[da / 4]._float = -mach->mem[da / 4]._float; - mach->mem[(da + 4) / 4]._float = -mach->mem[(da + 4) / 4]._float; - mach->mem[(da + 8) / 4]._float = -mach->mem[(da + 8) / 4]._float; - mach->mem[(da + 12) / 4]._float = - -mach->mem[(da + 12) / 4]._float; - } - break; -#if 0 - case slang_asm_vec4_dot: - /* [vec4] | vec4 > [float] */ - { - GLuint da = stack[mach->sp + 4]._addr; - mach->mem[da / 4]._float = - mach->mem[da / 4]._float * stack[mach->sp]._float + - mach->mem[(da + 4) / 4]._float * stack[mach->sp + 1]._float + - mach->mem[(da + 8) / 4]._float * stack[mach->sp + 2]._float + - mach->mem[(da + 12) / 4]._float * stack[mach->sp + 3]._float; - mach->sp += 4; - } - break; -#endif - case slang_asm_vec4_copy: - /* [vec4] | vec4 > [vec4] */ - { - GLuint da = stack[mach->sp + a->param[0] / 4]._addr + a->param[1]; - mach->mem[da / 4]._float = stack[mach->sp]._float; - mach->mem[(da + 4) / 4]._float = stack[mach->sp + 1]._float; - mach->mem[(da + 8) / 4]._float = stack[mach->sp + 2]._float; - mach->mem[(da + 12) / 4]._float = stack[mach->sp + 3]._float; - mach->sp += 4; - } - break; - case slang_asm_vec4_deref: - /* [vec4] > vec4 */ - { - GLuint sa = stack[mach->sp]._addr; - mach->sp -= 3; - stack[mach->sp]._float = mach->mem[sa / 4]._float; - stack[mach->sp + 1]._float = mach->mem[(sa + 4) / 4]._float; - stack[mach->sp + 2]._float = mach->mem[(sa + 8) / 4]._float; - stack[mach->sp + 3]._float = mach->mem[(sa + 12) / 4]._float; - } - break; - case slang_asm_vec4_equal_int: - { - GLuint sp0 = mach->sp + a->param[0] / 4; - GLuint sp1 = mach->sp + a->param[1] / 4; - mach->sp--; - if (stack[sp0]._float == stack[sp1]._float && - stack[sp0 + 1]._float == stack[sp1 + 1]._float && - stack[sp0 + 2]._float == stack[sp1 + 2]._float && - stack[sp0 + 3]._float == stack[sp1 + 3]._float) { - stack[mach->sp]._float = 1.0f; - } - else { - stack[mach->sp]._float = 0.0f; - } - } - break; - case slang_asm_vec4_dot: - case slang_asm_vec3_dot: - { - /* XXX almost certainly wrong */ - GLuint da = stack[mach->sp + 4]._addr; - mach->mem[da / 4]._float = - mach->mem[da / 4]._float * stack[mach->sp]._float + - mach->mem[(da + 4) / 4]._float * stack[mach->sp + 1]._float + - mach->mem[(da + 8) / 4]._float * stack[mach->sp + 2]._float + - mach->mem[(da + 12) / 4]._float * stack[mach->sp + 3]._float; - mach->sp += 4; - } - break; - default: - _mesa_problem(NULL, "bad slang opcode 0x%x", a->type); - return GL_FALSE; - } - } - -#if DEBUG_SLANG - if (f != NULL) - fclose(f); -#endif - - return GL_TRUE; -} diff --git a/src/mesa/shader/slang/slang_execute.h b/src/mesa/shader/slang/slang_execute.h deleted file mode 100644 index 1f8c3781a1..0000000000 --- a/src/mesa/shader/slang/slang_execute.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SLANG_EXECUTE_H -#define SLANG_EXECUTE_H - -#include "slang_assemble.h" - -#if defined __cplusplus -extern "C" { -#endif - - -/** - * A memory location - */ -typedef union slang_machine_slot_ -{ - GLfloat _float; - GLuint _addr; -} slang_machine_slot; - -#define SLANG_MACHINE_GLOBAL_SIZE 3072 -#define SLANG_MACHINE_STACK_SIZE 1024 -#define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE) - - -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ -/** - * Extra machine state for x86 execution. - */ -typedef struct -{ - GLvoid(*compiled_func) (struct slang_machine_ *); - GLuint esp_restore; - GLshort fpucntl_rnd_neg; - GLshort fpucntl_restore; -} slang_machine_x86; -#endif - - -/** - * Runtime shader machine state. - */ -typedef struct slang_machine_ -{ - GLuint ip; /**< instruction pointer, for flow control */ - GLuint sp; /**< stack pointer, for stack access */ - GLuint bp; /**< base pointer, for local variable access */ - GLboolean kill; /**< discard the fragment? */ - GLboolean exit; /**< terminate the shader */ - /** Machine memory */ - slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE]; - struct slang_info_log_ *infolog; /**< printMESA() support */ -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - slang_machine_x86 x86; -#endif -} slang_machine; - - -extern GLvoid -slang_machine_ctr(slang_machine *); - -extern GLvoid -slang_machine_dtr(slang_machine *); - -extern void -slang_machine_init(slang_machine *); - -extern GLboolean -_slang_execute2(const slang_assembly_file *, slang_machine *); - - -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ -extern GLboolean -_slang_x86_codegen(slang_machine *, slang_assembly_file *, GLuint); -#endif - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/mesa/shader/slang/slang_execute_x86.c b/src/mesa/shader/slang/slang_execute_x86.c deleted file mode 100644 index c48c9667c7..0000000000 --- a/src/mesa/shader/slang/slang_execute_x86.c +++ /dev/null @@ -1,756 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_execute_x86.c - * x86 back end compiler - * \author Michal Krol, Keith Whitwell - */ - -#include "imports.h" -#include "slang_compile.h" -#include "slang_execute.h" -#include "slang_library_noise.h" -#include "slang_library_texsample.h" - -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - -#include "x86/rtasm/x86sse.h" - -typedef struct -{ - GLuint index; - GLubyte *csr; -} fixup; - -typedef struct -{ - struct x86_function f; - struct x86_reg r_eax; - struct x86_reg r_ecx; - struct x86_reg r_edx; - struct x86_reg r_ebx; - struct x86_reg r_esp; - struct x86_reg r_ebp; - struct x86_reg r_st0; - struct x86_reg r_st1; - struct x86_reg r_st2; - struct x86_reg r_st3; - struct x86_reg r_st4; - fixup *fixups; - GLuint fixup_count; - GLubyte **labels; - slang_machine *mach; - GLubyte *l_discard; - GLubyte *l_exit; - GLshort fpucntl; -} codegen_ctx; - -static GLvoid -add_fixup(codegen_ctx * G, GLuint index, GLubyte * csr) -{ - G->fixups = - (fixup *) slang_alloc_realloc(G->fixups, G->fixup_count * sizeof(fixup), - (G->fixup_count + 1) * sizeof(fixup)); - G->fixups[G->fixup_count].index = index; - G->fixups[G->fixup_count].csr = csr; - G->fixup_count++; -} - -#ifdef NO_FAST_MATH -#define RESTORE_FPU (DEFAULT_X86_FPU) -#define RND_NEG_FPU (DEFAULT_X86_FPU | 0x400) -#else -#define RESTORE_FPU (FAST_X86_FPU) -#define RND_NEG_FPU (FAST_X86_FPU | 0x400) -#endif - -#if 0 - -/* - * XXX - * These should produce a valid code that computes powers. - * Unfortunately, it does not. - */ -static void -set_fpu_round_neg_inf(codegen_ctx * G) -{ - if (G->fpucntl != RND_NEG_FPU) { - G->fpucntl = RND_NEG_FPU; - x87_fnclex(&G->f); - x86_mov_reg_imm(&G->f, G->r_eax, - (GLint) & G->mach->x86.fpucntl_rnd_neg); - x87_fldcw(&G->f, x86_deref(G->r_eax)); - } -} - -static void -emit_x87_ex2(codegen_ctx * G) -{ - set_fpu_round_neg_inf(G); - - x87_fld(&G->f, G->r_st0); /* a a */ - x87_fprndint(&G->f); /* int(a) a */ - x87_fld(&G->f, G->r_st0); /* int(a) int(a) a */ - x87_fstp(&G->f, G->r_st3); /* int(a) a int(a) */ - x87_fsubp(&G->f, G->r_st1); /* frac(a) int(a) */ - x87_f2xm1(&G->f); /* (2^frac(a))-1 int(a) */ - x87_fld1(&G->f); /* 1 (2^frac(a))-1 int(a) */ - x87_faddp(&G->f, G->r_st1); /* 2^frac(a) int(a) */ - x87_fscale(&G->f); /* 2^a */ -} - -static void -emit_pow(codegen_ctx * G) -{ - x87_fld(&G->f, x86_deref(G->r_esp)); - x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); - x87_fyl2x(&G->f); - emit_x87_ex2(G); -} - -#endif - -static GLfloat -do_ceilf(GLfloat x) -{ - return CEILF(x); -} - -static GLfloat -do_floorf(GLfloat x) -{ - return FLOORF(x); -} - -static GLfloat -do_ftoi(GLfloat x) -{ - return (GLfloat) ((GLint) (x)); -} - -static GLfloat -do_powf(GLfloat y, GLfloat x) -{ - return (GLfloat) _mesa_pow((GLdouble) x, (GLdouble) y); -} - -static GLvoid -ensure_infolog_created(slang_info_log ** infolog) -{ - if (*infolog == NULL) { - *infolog = slang_alloc_malloc(sizeof(slang_info_log)); - if (*infolog == NULL) - return; - slang_info_log_construct(*infolog); - } -} - -static GLvoid -do_print_float(slang_info_log ** infolog, GLfloat x) -{ - _mesa_printf("slang print: %f\n", x); - ensure_infolog_created(infolog); - slang_info_log_print(*infolog, "%f", x); -} - -static GLvoid -do_print_int(slang_info_log ** infolog, GLfloat x) -{ - _mesa_printf("slang print: %d\n", (GLint) (x)); - ensure_infolog_created(infolog); - slang_info_log_print(*infolog, "%d", (GLint) (x)); -} - -static GLvoid -do_print_bool(slang_info_log ** infolog, GLfloat x) -{ - _mesa_printf("slang print: %s\n", (GLint) (x) ? "true" : "false"); - ensure_infolog_created(infolog); - slang_info_log_print(*infolog, "%s", (GLint) (x) ? "true" : "false"); -} - -#define FLOAT_ONE 0x3f800000 -#define FLOAT_ZERO 0 - -static GLvoid -codegen_assem(codegen_ctx * G, slang_assembly * a, slang_info_log ** infolog) -{ - GLint disp, i; - - switch (a->type) { - case slang_asm_none: - break; - case slang_asm_float_copy: - case slang_asm_int_copy: - case slang_asm_bool_copy: - x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, a->param[0])); - x86_pop(&G->f, G->r_ecx); - x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1]), G->r_ecx); - break; - case slang_asm_float_move: - case slang_asm_int_move: - case slang_asm_bool_move: - x86_lea(&G->f, G->r_eax, x86_make_disp(G->r_esp, a->param[1])); - x86_add(&G->f, G->r_eax, x86_deref(G->r_esp)); - x86_mov(&G->f, G->r_eax, x86_deref(G->r_eax)); - x86_mov(&G->f, x86_make_disp(G->r_esp, a->param[0]), G->r_eax); - break; - case slang_asm_float_push: - case slang_asm_int_push: - case slang_asm_bool_push: - /* TODO: use push imm32 */ - x86_mov_reg_imm(&G->f, G->r_eax, *((GLint *) & a->literal)); - x86_push(&G->f, G->r_eax); - break; - case slang_asm_float_deref: - case slang_asm_int_deref: - case slang_asm_bool_deref: - case slang_asm_addr_deref: - x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); - x86_mov(&G->f, G->r_eax, x86_deref(G->r_eax)); - x86_mov(&G->f, x86_deref(G->r_esp), G->r_eax); - break; - case slang_asm_float_add: - x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); - x87_fld(&G->f, x86_deref(G->r_esp)); - x87_faddp(&G->f, G->r_st1); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_multiply: - x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); - x87_fld(&G->f, x86_deref(G->r_esp)); - x87_fmulp(&G->f, G->r_st1); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_divide: - x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); - x87_fld(&G->f, x86_deref(G->r_esp)); - x87_fdivp(&G->f, G->r_st1); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_negate: - x87_fld(&G->f, x86_deref(G->r_esp)); - x87_fchs(&G->f); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_less: - x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); - x87_fcomp(&G->f, x86_deref(G->r_esp)); - x87_fnstsw(&G->f, G->r_eax); - /* TODO: use test r8,imm8 */ - x86_mov_reg_imm(&G->f, G->r_ecx, 0x100); - x86_test(&G->f, G->r_eax, G->r_ecx); - { - GLubyte *lab0, *lab1; - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward(&G->f, cc_E); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); - /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward(&G->f); - x86_fixup_fwd_jump(&G->f, lab0); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump(&G->f, lab1); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); - } - break; - case slang_asm_float_equal_exp: - x87_fld(&G->f, x86_make_disp(G->r_esp, 4)); - x87_fcomp(&G->f, x86_deref(G->r_esp)); - x87_fnstsw(&G->f, G->r_eax); - /* TODO: use test r8,imm8 */ - x86_mov_reg_imm(&G->f, G->r_ecx, 0x4000); - x86_test(&G->f, G->r_eax, G->r_ecx); - { - GLubyte *lab0, *lab1; - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward(&G->f, cc_E); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); - /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward(&G->f); - x86_fixup_fwd_jump(&G->f, lab0); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump(&G->f, lab1); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); - } - break; - case slang_asm_float_equal_int: - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, -4)); - x87_fld(&G->f, x86_make_disp(G->r_esp, a->param[0] + 4)); - x87_fcomp(&G->f, x86_make_disp(G->r_esp, a->param[1] + 4)); - x87_fnstsw(&G->f, G->r_eax); - /* TODO: use test r8,imm8 */ - x86_mov_reg_imm(&G->f, G->r_ecx, 0x4000); - x86_test(&G->f, G->r_eax, G->r_ecx); - { - GLubyte *lab0, *lab1; - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward(&G->f, cc_E); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); - /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward(&G->f); - x86_fixup_fwd_jump(&G->f, lab0); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump(&G->f, lab1); - x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); - } - break; - case slang_asm_float_to_int: - /* TODO: use fistp without rounding */ - x86_call(&G->f, (GLubyte *) (do_ftoi)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_sine: - /* TODO: use fsin */ - x86_call(&G->f, (GLubyte *) _mesa_sinf); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_arcsine: - /* TODO: use fpatan (?) */ - x86_call(&G->f, (GLubyte *) _mesa_asinf); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_arctan: - /* TODO: use fpatan */ - x86_call(&G->f, (GLubyte *) _mesa_atanf); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_power: - /* TODO: use emit_pow() */ - x86_call(&G->f, (GLubyte *) do_powf); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_log2: - x87_fld1(&G->f); - x87_fld(&G->f, x86_deref(G->r_esp)); - x87_fyl2x(&G->f); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; -#if 00 - case slang_asm_float_floor: - x86_call(&G->f, (GLubyte *) do_floorf); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; -#endif - case slang_asm_float_ceil: - x86_call(&G->f, (GLubyte *) do_ceilf); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_noise1: - x86_call(&G->f, (GLubyte *) _slang_library_noise1); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_noise2: - x86_call(&G->f, (GLubyte *) _slang_library_noise2); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_noise3: - x86_call(&G->f, (GLubyte *) _slang_library_noise4); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 8)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_float_noise4: - x86_call(&G->f, (GLubyte *) _slang_library_noise4); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 12)); - x87_fstp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_int_to_float: - break; - case slang_asm_int_to_addr: - x87_fld(&G->f, x86_deref(G->r_esp)); - x87_fistp(&G->f, x86_deref(G->r_esp)); - break; - case slang_asm_addr_copy: - x86_pop(&G->f, G->r_eax); - x86_mov(&G->f, G->r_ecx, x86_deref(G->r_esp)); - x86_mov(&G->f, x86_deref(G->r_ecx), G->r_eax); - break; - case slang_asm_addr_push: - /* TODO: use push imm32 */ - x86_mov_reg_imm(&G->f, G->r_eax, (GLint) a->param[0]); - x86_push(&G->f, G->r_eax); - break; - case slang_asm_addr_add: - x86_pop(&G->f, G->r_eax); - x86_add(&G->f, x86_deref(G->r_esp), G->r_eax); - break; - case slang_asm_addr_multiply: - x86_pop(&G->f, G->r_ecx); - x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); - x86_mul(&G->f, G->r_ecx); - x86_mov(&G->f, x86_deref(G->r_esp), G->r_eax); - break; - case slang_asm_vec4_tex1d: - x86_call(&G->f, (GLubyte *) _slang_library_tex1d); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 12)); - break; - case slang_asm_vec4_tex2d: - x86_call(&G->f, (GLubyte *) _slang_library_tex2d); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); - break; - case slang_asm_vec4_tex3d: - x86_call(&G->f, (GLubyte *) _slang_library_tex3d); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); - break; - case slang_asm_vec4_texcube: - x86_call(&G->f, (GLubyte *) _slang_library_texcube); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); - break; - case slang_asm_vec4_shad1d: - x86_call(&G->f, (GLubyte *) _slang_library_shad1d); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); - break; - case slang_asm_vec4_shad2d: - x86_call(&G->f, (GLubyte *) _slang_library_shad2d); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 20)); - break; - case slang_asm_jump: - add_fixup(G, a->param[0], x86_jmp_forward(&G->f)); - break; - case slang_asm_jump_if_zero: - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x86_xor(&G->f, G->r_eax, G->r_eax); - x86_cmp(&G->f, G->r_eax, x86_make_disp(G->r_esp, -4)); - { - GLubyte *lab0; - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward(&G->f, cc_NE); - add_fixup(G, a->param[0], x86_jmp_forward(&G->f)); - x86_fixup_fwd_jump(&G->f, lab0); - } - break; - case slang_asm_enter: - /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ - assert(a->param[0] != 0); - x86_push(&G->f, G->r_ebp); - x86_lea(&G->f, G->r_ebp, x86_make_disp(G->r_esp, (GLint) a->param[0])); - break; - case slang_asm_leave: - x86_pop(&G->f, G->r_ebp); - break; - case slang_asm_local_alloc: - /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ - assert(a->param[0] != 0); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, -(GLint) a->param[0])); - break; - case slang_asm_local_free: - /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */ - assert(a->param[0] != 0); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, (GLint) a->param[0])); - break; - case slang_asm_local_addr: - disp = -(GLint) (a->param[0] + a->param[1]) + 4; - if (disp != 0) { - x86_lea(&G->f, G->r_eax, x86_make_disp(G->r_ebp, disp)); - x86_push(&G->f, G->r_eax); - } - else - x86_push(&G->f, G->r_ebp); - break; - case slang_asm_global_addr: - /* TODO: use push imm32 */ - x86_mov_reg_imm(&G->f, G->r_eax, (GLint) & G->mach->mem + a->param[0]); - x86_push(&G->f, G->r_eax); - break; - case slang_asm_call: - add_fixup(G, a->param[0], x86_call_forward(&G->f)); - break; - case slang_asm_return: - x86_ret(&G->f); - break; - case slang_asm_discard: - x86_jmp(&G->f, G->l_discard); - break; - case slang_asm_exit: - x86_jmp(&G->f, G->l_exit); - break; - /* GL_MESA_shader_debug */ - case slang_asm_float_print: - /* TODO: use push imm32 */ - x86_mov_reg_imm(&G->f, G->r_eax, (GLint) (infolog)); - x86_push(&G->f, G->r_eax); - x86_call(&G->f, (GLubyte *) (do_print_float)); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - break; - case slang_asm_int_print: - /* TODO: use push imm32 */ - x86_mov_reg_imm(&G->f, G->r_eax, (GLint) (infolog)); - x86_push(&G->f, G->r_eax); - x86_call(&G->f, (GLubyte *) do_print_int); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - break; - case slang_asm_bool_print: - /* TODO: use push imm32 */ - x86_mov_reg_imm(&G->f, G->r_eax, (GLint) (infolog)); - x86_push(&G->f, G->r_eax); - x86_call(&G->f, (GLubyte *) do_print_bool); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - break; - /* vec4 */ - case slang_asm_float_to_vec4: - /* [vec4] | float > [vec4] */ - x87_fld(&G->f, x86_deref(G->r_esp)); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 4)); - x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); - x87_fst(&G->f, x86_make_disp(G->r_eax, 12)); - x87_fst(&G->f, x86_make_disp(G->r_eax, 8)); - x87_fst(&G->f, x86_make_disp(G->r_eax, 4)); - x87_fstp(&G->f, x86_deref(G->r_eax)); - break; - case slang_asm_vec4_add: - /* [vec4] | vec4 > [vec4] */ - x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_faddp(&G->f, G->r_st4); - for (i = 0; i < 4; i++) - x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); - break; - case slang_asm_vec4_subtract: - /* [vec4] | vec4 > [vec4] */ - x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_fsubp(&G->f, G->r_st4); - for (i = 0; i < 4; i++) - x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); - break; - case slang_asm_vec4_multiply: - /* [vec4] | vec4 > [vec4] */ - x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_fmulp(&G->f, G->r_st4); - for (i = 0; i < 4; i++) - x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); - break; - case slang_asm_vec4_divide: - /* [vec4] | vec4 > [vec4] */ - x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); - for (i = 0; i < 4; i++) - x87_fdivp(&G->f, G->r_st4); - for (i = 0; i < 4; i++) - x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); - break; - case slang_asm_vec4_negate: - /* [vec4] > [vec4] */ - x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); - for (i = 0; i < 4; i++) { - x87_fchs(&G->f); - x87_fstp(&G->f, x86_make_disp(G->r_eax, 12 - i * 4)); - } - break; - case slang_asm_vec4_dot: - /* [vec4] | vec4 > [float] */ - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_esp, i * 4)); - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, 16)); - x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); - for (i = 0; i < 4; i++) - x87_fld(&G->f, x86_make_disp(G->r_eax, i * 4)); - for (i = 0; i < 4; i++) - x87_fmulp(&G->f, G->r_st4); - for (i = 0; i < 3; i++) - x87_faddp(&G->f, G->r_st1); - x87_fstp(&G->f, x86_deref(G->r_eax)); - break; - case slang_asm_vec4_copy: - /* [vec4] | vec4 > [vec4] */ - x86_mov(&G->f, G->r_eax, x86_make_disp(G->r_esp, a->param[0])); - x86_pop(&G->f, G->r_ecx); - x86_pop(&G->f, G->r_edx); - x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1]), G->r_ecx); - x86_pop(&G->f, G->r_ebx); - x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1] + 4), G->r_edx); - x86_pop(&G->f, G->r_ecx); - x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1] + 8), G->r_ebx); - x86_mov(&G->f, x86_make_disp(G->r_eax, a->param[1] + 12), G->r_ecx); - break; - case slang_asm_vec4_deref: - /* [vec4] > vec4 */ - x86_mov(&G->f, G->r_eax, x86_deref(G->r_esp)); - x86_mov(&G->f, G->r_ecx, x86_make_disp(G->r_eax, 12)); - x86_mov(&G->f, G->r_edx, x86_make_disp(G->r_eax, 8)); - x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); - x86_mov(&G->f, G->r_ebx, x86_make_disp(G->r_eax, 4)); - x86_push(&G->f, G->r_edx); - x86_mov(&G->f, G->r_ecx, x86_deref(G->r_eax)); - x86_push(&G->f, G->r_ebx); - x86_push(&G->f, G->r_ecx); - break; - case slang_asm_vec4_equal_int: - x86_lea(&G->f, G->r_esp, x86_make_disp(G->r_esp, -4)); - x86_mov_reg_imm(&G->f, G->r_edx, 0x4000); - for (i = 0; i < 4; i++) { - x87_fld(&G->f, x86_make_disp(G->r_esp, a->param[0] + 4 + i * 4)); - x87_fcomp(&G->f, x86_make_disp(G->r_esp, a->param[1] + 4 + i * 4)); - x87_fnstsw(&G->f, G->r_eax); - x86_and(&G->f, G->r_edx, G->r_eax); - } - /* TODO: use test r8,imm8 */ - x86_mov_reg_imm(&G->f, G->r_ecx, 0x4000); - x86_test(&G->f, G->r_edx, G->r_ecx); - { - GLubyte *lab0, *lab1; - - /* TODO: use jcc rel8 */ - lab0 = x86_jcc_forward(&G->f, cc_E); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ONE); - /* TODO: use jmp rel8 */ - lab1 = x86_jmp_forward(&G->f); - x86_fixup_fwd_jump(&G->f, lab0); - x86_mov_reg_imm(&G->f, G->r_ecx, FLOAT_ZERO); - x86_fixup_fwd_jump(&G->f, lab1); - x86_mov(&G->f, x86_deref(G->r_esp), G->r_ecx); - } - break; - default: - _mesa_problem(NULL, "Unexpected switch case in codegen_assem"); - } -} - -GLboolean -_slang_x86_codegen(slang_machine * mach, slang_assembly_file * file, - GLuint start) -{ - codegen_ctx G; - GLubyte *j_body, *j_exit; - GLuint i; - - /* Free the old code - if any. - */ - if (mach->x86.compiled_func != NULL) { - _mesa_exec_free(mach->x86.compiled_func); - mach->x86.compiled_func = NULL; - } - - /* - * We need as much as 1M because *all* assembly, including built-in library, is - * being translated to x86. - * The built-in library occupies 450K, so we can be safe for now. - * It is going to change in the future, when we get assembly analysis running. - */ - x86_init_func_size(&G.f, 1048576); - G.r_eax = x86_make_reg(file_REG32, reg_AX); - G.r_ecx = x86_make_reg(file_REG32, reg_CX); - G.r_edx = x86_make_reg(file_REG32, reg_DX); - G.r_ebx = x86_make_reg(file_REG32, reg_BX); - G.r_esp = x86_make_reg(file_REG32, reg_SP); - G.r_ebp = x86_make_reg(file_REG32, reg_BP); - G.r_st0 = x86_make_reg(file_x87, 0); - G.r_st1 = x86_make_reg(file_x87, 1); - G.r_st2 = x86_make_reg(file_x87, 2); - G.r_st3 = x86_make_reg(file_x87, 3); - G.r_st4 = x86_make_reg(file_x87, 4); - G.fixups = NULL; - G.fixup_count = 0; - G.labels = - (GLubyte **) slang_alloc_malloc(file->count * sizeof(GLubyte *)); - G.mach = mach; - G.fpucntl = RESTORE_FPU; - - mach->x86.fpucntl_rnd_neg = RND_NEG_FPU; - mach->x86.fpucntl_restore = RESTORE_FPU; - - /* prepare stack and jump to start */ - x86_push(&G.f, G.r_ebp); - x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & mach->x86.esp_restore); - x86_push(&G.f, G.r_esp); - x86_pop(&G.f, G.r_ecx); - x86_mov(&G.f, x86_deref(G.r_eax), G.r_ecx); - j_body = x86_jmp_forward(&G.f); - - /* "discard" instructions jump to this label */ - G.l_discard = x86_get_label(&G.f); - x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & G.mach->kill); - x86_mov_reg_imm(&G.f, G.r_ecx, 1); - x86_mov(&G.f, x86_deref(G.r_eax), G.r_ecx); - G.l_exit = x86_get_label(&G.f); - j_exit = x86_jmp_forward(&G.f); - - for (i = 0; i < file->count; i++) { - G.labels[i] = x86_get_label(&G.f); - if (i == start) - x86_fixup_fwd_jump(&G.f, j_body); - codegen_assem(&G, &file->code[i], &mach->infolog); - } - - /* - * Restore stack and return. - * This must be handled this way, because "discard" can be invoked from any - * place in the code. - */ - x86_fixup_fwd_jump(&G.f, j_exit); - x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & mach->x86.esp_restore); - x86_mov(&G.f, G.r_esp, x86_deref(G.r_eax)); - x86_pop(&G.f, G.r_ebp); - if (G.fpucntl != RESTORE_FPU) { - x87_fnclex(&G.f); - x86_mov_reg_imm(&G.f, G.r_eax, (GLint) & G.mach->x86.fpucntl_restore); - x87_fldcw(&G.f, x86_deref(G.r_eax)); - } - x86_ret(&G.f); - - /* fixup forward labels */ - for (i = 0; i < G.fixup_count; i++) { - G.f.csr = G.labels[G.fixups[i].index]; - x86_fixup_fwd_jump(&G.f, G.fixups[i].csr); - } - - slang_alloc_free(G.fixups); - slang_alloc_free(G.labels); - - /* install new code */ - mach->x86.compiled_func = (GLvoid(*)(slang_machine *)) x86_get_func(&G.f); - - return GL_TRUE; -} - -#endif -- cgit v1.2.3 From d79fd748716f4d5becdbf482ff6f8c3fbc3e5c8b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 14:04:58 -0700 Subject: remove old linker stuff --- src/mesa/shader/slang/slang_link.h | 335 +------------------------------------ 1 file changed, 6 insertions(+), 329 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index 8c7d0c01cf..edd4a097d5 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 2006 Brian Paul All Rights Reserved. + * Copyright (C) 2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,331 +22,11 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_LINK_H -#define SLANG_LINK_H +#ifndef SLANG_LINK_H +#define SLANG_LINK_H 1 #include "slang_compile.h" -#if defined __cplusplus -extern "C" { -#endif - -enum -{ - SLANG_SHADER_VERTEX, - SLANG_SHADER_FRAGMENT, - SLANG_SHADER_MAX -}; - - -/** - * Active variables. - * - * Active uniforms/attribs can be queried by the application to get a - * list of uniforms/attribs actually used by shaders (uniforms) or - * vertex shader only (attribs). - */ -/*@{*/ -typedef struct -{ - slang_export_data_quant *quant; - GLchar *name; -} slang_active_variable; - -typedef struct -{ - slang_active_variable *table; - GLuint count; -} slang_active_variables; -/*@}*/ - - -/** - * Attrib binding override. - * - * The application can override GL attrib binding by specifying its - * preferred index assignment for a given attrib name. Those overrides - * are taken into account while linking the program. - */ -/*@{*/ -typedef struct -{ - GLuint index; - GLchar *name; -} slang_attrib_override; - -typedef struct -{ - slang_attrib_override *table; - GLuint count; -} slang_attrib_overrides; -/*@}*/ - - -extern GLboolean -_slang_attrib_overrides_add (slang_attrib_overrides *, GLuint, const GLchar *); - - -/** - * Uniform bindings. - * - * Each slang_uniform_binding holds an array of addresses to actual - * memory locations in those shader types that use that - * uniform. Uniform bindings are held in an array and accessed by - * array index which is seen to the application as a uniform location. - * - * When the application writes to a particular uniform, it specifies - * its location. This location is treated as an array index to - * slang_uniform_bindings::table and tested against - * slang_uniform_bindings::count limit. The result is a pointer to - * slang_uniform_binding. The type of data being written to uniform - * is tested against slang_uniform_binding::quant. If the types are - * compatible, the array slang_uniform_binding::address is iterated - * for each shader type and if the address is valid (i.e. the uniform - * is used by this shader type), the new uniform value is written at - * that address. - */ -/*@{*/ -typedef struct -{ - slang_export_data_quant *quant; - GLchar *name; - GLuint address[SLANG_SHADER_MAX]; -} slang_uniform_binding; - -typedef struct -{ - slang_uniform_binding *table; - GLuint count; -} slang_uniform_bindings; -/*@}*/ - - -/** - * Attrib bindings. - * - * There is a fixed number of vertex attrib vectors (attrib - * slots). The slang_attrib_slot::addr maps vertex attrib index to the - * actual memory location of the attrib in vertex shader. One vertex - * attrib can span over many attrib slots (this is the case for - * matrices). The slang_attrib_binding::first_slot_index holds the - * first slot index that the attrib is bound to. - */ -/*@{*/ -typedef struct -{ - slang_export_data_quant *quant; - GLchar *name; - GLuint first_slot_index; -} slang_attrib_binding; - -typedef struct -{ - GLuint addr; /**< memory location */ - GLuint fill; /**< 1..4, number of components used */ -} slang_attrib_slot; - -typedef struct -{ - slang_attrib_binding bindings[MAX_VERTEX_ATTRIBS]; - GLuint binding_count; - slang_attrib_slot slots[MAX_VERTEX_ATTRIBS]; -} slang_attrib_bindings; -/*@}*/ - - - -/** - * Varying bindings. - * - * There is a fixed number of varying floats (varying slots). The - * slang_varying_slot::vert_addr maps varying float index to the - * actual memory location of the output variable in vertex shader. - * The slang_varying_slot::frag_addr maps varying float index to the - * actual memory location of the input variable in fragment shader. - */ -/*@{*/ -typedef struct -{ - GLuint vert_addr; - GLuint frag_addr; -} slang_varying_slot; - -typedef struct -{ - slang_export_data_quant *quant; - GLchar *name; - GLuint first_slot_index; -} slang_varying_binding; - -typedef struct -{ - slang_varying_binding bindings[MAX_VARYING * 4]; - GLuint binding_count; - slang_varying_slot slots[MAX_VARYING * 4]; - GLuint slot_count; -} slang_varying_bindings; -/*@}*/ - - -/** - * Texture usage. - * - * A slang_texture_usage struct holds indirect information about - * texture image unit usage. The slang_texture_usages::table is - * derived from active uniform table by extracting only uniforms that - * are samplers. - * - * To collect current texture usage one must iterate the - * slang_texture_usages::table and read uniform at address - * slang_texture_usage::frag_address to get texture unit index. This - * index, coupled with texture access type (target) taken from - * slang_texture_usage::quant forms texture usage for that texture - * unit. - */ -/*@{*/ -typedef struct -{ - slang_export_data_quant *quant; - GLuint frag_address; -} slang_texture_usage; - -typedef struct -{ - slang_texture_usage *table; - GLuint count; -} slang_texture_usages; -/*@}*/ - - -extern GLvoid -_slang_texture_usages_ctr (slang_texture_usages *); - -extern GLvoid -_slang_texture_usages_dtr (slang_texture_usages *); - -enum -{ - SLANG_COMMON_FIXED_MODELVIEWMATRIX, - SLANG_COMMON_FIXED_PROJECTIONMATRIX, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX, - SLANG_COMMON_FIXED_TEXTUREMATRIX, - SLANG_COMMON_FIXED_NORMALMATRIX, - SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE, - SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE, - SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE, - SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE, - SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE, - SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE, - SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE, - SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE, - SLANG_COMMON_FIXED_NORMALSCALE, - SLANG_COMMON_FIXED_DEPTHRANGE, - SLANG_COMMON_FIXED_CLIPPLANE, - SLANG_COMMON_FIXED_POINT, - SLANG_COMMON_FIXED_FRONTMATERIAL, - SLANG_COMMON_FIXED_BACKMATERIAL, - SLANG_COMMON_FIXED_LIGHTSOURCE, - SLANG_COMMON_FIXED_LIGHTMODEL, - SLANG_COMMON_FIXED_FRONTLIGHTMODELPRODUCT, - SLANG_COMMON_FIXED_BACKLIGHTMODELPRODUCT, - SLANG_COMMON_FIXED_FRONTLIGHTPRODUCT, - SLANG_COMMON_FIXED_BACKLIGHTPRODUCT, - SLANG_COMMON_FIXED_TEXTUREENVCOLOR, - SLANG_COMMON_FIXED_EYEPLANES, - SLANG_COMMON_FIXED_EYEPLANET, - SLANG_COMMON_FIXED_EYEPLANER, - SLANG_COMMON_FIXED_EYEPLANEQ, - SLANG_COMMON_FIXED_OBJECTPLANES, - SLANG_COMMON_FIXED_OBJECTPLANET, - SLANG_COMMON_FIXED_OBJECTPLANER, - SLANG_COMMON_FIXED_OBJECTPLANEQ, - SLANG_COMMON_FIXED_FOG, - SLANG_COMMON_FIXED_MAX -}; - -enum -{ - SLANG_VERTEX_FIXED_POSITION, - SLANG_VERTEX_FIXED_POINTSIZE, - SLANG_VERTEX_FIXED_CLIPVERTEX, - SLANG_VERTEX_FIXED_COLOR, - SLANG_VERTEX_FIXED_SECONDARYCOLOR, - SLANG_VERTEX_FIXED_NORMAL, - SLANG_VERTEX_FIXED_VERTEX, - SLANG_VERTEX_FIXED_MULTITEXCOORD0, - SLANG_VERTEX_FIXED_MULTITEXCOORD1, - SLANG_VERTEX_FIXED_MULTITEXCOORD2, - SLANG_VERTEX_FIXED_MULTITEXCOORD3, - SLANG_VERTEX_FIXED_MULTITEXCOORD4, - SLANG_VERTEX_FIXED_MULTITEXCOORD5, - SLANG_VERTEX_FIXED_MULTITEXCOORD6, - SLANG_VERTEX_FIXED_MULTITEXCOORD7, - SLANG_VERTEX_FIXED_FOGCOORD, - SLANG_VERTEX_FIXED_FRONTCOLOR, - SLANG_VERTEX_FIXED_BACKCOLOR, - SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR, - SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR, - SLANG_VERTEX_FIXED_TEXCOORD, - SLANG_VERTEX_FIXED_FOGFRAGCOORD, - SLANG_VERTEX_FIXED_MAX -}; - -enum -{ - SLANG_FRAGMENT_FIXED_FRAGCOORD, - SLANG_FRAGMENT_FIXED_FRONTFACING, - SLANG_FRAGMENT_FIXED_FRAGCOLOR, - SLANG_FRAGMENT_FIXED_FRAGDATA, - SLANG_FRAGMENT_FIXED_FRAGDEPTH, - SLANG_FRAGMENT_FIXED_COLOR, - SLANG_FRAGMENT_FIXED_SECONDARYCOLOR, - SLANG_FRAGMENT_FIXED_TEXCOORD, - SLANG_FRAGMENT_FIXED_FOGFRAGCOORD, - SLANG_FRAGMENT_FIXED_MAX -}; - -enum -{ - SLANG_COMMON_CODE_MAIN, - SLANG_COMMON_CODE_MAX -}; - -/** - * XXX promote this to mtypes.h? - */ -typedef struct -{ - slang_active_variables active_uniforms; - slang_active_variables active_attribs; - slang_attrib_overrides attrib_overrides; - slang_uniform_bindings uniforms; - slang_attrib_bindings attribs; - slang_varying_bindings varyings; - slang_texture_usages texture_usage; - GLuint common_fixed_entries[SLANG_SHADER_MAX][SLANG_COMMON_FIXED_MAX]; - GLuint vertex_fixed_entries[SLANG_VERTEX_FIXED_MAX]; - GLuint fragment_fixed_entries[SLANG_FRAGMENT_FIXED_MAX]; - GLuint code[SLANG_SHADER_MAX][SLANG_COMMON_CODE_MAX]; - slang_assembly_file *assemblies[SLANG_SHADER_MAX]; -} slang_program; - -extern GLvoid -_slang_program_ctr (slang_program *); - -extern GLvoid -_slang_program_dtr (slang_program *); - -extern GLvoid -_slang_program_rst (slang_program *); - -extern GLboolean -_slang_link (slang_program *, slang_code_object **, GLuint); - extern void _slang_link2(GLcontext *ctx, GLhandleARB h, @@ -357,12 +37,9 @@ _slang_resolve_samplers(struct gl_shader_program *shProg, struct gl_program *prog); extern void -_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttrib); - +_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, + GLuint newAttrib); -#ifdef __cplusplus -} -#endif #endif -- cgit v1.2.3 From 8b60787e85a88216d1e56bf3fc5ae807d4f2392b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 14:05:25 -0700 Subject: remove slang_link.c and slang_analyse.c --- src/mesa/sources | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index db1d5e8e70..a7936101ca 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -166,7 +166,6 @@ SHADER_SOURCES = \ shader/shader_api.c \ SLANG_SOURCES = \ - shader/slang/slang_analyse.c \ shader/slang/slang_assemble.c \ shader/slang/slang_assemble_assignment.c \ shader/slang/slang_assemble_conditional.c \ @@ -183,7 +182,6 @@ SLANG_SOURCES = \ shader/slang/slang_export.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ - shader/slang/slang_link.c \ shader/slang/slang_link2.c \ shader/slang/slang_preprocess.c \ shader/slang/slang_simplify.c \ -- cgit v1.2.3 From 5072fd3a641fa31cbfa7ecfbb34b2d8e782f9e06 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 14:05:55 -0700 Subject: Remove old slang linker code. --- src/mesa/shader/slang/slang_analyse.c | 100 ---- src/mesa/shader/slang/slang_analyse.h | 50 -- src/mesa/shader/slang/slang_link.c | 871 ---------------------------------- 3 files changed, 1021 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_analyse.c delete mode 100644 src/mesa/shader/slang/slang_analyse.h delete mode 100644 src/mesa/shader/slang/slang_link.c (limited to 'src') diff --git a/src/mesa/shader/slang/slang_analyse.c b/src/mesa/shader/slang/slang_analyse.c deleted file mode 100644 index fe48a670ee..0000000000 --- a/src/mesa/shader/slang/slang_analyse.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_analyse.c - * slang assembly code analysis - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_analyse.h" -#include "slang_utility.h" - -GLboolean _slang_analyse_texture_usage (slang_program *prog) -{ - GLuint i, count = 0; - - _slang_texture_usages_dtr (&prog->texture_usage); - _slang_texture_usages_ctr (&prog->texture_usage); - - /* - * We could do a full code analysis to find out which uniforms are actually used. - * For now, we are very conservative and extract them from uniform binding table, which - * in turn also do not come from code analysis. - */ - - for (i = 0; i < prog->uniforms.count; i++) - { - slang_uniform_binding *b = &prog->uniforms.table[i]; - - if (b->address[SLANG_SHADER_FRAGMENT] != ~0 && !slang_export_data_quant_struct (b->quant)) - { - switch (slang_export_data_quant_type (b->quant)) - { - case GL_SAMPLER_1D_ARB: - case GL_SAMPLER_2D_ARB: - case GL_SAMPLER_3D_ARB: - case GL_SAMPLER_CUBE_ARB: - case GL_SAMPLER_1D_SHADOW_ARB: - case GL_SAMPLER_2D_SHADOW_ARB: - count++; - break; - } - } - } - - if (count == 0) - return GL_TRUE; - prog->texture_usage.table = (slang_texture_usage *) slang_alloc_malloc ( - count * sizeof (slang_texture_usage)); - if (prog->texture_usage.table == NULL) - return GL_FALSE; - prog->texture_usage.count = count; - - for (count = i = 0; i < prog->uniforms.count; i++) - { - slang_uniform_binding *b = &prog->uniforms.table[i]; - - if (b->address[SLANG_SHADER_FRAGMENT] != ~0 && !slang_export_data_quant_struct (b->quant)) - { - switch (slang_export_data_quant_type (b->quant)) - { - case GL_SAMPLER_1D_ARB: - case GL_SAMPLER_2D_ARB: - case GL_SAMPLER_3D_ARB: - case GL_SAMPLER_CUBE_ARB: - case GL_SAMPLER_1D_SHADOW_ARB: - case GL_SAMPLER_2D_SHADOW_ARB: - prog->texture_usage.table[count].quant = b->quant; - prog->texture_usage.table[count].frag_address = b->address[SLANG_SHADER_FRAGMENT]; - count++; - break; - } - } - } - - return GL_TRUE; -} - diff --git a/src/mesa/shader/slang/slang_analyse.h b/src/mesa/shader/slang/slang_analyse.h deleted file mode 100644 index d7e39ae7ce..0000000000 --- a/src/mesa/shader/slang/slang_analyse.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#if !defined SLANG_ANALYSE_H -#define SLANG_ANALYSE_H - -#include "slang_link.h" - -#if defined __cplusplus -extern "C" { -#endif - -/* - * Texture usage analysis is a bit more difficult than for fragment programs. While fragment - * programs statically link to texture targets and texture units, shaders statically link - * only to texture targets. The texture unit linkage is determined just before the execution - * of a given primitive by reading active uniform samplers. - * - * This procedure retrieves a list of uniforms that reach texture sample instructions. - */ - -GLboolean _slang_analyse_texture_usage (slang_program *); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c deleted file mode 100644 index 8894f78088..0000000000 --- a/src/mesa/shader/slang/slang_link.c +++ /dev/null @@ -1,871 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_link.c - * slang linker - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_link.h" -#include "slang_analyse.h" - -#define TABLE_GROW(PTR,TYPE,N) \ - (PTR = (TYPE *) (slang_alloc_realloc (PTR, N * sizeof (TYPE), (N + 1) * sizeof (TYPE)))) - -/* - * Check if a given name starts with "gl_". Globals with this prefix are - * treated differently, as they are built-in variables. - */ -static GLboolean -entry_has_gl_prefix (slang_atom name, slang_atom_pool *atoms) -{ - const GLchar *str; - - str = slang_atom_pool_id (atoms, name); - return str[0] == 'g' && str[1] == 'l' && str[2] == '_'; -} - -/* - * slang_active_variables - */ - -static GLvoid -slang_active_variables_ctr (slang_active_variables *self) -{ - self->table = NULL; - self->count = 0; -} - -static GLvoid -slang_active_variables_dtr (slang_active_variables *self) -{ - GLuint i; - - for (i = 0; i < self->count; i++) - slang_alloc_free (self->table[i].name); - slang_alloc_free (self->table); -} - -/* - * Active variable queried by the application cannot be a structure. Queriable globals - * (uniforms and attributes) are decomposited into "simple" variables if they are - * "complex". - */ - -static GLboolean -add_simple_variable (slang_active_variables *self, slang_export_data_quant *q, const GLchar *name) -{ - GLuint n; - slang_active_variable *var; - - n = self->count; - if (!TABLE_GROW(self->table, slang_active_variable, n)) - return GL_FALSE; - - /* Initialize the new element. Increment table size only when it is fully initilized. */ - var = &self->table[n]; - var->quant = q; - var->name = slang_string_duplicate (name); - if (var->name == NULL) - return GL_FALSE; - self->count++; - - return GL_TRUE; -} - -static GLboolean -add_complex_variable (slang_active_variables *self, slang_export_data_quant *q, GLchar *name, - slang_atom_pool *atoms) -{ - slang_string_concat (name, slang_atom_pool_id (atoms, q->name)); - - /* If array, add only first element. */ - if (slang_export_data_quant_array (q)) - slang_string_concat (name, "[0]"); - - if (slang_export_data_quant_struct (q)) { - GLuint field_pos, fields, i; - - slang_string_concat (name, "."); - field_pos = slang_string_length (name); - - /* Break it down into individual fields. */ - fields = slang_export_data_quant_fields (q); - for (i = 0; i < fields; i++) { - if (!add_complex_variable (self, &q->structure[i], name, atoms)) - return GL_FALSE; - name[field_pos] = '\0'; - } - - return GL_TRUE; - } - - return add_simple_variable (self, q, name); -} - -/* - * Search a list of global variables with a given access (either attribute or uniform) - * and add it to the list of active variables. - */ -static GLboolean -gather_active_variables (slang_active_variables *self, slang_export_data_table *tbl, - slang_export_data_access access) -{ - GLuint i; - - for (i = 0; i < tbl->count; i++) { - if (tbl->entries[i].access == access) { - GLchar name[1024] = ""; - - if (!add_complex_variable (self, &tbl->entries[i].quant, name, tbl->atoms)) - return GL_FALSE; - } - } - - return GL_TRUE; -} - -/* - * slang_attrib_overrides - */ - -static GLvoid -slang_attrib_overrides_ctr (slang_attrib_overrides *self) -{ - self->table = NULL; - self->count = 0; -} - -static GLvoid -slang_attrib_overrides_dtr (slang_attrib_overrides *self) -{ - GLuint i; - - for (i = 0; i < self->count; i++) - slang_alloc_free (self->table[i].name); - slang_alloc_free (self->table); -} - -static slang_attrib_override * -lookup_attrib_override (slang_attrib_overrides *self, const GLchar *name) -{ - GLuint n, i; - - n = self->count; - for (i = 0; i < n; i++) { - if (slang_string_compare (name, self->table[i].name) == 0) - return &self->table[i]; - } - return NULL; -} - -GLboolean -_slang_attrib_overrides_add (slang_attrib_overrides *self, GLuint index, const GLchar *name) -{ - slang_attrib_override *ovr; - GLuint n; - - /* Attribs can be overriden multiple times. Look-up the table and replace - * its index if it is found. */ - ovr = lookup_attrib_override (self, name); - if (ovr != NULL) { - ovr->index = index; - return GL_TRUE; - } - - n = self->count; - if (!TABLE_GROW(self->table, slang_attrib_override, n)) - return GL_FALSE; - - /* Initialize the new element. Increment table size only when it is fully initilized. */ - ovr = &self->table[n]; - ovr->index = index; - ovr->name = slang_string_duplicate (name); - if (ovr->name == NULL) - return GL_FALSE; - self->count++; - - return GL_TRUE; -} - -/* - * slang_uniform_bindings - */ - -static GLvoid -slang_uniform_bindings_ctr (slang_uniform_bindings *self) -{ - self->table = NULL; - self->count = 0; -} - -static GLvoid -slang_uniform_bindings_dtr (slang_uniform_bindings *self) -{ - GLuint i; - - for (i = 0; i < self->count; i++) - slang_alloc_free (self->table[i].name); - slang_alloc_free (self->table); -} - -static GLboolean -add_simple_uniform_binding (slang_uniform_bindings *self, slang_export_data_quant *q, - const GLchar *name, GLuint index, GLuint addr) -{ - GLuint n, i; - slang_uniform_binding *bind; - - /* Uniform binding table is shared between vertex and fragment shaders. If the same uniform - * is declared both in a vertex and fragment shader, only one uniform entry is maintained. - * When add a uniform binding there can be an entry already allocated for it by the other - * shader. */ - n = self->count; - for (i = 0; i < n; i++) { - if (slang_string_compare (self->table[i].name, name) == 0) { - self->table[i].address[index] = addr; - return GL_TRUE; - } - } - - if (!TABLE_GROW(self->table, slang_uniform_binding, n)) - return GL_FALSE; - - /* Initialize the new element. Increment table size only when it is fully initilized. */ - bind = &self->table[n]; - bind->quant = q; - bind->name = slang_string_duplicate (name); - if (bind->name == NULL) - return GL_FALSE; - for (i = 0; i < SLANG_SHADER_MAX; i++) - bind->address[i] = ~0; - bind->address[index] = addr; - self->count++; - - return GL_TRUE; -} - -static GLboolean -add_complex_uniform_binding (slang_uniform_bindings *self, slang_export_data_quant *q, - GLchar *name, slang_atom_pool *atoms, GLuint index, GLuint addr) -{ - GLuint count, i; - - slang_string_concat (name, slang_atom_pool_id (atoms, q->name)); - count = slang_export_data_quant_elements (q); - - /* If array, add binding for every array element. */ - for (i = 0; i < count; i++) { - GLuint bracket_pos; - - bracket_pos = slang_string_length (name); - if (slang_export_data_quant_array (q)) - _mesa_sprintf (&name[slang_string_length (name)], "[%d]", i); - - if (slang_export_data_quant_struct (q)) { - GLuint field_pos, fields, i; - - slang_string_concat (name, "."); - field_pos = slang_string_length (name); - - /* Break it down into individual fields. */ - fields = slang_export_data_quant_fields (q); - for (i = 0; i < fields; i++) { - if (!add_complex_uniform_binding (self, &q->structure[i], name, atoms, index, addr)) - return GL_FALSE; - - name[field_pos] = '\0'; - addr += slang_export_data_quant_size (&q->structure[i]); - } - } - else { - if (!add_simple_uniform_binding (self, q, name, index, addr)) - return GL_FALSE; - - addr += slang_export_data_quant_size (q); - } - - name[bracket_pos] = '\0'; - } - - return GL_TRUE; -} - -static GLboolean -gather_uniform_bindings (slang_uniform_bindings *self, slang_export_data_table *tbl, GLuint index) -{ - GLuint n, i; - - n = tbl->count; - for (i = 0; i < n; i++) { - if (tbl->entries[i].access == slang_exp_uniform) { - GLchar name[1024] = ""; - - if (!add_complex_uniform_binding (self, &tbl->entries[i].quant, name, tbl->atoms, index, - tbl->entries[i].address)) - return GL_FALSE; - } - } - - return GL_TRUE; -} - -/* - * slang_attrib_bindings - */ - -static GLvoid -slang_attrib_bindings_ctr (slang_attrib_bindings *self) -{ - GLuint i; - - self->binding_count = 0; - for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) - self->slots[i].addr = ~0; -} - -static GLvoid -slang_attrib_bindings_dtr (slang_attrib_bindings *self) -{ - GLuint i; - - for (i = 0; i < self->binding_count; i++) - slang_alloc_free (self->bindings[i].name); -} - -/* - * NOTE: If conventional vertex attribute gl_Vertex is used, application cannot use - * vertex attrib index 0 for binding override. Currently this is not checked. - * Anyways, attrib index 0 is not used when not explicitly asked. - */ - -static GLuint -can_allocate_attrib_slots (slang_attrib_bindings *self, GLuint index, GLuint count) -{ - GLuint i; - - for (i = 0; i < count; i++) { - if (self->slots[index + i].addr != ~0) - break; - } - return i; -} - -static GLuint -allocate_attrib_slots (slang_attrib_bindings *self, GLuint count) -{ - GLuint i; - - /* Start with attrib index 1. Index 0 will be used when explicitly - * asked by application binding. */ - for (i = 1; i <= MAX_VERTEX_ATTRIBS - count; i++) { - GLuint size; - - size = can_allocate_attrib_slots (self, i, count); - if (size == count) - return i; - - /* Speed-up the search a bit. */ - i += size; - } - - return MAX_VERTEX_ATTRIBS; -} - -static GLboolean -add_attrib_binding (slang_attrib_bindings *self, slang_export_data_quant *q, const GLchar *name, - GLuint addr, GLuint index_override) -{ - GLuint slot_span, slot_fill, slot_index, i; - slang_attrib_binding *bind; - - assert (slang_export_data_quant_simple (q)); - - switch (slang_export_data_quant_type (q)) { - case GL_FLOAT: - slot_span = 1; - slot_fill = 1; - break; - case GL_FLOAT_VEC2: - slot_span = 1; - slot_fill = 2; - break; - case GL_FLOAT_VEC3: - slot_span = 1; - slot_fill = 3; - break; - case GL_FLOAT_VEC4: - slot_span = 1; - slot_fill = 4; - break; - case GL_FLOAT_MAT2: - slot_span = 2; - slot_fill = 2; - break; - case GL_FLOAT_MAT3: - slot_span = 3; - slot_fill = 3; - break; - case GL_FLOAT_MAT4: - slot_span = 4; - slot_fill = 4; - break; - default: - assert (0); - } - - if (index_override == MAX_VERTEX_ATTRIBS) - slot_index = allocate_attrib_slots (self, slot_span); - else if (can_allocate_attrib_slots (self, index_override, slot_span) == slot_span) - slot_index = index_override; - else - slot_index = MAX_VERTEX_ATTRIBS; - - if (slot_index == MAX_VERTEX_ATTRIBS) { - /* TODO: info log: error: MAX_VERTEX_ATTRIBS exceeded */ - return GL_FALSE; - } - - /* Initialize the new element. Increment table size only when it is fully initilized. */ - bind = &self->bindings[self->binding_count]; - bind->quant = q; - bind->name = slang_string_duplicate (name); - if (bind->name == NULL) - return GL_FALSE; - bind->first_slot_index = slot_index; - self->binding_count++; - - for (i = 0; i < slot_span; i++) { - slang_attrib_slot *slot; - - slot = &self->slots[bind->first_slot_index + i]; - slot->addr = addr + i * slot_fill * 4; - slot->fill = slot_fill; - } - - return GL_TRUE; -} - -static GLboolean -gather_attrib_bindings (slang_attrib_bindings *self, slang_export_data_table *tbl, - slang_attrib_overrides *ovr) -{ - GLuint i; - - /* First pass. Gather attribs that have overriden index slots. */ - for (i = 0; i < tbl->count; i++) { - if (tbl->entries[i].access == slang_exp_attribute && - !entry_has_gl_prefix (tbl->entries[i].quant.name, tbl->atoms)) { - slang_export_data_quant *quant; - const GLchar *id; - slang_attrib_override *ao; - - quant = &tbl->entries[i].quant; - id = slang_atom_pool_id (tbl->atoms, quant->name); - ao = lookup_attrib_override (ovr, id); - if (ao != NULL) { - if (!add_attrib_binding (self, quant, id, tbl->entries[i].address, ao->index)) - return GL_FALSE; - } - } - } - - /* Second pass. Gather attribs that have not overriden index slots. */ - for (i = 0; i < tbl->count; i++) { - if (tbl->entries[i].access == slang_exp_attribute && - !entry_has_gl_prefix (tbl->entries[i].quant.name, tbl->atoms)) { - slang_export_data_quant *quant; - const GLchar *id; - slang_attrib_override *ao; - - quant = &tbl->entries[i].quant; - id = slang_atom_pool_id (tbl->atoms, quant->name); - ao = lookup_attrib_override (ovr, id); - if (ao == NULL) { - if (!add_attrib_binding (self, quant, id, tbl->entries[i].address, ao->index)) - return GL_FALSE; - } - } - } - - return GL_TRUE; -} - -/* - * slang_varying_bindings - */ - -static GLvoid -slang_varying_bindings_ctr (slang_varying_bindings *self) -{ - self->binding_count = 0; - self->slot_count = 0; -} - -static GLvoid -slang_varying_bindings_dtr (slang_varying_bindings *self) -{ - GLuint i; - - for (i = 0; i < self->binding_count; i++) - slang_alloc_free (self->bindings[i].name); -} - -static GLvoid -update_varying_slots (slang_varying_slot *slots, GLuint count, GLboolean is_vert, GLuint addr, - GLuint do_offset) -{ - GLuint i; - - for (i = 0; i < count; i++) { - if (is_vert) - slots[i].vert_addr = addr + i * 4 * do_offset; - else - slots[i].frag_addr = addr + i * 4 * do_offset; - } -} - -static GLboolean -add_varying_binding (slang_varying_bindings *self, slang_export_data_quant *q, const GLchar *name, - GLboolean is_vert, GLuint addr) -{ - GLuint n, slot_span, i; - slang_varying_binding *bind; - - n = self->binding_count; - slot_span = slang_export_data_quant_components (q) * slang_export_data_quant_elements (q); - for (i = 0; i < n; i++) { - if (slang_string_compare (self->bindings[i].name, name) == 0) { - /* TODO: data quantities must match, or else link fails */ - update_varying_slots (&self->slots[self->bindings[i].first_slot_index], slot_span, - is_vert, addr, 1); - return GL_TRUE; - } - } - - if (self->slot_count + slot_span > MAX_VARYING * 4) { - /* TODO: info log: error: MAX_VARYING_FLOATS exceeded */ - return GL_FALSE; - } - - /* Initialize the new element. Increment table size only when it is fully initilized. */ - bind = &self->bindings[n]; - bind->quant = q; - bind->name = slang_string_duplicate (name); - if (bind->name == NULL) - return GL_FALSE; - bind->first_slot_index = self->slot_count; - self->binding_count++; - - update_varying_slots (&self->slots[bind->first_slot_index], slot_span, is_vert, addr, 1); - update_varying_slots (&self->slots[bind->first_slot_index], slot_span, !is_vert, ~0, 0); - self->slot_count += slot_span; - - return GL_TRUE; -} - -static GLboolean -gather_varying_bindings (slang_varying_bindings *self, slang_export_data_table *tbl, - GLboolean is_vert) -{ - GLuint i; - - for (i = 0; i < tbl->count; i++) { - if (tbl->entries[i].access == slang_exp_varying && - !entry_has_gl_prefix (tbl->entries[i].quant.name, tbl->atoms)) { - if (!add_varying_binding (self, &tbl->entries[i].quant, - slang_atom_pool_id (tbl->atoms, tbl->entries[i].quant.name), - is_vert, tbl->entries[i].address)) - return GL_FALSE; - } - } - - return GL_TRUE; -} - -/* - * slang_texture_bindings - */ - -GLvoid -_slang_texture_usages_ctr (slang_texture_usages *self) -{ - self->table = NULL; - self->count = 0; -} - -GLvoid -_slang_texture_usages_dtr (slang_texture_usages *self) -{ - slang_alloc_free (self->table); -} - -/* - * slang_program - */ - -GLvoid -_slang_program_ctr (slang_program *self) -{ - GLuint i; - - slang_active_variables_ctr (&self->active_uniforms); - slang_active_variables_ctr (&self->active_attribs); - slang_attrib_overrides_ctr (&self->attrib_overrides); - slang_uniform_bindings_ctr (&self->uniforms); - slang_attrib_bindings_ctr (&self->attribs); - slang_varying_bindings_ctr (&self->varyings); - _slang_texture_usages_ctr (&self->texture_usage); - for (i = 0; i < SLANG_SHADER_MAX; i++) { - GLuint j; - - for (j = 0; j < SLANG_COMMON_FIXED_MAX; j++) - self->common_fixed_entries[i][j] = ~0; - for (j = 0; j < SLANG_COMMON_CODE_MAX; j++) - self->code[i][j] = ~0; - self->assemblies[i] = NULL; - } - for (i = 0; i < SLANG_VERTEX_FIXED_MAX; i++) - self->vertex_fixed_entries[i] = ~0; - for (i = 0; i < SLANG_FRAGMENT_FIXED_MAX; i++) - self->fragment_fixed_entries[i] = ~0; -} - -GLvoid -_slang_program_dtr (slang_program *self) -{ - slang_active_variables_dtr (&self->active_uniforms); - slang_active_variables_dtr (&self->active_attribs); - slang_attrib_overrides_dtr (&self->attrib_overrides); - slang_uniform_bindings_dtr (&self->uniforms); - slang_attrib_bindings_dtr (&self->attribs); - slang_varying_bindings_dtr (&self->varyings); - _slang_texture_usages_dtr (&self->texture_usage); -} - -GLvoid -_slang_program_rst (slang_program *self) -{ - GLuint i; - - slang_active_variables_dtr (&self->active_uniforms); - slang_active_variables_dtr (&self->active_attribs); - slang_uniform_bindings_dtr (&self->uniforms); - slang_attrib_bindings_dtr (&self->attribs); - slang_varying_bindings_dtr (&self->varyings); - _slang_texture_usages_dtr (&self->texture_usage); - - slang_active_variables_ctr (&self->active_uniforms); - slang_active_variables_ctr (&self->active_attribs); - slang_uniform_bindings_ctr (&self->uniforms); - slang_attrib_bindings_ctr (&self->attribs); - slang_varying_bindings_ctr (&self->varyings); - _slang_texture_usages_ctr (&self->texture_usage); - for (i = 0; i < SLANG_SHADER_MAX; i++) { - GLuint j; - - for (j = 0; j < SLANG_COMMON_FIXED_MAX; j++) - self->common_fixed_entries[i][j] = ~0; - for (j = 0; j < SLANG_COMMON_CODE_MAX; j++) - self->code[i][j] = ~0; - } - for (i = 0; i < SLANG_VERTEX_FIXED_MAX; i++) - self->vertex_fixed_entries[i] = ~0; - for (i = 0; i < SLANG_FRAGMENT_FIXED_MAX; i++) - self->fragment_fixed_entries[i] = ~0; -} - -/* - * _slang_link() - */ - -static GLuint -gd (slang_export_data_table *tbl, const GLchar *name) -{ - slang_atom atom; - GLuint i; - - atom = slang_atom_pool_atom (tbl->atoms, name); - if (atom == SLANG_ATOM_NULL) - return ~0; - - for (i = 0; i < tbl->count; i++) { - if (atom == tbl->entries[i].quant.name) - return tbl->entries[i].address; - } - return ~0; -} - -static GLvoid -resolve_common_fixed (GLuint e[], slang_export_data_table *tbl) -{ - e[SLANG_COMMON_FIXED_MODELVIEWMATRIX] = gd (tbl, "gl_ModelViewMatrix"); - e[SLANG_COMMON_FIXED_PROJECTIONMATRIX] = gd (tbl, "gl_ProjectionMatrix"); - e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX] = gd (tbl, "gl_ModelViewProjectionMatrix"); - e[SLANG_COMMON_FIXED_TEXTUREMATRIX] = gd (tbl, "gl_TextureMatrix"); - e[SLANG_COMMON_FIXED_NORMALMATRIX] = gd (tbl, "gl_NormalMatrix"); - e[SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE] = gd (tbl, "gl_ModelViewMatrixInverse"); - e[SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE] = gd (tbl, "gl_ProjectionMatrixInverse"); - e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE] = gd (tbl, "gl_ModelViewProjectionMatrixInverse"); - e[SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE] = gd (tbl, "gl_TextureMatrixInverse"); - e[SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE] = gd (tbl, "gl_ModelViewMatrixTranspose"); - e[SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE] = gd (tbl, "gl_ProjectionMatrixTranspose"); - e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE] = gd (tbl, "gl_ModelViewProjectionMatrixTranspose"); - e[SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE] = gd (tbl, "gl_TextureMatrixTranspose"); - e[SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE] = gd (tbl, "gl_ModelViewMatrixInverseTranspose"); - e[SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE] = gd (tbl, "gl_ProjectionMatrixInverseTranspose"); - e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE] = gd (tbl, "gl_ModelViewProjectionMatrixInverseTranspose"); - e[SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE] = gd (tbl, "gl_TextureMatrixInverseTranspose"); - e[SLANG_COMMON_FIXED_NORMALSCALE] = gd (tbl, "gl_NormalScale"); - e[SLANG_COMMON_FIXED_DEPTHRANGE] = gd (tbl, "gl_DepthRange"); - e[SLANG_COMMON_FIXED_CLIPPLANE] = gd (tbl, "gl_ClipPlane"); - e[SLANG_COMMON_FIXED_POINT] = gd (tbl, "gl_Point"); - e[SLANG_COMMON_FIXED_FRONTMATERIAL] = gd (tbl, "gl_FrontMaterial"); - e[SLANG_COMMON_FIXED_BACKMATERIAL] = gd (tbl, "gl_BackMaterial"); - e[SLANG_COMMON_FIXED_LIGHTSOURCE] = gd (tbl, "gl_LightSource"); - e[SLANG_COMMON_FIXED_LIGHTMODEL] = gd (tbl, "gl_LightModel"); - e[SLANG_COMMON_FIXED_FRONTLIGHTMODELPRODUCT] = gd (tbl, "gl_FrontLightModelProduct"); - e[SLANG_COMMON_FIXED_BACKLIGHTMODELPRODUCT] = gd (tbl, "gl_BackLightModelProduct"); - e[SLANG_COMMON_FIXED_FRONTLIGHTPRODUCT] = gd (tbl, "gl_FrontLightProduct"); - e[SLANG_COMMON_FIXED_BACKLIGHTPRODUCT] = gd (tbl, "gl_BackLightProduct"); - e[SLANG_COMMON_FIXED_TEXTUREENVCOLOR] = gd (tbl, "gl_TextureEnvColor"); - e[SLANG_COMMON_FIXED_EYEPLANES] = gd (tbl, "gl_EyePlaneS"); - e[SLANG_COMMON_FIXED_EYEPLANET] = gd (tbl, "gl_EyePlaneT"); - e[SLANG_COMMON_FIXED_EYEPLANER] = gd (tbl, "gl_EyePlaneR"); - e[SLANG_COMMON_FIXED_EYEPLANEQ] = gd (tbl, "gl_EyePlaneQ"); - e[SLANG_COMMON_FIXED_OBJECTPLANES] = gd (tbl, "gl_ObjectPlaneS"); - e[SLANG_COMMON_FIXED_OBJECTPLANET] = gd (tbl, "gl_ObjectPlaneT"); - e[SLANG_COMMON_FIXED_OBJECTPLANER] = gd (tbl, "gl_ObjectPlaneR"); - e[SLANG_COMMON_FIXED_OBJECTPLANEQ] = gd (tbl, "gl_ObjectPlaneQ"); - e[SLANG_COMMON_FIXED_FOG] = gd (tbl, "gl_Fog"); -} - -static GLvoid -resolve_vertex_fixed (GLuint e[], slang_export_data_table *tbl) -{ - e[SLANG_VERTEX_FIXED_POSITION] = gd (tbl, "gl_Position"); - e[SLANG_VERTEX_FIXED_POINTSIZE] = gd (tbl, "gl_PointSize"); - e[SLANG_VERTEX_FIXED_CLIPVERTEX] = gd (tbl, "gl_ClipVertex"); - e[SLANG_VERTEX_FIXED_COLOR] = gd (tbl, "gl_Color"); - e[SLANG_VERTEX_FIXED_SECONDARYCOLOR] = gd (tbl, "gl_SecondaryColor"); - e[SLANG_VERTEX_FIXED_NORMAL] = gd (tbl, "gl_Normal"); - e[SLANG_VERTEX_FIXED_VERTEX] = gd (tbl, "gl_Vertex"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD0] = gd (tbl, "gl_MultiTexCoord0"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD1] = gd (tbl, "gl_MultiTexCoord1"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD2] = gd (tbl, "gl_MultiTexCoord2"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD3] = gd (tbl, "gl_MultiTexCoord3"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD4] = gd (tbl, "gl_MultiTexCoord4"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD5] = gd (tbl, "gl_MultiTexCoord5"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD6] = gd (tbl, "gl_MultiTexCoord6"); - e[SLANG_VERTEX_FIXED_MULTITEXCOORD7] = gd (tbl, "gl_MultiTexCoord7"); - e[SLANG_VERTEX_FIXED_FOGCOORD] = gd (tbl, "gl_FogCoord"); - e[SLANG_VERTEX_FIXED_FRONTCOLOR] = gd (tbl, "gl_FrontColor"); - e[SLANG_VERTEX_FIXED_BACKCOLOR] = gd (tbl, "gl_BackColor"); - e[SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR] = gd (tbl, "gl_FrontSecondaryColor"); - e[SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR] = gd (tbl, "gl_BackSecondaryColor"); - e[SLANG_VERTEX_FIXED_TEXCOORD] = gd (tbl, "gl_TexCoord"); - e[SLANG_VERTEX_FIXED_FOGFRAGCOORD] = gd (tbl, "gl_FogFragCoord"); -} - -static GLvoid -resolve_fragment_fixed (GLuint e[], slang_export_data_table *tbl) -{ - e[SLANG_FRAGMENT_FIXED_FRAGCOORD] = gd (tbl, "gl_FragCoord"); - e[SLANG_FRAGMENT_FIXED_FRONTFACING] = gd (tbl, "gl_FrontFacing"); - e[SLANG_FRAGMENT_FIXED_FRAGCOLOR] = gd (tbl, "gl_FragColor"); - e[SLANG_FRAGMENT_FIXED_FRAGDATA] = gd (tbl, "gl_FragData"); - e[SLANG_FRAGMENT_FIXED_FRAGDEPTH] = gd (tbl, "gl_FragDepth"); - e[SLANG_FRAGMENT_FIXED_COLOR] = gd (tbl, "gl_Color"); - e[SLANG_FRAGMENT_FIXED_SECONDARYCOLOR] = gd (tbl, "gl_SecondaryColor"); - e[SLANG_FRAGMENT_FIXED_TEXCOORD] = gd (tbl, "gl_TexCoord"); - e[SLANG_FRAGMENT_FIXED_FOGFRAGCOORD] = gd (tbl, "gl_FogFragCoord"); -} - -static GLuint -gc (slang_export_code_table *tbl, const GLchar *name) -{ - slang_atom atom; - GLuint i; - - atom = slang_atom_pool_atom (tbl->atoms, name); - if (atom == SLANG_ATOM_NULL) - return ~0; - - for (i = 0; i < tbl->count; i++) { - if (atom == tbl->entries[i].name) - return tbl->entries[i].address; - } - return ~0; -} - -static GLvoid -resolve_common_code (GLuint code[], slang_export_code_table *tbl) -{ - code[SLANG_COMMON_CODE_MAIN] = gc (tbl, "@main"); -} - -GLboolean -_slang_link (slang_program *prog, slang_code_object **objects, GLuint count) -{ - GLuint i; - - for (i = 0; i < count; i++) { - GLuint index; - - if (objects[i]->unit.type == slang_unit_fragment_shader) { - index = SLANG_SHADER_FRAGMENT; - resolve_fragment_fixed (prog->fragment_fixed_entries, &objects[i]->expdata); - } - else { - index = SLANG_SHADER_VERTEX; - resolve_vertex_fixed (prog->vertex_fixed_entries, &objects[i]->expdata); - if (!gather_attrib_bindings (&prog->attribs, &objects[i]->expdata, - &prog->attrib_overrides)) - return GL_FALSE; - } - - if (!gather_active_variables (&prog->active_uniforms, &objects[i]->expdata, slang_exp_uniform)) - return GL_FALSE; - if (!gather_active_variables (&prog->active_attribs, &objects[i]->expdata, slang_exp_attribute)) - return GL_FALSE; - if (!gather_uniform_bindings (&prog->uniforms, &objects[i]->expdata, index)) - return GL_FALSE; - if (!gather_varying_bindings (&prog->varyings, &objects[i]->expdata, - index == SLANG_SHADER_VERTEX)) - return GL_FALSE; - resolve_common_fixed (prog->common_fixed_entries[index], &objects[i]->expdata); - resolve_common_code (prog->code[index], &objects[i]->expcode); - prog->assemblies[index] = &objects[i]->assembly; - } - - /* TODO: all varyings read by fragment shader must be written by vertex shader */ - - if (!_slang_analyse_texture_usage (prog)) - return GL_FALSE; - - return GL_TRUE; -} - -- cgit v1.2.3 From 1b24e2d5a7a7f97c179d7881a014f4aa025cacf7 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 14:24:24 -0700 Subject: remove slang_export.c and related code --- src/mesa/shader/slang/slang_assemble.c | 16 +----- src/mesa/shader/slang/slang_assemble_assignment.c | 5 -- src/mesa/shader/slang/slang_compile.c | 51 ----------------- src/mesa/shader/slang/slang_compile.h | 8 --- src/mesa/shader/slang/slang_compile_function.c | 46 ---------------- src/mesa/shader/slang/slang_compile_function.h | 6 -- src/mesa/shader/slang/slang_compile_variable.c | 67 ----------------------- src/mesa/shader/slang/slang_compile_variable.h | 5 -- src/mesa/shader/slang/slang_storage.c | 8 --- src/mesa/sources | 1 - 10 files changed, 1 insertion(+), 212 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c index e3b65a1238..e65bf38ad5 100644 --- a/src/mesa/shader/slang/slang_assemble.c +++ b/src/mesa/shader/slang/slang_assemble.c @@ -33,9 +33,8 @@ #include "slang_compile.h" #include "slang_storage.h" #include "slang_error.h" - #include "slang_print.h" -/*#include "assemble2.c"*/ + /* slang_assembly */ @@ -481,11 +480,6 @@ dereference_basic(slang_assemble_ctx * A, slang_storage_type type, case slang_stor_float: ty = slang_asm_float_deref; break; -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - case slang_stor_vec4: - ty = slang_asm_vec4_deref; - break; -#endif default: _mesa_problem(NULL, "Unexpected arr->type in dereference_basic"); ty = slang_asm_none; @@ -829,14 +823,6 @@ equality_aggregate(slang_assemble_ctx * A, return GL_FALSE; } else { -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - if (arr->type == slang_stor_vec4) { - if (!PLAB2(A->file, slang_asm_vec4_equal_int, - size + *index, *index)) - return GL_FALSE; - } - else -#endif if (!PLAB2(A->file, slang_asm_float_equal_int, size + *index, *index)) return GL_FALSE; diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c index 93a1ef3a08..6efc0f558a 100644 --- a/src/mesa/shader/slang/slang_assemble_assignment.c +++ b/src/mesa/shader/slang/slang_assemble_assignment.c @@ -79,11 +79,6 @@ assign_basic(slang_assemble_ctx * A, slang_storage_type type, GLuint * index, case slang_stor_float: ty = slang_asm_float_copy; break; -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - case slang_stor_vec4: - ty = slang_asm_vec4_copy; - break; -#endif default: _mesa_problem(NULL, "Unexpected arr->type in assign_basic"); ty = slang_asm_none; diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 8148c65a55..9f7f18167d 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -105,10 +105,6 @@ _slang_code_object_ctr(slang_code_object * self) #endif self->varpool.next_addr = 0; slang_atom_pool_construct(&self->atompool); - slang_export_data_table_ctr(&self->expdata); - self->expdata.atoms = &self->atompool; - slang_export_code_table_ctr(&self->expcode); - self->expcode.atoms = &self->atompool; } GLvoid @@ -123,8 +119,6 @@ _slang_code_object_dtr(slang_code_object * self) slang_assembly_file_destruct(&self->assembly); #endif slang_atom_pool_destruct(&self->atompool); - slang_export_data_table_dtr(&self->expdata); - slang_export_code_table_ctr(&self->expcode); } /* slang_info_log */ @@ -1730,9 +1724,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, A.space.structs = O->structs; A.space.vars = O->vars; A.program = O->program; -#if 0 - A.codegen = O->codegen; -#endif A.vartable = O->vartable; _slang_codegen_global_variable(&A, var, C->type); @@ -1890,9 +1881,6 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, A.space.structs = O->structs; A.space.vars = O->vars; A.program = O->program; -#if 0 - A.codegen = O->codegen; -#endif A.vartable = O->vartable; _slang_reset_error(); @@ -2115,12 +2103,6 @@ static const byte slang_vertex_builtin_gc[] = { #include "library/slang_vertex_builtin_gc.h" }; -#if 0 /*defined(USE_X86_ASM) || defined(SLANG_X86)*/ -static const byte slang_builtin_vec4_gc[] = { -#include "library/slang_builtin_vec4_gc.h" -}; -#endif - static GLboolean compile_object(grammar * id, const char *source, slang_code_object * object, slang_unit_type type, slang_info_log * infolog, @@ -2181,15 +2163,6 @@ compile_object(grammar * id, const char *source, slang_code_object * object, return GL_FALSE; } -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ - /* compile x86 4-component vector overrides, link to target */ - if (!compile_binary(slang_builtin_vec4_gc, - &object->builtin[SLANG_BUILTIN_VEC4], - slang_unit_fragment_builtin, infolog, NULL, - &object->builtin[SLANG_BUILTIN_TARGET])) - return GL_FALSE; -#endif - /* disable language extensions */ #if NEW_SLANG /* allow-built-ins */ grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); @@ -2205,24 +2178,6 @@ compile_object(grammar * id, const char *source, slang_code_object * object, } -#if 0 -static void -slang_create_uniforms(const slang_export_data_table *exports, - struct gl_program *program) -{ - /* XXX only add uniforms that are actually going to get used */ - GLuint i; - for (i = 0; i < exports->count; i++) { - if (exports->entries[i].access == slang_exp_uniform) { - const char *name = (char *) exports->entries[i].quant.name; - GLint j = _mesa_add_uniform(program->Parameters, name, 4); - assert(j >= 0); - } - } -} -#endif - - static GLboolean compile_shader(GLcontext *ctx, slang_code_object * object, slang_unit_type type, slang_info_log * infolog, @@ -2243,12 +2198,6 @@ compile_shader(GLcontext *ctx, slang_code_object * object, if (!success) return GL_FALSE; - if (!_slang_build_export_data_table(&object->expdata, &object->unit.vars)) - return GL_FALSE; - if (!_slang_build_export_code_table(&object->expcode, &object->unit.funs, - &object->unit)) - return GL_FALSE; - #if NEW_SLANG { slang_create_uniforms(&object->expdata, shader); diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 450119d650..3ebe72eca4 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -27,7 +27,6 @@ #include "imports.h" #include "mtypes.h" -#include "slang_export.h" #include "slang_assemble.h" #include "slang_compile_variable.h" #include "slang_compile_struct.h" @@ -70,12 +69,7 @@ _slang_code_unit_dtr (slang_code_unit *); #define SLANG_BUILTIN_COMMON 1 #define SLANG_BUILTIN_TARGET 2 -#if 0/*defined(USE_X86_ASM) || defined(SLANG_X86)*/ -#define SLANG_BUILTIN_VEC4 3 -#define SLANG_BUILTIN_TOTAL 4 -#else #define SLANG_BUILTIN_TOTAL 3 -#endif typedef struct slang_code_object_ { @@ -84,8 +78,6 @@ typedef struct slang_code_object_ slang_assembly_file assembly; slang_var_pool varpool; slang_atom_pool atompool; - slang_export_data_table expdata; - slang_export_code_table expcode; } slang_code_object; extern GLvoid diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index c9b33f3b2f..00a85c2e7d 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -214,49 +214,3 @@ slang_function_scope_find(slang_function_scope * funcs, slang_function * fun, return slang_function_scope_find(funcs->outer_scope, fun, 1); return NULL; } - -/* - * _slang_build_export_code_table() - */ - -GLboolean -_slang_build_export_code_table(slang_export_code_table * tbl, - slang_function_scope * funs, - slang_code_unit * unit) -{ - slang_atom mainAtom; - GLuint i; - - mainAtom = slang_atom_pool_atom(tbl->atoms, "main"); - if (mainAtom == SLANG_ATOM_NULL) - return GL_FALSE; - - for (i = 0; i < funs->num_functions; i++) { - if (funs->functions[i].header.a_name == mainAtom) { - slang_function *fun = &funs->functions[i]; - slang_export_code_entry *e; - slang_assemble_ctx A; - - e = slang_export_code_table_add(tbl); - if (e == NULL) - return GL_FALSE; - e->address = unit->object->assembly.count; - e->name = slang_atom_pool_atom(tbl->atoms, "@main"); - if (e->name == SLANG_ATOM_NULL) - return GL_FALSE; - - A.file = &unit->object->assembly; - A.atoms = &unit->object->atompool; - A.space.funcs = &unit->funs; - A.space.structs = &unit->structs; - A.space.vars = &unit->vars; - slang_assembly_file_push_label(&unit->object->assembly, - slang_asm_local_alloc, 20); - slang_assembly_file_push_label(&unit->object->assembly, - slang_asm_enter, 20); - _slang_assemble_function_call(&A, fun, NULL, 0, GL_FALSE); - slang_assembly_file_push(&unit->object->assembly, slang_asm_exit); - } - } - return GL_TRUE; -} diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 8f0e3b326d..99a6b2a034 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -102,12 +102,6 @@ slang_function_scope_find_by_name(slang_function_scope *, slang_atom, int); extern slang_function * slang_function_scope_find(slang_function_scope *, slang_function *, int); -extern GLboolean -_slang_build_export_code_table(slang_export_code_table *, - slang_function_scope *, - struct slang_code_unit_ *); - - #ifdef __cplusplus } #endif diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index b19615b085..c8ffaf296a 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -383,70 +383,3 @@ gl_type_from_specifier(const slang_type_specifier * type) return GL_FLOAT; } } - -static GLboolean -build_quant(slang_export_data_quant * q, const slang_variable * var) -{ - const slang_type_specifier *spec = &var->type.specifier; - - q->name = var->a_name; - q->size = var->size; - if (spec->type == slang_spec_array) { - q->array_len = var->array_len; -#if 1 - if (var->array_len > 0) -#endif - q->size /= var->array_len; - spec = spec->_array; - } - if (spec->type == slang_spec_struct) { - GLuint i; - - q->u.field_count = spec->_struct->fields->num_variables; - q->structure = (slang_export_data_quant *) - slang_alloc_malloc(q->u.field_count - * sizeof(slang_export_data_quant)); - if (q->structure == NULL) - return GL_FALSE; - - for (i = 0; i < q->u.field_count; i++) - slang_export_data_quant_ctr(&q->structure[i]); - for (i = 0; i < q->u.field_count; i++) { - if (!build_quant(&q->structure[i], - spec->_struct->fields->variables[i])) - return GL_FALSE; - } - } - else - q->u.basic_type = gl_type_from_specifier(spec); - return GL_TRUE; -} - -GLboolean -_slang_build_export_data_table(slang_export_data_table * tbl, - slang_variable_scope * vars) -{ - GLuint i; - - for (i = 0; i < vars->num_variables; i++) { - const slang_variable *var = vars->variables[i]; - slang_export_data_entry *e; - - e = slang_export_data_table_add(tbl); - if (e == NULL) - return GL_FALSE; - if (!build_quant(&e->quant, var)) - return GL_FALSE; - if (var->type.qualifier == slang_qual_uniform) - e->access = slang_exp_uniform; - else if (var->type.qualifier == slang_qual_attribute) - e->access = slang_exp_attribute; - else - e->access = slang_exp_varying; - e->address = var->address; - } - - if (vars->outer_scope != NULL) - return _slang_build_export_data_table(tbl, vars->outer_scope); - return GL_TRUE; -} diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 82800b32b5..841f9840a6 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -126,11 +126,6 @@ extern slang_variable * _slang_locate_variable(const slang_variable_scope *, const slang_atom a_name, GLboolean all); -extern GLboolean -_slang_build_export_data_table(slang_export_data_table *, - slang_variable_scope *); - - #ifdef __cplusplus } diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 899c36cbd3..472d08e6c1 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -180,21 +180,13 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, case slang_spec_vec3: return aggregate_vector(agg, slang_stor_float, 3); case slang_spec_vec4: -#if 0 /*defined(USE_X86_ASM) || defined(SLANG_X86) */ - return aggregate_vector(agg, slang_stor_vec4, 1); -#else return aggregate_vector(agg, slang_stor_float, 4); -#endif case slang_spec_mat2: return aggregate_matrix(agg, slang_stor_float, 2); case slang_spec_mat3: return aggregate_matrix(agg, slang_stor_float, 3); case slang_spec_mat4: -#if 0 /*defined(USE_X86_ASM) || defined(SLANG_X86) */ - return aggregate_vector(agg, slang_stor_vec4, 4); -#else return aggregate_matrix(agg, slang_stor_float, 4); -#endif case slang_spec_sampler1D: case slang_spec_sampler2D: case slang_spec_sampler3D: diff --git a/src/mesa/sources b/src/mesa/sources index a7936101ca..9b77d21786 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -179,7 +179,6 @@ SLANG_SOURCES = \ shader/slang/slang_compile_variable.c \ shader/slang/slang_emit.c \ shader/slang/slang_error.c \ - shader/slang/slang_export.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ shader/slang/slang_link2.c \ -- cgit v1.2.3 From fa1fe5f6f3f33891abec491329e2a35adf7ffdca Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 14:47:03 -0700 Subject: fix emit_tex() breakage --- src/mesa/shader/slang/slang_emit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 0626f7a643..01fb5a41da 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -858,6 +858,8 @@ emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + (void) emit(vt, n->Children[1], prog); + /* Child[1] is the coord */ storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); -- cgit v1.2.3 From 8d396100374837519677c425342c10b738972260 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 14:51:09 -0700 Subject: move some functions, disable some code in preparation for removing assembly code --- src/mesa/shader/slang/slang_assemble_typeinfo.c | 117 ++++++++++++++++++++++++ src/mesa/shader/slang/slang_codegen.c | 52 +++++++++++ src/mesa/shader/slang/slang_compile.c | 13 ++- 3 files changed, 177 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c index 21b31091ea..6a87ef3340 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.c +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c @@ -32,6 +32,123 @@ #include "slang_assemble.h" #include "slang_compile.h" #include "slang_error.h" +#include "prog_instruction.h" + + + + +/** + * Checks if a field selector is a general swizzle (an r-value swizzle + * with replicated components or an l-value swizzle mask) for a + * vector. Returns GL_TRUE if this is the case, is filled with + * swizzle information. Returns GL_FALSE otherwise. + */ +GLboolean +_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) +{ + GLuint i; + GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; + + /* init to undefined. + * We rely on undefined/nil values to distinguish between + * regular swizzles and writemasks. + * For example, the swizzle ".xNNN" is the writemask ".x". + * That's different than the swizzle ".xxxx". + */ + for (i = 0; i < 4; i++) + swz->swizzle[i] = SWIZZLE_NIL; + + /* the swizzle can be at most 4-component long */ + swz->num_components = slang_string_length(field); + if (swz->num_components > 4) + return GL_FALSE; + + for (i = 0; i < swz->num_components; i++) { + /* mark which swizzle group is used */ + switch (field[i]) { + case 'x': + case 'y': + case 'z': + case 'w': + xyzw = GL_TRUE; + break; + case 'r': + case 'g': + case 'b': + case 'a': + rgba = GL_TRUE; + break; + case 's': + case 't': + case 'p': + case 'q': + stpq = GL_TRUE; + break; + default: + return GL_FALSE; + } + + /* collect swizzle component */ + switch (field[i]) { + case 'x': + case 'r': + case 's': + swz->swizzle[i] = 0; + break; + case 'y': + case 'g': + case 't': + swz->swizzle[i] = 1; + break; + case 'z': + case 'b': + case 'p': + swz->swizzle[i] = 2; + break; + case 'w': + case 'a': + case 'q': + swz->swizzle[i] = 3; + break; + } + + /* check if the component is valid for given vector's row count */ + if (rows <= swz->swizzle[i]) + return GL_FALSE; + } + + /* only one swizzle group can be used */ + if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) + return GL_FALSE; + + return GL_TRUE; +} + + + +/** + * Checks if a general swizzle is an l-value swizzle - these swizzles + * do not have duplicated fields. Returns GL_TRUE if this is a + * swizzle mask. Returns GL_FALSE otherwise + */ +GLboolean +_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) +{ + GLuint i, c = 0; + + /* the swizzle may not be longer than the vector dim */ + if (swz->num_components > rows) + return GL_FALSE; + + /* the swizzle components cannot be duplicated */ + for (i = 0; i < swz->num_components; i++) { + if ((c & (1 << swz->swizzle[i])) != 0) + return GL_FALSE; + c |= 1 << swz->swizzle[i]; + } + + return GL_TRUE; +} GLvoid diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 5ce3e46578..03562018ca 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1264,6 +1264,58 @@ _slang_first_function(struct slang_function_scope_ *scope, const char *name) +slang_function * +_slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, + const slang_operation * args, GLuint num_args, + const slang_assembly_name_space * space, + slang_atom_pool * atoms) +{ + GLuint i; + + for (i = 0; i < funcs->num_functions; i++) { + slang_function *f = &funcs->functions[i]; + const GLuint haveRetValue = _slang_function_has_return_value(f); + GLuint j; + + if (a_name != f->header.a_name) + continue; + if (f->param_count - haveRetValue != num_args) + continue; + + /* compare parameter / argument types */ + for (j = 0; j < num_args; j++) { + slang_assembly_typeinfo ti; + + if (!slang_assembly_typeinfo_construct(&ti)) + return NULL; + if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { + slang_assembly_typeinfo_destruct(&ti); + return NULL; + } + if (!slang_type_specifier_equal(&ti.spec, + &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { + slang_assembly_typeinfo_destruct(&ti); + break; + } + slang_assembly_typeinfo_destruct(&ti); + + /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ + if (!ti.can_be_referenced && + (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out || + f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout)) + break; + } + if (j == num_args) + return f; + } + if (funcs->outer_scope != NULL) + return _slang_locate_function(funcs->outer_scope, a_name, args, + num_args, space, atoms); + return NULL; +} + + + /** * Assemble a function call, given a particular function name. * \param name the function's name (operators like '*' are possible). diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 9f7f18167d..67fcbaef92 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -100,7 +100,7 @@ _slang_code_object_ctr(slang_code_object * self) for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) _slang_code_unit_ctr(&self->builtin[i], self); _slang_code_unit_ctr(&self->unit, self); -#if 01 +#if 0 _slang_assembly_file_ctr(&self->assembly); #endif self->varpool.next_addr = 0; @@ -115,7 +115,7 @@ _slang_code_object_dtr(slang_code_object * self) for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) _slang_code_unit_dtr(&self->builtin[i]); _slang_code_unit_dtr(&self->unit); -#if 01 +#if 0 slang_assembly_file_destruct(&self->assembly); #endif slang_atom_pool_destruct(&self->atompool); @@ -1551,7 +1551,7 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) slang_operation op_id, op_assign; GLboolean result; -#if 01 +#if 0 /* save the current assembly */ if (!slang_assembly_file_restore_point_save(A->file, &point)) return GL_FALSE; @@ -1561,10 +1561,12 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) A->local.ret_size = 0; A->local.addr_tmp = 0; A->local.swizzle_tmp = 4; +#if 0 if (!slang_assembly_file_push_label(A->file, slang_asm_local_alloc, 20)) return GL_FALSE; if (!slang_assembly_file_push_label(A->file, slang_asm_enter, 20)) return GL_FALSE; +#endif /* construct the left side of assignment */ if (!slang_operation_construct(&op_id)) @@ -1618,10 +1620,11 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) if (!result) return GL_FALSE; +#if 0 if (!slang_assembly_file_push(A->file, slang_asm_exit)) return GL_FALSE; - -#if 01 +#endif +#if 0 /* restore the old assembly */ if (!slang_assembly_file_restore_point_load(A->file, &point)) return GL_FALSE; -- cgit v1.2.3 From b94c14114f8d5ec7983be0e9d6f286232e183894 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 14:51:34 -0700 Subject: remove slang_assemble*.c files --- src/mesa/sources | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index 9b77d21786..a7a40b3204 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -166,10 +166,6 @@ SHADER_SOURCES = \ shader/shader_api.c \ SLANG_SOURCES = \ - shader/slang/slang_assemble.c \ - shader/slang/slang_assemble_assignment.c \ - shader/slang/slang_assemble_conditional.c \ - shader/slang/slang_assemble_constructor.c \ shader/slang/slang_assemble_typeinfo.c \ shader/slang/slang_codegen.c \ shader/slang/slang_compile.c \ -- cgit v1.2.3 From 11e92390f6be99d9f57554bb000a2d288f3ac287 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:05:46 -0700 Subject: remove more assembly-related code --- src/mesa/shader/slang/slang_assemble.h | 223 +-------------------------------- src/mesa/shader/slang/slang_compile.c | 70 +---------- src/mesa/shader/slang/slang_compile.h | 2 + src/mesa/shader/slang/slang_print.c | 3 +- src/mesa/shader/slang/slang_print.h | 3 +- src/mesa/shader/slang/slang_storage.c | 10 +- src/mesa/shader/slang/slang_storage.h | 2 + 7 files changed, 19 insertions(+), 294 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h index 7e380b3c33..bd49791a89 100644 --- a/src/mesa/shader/slang/slang_assemble.h +++ b/src/mesa/shader/slang/slang_assemble.h @@ -30,199 +30,9 @@ #include "slang_utility.h" #include "slang_vartable.h" -#if defined __cplusplus -extern "C" { -#endif - struct slang_operation_; -typedef enum slang_assembly_type_ -{ - /* core */ - slang_asm_none, - slang_asm_float_copy, - slang_asm_float_move, - slang_asm_float_push, - slang_asm_float_deref, - slang_asm_float_add, /* a = pop(); b = pop(); push(a + b); */ - slang_asm_float_subtract, - slang_asm_float_multiply, - slang_asm_float_divide, - slang_asm_float_negate, /* push(-pop()) */ - slang_asm_float_less, /* a = pop(); b = pop(); push(a < b); */ - slang_asm_float_equal_exp, - slang_asm_float_equal_int, - slang_asm_float_to_int, /* push(floatToInt(pop())) */ - slang_asm_float_sine, /* push(sin(pop()) */ - slang_asm_float_cosine, - slang_asm_float_arcsine, - slang_asm_float_arctan, - slang_asm_float_power, /* push(pow(pop(), pop())) */ - slang_asm_float_exp, - slang_asm_float_exp2, - slang_asm_float_rsq, - slang_asm_float_rcp, - slang_asm_float_log2, - slang_asm_float_min, - slang_asm_float_max, - slang_asm_float_ceil, - slang_asm_float_noise1, /* push(noise1(pop()) */ - slang_asm_float_noise2, /* push(noise2(pop(), pop())) */ - slang_asm_float_noise3, - slang_asm_float_noise4, - - slang_asm_int_copy, - slang_asm_int_move, - slang_asm_int_push, - slang_asm_int_deref, - slang_asm_int_to_float, - slang_asm_int_to_addr, - - slang_asm_bool_copy, - slang_asm_bool_move, - slang_asm_bool_push, - slang_asm_bool_deref, - - slang_asm_addr_copy, - slang_asm_addr_push, - slang_asm_addr_deref, - slang_asm_addr_add, - slang_asm_addr_multiply, - - slang_asm_vec4_tex1d, - slang_asm_vec4_tex2d, - slang_asm_vec4_tex3d, - slang_asm_vec4_texcube, - slang_asm_vec4_shad1d, - slang_asm_vec4_shad2d, - - slang_asm_jump, - slang_asm_jump_if_zero, - - slang_asm_enter, - slang_asm_leave, - - slang_asm_local_alloc, - slang_asm_local_free, - slang_asm_local_addr, - slang_asm_global_addr, - - slang_asm_call, /* push(ip); jump(inst->param[0]); */ - slang_asm_return, - - slang_asm_discard, - slang_asm_exit, - /* GL_MESA_shader_debug */ - slang_asm_float_print, - slang_asm_int_print, - slang_asm_bool_print, - /* vec4 */ - slang_asm_float_to_vec4, - slang_asm_vec4_add, - slang_asm_vec4_subtract, - slang_asm_vec4_multiply, - slang_asm_vec4_divide, - slang_asm_vec4_negate, - slang_asm_vec4_min, - slang_asm_vec4_max, - slang_asm_vec4_seq, - slang_asm_vec4_sne, - slang_asm_vec4_sge, - slang_asm_vec4_sgt, - slang_asm_vec4_dot, - slang_asm_vec3_dot, - slang_asm_vec3_cross, - slang_asm_vec4_floor, - slang_asm_vec4_frac, - slang_asm_vec4_abs, - - slang_asm_vec4_copy, - slang_asm_vec4_deref, - slang_asm_vec4_equal_int, - /* not a real assembly instruction */ - slang_asm__last -} slang_assembly_type; - - -/** - * An assembly-level shader instruction. - */ -typedef struct slang_assembly_ -{ - slang_assembly_type type; /**< The instruction opcode */ - GLfloat literal; /**< float literal */ - GLuint param[2]; /**< Two integer/address parameters */ -} slang_assembly; - - -/** - * A list of slang_assembly instructions - */ -typedef struct slang_assembly_file_ -{ - slang_assembly *code; - GLuint count; - GLuint capacity; -} slang_assembly_file; - - -extern GLvoid -_slang_assembly_file_ctr(slang_assembly_file *); - -extern GLvoid -slang_assembly_file_destruct(slang_assembly_file *); - -extern GLboolean -slang_assembly_file_push(slang_assembly_file *, slang_assembly_type); - -extern GLboolean -slang_assembly_file_push_label(slang_assembly_file *, - slang_assembly_type, GLuint); - -extern GLboolean -slang_assembly_file_push_label2(slang_assembly_file *, slang_assembly_type, - GLuint, GLuint); - -extern GLboolean -slang_assembly_file_push_literal(slang_assembly_file *, - slang_assembly_type, GLfloat); - - -typedef struct slang_assembly_file_restore_point_ -{ - GLuint count; -} slang_assembly_file_restore_point; - - -extern GLboolean -slang_assembly_file_restore_point_save(slang_assembly_file *, - slang_assembly_file_restore_point *); - -extern GLboolean -slang_assembly_file_restore_point_load(slang_assembly_file *, - slang_assembly_file_restore_point *); - - -typedef struct slang_assembly_flow_control_ -{ - GLuint loop_start; /**< for "continue" statement */ - GLuint loop_end; /**< for "break" statement */ - GLuint function_end; /**< for "return" statement */ -} slang_assembly_flow_control; - -typedef struct slang_assembly_local_info_ -{ - GLuint ret_size; - GLuint addr_tmp; - GLuint swizzle_tmp; -} slang_assembly_local_info; - -typedef enum -{ - slang_ref_force, - slang_ref_forbid /**< slang_ref_freelance */ -} slang_ref_type; /** * Holds complete information about vector swizzle - the @@ -246,12 +56,8 @@ typedef struct slang_assembly_name_space_ typedef struct slang_assemble_ctx_ { - slang_assembly_file *file; slang_atom_pool *atoms; slang_assembly_name_space space; - slang_assembly_flow_control flow; - slang_assembly_local_info local; - slang_ref_type ref; slang_swizzle swz; struct gl_program *program; slang_var_table *vartable; @@ -268,36 +74,17 @@ _slang_locate_function(const struct slang_function_scope_ *funcs, const slang_assembly_name_space *space, slang_atom_pool *); -extern GLboolean -_slang_assemble_function(slang_assemble_ctx *, struct slang_function_ *); - -extern GLboolean -_slang_cleanup_stack(slang_assemble_ctx *, struct slang_operation_ *); extern GLboolean -_slang_dereference(slang_assemble_ctx *, struct slang_operation_ *); +_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz); extern GLboolean -_slang_assemble_function_call(slang_assemble_ctx *, struct slang_function_ *, - struct slang_operation_ *, GLuint, GLboolean); +_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows); -extern GLboolean -_slang_assemble_function_call_name(slang_assemble_ctx *, const char *, - struct slang_operation_ *, GLuint, - GLboolean); - -extern GLboolean -_slang_assemble_operation(slang_assemble_ctx *, struct slang_operation_ *, - slang_ref_type); - - -#ifdef __cplusplus -} -#endif +extern GLvoid +_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, + const slang_swizzle *); -#include "slang_assemble_assignment.h" #include "slang_assemble_typeinfo.h" -#include "slang_assemble_constructor.h" -#include "slang_assemble_conditional.h" #endif diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 67fcbaef92..615dfc1bf2 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -100,9 +100,6 @@ _slang_code_object_ctr(slang_code_object * self) for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) _slang_code_unit_ctr(&self->builtin[i], self); _slang_code_unit_ctr(&self->unit, self); -#if 0 - _slang_assembly_file_ctr(&self->assembly); -#endif self->varpool.next_addr = 0; slang_atom_pool_construct(&self->atompool); } @@ -115,9 +112,6 @@ _slang_code_object_dtr(slang_code_object * self) for (i = 0; i < SLANG_BUILTIN_TOTAL; i++) _slang_code_unit_dtr(&self->builtin[i]); _slang_code_unit_dtr(&self->unit); -#if 0 - slang_assembly_file_destruct(&self->assembly); -#endif slang_atom_pool_destruct(&self->atompool); } @@ -242,7 +236,6 @@ typedef struct slang_output_ctx_ slang_variable_scope *vars; slang_function_scope *funs; slang_struct_scope *structs; - slang_assembly_file *assembly; slang_var_pool *global_pool; struct gl_program *program; slang_var_table *vartable; @@ -377,8 +370,7 @@ calculate_var_size(slang_parse_ctx * C, slang_output_ctx * O, if (!slang_storage_aggregate_construct(&agg)) return GL_FALSE; if (!_slang_aggregate_variable(&agg, &var->type.specifier, var->array_len, - O->funs, O->structs, O->vars, - O->assembly, C->atoms)) { + O->funs, O->structs, O->vars, C->atoms)) { slang_storage_aggregate_destruct(&agg); return GL_FALSE; } @@ -1544,30 +1536,9 @@ parse_function_definition(slang_parse_ctx * C, slang_output_ctx * O, static GLboolean initialize_global(slang_assemble_ctx * A, slang_variable * var) { -#if 01 - slang_assembly_file_restore_point point; -#endif - slang_assembly_local_info save_local = A->local; slang_operation op_id, op_assign; GLboolean result; -#if 0 - /* save the current assembly */ - if (!slang_assembly_file_restore_point_save(A->file, &point)) - return GL_FALSE; -#endif - - /* allocate local storage for expression */ - A->local.ret_size = 0; - A->local.addr_tmp = 0; - A->local.swizzle_tmp = 4; -#if 0 - if (!slang_assembly_file_push_label(A->file, slang_asm_local_alloc, 20)) - return GL_FALSE; - if (!slang_assembly_file_push_label(A->file, slang_asm_enter, 20)) - return GL_FALSE; -#endif - /* construct the left side of assignment */ if (!slang_operation_construct(&op_id)) return GL_FALSE; @@ -1603,12 +1574,7 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) op_assign.children[0] = op_id; op_assign.children[1] = *var->initializer; -#if 0 /* this should go away */ - /* insert the actual expression */ - result = _slang_assemble_operation(A, &op_assign, slang_ref_forbid); -#else result = 1; -#endif /* carefully destroy the operations */ op_assign.num_children = 0; @@ -1620,16 +1586,6 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) if (!result) return GL_FALSE; -#if 0 - if (!slang_assembly_file_push(A->file, slang_asm_exit)) - return GL_FALSE; -#endif -#if 0 - /* restore the old assembly */ - if (!slang_assembly_file_restore_point_load(A->file, &point)) - return GL_FALSE; -#endif - A->local = save_local; return GL_TRUE; } @@ -1721,7 +1677,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (C->global_scope) { slang_assemble_ctx A; - A.file = O->assembly; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -1747,7 +1702,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (var->initializer != NULL) { slang_assemble_ctx A; - A.file = O->assembly; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -1878,7 +1832,6 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, { slang_assemble_ctx A; - A.file = O->assembly; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -1888,27 +1841,7 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, _slang_reset_error(); -#if 0 - printf("*************** Assemble function %s ****\n", (char *) (*parsed_func_ret)->header.a_name); - slang_print_var_scope((*parsed_func_ret)->parameters, - (*parsed_func_ret)->param_count); -#endif - -#if 0 - if (!_slang_assemble_function(&A, *parsed_func_ret)) { - /* propogate the error message back through the info log */ - C->L->text = _mesa_strdup(_slang_error_text()); - C->L->dont_free_text = GL_FALSE; - return GL_FALSE; - } -#endif - -#if 0 - printf("**************************************\n"); -#endif -#if 1 _slang_codegen_function(&A, *parsed_func_ret); -#endif } return GL_TRUE; } @@ -1967,7 +1900,6 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, o.funs = &unit->funs; o.structs = &unit->structs; o.vars = &unit->vars; - o.assembly = &unit->object->assembly; o.global_pool = &unit->object->varpool; o.program = program; o.vartable = _slang_new_var_table(maxRegs); diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 3ebe72eca4..f2731cb574 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -75,7 +75,9 @@ typedef struct slang_code_object_ { slang_code_unit builtin[SLANG_BUILTIN_TOTAL]; slang_code_unit unit; +#if 0 slang_assembly_file assembly; +#endif slang_var_pool varpool; slang_atom_pool atompool; } slang_code_object; diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index 07509cddbc..0ebef81808 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -631,7 +631,7 @@ slang_print_function(const slang_function *f, GLboolean body) - +#if 0 const char * slang_asm_string(slang_assembly_type t) @@ -784,6 +784,7 @@ slang_asm_string(slang_assembly_type t) return "??asm??"; } } +#endif const char * diff --git a/src/mesa/shader/slang/slang_print.h b/src/mesa/shader/slang/slang_print.h index ae39be6806..81cf0a844e 100644 --- a/src/mesa/shader/slang/slang_print.h +++ b/src/mesa/shader/slang/slang_print.h @@ -10,9 +10,10 @@ extern void slang_print_tree(const slang_operation *op, int indent); +#if 0 extern const char * slang_asm_string(slang_assembly_type t); - +#endif extern const char * slang_type_qual_string(slang_type_qualifier q); diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 472d08e6c1..747d8e1d29 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -136,14 +136,14 @@ aggregate_variables(slang_storage_aggregate * agg, slang_variable_scope * vars, slang_function_scope * funcs, slang_struct_scope * structs, slang_variable_scope * globals, - slang_assembly_file * file, slang_atom_pool * atoms) + slang_atom_pool * atoms) { GLuint i; for (i = 0; i < vars->num_variables; i++) if (!_slang_aggregate_variable(agg, &vars->variables[i]->type.specifier, vars->variables[i]->array_len, funcs, - structs, globals, file, atoms)) + structs, globals, atoms)) return GL_FALSE; return GL_TRUE; } @@ -154,7 +154,7 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, slang_function_scope * funcs, slang_struct_scope * structs, slang_variable_scope * vars, - slang_assembly_file * file, slang_atom_pool * atoms) + slang_atom_pool * atoms) { switch (spec->type) { case slang_spec_bool: @@ -196,7 +196,7 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, return aggregate_vector(agg, slang_stor_int, 1); case slang_spec_struct: return aggregate_variables(agg, spec->_struct->fields, funcs, structs, - vars, file, atoms); + vars, atoms); case slang_spec_array: { slang_storage_array *arr; @@ -216,7 +216,7 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, return GL_FALSE; } if (!_slang_aggregate_variable(arr->aggregate, spec->_array, 0, - funcs, structs, vars, file, atoms)) + funcs, structs, vars, atoms)) return GL_FALSE; arr->length = array_len; /* TODO: check if 0 < arr->length <= 65535 */ diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index 3fe60c78fe..b433e8bcec 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -98,7 +98,9 @@ _slang_aggregate_variable(slang_storage_aggregate *agg, slang_function_scope *funcs, slang_struct_scope *structs, slang_variable_scope *vars, +#if 0 slang_assembly_file *file, +#endif slang_atom_pool *atoms); /* -- cgit v1.2.3 From 452217e29a9fc948140460c5d3ffc50cac9dcb61 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:10:34 -0700 Subject: removed obsolete shader assembly files --- src/mesa/shader/slang/slang_assemble_assignment.c | 221 ---------- src/mesa/shader/slang/slang_assemble_assignment.h | 45 --- src/mesa/shader/slang/slang_assemble_conditional.c | 448 --------------------- src/mesa/shader/slang/slang_assemble_conditional.h | 51 --- src/mesa/shader/slang/slang_assemble_constructor.c | 421 ------------------- src/mesa/shader/slang/slang_assemble_constructor.h | 57 --- 6 files changed, 1243 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_assemble_assignment.c delete mode 100644 src/mesa/shader/slang/slang_assemble_assignment.h delete mode 100644 src/mesa/shader/slang/slang_assemble_conditional.c delete mode 100644 src/mesa/shader/slang/slang_assemble_conditional.h delete mode 100644 src/mesa/shader/slang/slang_assemble_constructor.c delete mode 100644 src/mesa/shader/slang/slang_assemble_constructor.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c deleted file mode 100644 index 6efc0f558a..0000000000 --- a/src/mesa/shader/slang/slang_assemble_assignment.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_assemble_assignment.c - * slang assignment expressions assembler - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_assemble.h" -#include "slang_storage.h" -#include "slang_error.h" - -/* - * _slang_assemble_assignment() - * - * Copies values on the stack ( to ) to a memory - * location pointed by . - * - * in: - * +------------------+ - * | addr of variable | - * +------------------+ - * | component N-1 | - * | ... | - * | component 0 | - * +------------------+ - * - * out: - * +------------------+ - * | addr of variable | - * +------------------+ - */ - - - -static GLboolean -assign_basic(slang_assemble_ctx * A, slang_storage_type type, GLuint * index, - GLuint size) -{ - GLuint dst_offset, dst_addr_loc; - slang_assembly_type ty; - - /* Calculate the offset within destination variable to write. */ - if (A->swz.num_components != 0) - dst_offset = A->swz.swizzle[*index / 4] * 4; - else - dst_offset = *index; - - switch (type) { - case slang_stor_bool: - ty = slang_asm_bool_copy; - break; - case slang_stor_int: - ty = slang_asm_int_copy; - break; - case slang_stor_float: - ty = slang_asm_float_copy; - break; - default: - _mesa_problem(NULL, "Unexpected arr->type in assign_basic"); - ty = slang_asm_none; - } - - /* Calculate the distance from top of the stack to the destination - * address. As the copy operation progresses, components of the - * source are being successively popped off the stack by the amount - * of *index increase step. - */ - dst_addr_loc = size - *index; - - if (!slang_assembly_file_push_label2(A->file, ty, dst_addr_loc, dst_offset)) - RETURN_NIL(); - - *index += _slang_sizeof_type(type); - - return GL_TRUE; -} - - -static GLboolean -assign_aggregate(slang_assemble_ctx * A, const slang_storage_aggregate * agg, - GLuint * index, GLuint size) -{ - GLuint i; - - for (i = 0; i < agg->count; i++) { - const slang_storage_array *arr = &agg->arrays[i]; - GLuint j; - - for (j = 0; j < arr->length; j++) { - if (arr->type == slang_stor_aggregate) { - if (!assign_aggregate(A, arr->aggregate, index, size)) - return GL_FALSE; - } - else { - /* When the destination is swizzled, we are forced to do - * float_copy, even if vec4 extension is enabled with - * vec4_copy operation. - */ - if (A->swz.num_components != 0 && arr->type == slang_stor_vec4) { - if (!assign_basic(A, slang_stor_float, index, size)) - return GL_FALSE; - if (!assign_basic(A, slang_stor_float, index, size)) - return GL_FALSE; - if (!assign_basic(A, slang_stor_float, index, size)) - return GL_FALSE; - if (!assign_basic(A, slang_stor_float, index, size)) - return GL_FALSE; - } - else { - if (!assign_basic(A, arr->type, index, size)) - return GL_FALSE; - } - } - } - } - - return GL_TRUE; -} - - -GLboolean -_slang_assemble_assignment(slang_assemble_ctx * A, const slang_operation * op) -{ - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg; - GLuint index, size; - - if (!slang_assembly_typeinfo_construct(&ti)) - RETURN_OUT_OF_MEMORY(); - if (!_slang_typeof_operation(A, op, &ti)) - goto end1; - - if (!slang_storage_aggregate_construct(&agg)) - goto end1; - if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) - goto end; - - index = 0; - size = _slang_sizeof_aggregate(&agg); - result = assign_aggregate(A, &agg, &index, size); - - end1: - slang_storage_aggregate_destruct(&agg); - end: - slang_assembly_typeinfo_destruct(&ti); - if (!result) - RETURN_NIL(); - return result; -} - - -/** - * Performs unary (pre ++ and --) or binary (=, +=, -=, *=, /=) - * assignment on the operation's children. - */ -GLboolean -_slang_assemble_assign(slang_assemble_ctx * A, slang_operation * op, - const char *oper, slang_ref_type ref) -{ - slang_swizzle swz; - - if (ref == slang_ref_forbid) { - if (!slang_assembly_file_push_label2 - (A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - } - - if (slang_string_compare("=", oper) == 0) { - if (!_slang_assemble_operation(A, &op->children[0], slang_ref_force)) - return GL_FALSE; - swz = A->swz; - if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - A->swz = swz; - if (!_slang_assemble_assignment(A, op->children)) - return GL_FALSE; - } - else { - if (!_slang_assemble_function_call_name - (A, oper, op->children, op->num_children, GL_TRUE)) - return GL_FALSE; - } - - if (ref == slang_ref_forbid) { - if (!slang_assembly_file_push(A->file, slang_asm_addr_copy)) - return GL_FALSE; - if (!slang_assembly_file_push_label(A->file, slang_asm_local_free, 4)) - return GL_FALSE; - if (!_slang_dereference(A, op->children)) - return GL_FALSE; - } - - return GL_TRUE; -} diff --git a/src/mesa/shader/slang/slang_assemble_assignment.h b/src/mesa/shader/slang/slang_assemble_assignment.h deleted file mode 100644 index 3c1ecdedab..0000000000 --- a/src/mesa/shader/slang/slang_assemble_assignment.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SLANG_ASSEMBLE_ASSIGNMENT_H -#define SLANG_ASSEMBLE_ASSIGNMENT_H - -#if defined __cplusplus -extern "C" { -#endif - - -extern GLboolean -_slang_assemble_assignment(slang_assemble_ctx *, const struct slang_operation_ *); - -extern GLboolean -_slang_assemble_assign(slang_assemble_ctx *, struct slang_operation_ *, - const char *, slang_ref_type); - - -#ifdef __cplusplus -} -#endif - -#endif /* SLANG_ASSEMBLE_ASSIGNMENT_H */ diff --git a/src/mesa/shader/slang/slang_assemble_conditional.c b/src/mesa/shader/slang/slang_assemble_conditional.c deleted file mode 100644 index f3400e8753..0000000000 --- a/src/mesa/shader/slang/slang_assemble_conditional.c +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_assemble_conditional.c - * slang condtional expressions assembler - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_assemble.h" -#include "slang_compile.h" - -/* - * _slang_assemble_logicaland() - * - * and: - * - * jumpz zero - * - * jump end - * zero: - * push 0 - * end: - */ - -GLboolean _slang_assemble_logicaland (slang_assemble_ctx *A, slang_operation *op) -{ - GLuint zero_jump, end_jump; - - /* evaluate left expression */ - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - - /* jump to pushing 0 if not true */ - zero_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero)) - return GL_FALSE; - - /* evaluate right expression */ - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - - /* jump to the end of the expression */ - end_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* push 0 on stack */ - A->file->code[zero_jump].param[0] = A->file->count; - if (!slang_assembly_file_push_literal (A->file, slang_asm_bool_push, (GLfloat) 0)) - return GL_FALSE; - - /* the end of the expression */ - A->file->code[end_jump].param[0] = A->file->count; - - return GL_TRUE; -} - -/* - * _slang_assemble_logicalor() - * - * or: - * - * jumpz right - * push 1 - * jump end - * right: - * - * end: - */ - -GLboolean _slang_assemble_logicalor (slang_assemble_ctx *A, slang_operation *op) -{ - GLuint right_jump, end_jump; - - /* evaluate left expression */ - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - - /* jump to evaluation of right expression if not true */ - right_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero)) - return GL_FALSE; - - /* push 1 on stack */ - if (!slang_assembly_file_push_literal (A->file, slang_asm_bool_push, (GLfloat) 1)) - return GL_FALSE; - - /* jump to the end of the expression */ - end_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* evaluate right expression */ - A->file->code[right_jump].param[0] = A->file->count; - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - - /* the end of the expression */ - A->file->code[end_jump].param[0] = A->file->count; - - return GL_TRUE; -} - -/* - * _slang_assemble_select() - * - * select: - * - * jumpz false - * - * jump end - * false: - * - * end: - */ - -GLboolean _slang_assemble_select (slang_assemble_ctx *A, slang_operation *op) -{ - GLuint cond_jump, end_jump; - - /* execute condition expression */ - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - - /* jump to false expression if not true */ - cond_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero)) - return GL_FALSE; - - /* execute true expression */ - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - - /* jump to the end of the expression */ - end_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* resolve false point */ - A->file->code[cond_jump].param[0] = A->file->count; - - /* execute false expression */ - if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid)) - return GL_FALSE; - - /* resolve the end of the expression */ - A->file->code[end_jump].param[0] = A->file->count; - - return GL_TRUE; -} - -/* - * _slang_assemble_for() - * - * for: - * - * jump start - * break: - * jump end - * continue: - * - * start: - * - * jumpz end - * - * jump continue - * end: - */ - -GLboolean _slang_assemble_for (slang_assemble_ctx *A, slang_operation *op) -{ - GLuint start_jump, end_jump, cond_jump; - GLuint break_label, cont_label; - slang_assembly_flow_control save_flow = A->flow; - - /* execute initialization statement */ - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[0])) - return GL_FALSE; - - /* skip the "go to the end of the loop" and loop-increment statements */ - start_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* go to the end of the loop - break statements are directed here */ - break_label = A->file->count; - end_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* resolve the beginning of the loop - continue statements are directed here */ - cont_label = A->file->count; - - /* execute loop-increment statement */ - if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[2])) - return GL_FALSE; - - /* resolve the condition point */ - A->file->code[start_jump].param[0] = A->file->count; - - /* execute condition statement */ - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - - /* jump to the end of the loop if not true */ - cond_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero)) - return GL_FALSE; - - /* execute loop body */ - A->flow.loop_start = cont_label; - A->flow.loop_end = break_label; - if (!_slang_assemble_operation (A, &op->children[3], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[3])) - return GL_FALSE; - A->flow = save_flow; - - /* go to the beginning of the loop */ - if (!slang_assembly_file_push_label (A->file, slang_asm_jump, cont_label)) - return GL_FALSE; - - /* resolve the end of the loop */ - A->file->code[end_jump].param[0] = A->file->count; - A->file->code[cond_jump].param[0] = A->file->count; - - return GL_TRUE; -} - -/* - * _slang_assemble_do() - * - * do: - * jump start - * break: - * jump end - * continue: - * jump condition - * start: - * - * condition: - * - * jumpz end - * jump start - * end: - */ - -GLboolean _slang_assemble_do (slang_assemble_ctx *A, slang_operation *op) -{ - GLuint skip_jump, end_jump, cont_jump, cond_jump; - GLuint break_label, cont_label; - slang_assembly_flow_control save_flow = A->flow; - - /* skip the "go to the end of the loop" and "go to condition" statements */ - skip_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* go to the end of the loop - break statements are directed here */ - break_label = A->file->count; - end_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* go to condition - continue statements are directed here */ - cont_label = A->file->count; - cont_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* resolve the beginning of the loop */ - A->file->code[skip_jump].param[0] = A->file->count; - - /* execute loop body */ - A->flow.loop_start = cont_label; - A->flow.loop_end = break_label; - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[0])) - return GL_FALSE; - A->flow = save_flow; - - /* resolve condition point */ - A->file->code[cont_jump].param[0] = A->file->count; - - /* execute condition statement */ - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - - /* jump to the end of the loop if not true */ - cond_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero)) - return GL_FALSE; - - /* jump to the beginning of the loop */ - if (!slang_assembly_file_push_label (A->file, slang_asm_jump, A->file->code[skip_jump].param[0])) - return GL_FALSE; - - /* resolve the end of the loop */ - A->file->code[end_jump].param[0] = A->file->count; - A->file->code[cond_jump].param[0] = A->file->count; - - return GL_TRUE; -} - -/* - * _slang_assemble_while() - * - * while: - * jump continue - * break: - * jump end - * continue: - * - * jumpz end - * - * jump continue - * end: - */ - -GLboolean _slang_assemble_while (slang_assemble_ctx *A, slang_operation *op) -{ - GLuint skip_jump, end_jump, cond_jump; - GLuint break_label; - slang_assembly_flow_control save_flow = A->flow; - - /* skip the "go to the end of the loop" statement */ - skip_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* go to the end of the loop - break statements are directed here */ - break_label = A->file->count; - end_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* resolve the beginning of the loop - continue statements are directed here */ - A->file->code[skip_jump].param[0] = A->file->count; - - /* execute condition statement */ - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - - /* jump to the end of the loop if not true */ - cond_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero)) - return GL_FALSE; - - /* execute loop body */ - A->flow.loop_start = A->file->code[skip_jump].param[0]; - A->flow.loop_end = break_label; - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[1])) - return GL_FALSE; - A->flow = save_flow; - - /* jump to the beginning of the loop */ - if (!slang_assembly_file_push_label (A->file, slang_asm_jump, A->file->code[skip_jump].param[0])) - return GL_FALSE; - - /* resolve the end of the loop */ - A->file->code[end_jump].param[0] = A->file->count; - A->file->code[cond_jump].param[0] = A->file->count; - - return GL_TRUE; -} - -/* - * _slang_assemble_if() - * - * if: - * - * jumpz else - * - * jump end - * else: - * - * end: - */ - -GLboolean _slang_assemble_if (slang_assemble_ctx *A, slang_operation *op) -{ - GLuint cond_jump, else_jump; - - /* execute condition statement */ - if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid)) - return GL_FALSE; - - /* jump to false-statement if not true */ - cond_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero)) - return GL_FALSE; - - /* execute true-statement */ - if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[1])) - return GL_FALSE; - - /* skip if-false statement */ - else_jump = A->file->count; - if (!slang_assembly_file_push (A->file, slang_asm_jump)) - return GL_FALSE; - - /* resolve start of false-statement */ - A->file->code[cond_jump].param[0] = A->file->count; - - /* execute false-statement */ - if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid/*slang_ref_freelance*/)) - return GL_FALSE; - if (!_slang_cleanup_stack (A, &op->children[2])) - return GL_FALSE; - - /* resolve end of if-false statement */ - A->file->code[else_jump].param[0] = A->file->count; - - return GL_TRUE; -} - diff --git a/src/mesa/shader/slang/slang_assemble_conditional.h b/src/mesa/shader/slang/slang_assemble_conditional.h deleted file mode 100644 index ce9e4de6c9..0000000000 --- a/src/mesa/shader/slang/slang_assemble_conditional.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#if !defined SLANG_ASSEMBLE_CONDITIONAL_H -#define SLANG_ASSEMBLE_CONDITIONAL_H - -#if defined __cplusplus -extern "C" { -#endif - -GLboolean _slang_assemble_logicaland (slang_assemble_ctx *, struct slang_operation_ *); - -GLboolean _slang_assemble_logicalor (slang_assemble_ctx *, struct slang_operation_ *); - -GLboolean _slang_assemble_select (slang_assemble_ctx *, struct slang_operation_ *); - -GLboolean _slang_assemble_for (slang_assemble_ctx *, struct slang_operation_ *); - -GLboolean _slang_assemble_do (slang_assemble_ctx *, struct slang_operation_ *); - -GLboolean _slang_assemble_while (slang_assemble_ctx *, struct slang_operation_ *); - -GLboolean _slang_assemble_if (slang_assemble_ctx *, struct slang_operation_ *); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c deleted file mode 100644 index 63407580ca..0000000000 --- a/src/mesa/shader/slang/slang_assemble_constructor.c +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_assemble_constructor.c - * slang constructor and vector swizzle assembler - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_assemble.h" -#include "slang_storage.h" -#include "prog_instruction.h" - - -/** - * Checks if a field selector is a general swizzle (an r-value swizzle - * with replicated components or an l-value swizzle mask) for a - * vector. Returns GL_TRUE if this is the case, is filled with - * swizzle information. Returns GL_FALSE otherwise. - */ -GLboolean -_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) -{ - GLuint i; - GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; - - /* init to undefined. - * We rely on undefined/nil values to distinguish between - * regular swizzles and writemasks. - * For example, the swizzle ".xNNN" is the writemask ".x". - * That's different than the swizzle ".xxxx". - */ - for (i = 0; i < 4; i++) - swz->swizzle[i] = SWIZZLE_NIL; - - /* the swizzle can be at most 4-component long */ - swz->num_components = slang_string_length(field); - if (swz->num_components > 4) - return GL_FALSE; - - for (i = 0; i < swz->num_components; i++) { - /* mark which swizzle group is used */ - switch (field[i]) { - case 'x': - case 'y': - case 'z': - case 'w': - xyzw = GL_TRUE; - break; - case 'r': - case 'g': - case 'b': - case 'a': - rgba = GL_TRUE; - break; - case 's': - case 't': - case 'p': - case 'q': - stpq = GL_TRUE; - break; - default: - return GL_FALSE; - } - - /* collect swizzle component */ - switch (field[i]) { - case 'x': - case 'r': - case 's': - swz->swizzle[i] = 0; - break; - case 'y': - case 'g': - case 't': - swz->swizzle[i] = 1; - break; - case 'z': - case 'b': - case 'p': - swz->swizzle[i] = 2; - break; - case 'w': - case 'a': - case 'q': - swz->swizzle[i] = 3; - break; - } - - /* check if the component is valid for given vector's row count */ - if (rows <= swz->swizzle[i]) - return GL_FALSE; - } - - /* only one swizzle group can be used */ - if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) - return GL_FALSE; - - return GL_TRUE; -} - - - -/** - * Checks if a general swizzle is an l-value swizzle - these swizzles - * do not have duplicated fields. Returns GL_TRUE if this is a - * swizzle mask. Returns GL_FALSE otherwise - */ -GLboolean -_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) -{ - GLuint i, c = 0; - - /* the swizzle may not be longer than the vector dim */ - if (swz->num_components > rows) - return GL_FALSE; - - /* the swizzle components cannot be duplicated */ - for (i = 0; i < swz->num_components; i++) { - if ((c & (1 << swz->swizzle[i])) != 0) - return GL_FALSE; - c |= 1 << swz->swizzle[i]; - } - - return GL_TRUE; -} - - - -/** - * Combines (multiplies) two swizzles to form single swizzle. - * Example: "vec.wzyx.yx" --> "vec.zw". - */ -GLvoid -_slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left, - const slang_swizzle * right) -{ - GLuint i; - - dst->num_components = right->num_components; - for (i = 0; i < right->num_components; i++) - dst->swizzle[i] = left->swizzle[right->swizzle[i]]; -} - - - -static GLboolean -sizeof_argument(slang_assemble_ctx * A, GLuint * size, slang_operation * op) -{ - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg; - - if (!slang_assembly_typeinfo_construct(&ti)) - return GL_FALSE; - if (!_slang_typeof_operation(A, op, &ti)) - goto end1; - - if (!slang_storage_aggregate_construct(&agg)) - goto end1; - if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) - goto end; - - *size = _slang_sizeof_aggregate(&agg); - result = GL_TRUE; - - end: - slang_storage_aggregate_destruct(&agg); - end1: - slang_assembly_typeinfo_destruct(&ti); - return result; -} - - -static GLboolean -constructor_aggregate(slang_assemble_ctx * A, - const slang_storage_aggregate * flat, - slang_operation * op, GLuint garbage_size) -{ - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg, flat_agg; - - if (!slang_assembly_typeinfo_construct(&ti)) - return GL_FALSE; - if (!_slang_typeof_operation(A, op, &ti)) - goto end1; - - if (!slang_storage_aggregate_construct(&agg)) - goto end1; - if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) - goto end2; - - if (!slang_storage_aggregate_construct(&flat_agg)) - goto end2; - if (!_slang_flatten_aggregate(&flat_agg, &agg)) - goto end; - - if (!_slang_assemble_operation(A, op, slang_ref_forbid)) - goto end; - - /* TODO: convert (generic) elements */ - - /* free the garbage */ - if (garbage_size != 0) { - GLuint i; - - /* move the non-garbage part to the end of the argument */ - if (!slang_assembly_file_push_label(A->file, slang_asm_addr_push, 0)) - goto end; - for (i = flat_agg.count * 4 - garbage_size; i > 0; i -= 4) { - if (!slang_assembly_file_push_label2(A->file, slang_asm_float_move, - garbage_size + i, i)) { - goto end; - } - } - if (!slang_assembly_file_push_label - (A->file, slang_asm_local_free, garbage_size + 4)) - goto end; - } - - result = GL_TRUE; - end: - slang_storage_aggregate_destruct(&flat_agg); - end2: - slang_storage_aggregate_destruct(&agg); - end1: - slang_assembly_typeinfo_destruct(&ti); - return result; -} - - -GLboolean -_slang_assemble_constructor(slang_assemble_ctx * A, const slang_operation * op) -{ - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg, flat; - GLuint size, i; - GLuint arg_sums[2]; - - /* get typeinfo of the constructor (the result of constructor expression) */ - if (!slang_assembly_typeinfo_construct(&ti)) - return GL_FALSE; - if (!_slang_typeof_operation(A, op, &ti)) - goto end1; - - /* create an aggregate of the constructor */ - if (!slang_storage_aggregate_construct(&agg)) - goto end1; - if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) - goto end2; - - /* calculate size of the constructor */ - size = _slang_sizeof_aggregate(&agg); - - /* flatten the constructor */ - if (!slang_storage_aggregate_construct(&flat)) - goto end2; - if (!_slang_flatten_aggregate(&flat, &agg)) - goto end; - - /* collect the last two constructor's argument size sums */ - arg_sums[0] = 0; /* will hold all but the last argument's size sum */ - arg_sums[1] = 0; /* will hold all argument's size sum */ - for (i = 0; i < op->num_children; i++) { - GLuint arg_size = 0; - - if (!sizeof_argument(A, &arg_size, &op->children[i])) - goto end; - if (i > 0) - arg_sums[0] = arg_sums[1]; - arg_sums[1] += arg_size; - } - - /* check if there are too many arguments */ - if (arg_sums[0] >= size) { - /* TODO: info log: too many arguments in constructor list */ - goto end; - } - - /* check if there are too few arguments */ - if (arg_sums[1] < size) { - /* TODO: info log: too few arguments in constructor list */ - /* DEBUG */ - { - if (!slang_storage_aggregate_construct(&agg)) - goto end1; - if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) - goto end2; - - /* calculate size of the constructor */ - size = _slang_sizeof_aggregate(&agg); - } - goto end; - } - - /* traverse the children that form the constructor expression */ - for (i = op->num_children; i > 0; i--) { - GLuint garbage_size; - - /* the last argument may be too big - calculate the unnecessary - * data size - */ - if (i == op->num_children) - garbage_size = arg_sums[1] - size; - else - garbage_size = 0; - - if (!constructor_aggregate(A, &flat, &op->children[i - 1], garbage_size)) - goto end; - } - - result = GL_TRUE; - end: - slang_storage_aggregate_destruct(&flat); - end2: - slang_storage_aggregate_destruct(&agg); - end1: - slang_assembly_typeinfo_destruct(&ti); - return result; -} - - - -GLboolean -_slang_assemble_constructor_from_swizzle(slang_assemble_ctx * A, - const slang_swizzle * swz, - const slang_type_specifier * spec, - const slang_type_specifier * master_spec) -{ - const GLuint master_rows = _slang_type_dim(master_spec->type); - GLuint i; - - for (i = 0; i < master_rows; i++) { - switch (_slang_type_base(master_spec->type)) { - case slang_spec_bool: - if (!slang_assembly_file_push_label2(A->file, slang_asm_bool_copy, - (master_rows - i) * 4, i * 4)) - return GL_FALSE; - break; - case slang_spec_int: - if (!slang_assembly_file_push_label2(A->file, slang_asm_int_copy, - (master_rows - i) * 4, i * 4)) - return GL_FALSE; - break; - case slang_spec_float: - if (!slang_assembly_file_push_label2(A->file, slang_asm_float_copy, - (master_rows - i) * 4, i * 4)) - return GL_FALSE; - break; - default: - break; - } - } - - if (!slang_assembly_file_push_label(A->file, slang_asm_local_free, 4)) - return GL_FALSE; - - for (i = swz->num_components; i > 0; i--) { - const GLuint n = i - 1; - - if (!slang_assembly_file_push_label2(A->file, slang_asm_local_addr, - A->local.swizzle_tmp, 16)) - return GL_FALSE; - if (!slang_assembly_file_push_label(A->file, slang_asm_addr_push, - swz->swizzle[n] * 4)) - return GL_FALSE; - if (!slang_assembly_file_push(A->file, slang_asm_addr_add)) - return GL_FALSE; - - switch (_slang_type_base(master_spec->type)) { - case slang_spec_bool: - if (!slang_assembly_file_push(A->file, slang_asm_bool_deref)) - return GL_FALSE; - break; - case slang_spec_int: - if (!slang_assembly_file_push(A->file, slang_asm_int_deref)) - return GL_FALSE; - break; - case slang_spec_float: - if (!slang_assembly_file_push(A->file, slang_asm_float_deref)) - return GL_FALSE; - break; - default: - break; - } - } - - return GL_TRUE; -} diff --git a/src/mesa/shader/slang/slang_assemble_constructor.h b/src/mesa/shader/slang/slang_assemble_constructor.h deleted file mode 100644 index c0deb91344..0000000000 --- a/src/mesa/shader/slang/slang_assemble_constructor.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SLANG_ASSEMBLE_CONSTRUCTOR_H -#define SLANG_ASSEMBLE_CONSTRUCTOR_H - -#if defined __cplusplus -extern "C" { -#endif - - -extern GLboolean -_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz); - -extern GLboolean -_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows); - -extern GLvoid -_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, - const slang_swizzle *); - -extern GLboolean -_slang_assemble_constructor(slang_assemble_ctx *, - const struct slang_operation_ *); - -extern GLboolean -_slang_assemble_constructor_from_swizzle(slang_assemble_ctx *, - const slang_swizzle *, - const slang_type_specifier *, - const slang_type_specifier *); - -#ifdef __cplusplus -} -#endif - -#endif /* SLANG_ASSEMBLE_CONSTRUCTOR_H */ -- cgit v1.2.3 From 640afdf4f26746270ae45ec17711457ee643ae91 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:16:51 -0700 Subject: remove more slang assembly-related files, codee --- src/mesa/shader/slang/slang_assemble.c | 1588 -------------------------------- src/mesa/shader/slang/slang_assemble.h | 90 -- 2 files changed, 1678 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_assemble.c delete mode 100644 src/mesa/shader/slang/slang_assemble.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c deleted file mode 100644 index e65bf38ad5..0000000000 --- a/src/mesa/shader/slang/slang_assemble.c +++ /dev/null @@ -1,1588 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_assemble.c - * slang intermediate code assembler - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_assemble.h" -#include "slang_compile.h" -#include "slang_storage.h" -#include "slang_error.h" -#include "slang_print.h" - - -/* slang_assembly */ - -static GLboolean -slang_assembly_construct(slang_assembly * assem) -{ - assem->type = slang_asm_none; - return GL_TRUE; -} - -static GLvoid -slang_assembly_destruct(slang_assembly * assem) -{ -} - -/* - * slang_assembly_file - */ - -GLvoid -_slang_assembly_file_ctr(slang_assembly_file * self) -{ - self->code = NULL; - self->count = 0; - self->capacity = 0; -} - -GLvoid -slang_assembly_file_destruct(slang_assembly_file * file) -{ - GLuint i; - - for (i = 0; i < file->count; i++) - slang_assembly_destruct(&file->code[i]); - slang_alloc_free(file->code); -} - -static GLboolean -push_new(slang_assembly_file * file) -{ - if (file->count == file->capacity) { - GLuint n; - - if (file->capacity == 0) - n = 256; - else - n = file->capacity * 2; - file->code = (slang_assembly *) - slang_alloc_realloc(file->code, - file->capacity * sizeof(slang_assembly), - n * sizeof(slang_assembly)); - if (file->code == NULL) - return GL_FALSE; - file->capacity = n; - } - if (!slang_assembly_construct(&file->code[file->count])) - return GL_FALSE; - file->count++; - return GL_TRUE; -} - -static GLboolean -push_gen(slang_assembly_file * file, slang_assembly_type type, - GLfloat literal, GLuint label, GLuint size) -{ - slang_assembly *assem; - -#if 0 - printf("Gen %s %f %d %d\n", slang_asm_string(type), literal, label, size); -#endif - if (!push_new(file)) - return GL_FALSE; - assem = &file->code[file->count - 1]; - assem->type = type; - assem->literal = literal; - assem->param[0] = label; - assem->param[1] = size; - return GL_TRUE; -} - -GLboolean -slang_assembly_file_push(slang_assembly_file * file, slang_assembly_type type) -{ - return push_gen(file, type, (GLfloat) 0, 0, 0); -} - -GLboolean -slang_assembly_file_push_label(slang_assembly_file * file, - slang_assembly_type type, GLuint label) -{ - return push_gen(file, type, (GLfloat) 0, label, 0); -} - -GLboolean -slang_assembly_file_push_label2(slang_assembly_file * file, - slang_assembly_type type, GLuint label1, - GLuint label2) -{ - return push_gen(file, type, (GLfloat) 0, label1, label2); -} - -GLboolean -slang_assembly_file_push_literal(slang_assembly_file * file, - slang_assembly_type type, GLfloat literal) -{ - return push_gen(file, type, literal, 0, 0); -} - -#define PUSH slang_assembly_file_push -#define PLAB slang_assembly_file_push_label -#define PLAB2 slang_assembly_file_push_label2 -#define PLIT slang_assembly_file_push_literal - -/* slang_assembly_file_restore_point */ - -GLboolean -slang_assembly_file_restore_point_save(slang_assembly_file * file, - slang_assembly_file_restore_point * - point) -{ - point->count = file->count; - return GL_TRUE; -} - -GLboolean -slang_assembly_file_restore_point_load(slang_assembly_file * file, - slang_assembly_file_restore_point * - point) -{ - GLuint i; - - for (i = point->count; i < file->count; i++) - slang_assembly_destruct(&file->code[i]); - file->count = point->count; - return GL_TRUE; -} - -/* utility functions */ - -static GLboolean -sizeof_variable(const slang_assemble_ctx * A, slang_type_specifier * spec, - slang_type_qualifier qual, GLuint array_len, GLuint * size) -{ - slang_storage_aggregate agg; - - /* calculate the size of the variable's aggregate */ - if (!slang_storage_aggregate_construct(&agg)) - return GL_FALSE; - if (!_slang_aggregate_variable(&agg, spec, array_len, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) { - slang_storage_aggregate_destruct(&agg); - return GL_FALSE; - } - *size += _slang_sizeof_aggregate(&agg); - slang_storage_aggregate_destruct(&agg); - - /* for reference variables consider the additional address overhead */ - if (qual == slang_qual_out || qual == slang_qual_inout) - *size += 4; - - return GL_TRUE; -} - -static GLboolean -sizeof_variable2(slang_assemble_ctx * A, slang_variable * var, GLuint * size) -{ - var->address = *size; - if (var->type.qualifier == slang_qual_out - || var->type.qualifier == slang_qual_inout) - var->address += 4; - return sizeof_variable(A, &var->type.specifier, var->type.qualifier, - var->array_len, size); -} - -static GLboolean -sizeof_variables(slang_assemble_ctx * A, slang_variable_scope * vars, - GLuint start, GLuint stop, GLuint * size) -{ - GLuint i; - - for (i = start; i < stop; i++) - if (!sizeof_variable2(A, vars->variables[i], size)) - return GL_FALSE; - return GL_TRUE; -} - -static GLboolean -collect_locals(slang_assemble_ctx * A, slang_operation * op, GLuint * size) -{ - GLuint i; - - if (!sizeof_variables(A, op->locals, 0, op->locals->num_variables, size)) - return GL_FALSE; - for (i = 0; i < op->num_children; i++) - if (!collect_locals(A, &op->children[i], size)) - return GL_FALSE; - return GL_TRUE; -} - -/* _slang_locate_function() */ - -/** - * Locate a function by comparing actual arguments against formal parameters. - */ -slang_function * -_slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, - const slang_operation * args, GLuint num_args, - const slang_assembly_name_space * space, - slang_atom_pool * atoms) -{ - GLuint i; - - for (i = 0; i < funcs->num_functions; i++) { - slang_function *f = &funcs->functions[i]; - const GLuint haveRetValue = _slang_function_has_return_value(f); - GLuint j; - - if (a_name != f->header.a_name) - continue; - if (f->param_count - haveRetValue != num_args) - continue; - - /* compare parameter / argument types */ - for (j = 0; j < num_args; j++) { - slang_assembly_typeinfo ti; - - if (!slang_assembly_typeinfo_construct(&ti)) - return NULL; - if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { - slang_assembly_typeinfo_destruct(&ti); - return NULL; - } - if (!slang_type_specifier_equal(&ti.spec, - &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { - slang_assembly_typeinfo_destruct(&ti); - break; - } - slang_assembly_typeinfo_destruct(&ti); - - /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ - if (!ti.can_be_referenced && - (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out || - f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout)) - break; - } - if (j == num_args) - return f; - } - if (funcs->outer_scope != NULL) - return _slang_locate_function(funcs->outer_scope, a_name, args, - num_args, space, atoms); - return NULL; -} - - - -/** - * Generate assembly for a parsed function. - */ -GLboolean -_slang_assemble_function(slang_assemble_ctx * A, slang_function * fun) -{ - GLuint param_size, local_size; - GLuint skip, cleanup; - const GLuint haveRetValue = _slang_function_has_return_value(fun); - - fun->address = A->file->count; - - if (fun->body == NULL) { - /* jump to the actual function body - we do not know it, so add - * the instruction to fixup table - */ - if (!slang_fixup_save(&fun->fixups, fun->address)) - RETURN_NIL(); - if (!PUSH(A->file, slang_asm_jump)) - RETURN_OUT_OF_MEMORY(); - return GL_TRUE; - } - else { - /* resolve all fixup table entries and delete it */ - GLuint i; - for (i = 0; i < fun->fixups.count; i++) - A->file->code[fun->fixups.table[i]].param[0] = fun->address; - slang_fixup_table_free(&fun->fixups); - } - - /* At this point traverse function formal parameters and code to calculate - * total memory size to be allocated on the stack. - * During this process the variables will be assigned local addresses to - * reference them in the code. - * No storage optimizations are performed so exclusive scopes are not - * detected and shared. - */ - - /* calculate return value size */ - param_size = 0; - if (fun->header.type.specifier.type != slang_spec_void) { - if (!sizeof_variable(A, &fun->header.type.specifier, - slang_qual_none, 0, ¶m_size)) - RETURN_NIL(); - } - A->local.ret_size = param_size; - - /* calculate formal parameter list size */ - if (!sizeof_variables(A, fun->parameters, - 0, - fun->param_count - haveRetValue, ¶m_size)) - RETURN_NIL(); - - /* calculate local variables size - take into account the four-byte - * return address and temporaries for various tasks (4 for addr and - * 16 for swizzle temporaries). these include variables from the - * formal parameter scope and from the code - */ - A->local.addr_tmp = param_size + 4; - A->local.swizzle_tmp = param_size + 4 + 4; - local_size = param_size + 4 + 4 + 16; - if (!sizeof_variables(A, fun->parameters, fun->param_count, - fun->parameters->num_variables, &local_size)) { - RETURN_OUT_OF_MEMORY(); - } - if (!collect_locals(A, fun->body, &local_size)) - RETURN_NIL(); - - /* allocate local variable storage */ - if (!PLAB(A->file, slang_asm_local_alloc, local_size - param_size - 4)) - RETURN_OUT_OF_MEMORY(); - - /* mark a new frame for function variable storage */ - if (!PLAB(A->file, slang_asm_enter, local_size)) - RETURN_OUT_OF_MEMORY(); - - /* jump directly to the actual code */ - skip = A->file->count; - if (!push_new(A->file)) - RETURN_OUT_OF_MEMORY(); - A->file->code[skip].type = slang_asm_jump; - - /* all "return" statements will be directed here */ - A->flow.function_end = A->file->count; - cleanup = A->file->count; - if (!push_new(A->file)) - RETURN_OUT_OF_MEMORY(); - A->file->code[cleanup].type = slang_asm_jump; - - /* execute the function body */ - A->file->code[skip].param[0] = A->file->count; - if (!_slang_assemble_operation(A, fun->body, - /*slang_ref_freelance */ slang_ref_forbid)) - RETURN_NIL(); - - /* this is the end of the function - restore the old function frame */ - A->file->code[cleanup].param[0] = A->file->count; - if (!PUSH(A->file, slang_asm_leave)) - RETURN_OUT_OF_MEMORY(); - - /* free local variable storage */ - if (!PLAB(A->file, slang_asm_local_free, local_size - param_size - 4)) - RETURN_OUT_OF_MEMORY(); - - /* return from the function */ - if (!PUSH(A->file, slang_asm_return)) - RETURN_OUT_OF_MEMORY(); - - return GL_TRUE; -} - -GLboolean -_slang_cleanup_stack(slang_assemble_ctx * A, slang_operation * op) -{ - slang_assembly_typeinfo ti; - GLuint size = 0; - - /* get type info of the operation and calculate its size */ - if (!slang_assembly_typeinfo_construct(&ti)) - return GL_FALSE; - if (!_slang_typeof_operation(A, op, &ti)) { - slang_assembly_typeinfo_destruct(&ti); - return GL_FALSE; - } - if (ti.spec.type != slang_spec_void) { - if (A->ref == slang_ref_force) { - size = 4; - } - else if (!sizeof_variable(A, &ti.spec, slang_qual_none, 0, &size)) { - slang_assembly_typeinfo_destruct(&ti); - return GL_FALSE; - } - } - slang_assembly_typeinfo_destruct(&ti); - - /* if nonzero, free it from the stack */ - if (size != 0) { - if (!PLAB(A->file, slang_asm_local_free, size)) - return GL_FALSE; - } - - return GL_TRUE; -} - -/* _slang_assemble_operation() */ - -static GLboolean -dereference_basic(slang_assemble_ctx * A, slang_storage_type type, - GLuint * size, slang_swizzle * swz, GLboolean is_swizzled) -{ - GLuint src_offset; - slang_assembly_type ty; - - *size -= _slang_sizeof_type(type); - - /* If swizzling is taking place, we are forced to use scalar - * operations, even if we have vec4 instructions enabled (this - * should be actually done with special vec4 shuffle instructions). - * Adjust the size and calculate the offset within source variable - * to read. - */ - if (is_swizzled) - src_offset = swz->swizzle[*size / 4] * 4; - else - src_offset = *size; - - /* dereference data slot of a basic type */ - if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_deref)) - return GL_FALSE; - if (src_offset != 0) { - if (!PLAB(A->file, slang_asm_addr_push, src_offset)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_add)) - return GL_FALSE; - } - - switch (type) { - case slang_stor_bool: - ty = slang_asm_bool_deref; - break; - case slang_stor_int: - ty = slang_asm_int_deref; - break; - case slang_stor_float: - ty = slang_asm_float_deref; - break; - default: - _mesa_problem(NULL, "Unexpected arr->type in dereference_basic"); - ty = slang_asm_none; - } - - return PUSH(A->file, ty); -} - -static GLboolean -dereference_aggregate(slang_assemble_ctx * A, - const slang_storage_aggregate * agg, GLuint * size, - slang_swizzle * swz, GLboolean is_swizzled) -{ - GLuint i; - - for (i = agg->count; i > 0; i--) { - const slang_storage_array *arr = &agg->arrays[i - 1]; - GLuint j; - - for (j = arr->length; j > 0; j--) { - if (arr->type == slang_stor_aggregate) { - if (!dereference_aggregate(A, arr->aggregate, size, - swz, is_swizzled)) - return GL_FALSE; - } - else { - if (is_swizzled && arr->type == slang_stor_vec4) { - if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) - return GL_FALSE; - if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) - return GL_FALSE; - if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) - return GL_FALSE; - if (!dereference_basic(A, slang_stor_float, size, swz, is_swizzled)) - return GL_FALSE; - } - else { - if (!dereference_basic(A, arr->type, size, swz, is_swizzled)) - return GL_FALSE; - } - } - } - } - - return GL_TRUE; -} - -GLboolean -_slang_dereference(slang_assemble_ctx * A, slang_operation * op) -{ - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg; - GLuint size; - - /* get type information of the given operation */ - if (!slang_assembly_typeinfo_construct(&ti)) - return GL_FALSE; - if (!_slang_typeof_operation(A, op, &ti)) - goto end1; - - /* construct aggregate from the type info */ - if (!slang_storage_aggregate_construct(&agg)) - goto end1; - if (!_slang_aggregate_variable(&agg, &ti.spec, ti.array_len, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) - goto end; - - /* dereference the resulting aggregate */ - size = _slang_sizeof_aggregate(&agg); - result = dereference_aggregate(A, &agg, &size, &ti.swz, ti.is_swizzled); - - end: - slang_storage_aggregate_destruct(&agg); - end1: - slang_assembly_typeinfo_destruct(&ti); - return result; -} - - -/** - * Assemble a function call, given a pointer to the actual function to call. - */ -GLboolean -_slang_assemble_function_call(slang_assemble_ctx * A, slang_function * fun, - slang_operation * params, GLuint param_count, - GLboolean assignment) -{ - GLuint i; - slang_swizzle p_swz[64]; - slang_ref_type p_ref[64]; - /* - const GLuint haveRetValue = _slang_function_has_return_value(fun); - */ - - /* TODO: fix this, allocate dynamically */ - if (param_count > 64) - return GL_FALSE; - - /* make room for the return value, if any */ - if (fun->header.type.specifier.type != slang_spec_void) { - GLuint ret_size = 0; - - if (!sizeof_variable(A, &fun->header.type.specifier, - slang_qual_none, 0, &ret_size)) - return GL_FALSE; - if (!PLAB(A->file, slang_asm_local_alloc, ret_size)) - return GL_FALSE; - } - - /* push the actual parameters on the stack */ - for (i = 0; i < param_count; i++) { - if (fun->parameters->variables[i /*+ haveRetValue*/]->type.qualifier == slang_qual_inout || - fun->parameters->variables[i /*+ haveRetValue*/]->type.qualifier == slang_qual_out) { - if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - /* TODO: optimize the "out" parameter case */ - if (!_slang_assemble_operation(A, ¶ms[i], slang_ref_force)) - return GL_FALSE; - p_swz[i] = A->swz; - p_ref[i] = A->ref; - if (!PUSH(A->file, slang_asm_addr_copy)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_deref)) - return GL_FALSE; - if (i == 0 && assignment) { - /* duplicate the resulting address */ - if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_deref)) - return GL_FALSE; - } - if (!_slang_dereference(A, ¶ms[i])) - return GL_FALSE; - } - else { - if (!_slang_assemble_operation(A, ¶ms[i], slang_ref_forbid)) - return GL_FALSE; - p_swz[i] = A->swz; - p_ref[i] = A->ref; - } - } - - /* call the function */ -#if 0 - printf("CALL FUNCTION %s\n", (char*) fun->header.a_name); - slang_print_var_scope(fun->parameters, fun->param_count); -#endif - if (!PLAB(A->file, slang_asm_call, fun->address)) - return GL_FALSE; - - /* pop the parameters from the stack */ - for (i = param_count; i > 0; i--) { - GLuint j = i - 1; - - A->swz = p_swz[j]; - A->ref = p_ref[j]; - if (fun->parameters->variables[j /*+ haveRetValue*/]->type.qualifier == slang_qual_inout || - fun->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out) { - /* for output parameter copy the contents of the formal parameter - * back to the original actual parameter - */ - if (!_slang_assemble_assignment(A, ¶ms[j])) - return GL_FALSE; - /* pop the actual parameter's address */ - if (!PLAB(A->file, slang_asm_local_free, 4)) - return GL_FALSE; - } - else { - /* pop the value of the parameter */ - if (!_slang_cleanup_stack(A, ¶ms[j])) - return GL_FALSE; - } - } - - return GL_TRUE; -} - - -/** - * Assemble a function call, given the name of the function to call and a - * list of parameters. - */ -GLboolean -_slang_assemble_function_call_name(slang_assemble_ctx * A, const char *name, - slang_operation * params, - GLuint param_count, GLboolean assignment) -{ - slang_atom atom; - slang_function *fun; - - atom = slang_atom_pool_atom(A->atoms, name); - if (atom == SLANG_ATOM_NULL) - return GL_FALSE; - fun = - _slang_locate_function(A->space.funcs, atom, params, param_count, - &A->space, A->atoms); - { - char *s = (char *) name; - if (strcmp(name, "vec4") == 0) - printf("LLLLLLLLLLLLLLL locate %s %p\n", s, (void*) fun); - } - - if (fun == NULL) - return GL_FALSE; - return _slang_assemble_function_call(A, fun, params, param_count, - assignment); -} - -static GLboolean -assemble_function_call_name_dummyint(slang_assemble_ctx * A, const char *name, - slang_operation * params) -{ - slang_operation p[2]; - GLboolean result; - - p[0] = params[0]; - if (!slang_operation_construct(&p[1])) - return GL_FALSE; - p[1].type = slang_oper_literal_int; - result = _slang_assemble_function_call_name(A, name, p, 2, GL_FALSE); - slang_operation_destruct(&p[1]); - return result; -} - -static const struct -{ - const char *name; - slang_assembly_type code1, code2; -} inst[] = { - /* core */ - {"float_add", slang_asm_float_add, slang_asm_float_copy}, - {"float_subtract", slang_asm_float_subtract, slang_asm_float_copy}, - {"float_multiply", slang_asm_float_multiply, slang_asm_float_copy}, - {"float_divide", slang_asm_float_divide, slang_asm_float_copy}, - {"float_negate", slang_asm_float_negate, slang_asm_float_copy}, - {"float_min", slang_asm_float_min, slang_asm_float_copy}, - {"float_max", slang_asm_float_max, slang_asm_float_copy}, - {"float_less", slang_asm_float_less, slang_asm_bool_copy}, - {"float_equal", slang_asm_float_equal_exp, slang_asm_bool_copy}, - {"float_to_int", slang_asm_float_to_int, slang_asm_int_copy}, - {"float_sine", slang_asm_float_sine, slang_asm_float_copy}, - {"float_cosine", slang_asm_float_cosine, slang_asm_float_copy}, - {"float_arcsine", slang_asm_float_arcsine, slang_asm_float_copy}, - {"float_arctan", slang_asm_float_arctan, slang_asm_float_copy}, - {"float_power", slang_asm_float_power, slang_asm_float_copy}, - {"float_exp", slang_asm_float_exp, slang_asm_float_copy}, - {"float_exp2", slang_asm_float_exp2, slang_asm_float_copy}, - {"float_rsq", slang_asm_float_rsq, slang_asm_float_copy}, - {"float_rcp", slang_asm_float_rcp, slang_asm_float_copy}, - {"float_log2", slang_asm_float_log2, slang_asm_float_copy}, - {"float_ceil", slang_asm_float_ceil, slang_asm_float_copy}, - {"float_noise1", slang_asm_float_noise1, slang_asm_float_copy}, - {"float_noise2", slang_asm_float_noise2, slang_asm_float_copy}, - {"float_noise3", slang_asm_float_noise3, slang_asm_float_copy}, - {"float_noise4", slang_asm_float_noise4, slang_asm_float_copy}, - {"int_to_float", slang_asm_int_to_float, slang_asm_float_copy}, - {"vec4_tex1d", slang_asm_vec4_tex1d, slang_asm_none}, - {"vec4_texb1d", slang_asm_vec4_tex1d, slang_asm_none}, - {"vec4_texp1d", slang_asm_vec4_tex1d, slang_asm_none}, - {"vec4_tex2d", slang_asm_vec4_tex2d, slang_asm_none}, - {"vec4_texb2d", slang_asm_vec4_tex2d, slang_asm_none}, - {"vec4_texp2d", slang_asm_vec4_tex2d, slang_asm_none}, - {"vec4_tex3d", slang_asm_vec4_tex3d, slang_asm_none}, - {"vec4_texb3d", slang_asm_vec4_tex3d, slang_asm_none}, - {"vec4_texp3d", slang_asm_vec4_tex3d, slang_asm_none}, - {"vec4_texcube", slang_asm_vec4_texcube, slang_asm_none}, - {"vec4_shad1d", slang_asm_vec4_shad1d, slang_asm_none}, - {"vec4_shad2d", slang_asm_vec4_shad2d, slang_asm_none}, - {"vec4_ddx", 0, slang_asm_none}, - {"vec4_ddy", 0, slang_asm_none}, - /* GL_MESA_shader_debug */ - {"float_print", slang_asm_float_deref, slang_asm_float_print}, - {"int_print", slang_asm_int_deref, slang_asm_int_print}, - {"bool_print", slang_asm_bool_deref, slang_asm_bool_print}, - /* vec4 */ - {"float_to_vec4", slang_asm_float_to_vec4, slang_asm_none}, - {"vec4_add", slang_asm_vec4_add, slang_asm_float_copy}, - {"vec4_subtract", slang_asm_vec4_subtract, slang_asm_float_copy}, - {"vec4_multiply", slang_asm_vec4_multiply, slang_asm_float_copy}, - {"vec4_min", slang_asm_vec4_min, slang_asm_float_copy}, - {"vec4_max", slang_asm_vec4_max, slang_asm_float_copy}, - {"vec4_seq", slang_asm_vec4_seq, slang_asm_float_copy}, - {"vec4_sne", slang_asm_vec4_sne, slang_asm_float_copy}, - {"vec4_sge", slang_asm_vec4_sge, slang_asm_float_copy}, - {"vec4_sgt", slang_asm_vec4_sgt, slang_asm_float_copy}, - {"vec4_floor", slang_asm_vec4_floor, slang_asm_float_copy}, - {"vec4_frac", slang_asm_vec4_frac, slang_asm_float_copy}, - {"vec4_abs", slang_asm_vec4_abs, slang_asm_float_copy}, - - {"vec4_divide", slang_asm_vec4_divide, slang_asm_none}, - {"vec4_negate", slang_asm_vec4_negate, slang_asm_none}, - {"vec4_dot", slang_asm_vec4_dot, slang_asm_float_copy}, - {"vec3_dot", slang_asm_vec3_dot, slang_asm_float_copy}, - {"vec3_cross", slang_asm_vec3_cross, slang_asm_float_copy}, - {NULL, slang_asm_none, slang_asm_none} -}; - -static GLboolean -call_asm_instruction(slang_assemble_ctx * A, slang_atom a_name) -{ - const char *id; - GLuint i; - - id = slang_atom_pool_id(A->atoms, a_name); - - for (i = 0; inst[i].name != NULL; i++) - if (slang_string_compare(id, inst[i].name) == 0) - break; - if (inst[i].name == NULL) - return GL_FALSE; - - if (!PLAB2(A->file, inst[i].code1, 4, 0)) - return GL_FALSE; - if (inst[i].code2 != slang_asm_none) - if (!PLAB2(A->file, inst[i].code2, 4, 0)) - return GL_FALSE; - - /* clean-up the stack from the remaining dst address */ - if (!PLAB(A->file, slang_asm_local_free, 4)) - return GL_FALSE; - - return GL_TRUE; -} - -static GLboolean -equality_aggregate(slang_assemble_ctx * A, - const slang_storage_aggregate * agg, GLuint * index, - GLuint size, GLuint z_label) -{ - GLuint i; - - for (i = 0; i < agg->count; i++) { - const slang_storage_array *arr = &agg->arrays[i]; - GLuint j; - - for (j = 0; j < arr->length; j++) { - if (arr->type == slang_stor_aggregate) { - if (!equality_aggregate(A, arr->aggregate, index, size, z_label)) - return GL_FALSE; - } - else { - if (!PLAB2(A->file, slang_asm_float_equal_int, - size + *index, *index)) - return GL_FALSE; - - *index += _slang_sizeof_type(arr->type); - if (!PLAB(A->file, slang_asm_jump_if_zero, z_label)) - return GL_FALSE; - } - } - } - - return GL_TRUE; -} - -static GLboolean -equality(slang_assemble_ctx * A, slang_operation * op, GLboolean equal) -{ - slang_assembly_typeinfo ti; - GLboolean result = GL_FALSE; - slang_storage_aggregate agg; - GLuint index, size; - GLuint skip_jump, true_label, true_jump, false_label, false_jump; - - /* get type of operation */ - if (!slang_assembly_typeinfo_construct(&ti)) - RETURN_OUT_OF_MEMORY(); - if (!_slang_typeof_operation(A, op, &ti)) - goto end1; - - /* convert it to an aggregate */ - if (!slang_storage_aggregate_construct(&agg)) - goto end1; - if (!_slang_aggregate_variable(&agg, &ti.spec, 0, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) - goto end; - - /* compute the size of the agregate - there are two such aggregates - * on the stack - */ - size = _slang_sizeof_aggregate(&agg); - - /* jump to the actual data-comparison code */ - skip_jump = A->file->count; - if (!PUSH(A->file, slang_asm_jump)) - goto end; - - /* pop off the stack the compared data and push 1 */ - true_label = A->file->count; - if (!PLAB(A->file, slang_asm_local_free, size * 2)) - goto end; - if (!PLIT(A->file, slang_asm_bool_push, (GLfloat) 1)) - goto end; - true_jump = A->file->count; - if (!PUSH(A->file, slang_asm_jump)) - goto end; - - false_label = A->file->count; - if (!PLAB(A->file, slang_asm_local_free, size * 2)) - goto end; - if (!PLIT(A->file, slang_asm_bool_push, (GLfloat) 0)) - goto end; - false_jump = A->file->count; - if (!PUSH(A->file, slang_asm_jump)) - goto end; - - A->file->code[skip_jump].param[0] = A->file->count; - - /* compare the data on stack, it will eventually jump either to - * true or false label - */ - index = 0; - if (!equality_aggregate(A, &agg, &index, size, - equal ? false_label : true_label)) - goto end; - if (!PLAB(A->file, slang_asm_jump, equal ? true_label : false_label)) - goto end; - - A->file->code[true_jump].param[0] = A->file->count; - A->file->code[false_jump].param[0] = A->file->count; - - result = GL_TRUE; - end: - slang_storage_aggregate_destruct(&agg); - end1: - slang_assembly_typeinfo_destruct(&ti); - return result; -} - -static GLboolean -handle_subscript(slang_assemble_ctx * A, slang_assembly_typeinfo * tie, - slang_assembly_typeinfo * tia, slang_operation * op, - slang_ref_type ref) -{ - GLuint asize = 0, esize = 0; - - /* get type info of the master expression (matrix, vector or an array */ - if (!_slang_typeof_operation(A, &op->children[0], tia)) - return GL_FALSE; - if (!sizeof_variable(A, &tia->spec, slang_qual_none, - tia->array_len, &asize)) - return GL_FALSE; - - /* get type info of the result (matrix column, vector row or array element) */ - if (!_slang_typeof_operation(A, op, tie)) - return GL_FALSE; - if (!sizeof_variable(A, &tie->spec, slang_qual_none, 0, &esize)) - return GL_FALSE; - - /* assemble the master expression */ - if (!_slang_assemble_operation(A, &op->children[0], ref)) - return GL_FALSE; - - /* when indexing an l-value swizzle, push the swizzle_tmp */ - if (ref == slang_ref_force && tia->is_swizzled) - if (!PLAB2(A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - return GL_FALSE; - - /* assemble the subscript expression */ - if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - return GL_FALSE; - - if (ref == slang_ref_force && tia->is_swizzled) { - GLuint i; - - /* copy the swizzle indexes to the swizzle_tmp */ - for (i = 0; i < tia->swz.num_components; i++) { - if (!PLAB2(A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - return GL_FALSE; - if (!PLAB(A->file, slang_asm_addr_push, i * 4)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_add)) - return GL_FALSE; - if (!PLAB(A->file, slang_asm_addr_push, tia->swz.swizzle[i])) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_copy)) - return GL_FALSE; - if (!PLAB(A->file, slang_asm_local_free, 4)) - return GL_FALSE; - } - - /* offset the pushed swizzle_tmp address and dereference it */ - if (!PUSH(A->file, slang_asm_int_to_addr)) - return GL_FALSE; - if (!PLAB(A->file, slang_asm_addr_push, 4)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_multiply)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_add)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_deref)) - return GL_FALSE; - } - else { - /* convert the integer subscript to a relative address */ - if (!PUSH(A->file, slang_asm_int_to_addr)) - return GL_FALSE; - } - - if (!PLAB(A->file, slang_asm_addr_push, esize)) - return GL_FALSE; - if (!PUSH(A->file, slang_asm_addr_multiply)) - return GL_FALSE; - - if (ref == slang_ref_force) { - /* offset the base address with the relative address */ - if (!PUSH(A->file, slang_asm_addr_add)) - return GL_FALSE; - } - else { - GLuint i; - - /* move the selected element to the beginning of the master expression */ - for (i = 0; i < esize; i += 4) - if (!PLAB2(A->file, slang_asm_float_move, - asize - esize + i + 4, i + 4)) - return GL_FALSE; - if (!PLAB(A->file, slang_asm_local_free, 4)) - return GL_FALSE; - - /* free the rest of the master expression */ - if (!PLAB(A->file, slang_asm_local_free, asize - esize)) - return GL_FALSE; - } - - return GL_TRUE; -} - -static GLboolean -handle_field(slang_assemble_ctx * A, slang_assembly_typeinfo * tia, - slang_assembly_typeinfo * tib, slang_operation * op, - slang_ref_type ref) -{ - /* get type info of the result (field or swizzle) */ - if (!_slang_typeof_operation(A, op, tia)) - RETURN_NIL(); - - /* get type info of the master expression being accessed (struct or vector) */ - if (!_slang_typeof_operation(A, &op->children[0], tib)) - RETURN_NIL(); - - /* if swizzling a vector in-place, the swizzle temporary is needed */ - if (ref == slang_ref_forbid && tia->is_swizzled) - if (!PLAB2(A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16)) - RETURN_OUT_OF_MEMORY(); - - /* assemble the master expression */ - if (!_slang_assemble_operation(A, &op->children[0], ref)) - RETURN_NIL(); - - /* assemble the field expression */ - if (tia->is_swizzled) { - if (ref == slang_ref_force) { -#if 0 - if (tia->swz.num_components == 1) { - /* simple case - adjust the vector's address to point to - * the selected component - */ - if (!PLAB(file, slang_asm_addr_push, tia->swz.swizzle[0] * 4)) - RETURN_OUT_OF_MEMORY(); - if (!PUSH(file, slang_asm_addr_add)) - RETURN_OUT_OF_MEMORY(); - } - else -#endif - { - /* two or more vector components are being referenced - - * the so-called write mask must be passed to the upper - * operations and applied when assigning value to this swizzle - */ - A->swz = tia->swz; - } - } - else { - /* swizzle the vector in-place using the swizzle temporary */ - if (!_slang_assemble_constructor_from_swizzle(A, &tia->swz, - &tia->spec, &tib->spec)) - RETURN_NIL(); - } - } - else { - GLuint i, struct_size = 0, field_offset = 0, field_size = 0; - - /* - * Calculate struct size, field offset and field size. - */ - for (i = 0; i < tib->spec._struct->fields->num_variables; i++) { - slang_variable *field; - slang_storage_aggregate agg; - GLuint size; - - field = tib->spec._struct->fields->variables[i]; - if (!slang_storage_aggregate_construct(&agg)) - RETURN_NIL(); - if (!_slang_aggregate_variable(&agg, &field->type.specifier, - field->array_len, A->space.funcs, - A->space.structs, A->space.vars, - A->file, A->atoms)) { - slang_storage_aggregate_destruct(&agg); - RETURN_NIL(); - } - size = _slang_sizeof_aggregate(&agg); - slang_storage_aggregate_destruct(&agg); - - if (op->a_id == field->a_name) { - field_size = size; - field_offset = struct_size; - } - struct_size += size; - } - - if (ref == slang_ref_force) { - GLboolean shift; - - /* - * OPTIMIZATION: If selecting first field, no address shifting - * is needed. - */ - shift = (field_offset != 0); - - if (shift) { - if (!PLAB(A->file, slang_asm_addr_push, field_offset)) - RETURN_OUT_OF_MEMORY(); - if (!PUSH(A->file, slang_asm_addr_add)) - RETURN_OUT_OF_MEMORY(); - } - } - else { - GLboolean relocate, shrink; - GLuint free_b = 0; - - /* - * OPTIMIZATION: If selecting last field, no relocation is needed. - */ - relocate = (field_offset != (struct_size - field_size)); - - /* - * OPTIMIZATION: If field and struct sizes are equal, no partial - * free is needed. - */ - shrink = (field_size != struct_size); - - if (relocate) { - GLuint i; - - /* - * Move the selected element to the end of the master expression. - * Do it in reverse order to avoid overwriting itself. - */ - if (!PLAB(A->file, slang_asm_addr_push, field_offset)) - RETURN_OUT_OF_MEMORY(); - for (i = field_size; i > 0; i -= 4) - if (!PLAB2(A->file, slang_asm_float_move, - struct_size - field_size + i, i)) - RETURN_OUT_OF_MEMORY(); - free_b += 4; - } - - if (shrink) { - /* free the rest of the master expression */ - free_b += struct_size - field_size; - } - - if (free_b) { - if (!PLAB(A->file, slang_asm_local_free, free_b)) - RETURN_OUT_OF_MEMORY(); - } - } - } - - return GL_TRUE; -} - -GLboolean -_slang_assemble_operation(slang_assemble_ctx * A, slang_operation * op, - slang_ref_type ref) -{ - /* set default results */ - A->ref = /*(ref == slang_ref_freelance) ? slang_ref_force : */ ref; - A->swz.num_components = 0; - - switch (op->type) { - case slang_oper_block_no_new_scope: - case slang_oper_block_new_scope: - { - GLuint i; - - for (i = 0; i < op->num_children; i++) { - if (!_slang_assemble_operation(A, &op->children[i], - slang_ref_forbid /*slang_ref_freelance */ )) - RETURN_NIL(); - if (!_slang_cleanup_stack(A, &op->children[i])) - RETURN_NIL(); - } - } - break; - case slang_oper_variable_decl: - { - GLuint i; - slang_operation assign; - GLboolean result; - - /* Construct assignment expression placeholder. */ - if (!slang_operation_construct(&assign)) - RETURN_NIL(); - assign.type = slang_oper_assign; - assign.children = slang_operation_new(2); - if (assign.children == NULL) { - slang_operation_destruct(&assign); - RETURN_NIL(); - } - for (assign.num_children = 0; assign.num_children < 2; - assign.num_children++) - if (!slang_operation_construct(&assign.children - [assign.num_children])) { - slang_operation_destruct(&assign); - RETURN_OUT_OF_MEMORY(); - } - - result = GL_TRUE; - for (i = 0; i < op->num_children; i++) { - slang_variable *var; - - var = - _slang_locate_variable(op->children[i].locals, - op->children[i].a_id, GL_TRUE); - if (var == NULL) { - result = GL_FALSE; - break; - } - if (var->initializer == NULL) - continue; - - if (!slang_operation_copy(&assign.children[0], &op->children[i]) - || !slang_operation_copy(&assign.children[1], - var->initializer) - || !_slang_assemble_assign(A, &assign, "=", slang_ref_forbid) - || !_slang_cleanup_stack(A, &assign)) { - result = GL_FALSE; - break; - } - } - slang_operation_destruct(&assign); - if (!result) - RETURN_NIL(); - } - break; - case slang_oper_asm: - { - GLuint i; - if (!_slang_assemble_operation(A, &op->children[0], slang_ref_force)) - RETURN_NIL(); - for (i = 1; i < op->num_children; i++) - if (!_slang_assemble_operation(A, &op->children[i], - slang_ref_forbid)) - RETURN_NIL(); - if (!call_asm_instruction(A, op->a_id)) - RETURN_ERROR2("Unknown __asm call", (char*) op->a_id, 0); - } - break; - case slang_oper_break: - if (!PLAB(A->file, slang_asm_jump, A->flow.loop_end)) - RETURN_OUT_OF_MEMORY(); - break; - case slang_oper_continue: - if (!PLAB(A->file, slang_asm_jump, A->flow.loop_start)) - RETURN_OUT_OF_MEMORY(); - break; - case slang_oper_discard: - if (!PUSH(A->file, slang_asm_discard)) - RETURN_OUT_OF_MEMORY(); - if (!PUSH(A->file, slang_asm_exit)) - RETURN_OUT_OF_MEMORY(); - break; - case slang_oper_return: - if (A->local.ret_size != 0) { - /* push the result's address */ - if (!PLAB2(A->file, slang_asm_local_addr, 0, A->local.ret_size)) - RETURN_OUT_OF_MEMORY(); - if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) - RETURN_NIL(); - - A->swz.num_components = 0; - /* assign the operation to the function result (it was reserved on the stack) */ - if (!_slang_assemble_assignment(A, op->children)) - RETURN_NIL(); - - if (!PLAB(A->file, slang_asm_local_free, 4)) - RETURN_OUT_OF_MEMORY(); - } - if (!PLAB(A->file, slang_asm_jump, A->flow.function_end)) - RETURN_OUT_OF_MEMORY(); - break; - case slang_oper_expression: - if (ref == slang_ref_force) - RETURN_NIL(); - if (!_slang_assemble_operation(A, &op->children[0], ref)) - RETURN_NIL(); - break; - case slang_oper_if: - if (!_slang_assemble_if(A, op)) - RETURN_NIL(); - break; - case slang_oper_while: - if (!_slang_assemble_while(A, op)) - RETURN_NIL(); - break; - case slang_oper_do: - if (!_slang_assemble_do(A, op)) - RETURN_NIL(); - break; - case slang_oper_for: - if (!_slang_assemble_for(A, op)) - RETURN_NIL(); - break; - case slang_oper_void: - break; - case slang_oper_literal_bool: - if (ref == slang_ref_force) - RETURN_NIL(); - if (!PLIT(A->file, slang_asm_bool_push, op->literal[0])) - RETURN_OUT_OF_MEMORY(); - A->ref = slang_ref_forbid; - break; - case slang_oper_literal_int: - if (ref == slang_ref_force) - RETURN_NIL(); - if (!PLIT(A->file, slang_asm_int_push, op->literal[0])) - RETURN_OUT_OF_MEMORY(); - A->ref = slang_ref_forbid; - break; - case slang_oper_literal_float: -#if 0 - if (ref == slang_ref_force) - RETURN_NIL(); -#endif - if (!PLIT(A->file, slang_asm_float_push, op->literal[0])) - RETURN_OUT_OF_MEMORY(); - A->ref = slang_ref_forbid; - break; - case slang_oper_identifier: - { - slang_variable *var; - GLuint size; - - /* find the variable and calculate its size */ - var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); - if (var == NULL) - RETURN_ERROR2("undefined variable", (char *) op->a_id, 0); - size = 0; - if (!sizeof_variable(A, &var->type.specifier, slang_qual_none, - var->array_len, &size)) - RETURN_OUT_OF_MEMORY(); - - /* prepare stack for dereferencing */ - if (ref == slang_ref_forbid) - if (!PLAB2(A->file, slang_asm_local_addr, A->local.addr_tmp, 4)) - RETURN_OUT_OF_MEMORY(); - - /* push the variable's address */ - if (var->global) { - if (!PLAB(A->file, slang_asm_global_addr, var->address)) - RETURN_OUT_OF_MEMORY(); - } - else { - if (!PLAB2(A->file, slang_asm_local_addr, var->address, size)) - RETURN_OUT_OF_MEMORY(); - } - - /* perform the dereference */ - if (ref == slang_ref_forbid) { - if (!PUSH(A->file, slang_asm_addr_copy)) - RETURN_OUT_OF_MEMORY(); - if (!PLAB(A->file, slang_asm_local_free, 4)) - RETURN_OUT_OF_MEMORY(); - if (!_slang_dereference(A, op)) - RETURN_NIL(); - } - } - break; - case slang_oper_sequence: - if (ref == slang_ref_force) - RETURN_NIL(); - if (!_slang_assemble_operation(A, &op->children[0], - slang_ref_forbid /*slang_ref_freelance */ )) - RETURN_NIL(); - if (!_slang_cleanup_stack(A, &op->children[0])) - RETURN_NIL(); - if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_assign: - if (!_slang_assemble_assign(A, op, "=", ref)) - RETURN_NIL(); - break; - case slang_oper_addassign: - if (!_slang_assemble_assign(A, op, "+=", ref)) - RETURN_NIL(); - A->ref = ref; - break; - case slang_oper_subassign: - if (!_slang_assemble_assign(A, op, "-=", ref)) - RETURN_NIL(); - A->ref = ref; - break; - case slang_oper_mulassign: - if (!_slang_assemble_assign(A, op, "*=", ref)) - RETURN_NIL(); - A->ref = ref; - break; - /*case slang_oper_modassign: */ - /*case slang_oper_lshassign: */ - /*case slang_oper_rshassign: */ - /*case slang_oper_orassign: */ - /*case slang_oper_xorassign: */ - /*case slang_oper_andassign: */ - case slang_oper_divassign: - if (!_slang_assemble_assign(A, op, "/=", ref)) - RETURN_NIL(); - A->ref = ref; - break; - case slang_oper_select: - if (!_slang_assemble_select(A, op)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_logicalor: - if (!_slang_assemble_logicalor(A, op)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_logicaland: - if (!_slang_assemble_logicaland(A, op)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_logicalxor: - if (!_slang_assemble_function_call_name(A, "^^", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - /*case slang_oper_bitor: */ - /*case slang_oper_bitxor: */ - /*case slang_oper_bitand: */ - case slang_oper_less: - if (!_slang_assemble_function_call_name(A, "<", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_greater: - if (!_slang_assemble_function_call_name(A, ">", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_lessequal: - if (!_slang_assemble_function_call_name(A, "<=", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_greaterequal: - if (!_slang_assemble_function_call_name(A, ">=", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - /*case slang_oper_lshift: */ - /*case slang_oper_rshift: */ - case slang_oper_add: - if (!_slang_assemble_function_call_name(A, "+", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_subtract: - if (!_slang_assemble_function_call_name(A, "-", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_multiply: - if (!_slang_assemble_function_call_name(A, "*", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - /*case slang_oper_modulus: */ - case slang_oper_divide: - if (!_slang_assemble_function_call_name(A, "/", op->children, 2, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_equal: - if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) - RETURN_NIL(); - if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - RETURN_NIL(); - if (!equality(A, op->children, GL_TRUE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_notequal: - if (!_slang_assemble_operation(A, &op->children[0], slang_ref_forbid)) - RETURN_NIL(); - if (!_slang_assemble_operation(A, &op->children[1], slang_ref_forbid)) - RETURN_NIL(); - if (!equality(A, op->children, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_preincrement: - if (!_slang_assemble_assign(A, op, "++", ref)) - RETURN_NIL(); - A->ref = ref; - break; - case slang_oper_predecrement: - if (!_slang_assemble_assign(A, op, "--", ref)) - RETURN_NIL(); - A->ref = ref; - break; - case slang_oper_plus: - if (!_slang_dereference(A, op)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_minus: - if (!_slang_assemble_function_call_name(A, "-", op->children, 1, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - /*case slang_oper_complement: */ - case slang_oper_not: - if (!_slang_assemble_function_call_name(A, "!", op->children, 1, GL_FALSE)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_subscript: - { - slang_assembly_typeinfo ti_arr, ti_elem; - - if (!slang_assembly_typeinfo_construct(&ti_arr)) - RETURN_OUT_OF_MEMORY(); - if (!slang_assembly_typeinfo_construct(&ti_elem)) { - slang_assembly_typeinfo_destruct(&ti_arr); - RETURN_OUT_OF_MEMORY(); - } - if (!handle_subscript(A, &ti_elem, &ti_arr, op, ref)) { - slang_assembly_typeinfo_destruct(&ti_arr); - slang_assembly_typeinfo_destruct(&ti_elem); - RETURN_NIL(); - } - slang_assembly_typeinfo_destruct(&ti_arr); - slang_assembly_typeinfo_destruct(&ti_elem); - } - break; - case slang_oper_call: - { - slang_function *fun - = _slang_locate_function(A->space.funcs, op->a_id, op->children, - op->num_children, &A->space, A->atoms); - if (fun == NULL) { - if (!_slang_assemble_constructor(A, op)) - RETURN_OUT_OF_MEMORY(); - } - else { - if (!_slang_assemble_function_call(A, fun, op->children, - op->num_children, GL_FALSE)) - RETURN_NIL(); - } - A->ref = slang_ref_forbid; - } - break; - case slang_oper_field: - { - slang_assembly_typeinfo ti_after, ti_before; - - if (!slang_assembly_typeinfo_construct(&ti_after)) - RETURN_OUT_OF_MEMORY(); - if (!slang_assembly_typeinfo_construct(&ti_before)) { - slang_assembly_typeinfo_destruct(&ti_after); - RETURN_OUT_OF_MEMORY(); - } - if (!handle_field(A, &ti_after, &ti_before, op, ref)) { - slang_assembly_typeinfo_destruct(&ti_after); - slang_assembly_typeinfo_destruct(&ti_before); - RETURN_NIL(); - } - slang_assembly_typeinfo_destruct(&ti_after); - slang_assembly_typeinfo_destruct(&ti_before); - } - break; - case slang_oper_postincrement: - if (!assemble_function_call_name_dummyint(A, "++", op->children)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - case slang_oper_postdecrement: - if (!assemble_function_call_name_dummyint(A, "--", op->children)) - RETURN_NIL(); - A->ref = slang_ref_forbid; - break; - default: - RETURN_NIL(); - } - - return GL_TRUE; -} diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h deleted file mode 100644 index bd49791a89..0000000000 --- a/src/mesa/shader/slang/slang_assemble.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SLANG_ASSEMBLE_H -#define SLANG_ASSEMBLE_H - -#include "imports.h" -#include "mtypes.h" -#include "slang_utility.h" -#include "slang_vartable.h" - - -struct slang_operation_; - - -/** - * Holds complete information about vector swizzle - the - * array contains vector component source indices, where 0 is "x", 1 - * is "y", 2 is "z" and 3 is "w". - * Example: "xwz" --> { 3, { 0, 3, 2, not used } }. - */ -typedef struct slang_swizzle_ -{ - GLuint num_components; - GLuint swizzle[4]; -} slang_swizzle; - -typedef struct slang_assembly_name_space_ -{ - struct slang_function_scope_ *funcs; - struct slang_struct_scope_ *structs; - struct slang_variable_scope_ *vars; -} slang_assembly_name_space; - - -typedef struct slang_assemble_ctx_ -{ - slang_atom_pool *atoms; - slang_assembly_name_space space; - slang_swizzle swz; - struct gl_program *program; - slang_var_table *vartable; - - struct slang_function_ *CurFunction; - slang_atom CurLoopBreak; - slang_atom CurLoopCont; -} slang_assemble_ctx; - -extern struct slang_function_ * -_slang_locate_function(const struct slang_function_scope_ *funcs, - slang_atom name, const struct slang_operation_ *params, - GLuint num_params, - const slang_assembly_name_space *space, - slang_atom_pool *); - - -extern GLboolean -_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz); - -extern GLboolean -_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows); - -extern GLvoid -_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, - const slang_swizzle *); - -#include "slang_assemble_typeinfo.h" - -#endif -- cgit v1.2.3 From 4f22bdf3e561ac9df46f0cf1e19d9f69f419f5e3 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:17:46 -0700 Subject: remove more slang assembly-related code --- src/mesa/shader/slang/slang_assemble_typeinfo.c | 2 +- src/mesa/shader/slang/slang_assemble_typeinfo.h | 70 +++++++++++++++++++++---- src/mesa/shader/slang/slang_codegen.c | 2 +- src/mesa/shader/slang/slang_compile.h | 2 +- src/mesa/shader/slang/slang_storage.h | 2 +- 5 files changed, 65 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c index 6a87ef3340..eafc452972 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.c +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c @@ -29,7 +29,7 @@ */ #include "imports.h" -#include "slang_assemble.h" +#include "slang_assemble_typeinfo.h" #include "slang_compile.h" #include "slang_error.h" #include "prog_instruction.h" diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.h b/src/mesa/shader/slang/slang_assemble_typeinfo.h index 777dc21f3a..b2ca8b8633 100644 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.h +++ b/src/mesa/shader/slang/slang_assemble_typeinfo.h @@ -22,12 +22,68 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_ASSEMBLE_TYPEINFO_H -#define SLANG_ASSEMBLE_TYPEINFO_H +#ifndef SLANG_ASSEMBLE_TYPEINFO_H +#define SLANG_ASSEMBLE_TYPEINFO_H 1 -#if defined __cplusplus -extern "C" { -#endif +#include "imports.h" +#include "mtypes.h" +#include "slang_utility.h" +#include "slang_vartable.h" + + +struct slang_operation_; + + +/** + * Holds complete information about vector swizzle - the + * array contains vector component source indices, where 0 is "x", 1 + * is "y", 2 is "z" and 3 is "w". + * Example: "xwz" --> { 3, { 0, 3, 2, not used } }. + */ +typedef struct slang_swizzle_ +{ + GLuint num_components; + GLuint swizzle[4]; +} slang_swizzle; + +typedef struct slang_assembly_name_space_ +{ + struct slang_function_scope_ *funcs; + struct slang_struct_scope_ *structs; + struct slang_variable_scope_ *vars; +} slang_assembly_name_space; + + +typedef struct slang_assemble_ctx_ +{ + slang_atom_pool *atoms; + slang_assembly_name_space space; + slang_swizzle swz; + struct gl_program *program; + slang_var_table *vartable; + + struct slang_function_ *CurFunction; + slang_atom CurLoopBreak; + slang_atom CurLoopCont; +} slang_assemble_ctx; + +extern struct slang_function_ * +_slang_locate_function(const struct slang_function_scope_ *funcs, + slang_atom name, const struct slang_operation_ *params, + GLuint num_params, + const slang_assembly_name_space *space, + slang_atom_pool *); + + +extern GLboolean +_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz); + +extern GLboolean +_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows); + +extern GLvoid +_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, + const slang_swizzle *); /** @@ -144,9 +200,5 @@ _slang_type_dim(slang_type_specifier_type); -#ifdef __cplusplus -} -#endif - #endif diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 03562018ca..d39cdd22a5 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -30,7 +30,7 @@ #include "imports.h" #include "macros.h" -#include "slang_assemble.h" +#include "slang_assemble_typeinfo.h" #include "slang_codegen.h" #include "slang_compile.h" #include "slang_storage.h" diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index f2731cb574..0fe5443c7c 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -27,7 +27,7 @@ #include "imports.h" #include "mtypes.h" -#include "slang_assemble.h" +#include "slang_assemble_typeinfo.h" #include "slang_compile_variable.h" #include "slang_compile_struct.h" #include "slang_compile_operation.h" diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index b433e8bcec..642ffa38c4 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -26,7 +26,7 @@ #define SLANG_STORAGE_H #include "slang_compile.h" -#include "slang_assemble.h" +#include "slang_assemble_typeinfo.h" #if defined __cplusplus extern "C" { -- cgit v1.2.3 From 7ace638da26d86c1805a4c454a466869715d3647 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:19:48 -0700 Subject: rename slang_assemble_typeinfo.[ch] to slang_typeinfo.[ch] --- src/mesa/shader/slang/slang_assemble_typeinfo.c | 738 ------------------------ src/mesa/shader/slang/slang_assemble_typeinfo.h | 204 ------- src/mesa/shader/slang/slang_typeinfo.c | 738 ++++++++++++++++++++++++ src/mesa/shader/slang/slang_typeinfo.h | 204 +++++++ 4 files changed, 942 insertions(+), 942 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_assemble_typeinfo.c delete mode 100644 src/mesa/shader/slang/slang_assemble_typeinfo.h create mode 100644 src/mesa/shader/slang/slang_typeinfo.c create mode 100644 src/mesa/shader/slang/slang_typeinfo.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c deleted file mode 100644 index eafc452972..0000000000 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.c +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_assemble_typeinfo.c - * slang type info - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_assemble_typeinfo.h" -#include "slang_compile.h" -#include "slang_error.h" -#include "prog_instruction.h" - - - - -/** - * Checks if a field selector is a general swizzle (an r-value swizzle - * with replicated components or an l-value swizzle mask) for a - * vector. Returns GL_TRUE if this is the case, is filled with - * swizzle information. Returns GL_FALSE otherwise. - */ -GLboolean -_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) -{ - GLuint i; - GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; - - /* init to undefined. - * We rely on undefined/nil values to distinguish between - * regular swizzles and writemasks. - * For example, the swizzle ".xNNN" is the writemask ".x". - * That's different than the swizzle ".xxxx". - */ - for (i = 0; i < 4; i++) - swz->swizzle[i] = SWIZZLE_NIL; - - /* the swizzle can be at most 4-component long */ - swz->num_components = slang_string_length(field); - if (swz->num_components > 4) - return GL_FALSE; - - for (i = 0; i < swz->num_components; i++) { - /* mark which swizzle group is used */ - switch (field[i]) { - case 'x': - case 'y': - case 'z': - case 'w': - xyzw = GL_TRUE; - break; - case 'r': - case 'g': - case 'b': - case 'a': - rgba = GL_TRUE; - break; - case 's': - case 't': - case 'p': - case 'q': - stpq = GL_TRUE; - break; - default: - return GL_FALSE; - } - - /* collect swizzle component */ - switch (field[i]) { - case 'x': - case 'r': - case 's': - swz->swizzle[i] = 0; - break; - case 'y': - case 'g': - case 't': - swz->swizzle[i] = 1; - break; - case 'z': - case 'b': - case 'p': - swz->swizzle[i] = 2; - break; - case 'w': - case 'a': - case 'q': - swz->swizzle[i] = 3; - break; - } - - /* check if the component is valid for given vector's row count */ - if (rows <= swz->swizzle[i]) - return GL_FALSE; - } - - /* only one swizzle group can be used */ - if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) - return GL_FALSE; - - return GL_TRUE; -} - - - -/** - * Checks if a general swizzle is an l-value swizzle - these swizzles - * do not have duplicated fields. Returns GL_TRUE if this is a - * swizzle mask. Returns GL_FALSE otherwise - */ -GLboolean -_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) -{ - GLuint i, c = 0; - - /* the swizzle may not be longer than the vector dim */ - if (swz->num_components > rows) - return GL_FALSE; - - /* the swizzle components cannot be duplicated */ - for (i = 0; i < swz->num_components; i++) { - if ((c & (1 << swz->swizzle[i])) != 0) - return GL_FALSE; - c |= 1 << swz->swizzle[i]; - } - - return GL_TRUE; -} - - -GLvoid -slang_type_specifier_ctr(slang_type_specifier * self) -{ - self->type = slang_spec_void; - self->_struct = NULL; - self->_array = NULL; -} - -GLvoid -slang_type_specifier_dtr(slang_type_specifier * self) -{ - if (self->_struct != NULL) { - slang_struct_destruct(self->_struct); - slang_alloc_free(self->_struct); - } - if (self->_array != NULL) { - slang_type_specifier_dtr(self->_array); - slang_alloc_free(self->_array); - } -} - -GLboolean -slang_type_specifier_copy(slang_type_specifier * x, - const slang_type_specifier * y) -{ - slang_type_specifier z; - - slang_type_specifier_ctr(&z); - z.type = y->type; - if (z.type == slang_spec_struct) { - z._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); - if (z._struct == NULL) { - slang_type_specifier_dtr(&z); - return GL_FALSE; - } - if (!slang_struct_construct(z._struct)) { - slang_alloc_free(z._struct); - slang_type_specifier_dtr(&z); - return GL_FALSE; - } - if (!slang_struct_copy(z._struct, y->_struct)) { - slang_type_specifier_dtr(&z); - return GL_FALSE; - } - } - else if (z.type == slang_spec_array) { - z._array = - (slang_type_specifier *) - slang_alloc_malloc(sizeof(slang_type_specifier)); - if (z._array == NULL) { - slang_type_specifier_dtr(&z); - return GL_FALSE; - } - slang_type_specifier_ctr(z._array); - if (!slang_type_specifier_copy(z._array, y->_array)) { - slang_type_specifier_dtr(&z); - return GL_FALSE; - } - } - slang_type_specifier_dtr(x); - *x = z; - return GL_TRUE; -} - -GLboolean -slang_type_specifier_equal(const slang_type_specifier * x, - const slang_type_specifier * y) -{ - if (x->type != y->type) - return 0; - if (x->type == slang_spec_struct) - return slang_struct_equal(x->_struct, y->_struct); - if (x->type == slang_spec_array) - return slang_type_specifier_equal(x->_array, y->_array); - return 1; -} - - -GLboolean -slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) -{ - slang_type_specifier_ctr(&ti->spec); - ti->array_len = 0; - return GL_TRUE; -} - -GLvoid -slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) -{ - slang_type_specifier_dtr(&ti->spec); -} - - -/** - * Determine the return type of a function. - * \param name name of the function - * \param params array of function parameters - * \param num_params number of parameters - * \param space namespace to use - * \param spec returns the function's type - * \param atoms atom pool - * \return GL_TRUE for success, GL_FALSE if failure - */ -static GLboolean -typeof_existing_function(const char *name, const slang_operation * params, - GLuint num_params, - const slang_assembly_name_space * space, - slang_type_specifier * spec, - slang_atom_pool * atoms) -{ - slang_atom atom; - GLboolean exists; - - atom = slang_atom_pool_atom(atoms, name); - if (!_slang_typeof_function(atom, params, num_params, space, spec, - &exists, atoms)) - return GL_FALSE; - return exists; -} - -GLboolean -_slang_typeof_operation(const slang_assemble_ctx * A, - const slang_operation * op, - slang_assembly_typeinfo * ti) -{ - return _slang_typeof_operation_(op, &A->space, ti, A->atoms); -} - - -/** - * Determine the return type of an operation. - * \param op the operation node - * \param space the namespace to use - * \param ti the returned type - * \param atoms atom pool - * \return GL_TRUE for success, GL_FALSE if failure - */ -GLboolean -_slang_typeof_operation_(const slang_operation * op, - const slang_assembly_name_space * space, - slang_assembly_typeinfo * ti, - slang_atom_pool * atoms) -{ - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - - switch (op->type) { - case slang_oper_block_no_new_scope: - case slang_oper_block_new_scope: - case slang_oper_variable_decl: - case slang_oper_asm: - case slang_oper_break: - case slang_oper_continue: - case slang_oper_discard: - case slang_oper_return: - case slang_oper_if: - case slang_oper_while: - case slang_oper_do: - case slang_oper_for: - case slang_oper_void: - ti->spec.type = slang_spec_void; - break; - case slang_oper_expression: - case slang_oper_assign: - case slang_oper_addassign: - case slang_oper_subassign: - case slang_oper_mulassign: - case slang_oper_divassign: - case slang_oper_preincrement: - case slang_oper_predecrement: - if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - return GL_FALSE; - break; - case slang_oper_literal_bool: - case slang_oper_logicalor: - case slang_oper_logicalxor: - case slang_oper_logicaland: - case slang_oper_equal: - case slang_oper_notequal: - case slang_oper_less: - case slang_oper_greater: - case slang_oper_lessequal: - case slang_oper_greaterequal: - case slang_oper_not: - ti->spec.type = slang_spec_bool; - break; - case slang_oper_literal_int: - ti->spec.type = slang_spec_int; - break; - case slang_oper_literal_float: - ti->spec.type = slang_spec_float; - break; - case slang_oper_identifier: - { - slang_variable *var; - var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); - if (var == NULL) - RETURN_ERROR2("undefined variable", (char *) op->a_id, 0); - if (!slang_type_specifier_copy(&ti->spec, &var->type.specifier)) - RETURN_OUT_OF_MEMORY(); - ti->can_be_referenced = GL_TRUE; - ti->array_len = var->array_len; - } - break; - case slang_oper_sequence: - /* TODO: check [0] and [1] if they match */ - if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) - RETURN_NIL(); - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - /*case slang_oper_modassign: */ - /*case slang_oper_lshassign: */ - /*case slang_oper_rshassign: */ - /*case slang_oper_orassign: */ - /*case slang_oper_xorassign: */ - /*case slang_oper_andassign: */ - case slang_oper_select: - /* TODO: check [1] and [2] if they match */ - if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) - RETURN_NIL(); - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - /*case slang_oper_bitor: */ - /*case slang_oper_bitxor: */ - /*case slang_oper_bitand: */ - /*case slang_oper_lshift: */ - /*case slang_oper_rshift: */ - case slang_oper_add: - if (!typeof_existing_function("+", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); - break; - case slang_oper_subtract: - if (!typeof_existing_function("-", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); - break; - case slang_oper_multiply: - if (!typeof_existing_function("*", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); - break; - case slang_oper_divide: - if (!typeof_existing_function("/", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); - break; - /*case slang_oper_modulus: */ - case slang_oper_plus: - if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - RETURN_NIL(); - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - case slang_oper_minus: - if (!typeof_existing_function("-", op->children, 1, space, - &ti->spec, atoms)) - RETURN_NIL(); - break; - /*case slang_oper_complement: */ - case slang_oper_subscript: - { - slang_assembly_typeinfo _ti; - - if (!slang_assembly_typeinfo_construct(&_ti)) - RETURN_NIL(); - if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_NIL(); - } - ti->can_be_referenced = _ti.can_be_referenced; - if (_ti.spec.type == slang_spec_array) { - if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_NIL(); - } - } - else { - if (!_slang_type_is_vector(_ti.spec.type) - && !_slang_type_is_matrix(_ti.spec.type)) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_ERROR("cannot index a non-array type", 0); - } - ti->spec.type = _slang_type_base(_ti.spec.type); - } - slang_assembly_typeinfo_destruct(&_ti); - } - break; - case slang_oper_call: - { - GLboolean exists; - - if (!_slang_typeof_function(op->a_id, op->children, op->num_children, - space, &ti->spec, &exists, atoms)) - RETURN_NIL(); - if (!exists) { - slang_struct *s = - slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); - if (s != NULL) { - ti->spec.type = slang_spec_struct; - ti->spec._struct = - (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); - if (ti->spec._struct == NULL) - RETURN_NIL(); - if (!slang_struct_construct(ti->spec._struct)) { - slang_alloc_free(ti->spec._struct); - ti->spec._struct = NULL; - RETURN_NIL(); - } - if (!slang_struct_copy(ti->spec._struct, s)) - RETURN_NIL(); - } - else { - const char *name; - slang_type_specifier_type type; - - name = slang_atom_pool_id(atoms, op->a_id); - type = slang_type_specifier_type_from_string(name); - if (type == slang_spec_void) - RETURN_ERROR2("function not found", name, 0); - ti->spec.type = type; - } - } - } - break; - case slang_oper_field: - { - slang_assembly_typeinfo _ti; - - if (!slang_assembly_typeinfo_construct(&_ti)) - RETURN_NIL(); - if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_NIL(); - } - if (_ti.spec.type == slang_spec_struct) { - slang_variable *field; - - field = _slang_locate_variable(_ti.spec._struct->fields, op->a_id, - GL_FALSE); - if (field == NULL) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_NIL(); - } - if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_NIL(); - } - ti->can_be_referenced = _ti.can_be_referenced; - } - else { - GLuint rows; - const char *swizzle; - slang_type_specifier_type base; - - /* determine the swizzle of the field expression */ -#if 000 - if (!_slang_type_is_vector(_ti.spec.type)) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_ERROR("Can't swizzle scalar expression", 0); - } -#endif - rows = _slang_type_dim(_ti.spec.type); - swizzle = slang_atom_pool_id(atoms, op->a_id); - if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { - slang_assembly_typeinfo_destruct(&_ti); - RETURN_ERROR("Bad swizzle", 0); - } - ti->is_swizzled = GL_TRUE; - ti->can_be_referenced = _ti.can_be_referenced - && _slang_is_swizzle_mask(&ti->swz, rows); - if (_ti.is_swizzled) { - slang_swizzle swz; - - /* swizzle the swizzle */ - _slang_multiply_swizzles(&swz, &_ti.swz, &ti->swz); - ti->swz = swz; - } - base = _slang_type_base(_ti.spec.type); - switch (ti->swz.num_components) { - case 1: - ti->spec.type = base; - break; - case 2: - switch (base) { - case slang_spec_float: - ti->spec.type = slang_spec_vec2; - break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec2; - break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec2; - break; - default: - break; - } - break; - case 3: - switch (base) { - case slang_spec_float: - ti->spec.type = slang_spec_vec3; - break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec3; - break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec3; - break; - default: - break; - } - break; - case 4: - switch (base) { - case slang_spec_float: - ti->spec.type = slang_spec_vec4; - break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec4; - break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec4; - break; - default: - break; - } - break; - default: - break; - } - } - slang_assembly_typeinfo_destruct(&_ti); - } - break; - case slang_oper_postincrement: - case slang_oper_postdecrement: - if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - RETURN_NIL(); - ti->can_be_referenced = GL_FALSE; - ti->is_swizzled = GL_FALSE; - break; - default: - RETURN_NIL(); - } - - return GL_TRUE; -} - - - -/** - * Determine the return type of a function. - * \param a_name the function name - * \param param function parameters (overloading) - * \param num_params number of parameters to function - * \param space namespace to search - * \param exists returns GL_TRUE or GL_FALSE to indicate existance of function - * \return GL_TRUE for success, GL_FALSE if failure (bad function name) - */ -GLboolean -_slang_typeof_function(slang_atom a_name, const slang_operation * params, - GLuint num_params, - const slang_assembly_name_space * space, - slang_type_specifier * spec, GLboolean * exists, - slang_atom_pool * atoms) -{ - slang_function *fun = _slang_locate_function(space->funcs, a_name, params, - num_params, space, atoms); - *exists = fun != NULL; - if (!fun) - return GL_TRUE; /* yes, not false */ - return slang_type_specifier_copy(spec, &fun->header.type.specifier); -} - - - -/** - * Determine if a type is a matrix. - * \return GL_TRUE if is a matrix, GL_FALSE otherwise. - */ -GLboolean -_slang_type_is_matrix(slang_type_specifier_type ty) -{ - switch (ty) { - case slang_spec_mat2: - case slang_spec_mat3: - case slang_spec_mat4: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Determine if a type is a vector. - * \return GL_TRUE if is a vector, GL_FALSE otherwise. - */ -GLboolean -_slang_type_is_vector(slang_type_specifier_type ty) -{ - switch (ty) { - case slang_spec_vec2: - case slang_spec_vec3: - case slang_spec_vec4: - case slang_spec_ivec2: - case slang_spec_ivec3: - case slang_spec_ivec4: - case slang_spec_bvec2: - case slang_spec_bvec3: - case slang_spec_bvec4: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Given a vector type, return the type of the vector's elements - */ -slang_type_specifier_type -_slang_type_base(slang_type_specifier_type ty) -{ - switch (ty) { - case slang_spec_float: - case slang_spec_vec2: - case slang_spec_vec3: - case slang_spec_vec4: - return slang_spec_float; - case slang_spec_int: - case slang_spec_ivec2: - case slang_spec_ivec3: - case slang_spec_ivec4: - return slang_spec_int; - case slang_spec_bool: - case slang_spec_bvec2: - case slang_spec_bvec3: - case slang_spec_bvec4: - return slang_spec_bool; - case slang_spec_mat2: - return slang_spec_vec2; - case slang_spec_mat3: - return slang_spec_vec3; - case slang_spec_mat4: - return slang_spec_vec4; - default: - return slang_spec_void; - } -} - - -/** - * Return the dimensionality of a vector or matrix type. - */ -GLuint -_slang_type_dim(slang_type_specifier_type ty) -{ - switch (ty) { - case slang_spec_float: - case slang_spec_int: - case slang_spec_bool: - return 1; - case slang_spec_vec2: - case slang_spec_ivec2: - case slang_spec_bvec2: - case slang_spec_mat2: - return 2; - case slang_spec_vec3: - case slang_spec_ivec3: - case slang_spec_bvec3: - case slang_spec_mat3: - return 3; - case slang_spec_vec4: - case slang_spec_ivec4: - case slang_spec_bvec4: - case slang_spec_mat4: - return 4; - default: - return 0; - } -} diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.h b/src/mesa/shader/slang/slang_assemble_typeinfo.h deleted file mode 100644 index b2ca8b8633..0000000000 --- a/src/mesa/shader/slang/slang_assemble_typeinfo.h +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SLANG_ASSEMBLE_TYPEINFO_H -#define SLANG_ASSEMBLE_TYPEINFO_H 1 - -#include "imports.h" -#include "mtypes.h" -#include "slang_utility.h" -#include "slang_vartable.h" - - -struct slang_operation_; - - -/** - * Holds complete information about vector swizzle - the - * array contains vector component source indices, where 0 is "x", 1 - * is "y", 2 is "z" and 3 is "w". - * Example: "xwz" --> { 3, { 0, 3, 2, not used } }. - */ -typedef struct slang_swizzle_ -{ - GLuint num_components; - GLuint swizzle[4]; -} slang_swizzle; - -typedef struct slang_assembly_name_space_ -{ - struct slang_function_scope_ *funcs; - struct slang_struct_scope_ *structs; - struct slang_variable_scope_ *vars; -} slang_assembly_name_space; - - -typedef struct slang_assemble_ctx_ -{ - slang_atom_pool *atoms; - slang_assembly_name_space space; - slang_swizzle swz; - struct gl_program *program; - slang_var_table *vartable; - - struct slang_function_ *CurFunction; - slang_atom CurLoopBreak; - slang_atom CurLoopCont; -} slang_assemble_ctx; - -extern struct slang_function_ * -_slang_locate_function(const struct slang_function_scope_ *funcs, - slang_atom name, const struct slang_operation_ *params, - GLuint num_params, - const slang_assembly_name_space *space, - slang_atom_pool *); - - -extern GLboolean -_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz); - -extern GLboolean -_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows); - -extern GLvoid -_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, - const slang_swizzle *); - - -/** - * The basic shading language types (float, vec4, mat3, etc) - */ -typedef enum slang_type_specifier_type_ -{ - slang_spec_void, - slang_spec_bool, - slang_spec_bvec2, - slang_spec_bvec3, - slang_spec_bvec4, - slang_spec_int, - slang_spec_ivec2, - slang_spec_ivec3, - slang_spec_ivec4, - slang_spec_float, - slang_spec_vec2, - slang_spec_vec3, - slang_spec_vec4, - slang_spec_mat2, - slang_spec_mat3, - slang_spec_mat4, - slang_spec_sampler1D, - slang_spec_sampler2D, - slang_spec_sampler3D, - slang_spec_samplerCube, - slang_spec_sampler1DShadow, - slang_spec_sampler2DShadow, - slang_spec_struct, - slang_spec_array -} slang_type_specifier_type; - - -/** - * Describes more sophisticated types, like structs and arrays. - */ -typedef struct slang_type_specifier_ -{ - slang_type_specifier_type type; - struct slang_struct_ *_struct; /**< used if type == spec_struct */ - struct slang_type_specifier_ *_array; /**< used if type == spec_array */ -} slang_type_specifier; - - -extern GLvoid -slang_type_specifier_ctr(slang_type_specifier *); - -extern GLvoid -slang_type_specifier_dtr(slang_type_specifier *); - -extern GLboolean -slang_type_specifier_copy(slang_type_specifier *, const slang_type_specifier *); - -extern GLboolean -slang_type_specifier_equal(const slang_type_specifier *, - const slang_type_specifier *); - - -typedef struct slang_assembly_typeinfo_ -{ - GLboolean can_be_referenced; - GLboolean is_swizzled; - slang_swizzle swz; - slang_type_specifier spec; - GLuint array_len; -} slang_assembly_typeinfo; - -extern GLboolean -slang_assembly_typeinfo_construct(slang_assembly_typeinfo *); - -extern GLvoid -slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *); - - -/** - * Retrieves type information about an operation. - * Returns GL_TRUE on success. - * Returns GL_FALSE otherwise. - */ -extern GLboolean -_slang_typeof_operation(const slang_assemble_ctx *, - const struct slang_operation_ *, - slang_assembly_typeinfo *); - -extern GLboolean -_slang_typeof_operation_(const struct slang_operation_ *, - const slang_assembly_name_space *, - slang_assembly_typeinfo *, slang_atom_pool *); - -/** - * Retrieves type of a function prototype, if one exists. - * Returns GL_TRUE on success, even if the function was not found. - * Returns GL_FALSE otherwise. - */ -extern GLboolean -_slang_typeof_function(slang_atom a_name, - const struct slang_operation_ *params, - GLuint num_params, const slang_assembly_name_space *, - slang_type_specifier *spec, GLboolean *exists, - slang_atom_pool *); - -extern GLboolean -_slang_type_is_matrix(slang_type_specifier_type); - -extern GLboolean -_slang_type_is_vector(slang_type_specifier_type); - -extern slang_type_specifier_type -_slang_type_base(slang_type_specifier_type); - -extern GLuint -_slang_type_dim(slang_type_specifier_type); - - - -#endif - diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c new file mode 100644 index 0000000000..eafc452972 --- /dev/null +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -0,0 +1,738 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_assemble_typeinfo.c + * slang type info + * \author Michal Krol + */ + +#include "imports.h" +#include "slang_assemble_typeinfo.h" +#include "slang_compile.h" +#include "slang_error.h" +#include "prog_instruction.h" + + + + +/** + * Checks if a field selector is a general swizzle (an r-value swizzle + * with replicated components or an l-value swizzle mask) for a + * vector. Returns GL_TRUE if this is the case, is filled with + * swizzle information. Returns GL_FALSE otherwise. + */ +GLboolean +_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz) +{ + GLuint i; + GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE; + + /* init to undefined. + * We rely on undefined/nil values to distinguish between + * regular swizzles and writemasks. + * For example, the swizzle ".xNNN" is the writemask ".x". + * That's different than the swizzle ".xxxx". + */ + for (i = 0; i < 4; i++) + swz->swizzle[i] = SWIZZLE_NIL; + + /* the swizzle can be at most 4-component long */ + swz->num_components = slang_string_length(field); + if (swz->num_components > 4) + return GL_FALSE; + + for (i = 0; i < swz->num_components; i++) { + /* mark which swizzle group is used */ + switch (field[i]) { + case 'x': + case 'y': + case 'z': + case 'w': + xyzw = GL_TRUE; + break; + case 'r': + case 'g': + case 'b': + case 'a': + rgba = GL_TRUE; + break; + case 's': + case 't': + case 'p': + case 'q': + stpq = GL_TRUE; + break; + default: + return GL_FALSE; + } + + /* collect swizzle component */ + switch (field[i]) { + case 'x': + case 'r': + case 's': + swz->swizzle[i] = 0; + break; + case 'y': + case 'g': + case 't': + swz->swizzle[i] = 1; + break; + case 'z': + case 'b': + case 'p': + swz->swizzle[i] = 2; + break; + case 'w': + case 'a': + case 'q': + swz->swizzle[i] = 3; + break; + } + + /* check if the component is valid for given vector's row count */ + if (rows <= swz->swizzle[i]) + return GL_FALSE; + } + + /* only one swizzle group can be used */ + if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq)) + return GL_FALSE; + + return GL_TRUE; +} + + + +/** + * Checks if a general swizzle is an l-value swizzle - these swizzles + * do not have duplicated fields. Returns GL_TRUE if this is a + * swizzle mask. Returns GL_FALSE otherwise + */ +GLboolean +_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) +{ + GLuint i, c = 0; + + /* the swizzle may not be longer than the vector dim */ + if (swz->num_components > rows) + return GL_FALSE; + + /* the swizzle components cannot be duplicated */ + for (i = 0; i < swz->num_components; i++) { + if ((c & (1 << swz->swizzle[i])) != 0) + return GL_FALSE; + c |= 1 << swz->swizzle[i]; + } + + return GL_TRUE; +} + + +GLvoid +slang_type_specifier_ctr(slang_type_specifier * self) +{ + self->type = slang_spec_void; + self->_struct = NULL; + self->_array = NULL; +} + +GLvoid +slang_type_specifier_dtr(slang_type_specifier * self) +{ + if (self->_struct != NULL) { + slang_struct_destruct(self->_struct); + slang_alloc_free(self->_struct); + } + if (self->_array != NULL) { + slang_type_specifier_dtr(self->_array); + slang_alloc_free(self->_array); + } +} + +GLboolean +slang_type_specifier_copy(slang_type_specifier * x, + const slang_type_specifier * y) +{ + slang_type_specifier z; + + slang_type_specifier_ctr(&z); + z.type = y->type; + if (z.type == slang_spec_struct) { + z._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); + if (z._struct == NULL) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + if (!slang_struct_construct(z._struct)) { + slang_alloc_free(z._struct); + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + if (!slang_struct_copy(z._struct, y->_struct)) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + } + else if (z.type == slang_spec_array) { + z._array = + (slang_type_specifier *) + slang_alloc_malloc(sizeof(slang_type_specifier)); + if (z._array == NULL) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + slang_type_specifier_ctr(z._array); + if (!slang_type_specifier_copy(z._array, y->_array)) { + slang_type_specifier_dtr(&z); + return GL_FALSE; + } + } + slang_type_specifier_dtr(x); + *x = z; + return GL_TRUE; +} + +GLboolean +slang_type_specifier_equal(const slang_type_specifier * x, + const slang_type_specifier * y) +{ + if (x->type != y->type) + return 0; + if (x->type == slang_spec_struct) + return slang_struct_equal(x->_struct, y->_struct); + if (x->type == slang_spec_array) + return slang_type_specifier_equal(x->_array, y->_array); + return 1; +} + + +GLboolean +slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) +{ + slang_type_specifier_ctr(&ti->spec); + ti->array_len = 0; + return GL_TRUE; +} + +GLvoid +slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) +{ + slang_type_specifier_dtr(&ti->spec); +} + + +/** + * Determine the return type of a function. + * \param name name of the function + * \param params array of function parameters + * \param num_params number of parameters + * \param space namespace to use + * \param spec returns the function's type + * \param atoms atom pool + * \return GL_TRUE for success, GL_FALSE if failure + */ +static GLboolean +typeof_existing_function(const char *name, const slang_operation * params, + GLuint num_params, + const slang_assembly_name_space * space, + slang_type_specifier * spec, + slang_atom_pool * atoms) +{ + slang_atom atom; + GLboolean exists; + + atom = slang_atom_pool_atom(atoms, name); + if (!_slang_typeof_function(atom, params, num_params, space, spec, + &exists, atoms)) + return GL_FALSE; + return exists; +} + +GLboolean +_slang_typeof_operation(const slang_assemble_ctx * A, + const slang_operation * op, + slang_assembly_typeinfo * ti) +{ + return _slang_typeof_operation_(op, &A->space, ti, A->atoms); +} + + +/** + * Determine the return type of an operation. + * \param op the operation node + * \param space the namespace to use + * \param ti the returned type + * \param atoms atom pool + * \return GL_TRUE for success, GL_FALSE if failure + */ +GLboolean +_slang_typeof_operation_(const slang_operation * op, + const slang_assembly_name_space * space, + slang_assembly_typeinfo * ti, + slang_atom_pool * atoms) +{ + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + + switch (op->type) { + case slang_oper_block_no_new_scope: + case slang_oper_block_new_scope: + case slang_oper_variable_decl: + case slang_oper_asm: + case slang_oper_break: + case slang_oper_continue: + case slang_oper_discard: + case slang_oper_return: + case slang_oper_if: + case slang_oper_while: + case slang_oper_do: + case slang_oper_for: + case slang_oper_void: + ti->spec.type = slang_spec_void; + break; + case slang_oper_expression: + case slang_oper_assign: + case slang_oper_addassign: + case slang_oper_subassign: + case slang_oper_mulassign: + case slang_oper_divassign: + case slang_oper_preincrement: + case slang_oper_predecrement: + if (!_slang_typeof_operation_(op->children, space, ti, atoms)) + return GL_FALSE; + break; + case slang_oper_literal_bool: + case slang_oper_logicalor: + case slang_oper_logicalxor: + case slang_oper_logicaland: + case slang_oper_equal: + case slang_oper_notequal: + case slang_oper_less: + case slang_oper_greater: + case slang_oper_lessequal: + case slang_oper_greaterequal: + case slang_oper_not: + ti->spec.type = slang_spec_bool; + break; + case slang_oper_literal_int: + ti->spec.type = slang_spec_int; + break; + case slang_oper_literal_float: + ti->spec.type = slang_spec_float; + break; + case slang_oper_identifier: + { + slang_variable *var; + var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); + if (var == NULL) + RETURN_ERROR2("undefined variable", (char *) op->a_id, 0); + if (!slang_type_specifier_copy(&ti->spec, &var->type.specifier)) + RETURN_OUT_OF_MEMORY(); + ti->can_be_referenced = GL_TRUE; + ti->array_len = var->array_len; + } + break; + case slang_oper_sequence: + /* TODO: check [0] and [1] if they match */ + if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) + RETURN_NIL(); + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + /*case slang_oper_modassign: */ + /*case slang_oper_lshassign: */ + /*case slang_oper_rshassign: */ + /*case slang_oper_orassign: */ + /*case slang_oper_xorassign: */ + /*case slang_oper_andassign: */ + case slang_oper_select: + /* TODO: check [1] and [2] if they match */ + if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) + RETURN_NIL(); + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + /*case slang_oper_bitor: */ + /*case slang_oper_bitxor: */ + /*case slang_oper_bitand: */ + /*case slang_oper_lshift: */ + /*case slang_oper_rshift: */ + case slang_oper_add: + if (!typeof_existing_function("+", op->children, 2, space, + &ti->spec, atoms)) + RETURN_NIL(); + break; + case slang_oper_subtract: + if (!typeof_existing_function("-", op->children, 2, space, + &ti->spec, atoms)) + RETURN_NIL(); + break; + case slang_oper_multiply: + if (!typeof_existing_function("*", op->children, 2, space, + &ti->spec, atoms)) + RETURN_NIL(); + break; + case slang_oper_divide: + if (!typeof_existing_function("/", op->children, 2, space, + &ti->spec, atoms)) + RETURN_NIL(); + break; + /*case slang_oper_modulus: */ + case slang_oper_plus: + if (!_slang_typeof_operation_(op->children, space, ti, atoms)) + RETURN_NIL(); + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + case slang_oper_minus: + if (!typeof_existing_function("-", op->children, 1, space, + &ti->spec, atoms)) + RETURN_NIL(); + break; + /*case slang_oper_complement: */ + case slang_oper_subscript: + { + slang_assembly_typeinfo _ti; + + if (!slang_assembly_typeinfo_construct(&_ti)) + RETURN_NIL(); + if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_NIL(); + } + ti->can_be_referenced = _ti.can_be_referenced; + if (_ti.spec.type == slang_spec_array) { + if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_NIL(); + } + } + else { + if (!_slang_type_is_vector(_ti.spec.type) + && !_slang_type_is_matrix(_ti.spec.type)) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_ERROR("cannot index a non-array type", 0); + } + ti->spec.type = _slang_type_base(_ti.spec.type); + } + slang_assembly_typeinfo_destruct(&_ti); + } + break; + case slang_oper_call: + { + GLboolean exists; + + if (!_slang_typeof_function(op->a_id, op->children, op->num_children, + space, &ti->spec, &exists, atoms)) + RETURN_NIL(); + if (!exists) { + slang_struct *s = + slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); + if (s != NULL) { + ti->spec.type = slang_spec_struct; + ti->spec._struct = + (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); + if (ti->spec._struct == NULL) + RETURN_NIL(); + if (!slang_struct_construct(ti->spec._struct)) { + slang_alloc_free(ti->spec._struct); + ti->spec._struct = NULL; + RETURN_NIL(); + } + if (!slang_struct_copy(ti->spec._struct, s)) + RETURN_NIL(); + } + else { + const char *name; + slang_type_specifier_type type; + + name = slang_atom_pool_id(atoms, op->a_id); + type = slang_type_specifier_type_from_string(name); + if (type == slang_spec_void) + RETURN_ERROR2("function not found", name, 0); + ti->spec.type = type; + } + } + } + break; + case slang_oper_field: + { + slang_assembly_typeinfo _ti; + + if (!slang_assembly_typeinfo_construct(&_ti)) + RETURN_NIL(); + if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_NIL(); + } + if (_ti.spec.type == slang_spec_struct) { + slang_variable *field; + + field = _slang_locate_variable(_ti.spec._struct->fields, op->a_id, + GL_FALSE); + if (field == NULL) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_NIL(); + } + if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_NIL(); + } + ti->can_be_referenced = _ti.can_be_referenced; + } + else { + GLuint rows; + const char *swizzle; + slang_type_specifier_type base; + + /* determine the swizzle of the field expression */ +#if 000 + if (!_slang_type_is_vector(_ti.spec.type)) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_ERROR("Can't swizzle scalar expression", 0); + } +#endif + rows = _slang_type_dim(_ti.spec.type); + swizzle = slang_atom_pool_id(atoms, op->a_id); + if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { + slang_assembly_typeinfo_destruct(&_ti); + RETURN_ERROR("Bad swizzle", 0); + } + ti->is_swizzled = GL_TRUE; + ti->can_be_referenced = _ti.can_be_referenced + && _slang_is_swizzle_mask(&ti->swz, rows); + if (_ti.is_swizzled) { + slang_swizzle swz; + + /* swizzle the swizzle */ + _slang_multiply_swizzles(&swz, &_ti.swz, &ti->swz); + ti->swz = swz; + } + base = _slang_type_base(_ti.spec.type); + switch (ti->swz.num_components) { + case 1: + ti->spec.type = base; + break; + case 2: + switch (base) { + case slang_spec_float: + ti->spec.type = slang_spec_vec2; + break; + case slang_spec_int: + ti->spec.type = slang_spec_ivec2; + break; + case slang_spec_bool: + ti->spec.type = slang_spec_bvec2; + break; + default: + break; + } + break; + case 3: + switch (base) { + case slang_spec_float: + ti->spec.type = slang_spec_vec3; + break; + case slang_spec_int: + ti->spec.type = slang_spec_ivec3; + break; + case slang_spec_bool: + ti->spec.type = slang_spec_bvec3; + break; + default: + break; + } + break; + case 4: + switch (base) { + case slang_spec_float: + ti->spec.type = slang_spec_vec4; + break; + case slang_spec_int: + ti->spec.type = slang_spec_ivec4; + break; + case slang_spec_bool: + ti->spec.type = slang_spec_bvec4; + break; + default: + break; + } + break; + default: + break; + } + } + slang_assembly_typeinfo_destruct(&_ti); + } + break; + case slang_oper_postincrement: + case slang_oper_postdecrement: + if (!_slang_typeof_operation_(op->children, space, ti, atoms)) + RETURN_NIL(); + ti->can_be_referenced = GL_FALSE; + ti->is_swizzled = GL_FALSE; + break; + default: + RETURN_NIL(); + } + + return GL_TRUE; +} + + + +/** + * Determine the return type of a function. + * \param a_name the function name + * \param param function parameters (overloading) + * \param num_params number of parameters to function + * \param space namespace to search + * \param exists returns GL_TRUE or GL_FALSE to indicate existance of function + * \return GL_TRUE for success, GL_FALSE if failure (bad function name) + */ +GLboolean +_slang_typeof_function(slang_atom a_name, const slang_operation * params, + GLuint num_params, + const slang_assembly_name_space * space, + slang_type_specifier * spec, GLboolean * exists, + slang_atom_pool * atoms) +{ + slang_function *fun = _slang_locate_function(space->funcs, a_name, params, + num_params, space, atoms); + *exists = fun != NULL; + if (!fun) + return GL_TRUE; /* yes, not false */ + return slang_type_specifier_copy(spec, &fun->header.type.specifier); +} + + + +/** + * Determine if a type is a matrix. + * \return GL_TRUE if is a matrix, GL_FALSE otherwise. + */ +GLboolean +_slang_type_is_matrix(slang_type_specifier_type ty) +{ + switch (ty) { + case slang_spec_mat2: + case slang_spec_mat3: + case slang_spec_mat4: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Determine if a type is a vector. + * \return GL_TRUE if is a vector, GL_FALSE otherwise. + */ +GLboolean +_slang_type_is_vector(slang_type_specifier_type ty) +{ + switch (ty) { + case slang_spec_vec2: + case slang_spec_vec3: + case slang_spec_vec4: + case slang_spec_ivec2: + case slang_spec_ivec3: + case slang_spec_ivec4: + case slang_spec_bvec2: + case slang_spec_bvec3: + case slang_spec_bvec4: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Given a vector type, return the type of the vector's elements + */ +slang_type_specifier_type +_slang_type_base(slang_type_specifier_type ty) +{ + switch (ty) { + case slang_spec_float: + case slang_spec_vec2: + case slang_spec_vec3: + case slang_spec_vec4: + return slang_spec_float; + case slang_spec_int: + case slang_spec_ivec2: + case slang_spec_ivec3: + case slang_spec_ivec4: + return slang_spec_int; + case slang_spec_bool: + case slang_spec_bvec2: + case slang_spec_bvec3: + case slang_spec_bvec4: + return slang_spec_bool; + case slang_spec_mat2: + return slang_spec_vec2; + case slang_spec_mat3: + return slang_spec_vec3; + case slang_spec_mat4: + return slang_spec_vec4; + default: + return slang_spec_void; + } +} + + +/** + * Return the dimensionality of a vector or matrix type. + */ +GLuint +_slang_type_dim(slang_type_specifier_type ty) +{ + switch (ty) { + case slang_spec_float: + case slang_spec_int: + case slang_spec_bool: + return 1; + case slang_spec_vec2: + case slang_spec_ivec2: + case slang_spec_bvec2: + case slang_spec_mat2: + return 2; + case slang_spec_vec3: + case slang_spec_ivec3: + case slang_spec_bvec3: + case slang_spec_mat3: + return 3; + case slang_spec_vec4: + case slang_spec_ivec4: + case slang_spec_bvec4: + case slang_spec_mat4: + return 4; + default: + return 0; + } +} diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h new file mode 100644 index 0000000000..b2ca8b8633 --- /dev/null +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -0,0 +1,204 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef SLANG_ASSEMBLE_TYPEINFO_H +#define SLANG_ASSEMBLE_TYPEINFO_H 1 + +#include "imports.h" +#include "mtypes.h" +#include "slang_utility.h" +#include "slang_vartable.h" + + +struct slang_operation_; + + +/** + * Holds complete information about vector swizzle - the + * array contains vector component source indices, where 0 is "x", 1 + * is "y", 2 is "z" and 3 is "w". + * Example: "xwz" --> { 3, { 0, 3, 2, not used } }. + */ +typedef struct slang_swizzle_ +{ + GLuint num_components; + GLuint swizzle[4]; +} slang_swizzle; + +typedef struct slang_assembly_name_space_ +{ + struct slang_function_scope_ *funcs; + struct slang_struct_scope_ *structs; + struct slang_variable_scope_ *vars; +} slang_assembly_name_space; + + +typedef struct slang_assemble_ctx_ +{ + slang_atom_pool *atoms; + slang_assembly_name_space space; + slang_swizzle swz; + struct gl_program *program; + slang_var_table *vartable; + + struct slang_function_ *CurFunction; + slang_atom CurLoopBreak; + slang_atom CurLoopCont; +} slang_assemble_ctx; + +extern struct slang_function_ * +_slang_locate_function(const struct slang_function_scope_ *funcs, + slang_atom name, const struct slang_operation_ *params, + GLuint num_params, + const slang_assembly_name_space *space, + slang_atom_pool *); + + +extern GLboolean +_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz); + +extern GLboolean +_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows); + +extern GLvoid +_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, + const slang_swizzle *); + + +/** + * The basic shading language types (float, vec4, mat3, etc) + */ +typedef enum slang_type_specifier_type_ +{ + slang_spec_void, + slang_spec_bool, + slang_spec_bvec2, + slang_spec_bvec3, + slang_spec_bvec4, + slang_spec_int, + slang_spec_ivec2, + slang_spec_ivec3, + slang_spec_ivec4, + slang_spec_float, + slang_spec_vec2, + slang_spec_vec3, + slang_spec_vec4, + slang_spec_mat2, + slang_spec_mat3, + slang_spec_mat4, + slang_spec_sampler1D, + slang_spec_sampler2D, + slang_spec_sampler3D, + slang_spec_samplerCube, + slang_spec_sampler1DShadow, + slang_spec_sampler2DShadow, + slang_spec_struct, + slang_spec_array +} slang_type_specifier_type; + + +/** + * Describes more sophisticated types, like structs and arrays. + */ +typedef struct slang_type_specifier_ +{ + slang_type_specifier_type type; + struct slang_struct_ *_struct; /**< used if type == spec_struct */ + struct slang_type_specifier_ *_array; /**< used if type == spec_array */ +} slang_type_specifier; + + +extern GLvoid +slang_type_specifier_ctr(slang_type_specifier *); + +extern GLvoid +slang_type_specifier_dtr(slang_type_specifier *); + +extern GLboolean +slang_type_specifier_copy(slang_type_specifier *, const slang_type_specifier *); + +extern GLboolean +slang_type_specifier_equal(const slang_type_specifier *, + const slang_type_specifier *); + + +typedef struct slang_assembly_typeinfo_ +{ + GLboolean can_be_referenced; + GLboolean is_swizzled; + slang_swizzle swz; + slang_type_specifier spec; + GLuint array_len; +} slang_assembly_typeinfo; + +extern GLboolean +slang_assembly_typeinfo_construct(slang_assembly_typeinfo *); + +extern GLvoid +slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *); + + +/** + * Retrieves type information about an operation. + * Returns GL_TRUE on success. + * Returns GL_FALSE otherwise. + */ +extern GLboolean +_slang_typeof_operation(const slang_assemble_ctx *, + const struct slang_operation_ *, + slang_assembly_typeinfo *); + +extern GLboolean +_slang_typeof_operation_(const struct slang_operation_ *, + const slang_assembly_name_space *, + slang_assembly_typeinfo *, slang_atom_pool *); + +/** + * Retrieves type of a function prototype, if one exists. + * Returns GL_TRUE on success, even if the function was not found. + * Returns GL_FALSE otherwise. + */ +extern GLboolean +_slang_typeof_function(slang_atom a_name, + const struct slang_operation_ *params, + GLuint num_params, const slang_assembly_name_space *, + slang_type_specifier *spec, GLboolean *exists, + slang_atom_pool *); + +extern GLboolean +_slang_type_is_matrix(slang_type_specifier_type); + +extern GLboolean +_slang_type_is_vector(slang_type_specifier_type); + +extern slang_type_specifier_type +_slang_type_base(slang_type_specifier_type); + +extern GLuint +_slang_type_dim(slang_type_specifier_type); + + + +#endif + -- cgit v1.2.3 From f65091c94766b9a21abf29dfc17fa5e857a835b8 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:19:58 -0700 Subject: rename slang_assemble_typeinfo.[ch] to slang_typeinfo.[ch] --- src/mesa/shader/slang/slang_codegen.c | 2 +- src/mesa/shader/slang/slang_compile.h | 2 +- src/mesa/shader/slang/slang_storage.h | 2 +- src/mesa/shader/slang/slang_typeinfo.c | 2 +- src/mesa/sources | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d39cdd22a5..222bf113cc 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -30,7 +30,7 @@ #include "imports.h" #include "macros.h" -#include "slang_assemble_typeinfo.h" +#include "slang_typeinfo.h" #include "slang_codegen.h" #include "slang_compile.h" #include "slang_storage.h" diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 0fe5443c7c..6e247d002c 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -27,7 +27,7 @@ #include "imports.h" #include "mtypes.h" -#include "slang_assemble_typeinfo.h" +#include "slang_typeinfo.h" #include "slang_compile_variable.h" #include "slang_compile_struct.h" #include "slang_compile_operation.h" diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index 642ffa38c4..c7380ebb60 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -26,7 +26,7 @@ #define SLANG_STORAGE_H #include "slang_compile.h" -#include "slang_assemble_typeinfo.h" +#include "slang_typeinfo.h" #if defined __cplusplus extern "C" { diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index eafc452972..fd5cd70a3c 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -29,7 +29,7 @@ */ #include "imports.h" -#include "slang_assemble_typeinfo.h" +#include "slang_typeinfo.h" #include "slang_compile.h" #include "slang_error.h" #include "prog_instruction.h" diff --git a/src/mesa/sources b/src/mesa/sources index a7a40b3204..98af7b3b75 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -166,7 +166,7 @@ SHADER_SOURCES = \ shader/shader_api.c \ SLANG_SOURCES = \ - shader/slang/slang_assemble_typeinfo.c \ + shader/slang/slang_typeinfo.c \ shader/slang/slang_codegen.c \ shader/slang/slang_compile.c \ shader/slang/slang_compile_function.c \ -- cgit v1.2.3 From 5c1763e7b53d161f646c05964d37cb51db74deba Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:22:02 -0700 Subject: rename slang_link2.c slang_link.c --- src/mesa/shader/slang/slang_link.c | 647 ++++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_link2.c | 647 ------------------------------------ 2 files changed, 647 insertions(+), 647 deletions(-) create mode 100644 src/mesa/shader/slang/slang_link.c delete mode 100644 src/mesa/shader/slang/slang_link2.c (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c new file mode 100644 index 0000000000..017cf6078c --- /dev/null +++ b/src/mesa/shader/slang/slang_link.c @@ -0,0 +1,647 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_link2.c + * GLSL linker + * \author Brian Paul + */ + +#include "imports.h" +#include "context.h" +#include "hash.h" +#include "macros.h" +#include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_print.h" +#include "prog_statevars.h" +#include "shader_api.h" +#include "slang_link.h" + + + + +static GLboolean +link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog) +{ + GLuint *map, i, firstVarying, newFile; + GLbitfield varsWritten, varsRead; + + map = (GLuint *) malloc(prog->Varying->NumParameters * sizeof(GLuint)); + if (!map) + return GL_FALSE; + + for (i = 0; i < prog->Varying->NumParameters; i++) { + /* see if this varying is in the linked varying list */ + const struct gl_program_parameter *var + = prog->Varying->Parameters + i; + + GLint j = _mesa_lookup_parameter_index(shProg->Varying, -1, var->Name); + if (j >= 0) { + /* already in list, check size */ + if (var->Size != shProg->Varying->Parameters[j].Size) { + /* error */ + return GL_FALSE; + } + } + else { + /* not already in linked list */ + j = _mesa_add_varying(shProg->Varying, var->Name, var->Size); + } + ASSERT(j >= 0); + + map[i] = j; + } + + + /* Varying variables are treated like other vertex program outputs + * (and like other fragment program inputs). The position of the + * first varying differs for vertex/fragment programs... + * Also, replace File=PROGRAM_VARYING with File=PROGRAM_INPUT/OUTPUT. + */ + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + firstVarying = VERT_RESULT_VAR0; + newFile = PROGRAM_OUTPUT; + } + else { + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + firstVarying = FRAG_ATTRIB_VAR0; + newFile = PROGRAM_INPUT; + } + + /* keep track of which varying vars we read and write */ + varsWritten = varsRead = 0x0; + + /* OK, now scan the program/shader instructions looking for varying vars, + * replacing the old index with the new index. + */ + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + GLuint j; + + if (inst->DstReg.File == PROGRAM_VARYING) { + inst->DstReg.File = newFile; + inst->DstReg.Index = map[ inst->DstReg.Index ] + firstVarying; + varsWritten |= (1 << inst->DstReg.Index); + } + + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_VARYING) { + inst->SrcReg[j].File = newFile; + inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ] + firstVarying; + varsRead |= (1 << inst->SrcReg[j].Index); + } + } + /* XXX update program OutputsWritten, InputsRead */ + } + + if (prog->Target == GL_VERTEX_PROGRAM_ARB) { + prog->OutputsWritten |= varsWritten; + } + else { + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + prog->InputsRead |= varsRead; + } + + + free(map); + + return GL_TRUE; +} + + +static GLboolean +is_uniform(GLuint file) +{ + return (file == PROGRAM_ENV_PARAM || + file == PROGRAM_STATE_VAR || + file == PROGRAM_NAMED_PARAM || + file == PROGRAM_CONSTANT || + file == PROGRAM_SAMPLER || + file == PROGRAM_UNIFORM); +} + + +static GLboolean +link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) +{ + GLuint *map, i; + +#if 0 + printf("================ pre link uniforms ===============\n"); + _mesa_print_parameter_list(shProg->Uniforms); +#endif + + map = (GLuint *) malloc(prog->Parameters->NumParameters * sizeof(GLuint)); + if (!map) + return GL_FALSE; + + for (i = 0; i < prog->Parameters->NumParameters; /* incr below*/) { + /* see if this uniform is in the linked uniform list */ + const struct gl_program_parameter *p = prog->Parameters->Parameters + i; + const GLfloat *pVals = prog->Parameters->ParameterValues[i]; + GLint j; + GLint size; + + /* sanity check */ + assert(is_uniform(p->Type)); + + if (p->Name) { + j = _mesa_lookup_parameter_index(shProg->Uniforms, -1, p->Name); + } + else { + GLuint swizzle; + ASSERT(p->Type == PROGRAM_CONSTANT); + if (_mesa_lookup_parameter_constant(shProg->Uniforms, pVals, + p->Size, &j, &swizzle)) { + assert(j >= 0); + } + else { + j = -1; + } + } + + if (j >= 0) { + /* already in list, check size XXX check this */ +#if 0 + assert(p->Size == shProg->Uniforms->Parameters[j].Size); +#endif + } + else { + /* not already in linked list */ + switch (p->Type) { + case PROGRAM_ENV_PARAM: + j = _mesa_add_named_parameter(shProg->Uniforms, p->Name, pVals); + break; + case PROGRAM_CONSTANT: + j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size); + break; + case PROGRAM_STATE_VAR: + j = _mesa_add_state_reference(shProg->Uniforms, (const GLint *) p->StateIndexes); + break; + case PROGRAM_UNIFORM: + j = _mesa_add_uniform(shProg->Uniforms, p->Name, p->Size); + break; + case PROGRAM_SAMPLER: + j = _mesa_add_sampler(shProg->Uniforms, p->Name); + break; + default: + abort(); + } + + } + ASSERT(j >= 0); + + size = p->Size; + while (size > 0) { + map[i] = j; + i++; + j++; + size -= 4; + } + + } + +#if 0 + printf("================ post link uniforms ===============\n"); + _mesa_print_parameter_list(shProg->Uniforms); +#endif + +#if 0 + { + GLuint i; + for (i = 0; i < prog->Parameters->NumParameters; i++) { + printf("map[%d] = %d\n", i, map[i]); + } + _mesa_print_parameter_list(shProg->Uniforms); + } +#endif + + /* OK, now scan the program/shader instructions looking for uniform vars, + * replacing the old index with the new index. + */ + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + GLuint j; + + if (is_uniform(inst->DstReg.File)) { + inst->DstReg.Index = map[ inst->DstReg.Index ]; + } + + for (j = 0; j < 3; j++) { + if (is_uniform(inst->SrcReg[j].File)) { + inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ]; + } + } + + if (inst->Opcode == OPCODE_TEX || + inst->Opcode == OPCODE_TXB || + inst->Opcode == OPCODE_TXP) { + /* + printf("====== remap sampler from %d to %d\n", + inst->Sampler, map[ inst->Sampler ]); + */ + inst->Sampler = map[ inst->Sampler ]; + } + } + + free(map); + + return GL_TRUE; +} + + +/** + * XXX Temporary + */ +static void +_slang_resolve_branches(struct gl_program *prog) +{ + struct target { + const char *Name; + GLuint Pos; + }; + struct target targets[500]; + GLuint numTargets = 0; + GLuint i, j; + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_NOP && inst->Comment) { + targets[numTargets].Name = inst->Comment; + targets[numTargets].Pos = i; + numTargets++; + } + } + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_BRA) { + for (j = 0; j < numTargets; j++) { + if (!strcmp(inst->Comment, targets[j].Name)) { + inst->BranchTarget = targets[j].Pos; + break; + } + } + if (j == numTargets) { + abort(); + } + } + } +} + + +/** + * Resolve binding of generic vertex attributes. + * For example, if the vertex shader declared "attribute vec4 foobar" we'll + * allocate a generic vertex attribute for "foobar" and plug that value into + * the vertex program instructions. + */ +static GLboolean +_slang_resolve_attributes(struct gl_shader_program *shProg, + struct gl_program *prog) +{ + GLuint i, j; + GLbitfield usedAttributes; + GLint size = 4; /* XXX fix */ + + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + + /* Build a bitmask indicating which attribute indexes have been + * explicitly bound by the user with glBindAttributeLocation(). + */ + usedAttributes = 0x0; + for (i = 0; i < shProg->Attributes->NumParameters; i++) { + GLint attr = shProg->Attributes->Parameters[i].StateIndexes[0]; + usedAttributes |= attr; + } + + if (!shProg->Attributes) + shProg->Attributes = _mesa_new_parameter_list(); + + /* + * Scan program for generic attribute references + */ + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT && + inst->SrcReg[j].Index >= VERT_ATTRIB_GENERIC0) { + /* this is a generic attrib */ + const GLint k = inst->SrcReg[j].Index - VERT_ATTRIB_GENERIC0; + const char *name = prog->Attributes->Parameters[k].Name; + /* See if this attrib name is in the program's attribute list + * (i.e. was bound by the user). + */ + GLint index = _mesa_lookup_parameter_index(shProg->Attributes, + -1, name); + GLint attr; + if (index >= 0) { + /* found, user must have specified a binding */ + attr = shProg->Attributes->Parameters[index].StateIndexes[0]; + } + else { + /* Not found, choose our own attribute number. + * Start at 1 since generic attribute 0 always aliases + * glVertex/position. + */ + for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) { + if (((1 << attr) & usedAttributes) == 0) + break; + } + if (attr == MAX_VERTEX_ATTRIBS) { + /* too many! XXX record error log */ + return GL_FALSE; + } + _mesa_add_attribute(shProg->Attributes, name, size, attr); + } + + inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + attr; + } + } + } + return GL_TRUE; +} + + +/** + * Scan program instructions to update the program's InputsRead and + * OutputsWritten fields. + */ +static void +_slang_update_inputs_outputs(struct gl_program *prog) +{ + GLuint i, j; + + prog->InputsRead = 0x0; + prog->OutputsWritten = 0x0; + + for (i = 0; i < prog->NumInstructions; i++) { + const struct prog_instruction *inst = prog->Instructions + i; + const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); + for (j = 0; j < numSrc; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT) { + prog->InputsRead |= 1 << inst->SrcReg[j].Index; + } + } + if (inst->DstReg.File == PROGRAM_OUTPUT) { + prog->OutputsWritten |= 1 << inst->DstReg.Index; + } + } +} + + +/** + * Scan a vertex program looking for instances of + * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + oldAttrib) and replace with + * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + newAttrib). + * This is used when the user calls glBindAttribLocation on an already linked + * shader program. + */ +void +_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttrib) +{ + GLuint i, j; + + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + for (j = 0; j < 3; j++) { + if (inst->SrcReg[j].File == PROGRAM_INPUT) { + if (inst->SrcReg[j].Index == VERT_ATTRIB_GENERIC0 + oldAttrib) { + inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + newAttrib; + } + } + } + } + + _slang_update_inputs_outputs(prog); +} + + + +/** + * Scan program for texture instructions, lookup sampler/uniform's value + * to determine which texture unit to use. + * Also, update the program's TexturesUsed[] array. + */ +void +_slang_resolve_samplers(struct gl_shader_program *shProg, + struct gl_program *prog) +{ + GLuint i; + + for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) + prog->TexturesUsed[i] = 0; + + for (i = 0; i < prog->NumInstructions; i++) { + struct prog_instruction *inst = prog->Instructions + i; + if (inst->Opcode == OPCODE_TEX || + inst->Opcode == OPCODE_TXB || + inst->Opcode == OPCODE_TXP) { + GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; + assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); + inst->TexSrcUnit = sampleUnit; + + prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); + } + } +} + + + +/** cast wrapper */ +static struct gl_vertex_program * +vertex_program(struct gl_program *prog) +{ + assert(prog->Target == GL_VERTEX_PROGRAM_ARB); + return (struct gl_vertex_program *) prog; +} + + +/** cast wrapper */ +static struct gl_fragment_program * +fragment_program(struct gl_program *prog) +{ + assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); + return (struct gl_fragment_program *) prog; +} + + +/** + * Shader linker. Currently: + * + * 1. The last attached vertex shader and fragment shader are linked. + * 2. Varying vars in the two shaders are combined so their locations + * agree between the vertex and fragment stages. They're treated as + * vertex program output attribs and as fragment program input attribs. + * 3. Uniform vars (including state references, constants, etc) from the + * vertex and fragment shaders are merged into one group. Recall that + * GLSL uniforms are shared by all linked shaders. + * 4. The vertex and fragment programs are cloned and modified to update + * src/dst register references so they use the new, linked uniform/ + * varying storage locations. + */ +void +_slang_link2(GLcontext *ctx, + GLhandleARB programObj, + struct gl_shader_program *shProg) +{ + const struct gl_vertex_program *vertProg; + const struct gl_fragment_program *fragProg; + GLuint i; + + _mesa_free_shader_program_data(ctx, shProg); + + shProg->Uniforms = _mesa_new_parameter_list(); + shProg->Varying = _mesa_new_parameter_list(); + + /** + * Find attached vertex shader, fragment shader + */ + vertProg = NULL; + fragProg = NULL; + for (i = 0; i < shProg->NumShaders; i++) { + if (shProg->Shaders[i]->Type == GL_VERTEX_SHADER) + vertProg = vertex_program(shProg->Shaders[i]->Programs[0]); + else if (shProg->Shaders[i]->Type == GL_FRAGMENT_SHADER) + fragProg = fragment_program(shProg->Shaders[i]->Programs[0]); + else + _mesa_problem(ctx, "unexpected shader target in slang_link2()"); + } +#if 00 + if (!vertProg || !fragProg) { + /* XXX is it legal to have one but not the other?? */ + /* XXX record error */ + shProg->LinkStatus = GL_FALSE; + return; + } + + /* XXX is this test used? */ + if (!vertProg->Base.Varying || !fragProg->Base.Varying) { + /* temporary */ + _mesa_problem(ctx, "vertex/fragment program lacks varying list!"); + abort(); + shProg->LinkStatus = GL_FALSE; + return; + } +#endif + + /* + * Make copies of the vertex/fragment programs now since we'll be + * changing src/dst registers after merging the uniforms and varying vars. + */ + if (vertProg) { + shProg->VertexProgram + = vertex_program(_mesa_clone_program(ctx, &vertProg->Base)); + } + else { + shProg->VertexProgram = NULL; + } + + if (fragProg) { + shProg->FragmentProgram + = fragment_program(_mesa_clone_program(ctx, &fragProg->Base)); + } + else { + shProg->FragmentProgram = NULL; + } + + if (shProg->VertexProgram) + link_varying_vars(shProg, &shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + link_varying_vars(shProg, &shProg->FragmentProgram->Base); + + if (shProg->VertexProgram) + link_uniform_vars(shProg, &shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + link_uniform_vars(shProg, &shProg->FragmentProgram->Base); + + /* The vertex and fragment programs share a common set of uniforms now */ + if (shProg->VertexProgram) { + _mesa_free_parameter_list(shProg->VertexProgram->Base.Parameters); + shProg->VertexProgram->Base.Parameters = shProg->Uniforms; + } + if (shProg->FragmentProgram) { + _mesa_free_parameter_list(shProg->FragmentProgram->Base.Parameters); + shProg->FragmentProgram->Base.Parameters = shProg->Uniforms; + } + + if (shProg->VertexProgram) { + _slang_resolve_branches(&shProg->VertexProgram->Base); + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); + } + if (shProg->FragmentProgram) { + _slang_resolve_branches(&shProg->FragmentProgram->Base); + _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); + } + + if (shProg->VertexProgram) { + if (!_slang_resolve_attributes(shProg, &shProg->VertexProgram->Base)) { + /*goto cleanup;*/ + _mesa_problem(ctx, "_slang_resolve_attributes() failed"); + abort(); /* XXX fix */ + } + } + + if (shProg->VertexProgram) + _slang_update_inputs_outputs(&shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); + + if (fragProg && shProg->FragmentProgram) { +#if 1 + printf("************** original fragment program\n"); + _mesa_print_program(&fragProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); +#endif +#if 1 + printf("************** linked fragment prog\n"); + _mesa_print_program(&shProg->FragmentProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); +#endif + } + + if (vertProg && shProg->VertexProgram) { +#if 1 + printf("************** original vertex program\n"); + _mesa_print_program(&vertProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); +#endif +#if 1 + printf("************** linked vertex prog\n"); + _mesa_print_program(&shProg->VertexProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); +#endif + } + +#if 0 + shProg->LinkStatus = (shProg->VertexProgram && shProg->FragmentProgram); +#else + shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); +#endif +} + diff --git a/src/mesa/shader/slang/slang_link2.c b/src/mesa/shader/slang/slang_link2.c deleted file mode 100644 index 017cf6078c..0000000000 --- a/src/mesa/shader/slang/slang_link2.c +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.3 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_link2.c - * GLSL linker - * \author Brian Paul - */ - -#include "imports.h" -#include "context.h" -#include "hash.h" -#include "macros.h" -#include "program.h" -#include "prog_instruction.h" -#include "prog_parameter.h" -#include "prog_print.h" -#include "prog_statevars.h" -#include "shader_api.h" -#include "slang_link.h" - - - - -static GLboolean -link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog) -{ - GLuint *map, i, firstVarying, newFile; - GLbitfield varsWritten, varsRead; - - map = (GLuint *) malloc(prog->Varying->NumParameters * sizeof(GLuint)); - if (!map) - return GL_FALSE; - - for (i = 0; i < prog->Varying->NumParameters; i++) { - /* see if this varying is in the linked varying list */ - const struct gl_program_parameter *var - = prog->Varying->Parameters + i; - - GLint j = _mesa_lookup_parameter_index(shProg->Varying, -1, var->Name); - if (j >= 0) { - /* already in list, check size */ - if (var->Size != shProg->Varying->Parameters[j].Size) { - /* error */ - return GL_FALSE; - } - } - else { - /* not already in linked list */ - j = _mesa_add_varying(shProg->Varying, var->Name, var->Size); - } - ASSERT(j >= 0); - - map[i] = j; - } - - - /* Varying variables are treated like other vertex program outputs - * (and like other fragment program inputs). The position of the - * first varying differs for vertex/fragment programs... - * Also, replace File=PROGRAM_VARYING with File=PROGRAM_INPUT/OUTPUT. - */ - if (prog->Target == GL_VERTEX_PROGRAM_ARB) { - firstVarying = VERT_RESULT_VAR0; - newFile = PROGRAM_OUTPUT; - } - else { - assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); - firstVarying = FRAG_ATTRIB_VAR0; - newFile = PROGRAM_INPUT; - } - - /* keep track of which varying vars we read and write */ - varsWritten = varsRead = 0x0; - - /* OK, now scan the program/shader instructions looking for varying vars, - * replacing the old index with the new index. - */ - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - GLuint j; - - if (inst->DstReg.File == PROGRAM_VARYING) { - inst->DstReg.File = newFile; - inst->DstReg.Index = map[ inst->DstReg.Index ] + firstVarying; - varsWritten |= (1 << inst->DstReg.Index); - } - - for (j = 0; j < 3; j++) { - if (inst->SrcReg[j].File == PROGRAM_VARYING) { - inst->SrcReg[j].File = newFile; - inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ] + firstVarying; - varsRead |= (1 << inst->SrcReg[j].Index); - } - } - /* XXX update program OutputsWritten, InputsRead */ - } - - if (prog->Target == GL_VERTEX_PROGRAM_ARB) { - prog->OutputsWritten |= varsWritten; - } - else { - assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); - prog->InputsRead |= varsRead; - } - - - free(map); - - return GL_TRUE; -} - - -static GLboolean -is_uniform(GLuint file) -{ - return (file == PROGRAM_ENV_PARAM || - file == PROGRAM_STATE_VAR || - file == PROGRAM_NAMED_PARAM || - file == PROGRAM_CONSTANT || - file == PROGRAM_SAMPLER || - file == PROGRAM_UNIFORM); -} - - -static GLboolean -link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) -{ - GLuint *map, i; - -#if 0 - printf("================ pre link uniforms ===============\n"); - _mesa_print_parameter_list(shProg->Uniforms); -#endif - - map = (GLuint *) malloc(prog->Parameters->NumParameters * sizeof(GLuint)); - if (!map) - return GL_FALSE; - - for (i = 0; i < prog->Parameters->NumParameters; /* incr below*/) { - /* see if this uniform is in the linked uniform list */ - const struct gl_program_parameter *p = prog->Parameters->Parameters + i; - const GLfloat *pVals = prog->Parameters->ParameterValues[i]; - GLint j; - GLint size; - - /* sanity check */ - assert(is_uniform(p->Type)); - - if (p->Name) { - j = _mesa_lookup_parameter_index(shProg->Uniforms, -1, p->Name); - } - else { - GLuint swizzle; - ASSERT(p->Type == PROGRAM_CONSTANT); - if (_mesa_lookup_parameter_constant(shProg->Uniforms, pVals, - p->Size, &j, &swizzle)) { - assert(j >= 0); - } - else { - j = -1; - } - } - - if (j >= 0) { - /* already in list, check size XXX check this */ -#if 0 - assert(p->Size == shProg->Uniforms->Parameters[j].Size); -#endif - } - else { - /* not already in linked list */ - switch (p->Type) { - case PROGRAM_ENV_PARAM: - j = _mesa_add_named_parameter(shProg->Uniforms, p->Name, pVals); - break; - case PROGRAM_CONSTANT: - j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size); - break; - case PROGRAM_STATE_VAR: - j = _mesa_add_state_reference(shProg->Uniforms, (const GLint *) p->StateIndexes); - break; - case PROGRAM_UNIFORM: - j = _mesa_add_uniform(shProg->Uniforms, p->Name, p->Size); - break; - case PROGRAM_SAMPLER: - j = _mesa_add_sampler(shProg->Uniforms, p->Name); - break; - default: - abort(); - } - - } - ASSERT(j >= 0); - - size = p->Size; - while (size > 0) { - map[i] = j; - i++; - j++; - size -= 4; - } - - } - -#if 0 - printf("================ post link uniforms ===============\n"); - _mesa_print_parameter_list(shProg->Uniforms); -#endif - -#if 0 - { - GLuint i; - for (i = 0; i < prog->Parameters->NumParameters; i++) { - printf("map[%d] = %d\n", i, map[i]); - } - _mesa_print_parameter_list(shProg->Uniforms); - } -#endif - - /* OK, now scan the program/shader instructions looking for uniform vars, - * replacing the old index with the new index. - */ - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - GLuint j; - - if (is_uniform(inst->DstReg.File)) { - inst->DstReg.Index = map[ inst->DstReg.Index ]; - } - - for (j = 0; j < 3; j++) { - if (is_uniform(inst->SrcReg[j].File)) { - inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ]; - } - } - - if (inst->Opcode == OPCODE_TEX || - inst->Opcode == OPCODE_TXB || - inst->Opcode == OPCODE_TXP) { - /* - printf("====== remap sampler from %d to %d\n", - inst->Sampler, map[ inst->Sampler ]); - */ - inst->Sampler = map[ inst->Sampler ]; - } - } - - free(map); - - return GL_TRUE; -} - - -/** - * XXX Temporary - */ -static void -_slang_resolve_branches(struct gl_program *prog) -{ - struct target { - const char *Name; - GLuint Pos; - }; - struct target targets[500]; - GLuint numTargets = 0; - GLuint i, j; - - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_NOP && inst->Comment) { - targets[numTargets].Name = inst->Comment; - targets[numTargets].Pos = i; - numTargets++; - } - } - - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_BRA) { - for (j = 0; j < numTargets; j++) { - if (!strcmp(inst->Comment, targets[j].Name)) { - inst->BranchTarget = targets[j].Pos; - break; - } - } - if (j == numTargets) { - abort(); - } - } - } -} - - -/** - * Resolve binding of generic vertex attributes. - * For example, if the vertex shader declared "attribute vec4 foobar" we'll - * allocate a generic vertex attribute for "foobar" and plug that value into - * the vertex program instructions. - */ -static GLboolean -_slang_resolve_attributes(struct gl_shader_program *shProg, - struct gl_program *prog) -{ - GLuint i, j; - GLbitfield usedAttributes; - GLint size = 4; /* XXX fix */ - - assert(prog->Target == GL_VERTEX_PROGRAM_ARB); - - /* Build a bitmask indicating which attribute indexes have been - * explicitly bound by the user with glBindAttributeLocation(). - */ - usedAttributes = 0x0; - for (i = 0; i < shProg->Attributes->NumParameters; i++) { - GLint attr = shProg->Attributes->Parameters[i].StateIndexes[0]; - usedAttributes |= attr; - } - - if (!shProg->Attributes) - shProg->Attributes = _mesa_new_parameter_list(); - - /* - * Scan program for generic attribute references - */ - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - for (j = 0; j < 3; j++) { - if (inst->SrcReg[j].File == PROGRAM_INPUT && - inst->SrcReg[j].Index >= VERT_ATTRIB_GENERIC0) { - /* this is a generic attrib */ - const GLint k = inst->SrcReg[j].Index - VERT_ATTRIB_GENERIC0; - const char *name = prog->Attributes->Parameters[k].Name; - /* See if this attrib name is in the program's attribute list - * (i.e. was bound by the user). - */ - GLint index = _mesa_lookup_parameter_index(shProg->Attributes, - -1, name); - GLint attr; - if (index >= 0) { - /* found, user must have specified a binding */ - attr = shProg->Attributes->Parameters[index].StateIndexes[0]; - } - else { - /* Not found, choose our own attribute number. - * Start at 1 since generic attribute 0 always aliases - * glVertex/position. - */ - for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) { - if (((1 << attr) & usedAttributes) == 0) - break; - } - if (attr == MAX_VERTEX_ATTRIBS) { - /* too many! XXX record error log */ - return GL_FALSE; - } - _mesa_add_attribute(shProg->Attributes, name, size, attr); - } - - inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + attr; - } - } - } - return GL_TRUE; -} - - -/** - * Scan program instructions to update the program's InputsRead and - * OutputsWritten fields. - */ -static void -_slang_update_inputs_outputs(struct gl_program *prog) -{ - GLuint i, j; - - prog->InputsRead = 0x0; - prog->OutputsWritten = 0x0; - - for (i = 0; i < prog->NumInstructions; i++) { - const struct prog_instruction *inst = prog->Instructions + i; - const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); - for (j = 0; j < numSrc; j++) { - if (inst->SrcReg[j].File == PROGRAM_INPUT) { - prog->InputsRead |= 1 << inst->SrcReg[j].Index; - } - } - if (inst->DstReg.File == PROGRAM_OUTPUT) { - prog->OutputsWritten |= 1 << inst->DstReg.Index; - } - } -} - - -/** - * Scan a vertex program looking for instances of - * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + oldAttrib) and replace with - * (PROGRAM_INPUT, VERT_ATTRIB_GENERIC0 + newAttrib). - * This is used when the user calls glBindAttribLocation on an already linked - * shader program. - */ -void -_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttrib) -{ - GLuint i, j; - - assert(prog->Target == GL_VERTEX_PROGRAM_ARB); - - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - for (j = 0; j < 3; j++) { - if (inst->SrcReg[j].File == PROGRAM_INPUT) { - if (inst->SrcReg[j].Index == VERT_ATTRIB_GENERIC0 + oldAttrib) { - inst->SrcReg[j].Index = VERT_ATTRIB_GENERIC0 + newAttrib; - } - } - } - } - - _slang_update_inputs_outputs(prog); -} - - - -/** - * Scan program for texture instructions, lookup sampler/uniform's value - * to determine which texture unit to use. - * Also, update the program's TexturesUsed[] array. - */ -void -_slang_resolve_samplers(struct gl_shader_program *shProg, - struct gl_program *prog) -{ - GLuint i; - - for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) - prog->TexturesUsed[i] = 0; - - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_TEX || - inst->Opcode == OPCODE_TXB || - inst->Opcode == OPCODE_TXP) { - GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0]; - assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS); - inst->TexSrcUnit = sampleUnit; - - prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget); - } - } -} - - - -/** cast wrapper */ -static struct gl_vertex_program * -vertex_program(struct gl_program *prog) -{ - assert(prog->Target == GL_VERTEX_PROGRAM_ARB); - return (struct gl_vertex_program *) prog; -} - - -/** cast wrapper */ -static struct gl_fragment_program * -fragment_program(struct gl_program *prog) -{ - assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); - return (struct gl_fragment_program *) prog; -} - - -/** - * Shader linker. Currently: - * - * 1. The last attached vertex shader and fragment shader are linked. - * 2. Varying vars in the two shaders are combined so their locations - * agree between the vertex and fragment stages. They're treated as - * vertex program output attribs and as fragment program input attribs. - * 3. Uniform vars (including state references, constants, etc) from the - * vertex and fragment shaders are merged into one group. Recall that - * GLSL uniforms are shared by all linked shaders. - * 4. The vertex and fragment programs are cloned and modified to update - * src/dst register references so they use the new, linked uniform/ - * varying storage locations. - */ -void -_slang_link2(GLcontext *ctx, - GLhandleARB programObj, - struct gl_shader_program *shProg) -{ - const struct gl_vertex_program *vertProg; - const struct gl_fragment_program *fragProg; - GLuint i; - - _mesa_free_shader_program_data(ctx, shProg); - - shProg->Uniforms = _mesa_new_parameter_list(); - shProg->Varying = _mesa_new_parameter_list(); - - /** - * Find attached vertex shader, fragment shader - */ - vertProg = NULL; - fragProg = NULL; - for (i = 0; i < shProg->NumShaders; i++) { - if (shProg->Shaders[i]->Type == GL_VERTEX_SHADER) - vertProg = vertex_program(shProg->Shaders[i]->Programs[0]); - else if (shProg->Shaders[i]->Type == GL_FRAGMENT_SHADER) - fragProg = fragment_program(shProg->Shaders[i]->Programs[0]); - else - _mesa_problem(ctx, "unexpected shader target in slang_link2()"); - } -#if 00 - if (!vertProg || !fragProg) { - /* XXX is it legal to have one but not the other?? */ - /* XXX record error */ - shProg->LinkStatus = GL_FALSE; - return; - } - - /* XXX is this test used? */ - if (!vertProg->Base.Varying || !fragProg->Base.Varying) { - /* temporary */ - _mesa_problem(ctx, "vertex/fragment program lacks varying list!"); - abort(); - shProg->LinkStatus = GL_FALSE; - return; - } -#endif - - /* - * Make copies of the vertex/fragment programs now since we'll be - * changing src/dst registers after merging the uniforms and varying vars. - */ - if (vertProg) { - shProg->VertexProgram - = vertex_program(_mesa_clone_program(ctx, &vertProg->Base)); - } - else { - shProg->VertexProgram = NULL; - } - - if (fragProg) { - shProg->FragmentProgram - = fragment_program(_mesa_clone_program(ctx, &fragProg->Base)); - } - else { - shProg->FragmentProgram = NULL; - } - - if (shProg->VertexProgram) - link_varying_vars(shProg, &shProg->VertexProgram->Base); - if (shProg->FragmentProgram) - link_varying_vars(shProg, &shProg->FragmentProgram->Base); - - if (shProg->VertexProgram) - link_uniform_vars(shProg, &shProg->VertexProgram->Base); - if (shProg->FragmentProgram) - link_uniform_vars(shProg, &shProg->FragmentProgram->Base); - - /* The vertex and fragment programs share a common set of uniforms now */ - if (shProg->VertexProgram) { - _mesa_free_parameter_list(shProg->VertexProgram->Base.Parameters); - shProg->VertexProgram->Base.Parameters = shProg->Uniforms; - } - if (shProg->FragmentProgram) { - _mesa_free_parameter_list(shProg->FragmentProgram->Base.Parameters); - shProg->FragmentProgram->Base.Parameters = shProg->Uniforms; - } - - if (shProg->VertexProgram) { - _slang_resolve_branches(&shProg->VertexProgram->Base); - _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); - } - if (shProg->FragmentProgram) { - _slang_resolve_branches(&shProg->FragmentProgram->Base); - _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); - } - - if (shProg->VertexProgram) { - if (!_slang_resolve_attributes(shProg, &shProg->VertexProgram->Base)) { - /*goto cleanup;*/ - _mesa_problem(ctx, "_slang_resolve_attributes() failed"); - abort(); /* XXX fix */ - } - } - - if (shProg->VertexProgram) - _slang_update_inputs_outputs(&shProg->VertexProgram->Base); - if (shProg->FragmentProgram) - _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); - - if (fragProg && shProg->FragmentProgram) { -#if 1 - printf("************** original fragment program\n"); - _mesa_print_program(&fragProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); -#endif -#if 1 - printf("************** linked fragment prog\n"); - _mesa_print_program(&shProg->FragmentProgram->Base); - _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); -#endif - } - - if (vertProg && shProg->VertexProgram) { -#if 1 - printf("************** original vertex program\n"); - _mesa_print_program(&vertProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); -#endif -#if 1 - printf("************** linked vertex prog\n"); - _mesa_print_program(&shProg->VertexProgram->Base); - _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); -#endif - } - -#if 0 - shProg->LinkStatus = (shProg->VertexProgram && shProg->FragmentProgram); -#else - shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); -#endif -} - -- cgit v1.2.3 From 6c52dd38524a3f3edc48dcabee684bf94e605a22 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:22:05 -0700 Subject: rename slang_link2.c slang_link.c --- src/mesa/sources | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index 98af7b3b75..a6bbbab009 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -166,7 +166,6 @@ SHADER_SOURCES = \ shader/shader_api.c \ SLANG_SOURCES = \ - shader/slang/slang_typeinfo.c \ shader/slang/slang_codegen.c \ shader/slang/slang_compile.c \ shader/slang/slang_compile_function.c \ @@ -177,12 +176,13 @@ SLANG_SOURCES = \ shader/slang/slang_error.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_library_texsample.c \ - shader/slang/slang_link2.c \ + shader/slang/slang_link.c \ shader/slang/slang_preprocess.c \ + shader/slang/slang_print.c \ shader/slang/slang_simplify.c \ shader/slang/slang_storage.c \ + shader/slang/slang_typeinfo.c \ shader/slang/slang_vartable.c \ - shader/slang/slang_print.c \ shader/slang/slang_utility.c ASM_C_SOURCES = \ -- cgit v1.2.3 From 4a2ef4fd8811fca49d6e1cf3005a18b379af5f2b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:23:33 -0700 Subject: remove slang_library_texsample.[ch] --- src/mesa/shader/slang/slang_library_texsample.c | 172 ------------------------ src/mesa/shader/slang/slang_library_texsample.h | 44 ------ 2 files changed, 216 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_library_texsample.c delete mode 100644 src/mesa/shader/slang/slang_library_texsample.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_library_texsample.c b/src/mesa/shader/slang/slang_library_texsample.c deleted file mode 100644 index 7d56880400..0000000000 --- a/src/mesa/shader/slang/slang_library_texsample.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_library_texsample.c - * built-in library functions for texture and shadow sampling - * \author Michal Krol - */ - -#include "imports.h" -#include "context.h" -#include "colormac.h" -#include "swrast/s_context.h" -#include "slang_library_texsample.h" - -GLvoid _slang_library_tex1d (GLfloat bias, GLfloat s, GLfloat sampler, GLfloat *color) -{ - GET_CURRENT_CONTEXT(ctx); - SWcontext *swrast = SWRAST_CONTEXT(ctx); - GLuint unit = (GLuint) sampler; - GLfloat texcoord[4]; - GLfloat lambda = bias; - GLchan rgba[4]; - - texcoord[0] = s; - texcoord[1] = 0.0f; - texcoord[2] = 0.0f; - texcoord[3] = 1.0f; - - swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1, - (const GLfloat (*)[4]) texcoord, &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - -GLvoid _slang_library_tex2d (GLfloat bias, GLfloat s, GLfloat t, GLfloat sampler, GLfloat *color) -{ - GET_CURRENT_CONTEXT(ctx); - SWcontext *swrast = SWRAST_CONTEXT(ctx); - GLuint unit = (GLuint) sampler; - GLfloat texcoord[4]; - GLfloat lambda = bias; - GLchan rgba[4]; - - texcoord[0] = s; - texcoord[1] = t; - texcoord[2] = 0.0f; - texcoord[3] = 1.0f; - - swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1, - (const GLfloat (*)[4]) texcoord, &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - -GLvoid _slang_library_tex3d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler, - GLfloat *color) -{ - GET_CURRENT_CONTEXT(ctx); - SWcontext *swrast = SWRAST_CONTEXT(ctx); - GLuint unit = (GLuint) sampler; - GLfloat texcoord[4]; - GLfloat lambda = bias; - GLchan rgba[4]; - - texcoord[0] = s; - texcoord[1] = t; - texcoord[2] = r; - texcoord[3] = 1.0f; - - swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1, - (const GLfloat (*)[4]) texcoord, &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - -GLvoid _slang_library_texcube (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler, - GLfloat *color) -{ - GET_CURRENT_CONTEXT(ctx); - SWcontext *swrast = SWRAST_CONTEXT(ctx); - GLuint unit = (GLuint) sampler; - GLfloat texcoord[4]; - GLfloat lambda = bias; - GLchan rgba[4]; - - texcoord[0] = s; - texcoord[1] = t; - texcoord[2] = r; - texcoord[3] = 1.0f; - - swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1, - (const GLfloat (*)[4]) texcoord, &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - -GLvoid _slang_library_shad1d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler, - GLfloat *color) -{ - GET_CURRENT_CONTEXT(ctx); - SWcontext *swrast = SWRAST_CONTEXT(ctx); - GLuint unit = (GLuint) sampler; - GLfloat texcoord[4]; - GLfloat lambda = bias; - GLchan rgba[4]; - - texcoord[0] = s; - texcoord[1] = t; - texcoord[2] = r; - texcoord[3] = 1.0f; - - swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1, - (const GLfloat (*)[4]) texcoord, &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - -GLvoid _slang_library_shad2d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler, - GLfloat *color) -{ - GET_CURRENT_CONTEXT(ctx); - SWcontext *swrast = SWRAST_CONTEXT(ctx); - GLuint unit = (GLuint) sampler; - GLfloat texcoord[4]; - GLfloat lambda = bias; - GLchan rgba[4]; - - texcoord[0] = s; - texcoord[1] = t; - texcoord[2] = r; - texcoord[3] = 1.0f; - - swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1, - (const GLfloat (*)[4]) texcoord, &lambda, &rgba); - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); -} - diff --git a/src/mesa/shader/slang/slang_library_texsample.h b/src/mesa/shader/slang/slang_library_texsample.h deleted file mode 100644 index f74738ffa1..0000000000 --- a/src/mesa/shader/slang/slang_library_texsample.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#if !defined SLANG_LIBRARY_TEXSAMPLE_H -#define SLANG_LIBRARY_TEXSAMPLE_H - -#if defined __cplusplus -extern "C" { -#endif - -GLvoid _slang_library_tex1d (GLfloat, GLfloat, GLfloat, GLfloat *); -GLvoid _slang_library_tex2d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *); -GLvoid _slang_library_tex3d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *); -GLvoid _slang_library_texcube (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *); -GLvoid _slang_library_shad1d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *); -GLvoid _slang_library_shad2d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *); - -#ifdef __cplusplus -} -#endif - -#endif - -- cgit v1.2.3 From 884fdfeb2272802e3103321edfed9cb198950e90 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:23:38 -0700 Subject: remove slang_library_texsample.[ch] --- src/mesa/sources | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index a6bbbab009..4d8055b4bf 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -175,7 +175,6 @@ SLANG_SOURCES = \ shader/slang/slang_emit.c \ shader/slang/slang_error.c \ shader/slang/slang_library_noise.c \ - shader/slang/slang_library_texsample.c \ shader/slang/slang_link.c \ shader/slang/slang_preprocess.c \ shader/slang/slang_print.c \ -- cgit v1.2.3 From fe45343df98ecdc06039b68d5a249a41f9e9e11e Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:29:48 -0700 Subject: s/slang_assembly_name_space/slang_name_space/ --- src/mesa/shader/slang/slang_codegen.c | 2 +- src/mesa/shader/slang/slang_compile.c | 2 +- src/mesa/shader/slang/slang_simplify.c | 4 ++-- src/mesa/shader/slang/slang_simplify.h | 4 ++-- src/mesa/shader/slang/slang_typeinfo.c | 6 +++--- src/mesa/shader/slang/slang_typeinfo.h | 12 ++++++------ 6 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 222bf113cc..d972118de6 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1267,7 +1267,7 @@ _slang_first_function(struct slang_function_scope_ *scope, const char *name) slang_function * _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, const slang_operation * args, GLuint num_args, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_atom_pool * atoms) { GLuint i; diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 615dfc1bf2..2f4d458b36 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -339,7 +339,7 @@ static GLboolean parse_array_len(slang_parse_ctx * C, slang_output_ctx * O, GLuint * len) { slang_operation array_size; - slang_assembly_name_space space; + slang_name_space space; GLboolean result; if (!slang_operation_construct(&array_size)) diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index 19e627489f..bf6afe4532 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -90,7 +90,7 @@ _slang_lookup_constant(const char *name) */ void _slang_simplify(slang_operation *oper, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_atom_pool * atoms) { GLboolean isFloat[4]; @@ -275,7 +275,7 @@ _slang_simplify(slang_operation *oper, */ GLboolean _slang_adapt_call(slang_operation *callOper, const slang_function *fun, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_atom_pool * atoms) { const GLboolean haveRetValue = _slang_function_has_return_value(fun); diff --git a/src/mesa/shader/slang/slang_simplify.h b/src/mesa/shader/slang/slang_simplify.h index b29740eaca..d6979a800a 100644 --- a/src/mesa/shader/slang/slang_simplify.h +++ b/src/mesa/shader/slang/slang_simplify.h @@ -9,13 +9,13 @@ _slang_lookup_constant(const char *name); extern void _slang_simplify(slang_operation *oper, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_atom_pool * atoms); extern GLboolean _slang_adapt_call(slang_operation *callOper, const slang_function *fun, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_atom_pool * atoms); diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index fd5cd70a3c..d48113a14a 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -257,7 +257,7 @@ slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) static GLboolean typeof_existing_function(const char *name, const slang_operation * params, GLuint num_params, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_type_specifier * spec, slang_atom_pool * atoms) { @@ -290,7 +290,7 @@ _slang_typeof_operation(const slang_assemble_ctx * A, */ GLboolean _slang_typeof_operation_(const slang_operation * op, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_assembly_typeinfo * ti, slang_atom_pool * atoms) { @@ -616,7 +616,7 @@ _slang_typeof_operation_(const slang_operation * op, GLboolean _slang_typeof_function(slang_atom a_name, const slang_operation * params, GLuint num_params, - const slang_assembly_name_space * space, + const slang_name_space * space, slang_type_specifier * spec, GLboolean * exists, slang_atom_pool * atoms) { diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index b2ca8b8633..267f9abe7b 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -46,18 +46,18 @@ typedef struct slang_swizzle_ GLuint swizzle[4]; } slang_swizzle; -typedef struct slang_assembly_name_space_ +typedef struct slang_name_space_ { struct slang_function_scope_ *funcs; struct slang_struct_scope_ *structs; struct slang_variable_scope_ *vars; -} slang_assembly_name_space; +} slang_name_space; typedef struct slang_assemble_ctx_ { slang_atom_pool *atoms; - slang_assembly_name_space space; + slang_name_space space; slang_swizzle swz; struct gl_program *program; slang_var_table *vartable; @@ -71,7 +71,7 @@ extern struct slang_function_ * _slang_locate_function(const struct slang_function_scope_ *funcs, slang_atom name, const struct slang_operation_ *params, GLuint num_params, - const slang_assembly_name_space *space, + const slang_name_space *space, slang_atom_pool *); @@ -171,7 +171,7 @@ _slang_typeof_operation(const slang_assemble_ctx *, extern GLboolean _slang_typeof_operation_(const struct slang_operation_ *, - const slang_assembly_name_space *, + const slang_name_space *, slang_assembly_typeinfo *, slang_atom_pool *); /** @@ -182,7 +182,7 @@ _slang_typeof_operation_(const struct slang_operation_ *, extern GLboolean _slang_typeof_function(slang_atom a_name, const struct slang_operation_ *params, - GLuint num_params, const slang_assembly_name_space *, + GLuint num_params, const slang_name_space *, slang_type_specifier *spec, GLboolean *exists, slang_atom_pool *); -- cgit v1.2.3 From 1bc71e32ea281077fed6f77bf4c1d63c65eb14f6 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:30:50 -0700 Subject: s/slang_assembly_typeinfo/slang_typeinfo/ --- src/mesa/shader/slang/slang_codegen.c | 26 +++++++++--------- src/mesa/shader/slang/slang_compile_operation.h | 2 +- src/mesa/shader/slang/slang_simplify.c | 14 +++++----- src/mesa/shader/slang/slang_typeinfo.c | 36 ++++++++++++------------- src/mesa/shader/slang/slang_typeinfo.h | 12 ++++----- 5 files changed, 45 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d972118de6..295292e076 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1284,20 +1284,20 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, /* compare parameter / argument types */ for (j = 0; j < num_args; j++) { - slang_assembly_typeinfo ti; + slang_typeinfo ti; - if (!slang_assembly_typeinfo_construct(&ti)) + if (!slang_typeinfo_construct(&ti)) return NULL; if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { - slang_assembly_typeinfo_destruct(&ti); + slang_typeinfo_destruct(&ti); return NULL; } if (!slang_type_specifier_equal(&ti.spec, &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { - slang_assembly_typeinfo_destruct(&ti); + slang_typeinfo_destruct(&ti); break; } - slang_assembly_typeinfo_destruct(&ti); + slang_typeinfo_destruct(&ti); /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ if (!ti.can_be_referenced && @@ -1667,14 +1667,14 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *altLab, *endLab; slang_ir_node *tree, *tmpDecl, *tmpVar, *cond, *cjump, *jump; slang_ir_node *bodx, *body, *assignx, *assigny; - slang_assembly_typeinfo type; + slang_typeinfo type; int size; assert(oper->type == slang_oper_select); assert(oper->num_children == 3); /* size of x or y's type */ - slang_assembly_typeinfo_construct(&type); + slang_typeinfo_construct(&type); _slang_typeof_operation(A, &oper->children[1], &type); size = _slang_sizeof_type_specifier(&type.spec); assert(size > 0); @@ -2110,9 +2110,9 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) static slang_ir_node * _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) { - slang_assembly_typeinfo ti; + slang_typeinfo ti; - slang_assembly_typeinfo_construct(&ti); + slang_typeinfo_construct(&ti); _slang_typeof_operation(A, &oper->children[0], &ti); if (_slang_type_is_vector(ti.spec.type)) { @@ -2167,10 +2167,10 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) static slang_ir_node * _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) { - slang_assembly_typeinfo array_ti; + slang_typeinfo array_ti; /* get array's type info */ - slang_assembly_typeinfo_construct(&array_ti); + slang_typeinfo_construct(&array_ti); _slang_typeof_operation(A, &oper->children[0], &array_ti); if (_slang_type_is_vector(array_ti.spec.type)) { @@ -2201,12 +2201,12 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) } else { /* conventional array */ - slang_assembly_typeinfo elem_ti; + slang_typeinfo elem_ti; slang_ir_node *elem, *array, *index; GLint elemSize; /* size of array element */ - slang_assembly_typeinfo_construct(&elem_ti); + slang_typeinfo_construct(&elem_ti); _slang_typeof_operation(A, oper, &elem_ti); elemSize = _slang_sizeof_type_specifier(&elem_ti.spec); assert(elemSize >= 1); diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index ad52b6690d..0ce9bbad81 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -122,7 +122,7 @@ typedef struct slang_operation_ struct slang_function_ *fun; /**< If type == slang_oper_call */ struct slang_variable_ *var; /**< If type == slang_oper_identier */ slang_fully_specified_type *datatype; /**< Type of this operation */ - slang_assembly_typeinfo ti; + slang_typeinfo ti; } slang_operation; diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index bf6afe4532..ef8b2fedd8 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -294,15 +294,15 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, * into individual floats/ints and try to match the function params. */ for (i = 0; i < numParams; i++) { - slang_assembly_typeinfo argType; + slang_typeinfo argType; GLint argSz, j; /* Get type of arg[i] */ - if (!slang_assembly_typeinfo_construct(&argType)) + if (!slang_typeinfo_construct(&argType)) return GL_FALSE; if (!_slang_typeof_operation_(&callOper->children[i], space, &argType, atoms)) { - slang_assembly_typeinfo_destruct(&argType); + slang_typeinfo_destruct(&argType); return GL_FALSE; } @@ -369,15 +369,15 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, * x = foo(int(3.15), bool(9)) */ for (i = 0; i < numParams; i++) { - slang_assembly_typeinfo argType; + slang_typeinfo argType; slang_variable *paramVar = fun->parameters->variables[i]; /* Get type of arg[i] */ - if (!slang_assembly_typeinfo_construct(&argType)) + if (!slang_typeinfo_construct(&argType)) return GL_FALSE; if (!_slang_typeof_operation_(&callOper->children[i], space, &argType, atoms)) { - slang_assembly_typeinfo_destruct(&argType); + slang_typeinfo_destruct(&argType); return GL_FALSE; } @@ -398,7 +398,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, callOper->children[i].children = child; } - slang_assembly_typeinfo_destruct(&argType); + slang_typeinfo_destruct(&argType); } if (dbg) { diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index d48113a14a..cfed54276d 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -230,7 +230,7 @@ slang_type_specifier_equal(const slang_type_specifier * x, GLboolean -slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) +slang_typeinfo_construct(slang_typeinfo * ti) { slang_type_specifier_ctr(&ti->spec); ti->array_len = 0; @@ -238,7 +238,7 @@ slang_assembly_typeinfo_construct(slang_assembly_typeinfo * ti) } GLvoid -slang_assembly_typeinfo_destruct(slang_assembly_typeinfo * ti) +slang_typeinfo_destruct(slang_typeinfo * ti) { slang_type_specifier_dtr(&ti->spec); } @@ -274,7 +274,7 @@ typeof_existing_function(const char *name, const slang_operation * params, GLboolean _slang_typeof_operation(const slang_assemble_ctx * A, const slang_operation * op, - slang_assembly_typeinfo * ti) + slang_typeinfo * ti) { return _slang_typeof_operation_(op, &A->space, ti, A->atoms); } @@ -291,7 +291,7 @@ _slang_typeof_operation(const slang_assemble_ctx * A, GLboolean _slang_typeof_operation_(const slang_operation * op, const slang_name_space * space, - slang_assembly_typeinfo * ti, + slang_typeinfo * ti, slang_atom_pool * atoms) { ti->can_be_referenced = GL_FALSE; @@ -415,30 +415,30 @@ _slang_typeof_operation_(const slang_operation * op, /*case slang_oper_complement: */ case slang_oper_subscript: { - slang_assembly_typeinfo _ti; + slang_typeinfo _ti; - if (!slang_assembly_typeinfo_construct(&_ti)) + if (!slang_typeinfo_construct(&_ti)) RETURN_NIL(); if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } ti->can_be_referenced = _ti.can_be_referenced; if (_ti.spec.type == slang_spec_array) { if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } } else { if (!_slang_type_is_vector(_ti.spec.type) && !_slang_type_is_matrix(_ti.spec.type)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_ERROR("cannot index a non-array type", 0); } ti->spec.type = _slang_type_base(_ti.spec.type); } - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); } break; case slang_oper_call: @@ -480,12 +480,12 @@ _slang_typeof_operation_(const slang_operation * op, break; case slang_oper_field: { - slang_assembly_typeinfo _ti; + slang_typeinfo _ti; - if (!slang_assembly_typeinfo_construct(&_ti)) + if (!slang_typeinfo_construct(&_ti)) RETURN_NIL(); if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } if (_ti.spec.type == slang_spec_struct) { @@ -494,11 +494,11 @@ _slang_typeof_operation_(const slang_operation * op, field = _slang_locate_variable(_ti.spec._struct->fields, op->a_id, GL_FALSE); if (field == NULL) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_NIL(); } ti->can_be_referenced = _ti.can_be_referenced; @@ -511,14 +511,14 @@ _slang_typeof_operation_(const slang_operation * op, /* determine the swizzle of the field expression */ #if 000 if (!_slang_type_is_vector(_ti.spec.type)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_ERROR("Can't swizzle scalar expression", 0); } #endif rows = _slang_type_dim(_ti.spec.type); swizzle = slang_atom_pool_id(atoms, op->a_id); if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); RETURN_ERROR("Bad swizzle", 0); } ti->is_swizzled = GL_TRUE; @@ -585,7 +585,7 @@ _slang_typeof_operation_(const slang_operation * op, break; } } - slang_assembly_typeinfo_destruct(&_ti); + slang_typeinfo_destruct(&_ti); } break; case slang_oper_postincrement: diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 267f9abe7b..71ed9b7a53 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -143,20 +143,20 @@ slang_type_specifier_equal(const slang_type_specifier *, const slang_type_specifier *); -typedef struct slang_assembly_typeinfo_ +typedef struct slang_typeinfo_ { GLboolean can_be_referenced; GLboolean is_swizzled; slang_swizzle swz; slang_type_specifier spec; GLuint array_len; -} slang_assembly_typeinfo; +} slang_typeinfo; extern GLboolean -slang_assembly_typeinfo_construct(slang_assembly_typeinfo *); +slang_typeinfo_construct(slang_typeinfo *); extern GLvoid -slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *); +slang_typeinfo_destruct(slang_typeinfo *); /** @@ -167,12 +167,12 @@ slang_assembly_typeinfo_destruct(slang_assembly_typeinfo *); extern GLboolean _slang_typeof_operation(const slang_assemble_ctx *, const struct slang_operation_ *, - slang_assembly_typeinfo *); + slang_typeinfo *); extern GLboolean _slang_typeof_operation_(const struct slang_operation_ *, const slang_name_space *, - slang_assembly_typeinfo *, slang_atom_pool *); + slang_typeinfo *, slang_atom_pool *); /** * Retrieves type of a function prototype, if one exists. -- cgit v1.2.3 From 0d1cd6d41c22836cf196e06656ae5f34e5148deb Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:31:21 -0700 Subject: s/SLANG_ASSEMBLE_TYPEINFO_H/SLANG_TYPEINFO_H/ --- src/mesa/shader/slang/slang_typeinfo.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 71ed9b7a53..2b565dfd24 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -22,8 +22,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SLANG_ASSEMBLE_TYPEINFO_H -#define SLANG_ASSEMBLE_TYPEINFO_H 1 +#ifndef SLANG_TYPEINFO_H +#define SLANG_TYPEINFO_H 1 #include "imports.h" #include "mtypes.h" @@ -199,6 +199,4 @@ extern GLuint _slang_type_dim(slang_type_specifier_type); - #endif - -- cgit v1.2.3 From 72c3672857b3ee4bed34d82ed70a1cf9cf277131 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:32:32 -0700 Subject: remove slang_asm_string() --- src/mesa/shader/slang/slang_print.c | 154 ------------------------------------ src/mesa/shader/slang/slang_print.h | 6 -- 2 files changed, 160 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index 0ebef81808..7cfd87fb62 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -631,160 +631,6 @@ slang_print_function(const slang_function *f, GLboolean body) -#if 0 - -const char * -slang_asm_string(slang_assembly_type t) -{ - switch (t) { - /* core */ - case slang_asm_none: - return "none"; - case slang_asm_float_copy: - return "float_copy"; - case slang_asm_float_move: - return "float_move"; - case slang_asm_float_push: - return "float_push"; - case slang_asm_float_deref: - return "float_deref"; - case slang_asm_float_add: - return "float_add"; - case slang_asm_float_multiply: - return "float_multiply"; - case slang_asm_float_divide: - return "float_divide"; - case slang_asm_float_negate: - return "float_negate"; - case slang_asm_float_less: - return "float_less"; - case slang_asm_float_equal_exp: - return "float_equal"; - case slang_asm_float_equal_int: - return "float_equal"; - case slang_asm_float_to_int: - return "float_to_int"; - case slang_asm_float_sine: - return "float_sine"; - case slang_asm_float_arcsine: - return "float_arcsine"; - case slang_asm_float_arctan: - return "float_arctan"; - case slang_asm_float_power: - return "float_power"; - case slang_asm_float_log2: - return "float_log2"; - case slang_asm_vec4_floor: - return "vec4_floor"; - case slang_asm_float_ceil: - return "float_ceil"; - case slang_asm_float_noise1: - return "float_noise1"; - case slang_asm_float_noise2: - return "float_noise2"; - case slang_asm_float_noise3: - return "float_noise3"; - case slang_asm_float_noise4: - return "float_noise4"; - case slang_asm_int_copy: - return "int_copy"; - case slang_asm_int_move: - return "int_move"; - case slang_asm_int_push: - return "int_push"; - case slang_asm_int_deref: - return "int_deref"; - case slang_asm_int_to_float: - return "int_to_float"; - case slang_asm_int_to_addr: - return "int_to_addr"; - case slang_asm_bool_copy: - return "bool_copy"; - case slang_asm_bool_move: - return "bool_move"; - case slang_asm_bool_push: - return "bool_push"; - case slang_asm_bool_deref: - return "bool_deref"; - case slang_asm_addr_copy: - return "addr_copy"; - case slang_asm_addr_push: - return "addr_push"; - case slang_asm_addr_deref: - return "addr_deref"; - case slang_asm_addr_add: - return "addr_add"; - case slang_asm_addr_multiply: - return "addr_multiply"; - case slang_asm_vec4_tex1d: - return "vec4_tex1d"; - case slang_asm_vec4_tex2d: - return "vec4_tex2d"; - case slang_asm_vec4_tex3d: - return "vec4_tex3d"; - case slang_asm_vec4_texcube: - return "vec4_texcube"; - case slang_asm_vec4_shad1d: - return "vec4_shad1d"; - case slang_asm_vec4_shad2d: - return "vec4_shad2d"; - case slang_asm_jump: - return "jump"; - case slang_asm_jump_if_zero: - return "jump_if_zero"; - case slang_asm_enter: - return "enter"; - case slang_asm_leave: - return "leave"; - case slang_asm_local_alloc: - return "local_alloc"; - case slang_asm_local_free: - return "local_free"; - case slang_asm_local_addr: - return "local_addr"; - case slang_asm_global_addr: - return "global_addr"; - case slang_asm_call: - return "call"; - case slang_asm_return: - return "return"; - case slang_asm_discard: - return "discard"; - case slang_asm_exit: - return "exit"; - /* GL_MESA_shader_debug */ - case slang_asm_float_print: - return "float_print"; - case slang_asm_int_print: - return "int_print"; - case slang_asm_bool_print: - return "bool_print"; - /* vec4 */ - case slang_asm_float_to_vec4: - return "float_to_vec4"; - case slang_asm_vec4_add: - return "vec4_add"; - case slang_asm_vec4_subtract: - return "vec4_subtract"; - case slang_asm_vec4_multiply: - return "vec4_multiply"; - case slang_asm_vec4_divide: - return "vec4_divide"; - case slang_asm_vec4_negate: - return "vec4_negate"; - case slang_asm_vec4_dot: - return "vec4_dot"; - case slang_asm_vec4_copy: - return "vec4_copy"; - case slang_asm_vec4_deref: - return "vec4_deref"; - case slang_asm_vec4_equal_int: - return "vec4_equal"; - default: - return "??asm??"; - } -} -#endif const char * diff --git a/src/mesa/shader/slang/slang_print.h b/src/mesa/shader/slang/slang_print.h index 81cf0a844e..46605c8061 100644 --- a/src/mesa/shader/slang/slang_print.h +++ b/src/mesa/shader/slang/slang_print.h @@ -9,12 +9,6 @@ slang_print_function(const slang_function *f, GLboolean body); extern void slang_print_tree(const slang_operation *op, int indent); - -#if 0 -extern const char * -slang_asm_string(slang_assembly_type t); -#endif - extern const char * slang_type_qual_string(slang_type_qualifier q); -- cgit v1.2.3 From 3f71282850d97e8493c505f178365ba305754ce9 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 15:33:16 -0700 Subject: remove unused field --- src/mesa/shader/slang/slang_compile.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 6e247d002c..e7be7ef069 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -75,9 +75,6 @@ typedef struct slang_code_object_ { slang_code_unit builtin[SLANG_BUILTIN_TOTAL]; slang_code_unit unit; -#if 0 - slang_assembly_file assembly; -#endif slang_var_pool varpool; slang_atom_pool atompool; } slang_code_object; -- cgit v1.2.3 From 9cfee527f6ff5ff3e4de43b46ef098cb86211d2d Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:08:45 -0700 Subject: remove multibyte chars --- src/mesa/shader/slang/slang_library_noise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_library_noise.c b/src/mesa/shader/slang/slang_library_noise.c index b30bb30ce2..46075c492c 100644 --- a/src/mesa/shader/slang/slang_library_noise.c +++ b/src/mesa/shader/slang/slang_library_noise.c @@ -24,7 +24,7 @@ /* * SimplexNoise1234 - * Copyright © 2003-2005, Stefan Gustavson + * Copyright (c) 2003-2005, Stefan Gustavson * * Contact: stegu@itn.liu.se */ @@ -395,7 +395,7 @@ GLfloat _slang_library_noise4 (GLfloat x, GLfloat y, GLfloat z, GLfloat w) /* To find out which of the 24 possible simplices we're in, we need to */ /* determine the magnitude ordering of x0, y0, z0 and w0. */ /* The method below is a good way of finding the ordering of x,y,z,w and */ - /* then find the correct traversal order for the simplex we’re in. */ + /* then find the correct traversal order for the simplex we're in. */ /* First, six pair-wise comparisons are performed between each possible pair */ /* of the four coordinates, and the results are used to add up binary bits */ /* for an integer index. */ -- cgit v1.2.3 From 1f9def3163e26310b688336ef6dd513b99506151 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:10:02 -0700 Subject: move _slang_locate_function() --- src/mesa/shader/slang/slang_codegen.c | 52 ---------------------------------- src/mesa/shader/slang/slang_typeinfo.c | 52 ++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_typeinfo.h | 3 +- 3 files changed, 53 insertions(+), 54 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 295292e076..17d1a6bb82 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1264,58 +1264,6 @@ _slang_first_function(struct slang_function_scope_ *scope, const char *name) -slang_function * -_slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, - const slang_operation * args, GLuint num_args, - const slang_name_space * space, - slang_atom_pool * atoms) -{ - GLuint i; - - for (i = 0; i < funcs->num_functions; i++) { - slang_function *f = &funcs->functions[i]; - const GLuint haveRetValue = _slang_function_has_return_value(f); - GLuint j; - - if (a_name != f->header.a_name) - continue; - if (f->param_count - haveRetValue != num_args) - continue; - - /* compare parameter / argument types */ - for (j = 0; j < num_args; j++) { - slang_typeinfo ti; - - if (!slang_typeinfo_construct(&ti)) - return NULL; - if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { - slang_typeinfo_destruct(&ti); - return NULL; - } - if (!slang_type_specifier_equal(&ti.spec, - &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { - slang_typeinfo_destruct(&ti); - break; - } - slang_typeinfo_destruct(&ti); - - /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ - if (!ti.can_be_referenced && - (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out || - f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout)) - break; - } - if (j == num_args) - return f; - } - if (funcs->outer_scope != NULL) - return _slang_locate_function(funcs->outer_scope, a_name, args, - num_args, space, atoms); - return NULL; -} - - - /** * Assemble a function call, given a particular function name. * \param name the function's name (operators like '*' are possible). diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index cfed54276d..8bedb40435 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -604,6 +604,58 @@ _slang_typeof_operation_(const slang_operation * op, +slang_function * +_slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, + const slang_operation * args, GLuint num_args, + const slang_name_space * space, + slang_atom_pool * atoms) +{ + GLuint i; + + for (i = 0; i < funcs->num_functions; i++) { + slang_function *f = &funcs->functions[i]; + const GLuint haveRetValue = _slang_function_has_return_value(f); + GLuint j; + + if (a_name != f->header.a_name) + continue; + if (f->param_count - haveRetValue != num_args) + continue; + + /* compare parameter / argument types */ + for (j = 0; j < num_args; j++) { + slang_typeinfo ti; + + if (!slang_typeinfo_construct(&ti)) + return NULL; + if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { + slang_typeinfo_destruct(&ti); + return NULL; + } + if (!slang_type_specifier_equal(&ti.spec, + &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { + slang_typeinfo_destruct(&ti); + break; + } + slang_typeinfo_destruct(&ti); + + /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ + if (!ti.can_be_referenced && + (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out || + f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout)) + break; + } + if (j == num_args) + return f; + } + if (funcs->outer_scope != NULL) + return _slang_locate_function(funcs->outer_scope, a_name, args, + num_args, space, atoms); + return NULL; +} + + + /** * Determine the return type of a function. * \param a_name the function name diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 2b565dfd24..6e27079ff8 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -58,15 +58,14 @@ typedef struct slang_assemble_ctx_ { slang_atom_pool *atoms; slang_name_space space; - slang_swizzle swz; struct gl_program *program; slang_var_table *vartable; - struct slang_function_ *CurFunction; slang_atom CurLoopBreak; slang_atom CurLoopCont; } slang_assemble_ctx; + extern struct slang_function_ * _slang_locate_function(const struct slang_function_scope_ *funcs, slang_atom name, const struct slang_operation_ *params, -- cgit v1.2.3 From e1b47b68ecd4a91ec46f594d8dfbcbcabae87988 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:12:20 -0700 Subject: reformat, clean-up comments --- src/mesa/shader/slang/slang_storage.h | 94 +++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index c7380ebb60..5d756b5216 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -28,21 +28,21 @@ #include "slang_compile.h" #include "slang_typeinfo.h" -#if defined __cplusplus -extern "C" { -#endif /* - * Program variable data storage is kept completely transparent to the front-end compiler. It is - * up to the back-end how the data is actually allocated. The slang_storage_type enum - * provides the basic information about how the memory is interpreted. This abstract piece - * of memory is called a data slot. A data slot of a particular type has a fixed size. + * Program variable data storage is kept completely transparent to the + * front-end compiler. It is up to the back-end how the data is + * actually allocated. The slang_storage_type enum provides the basic + * information about how the memory is interpreted. This abstract + * piece of memory is called a data slot. A data slot of a particular + * type has a fixed size. * - * For now, only the three basic types are supported, that is bool, int and float. Other built-in - * types like vector or matrix can easily be decomposed into a series of basic types. + * For now, only the three basic types are supported, that is bool, + * int and float. Other built-in types like vector or matrix can + * easily be decomposed into a series of basic types. * - * If the vec4 module is enabled, 4-component vectors of floats are used when possible. 4x4 matrices - * are constructed of 4 vec4 slots. + * If the vec4 module is enabled, 4-component vectors of floats are + * used when possible. 4x4 matrices are constructed of 4 vec4 slots. */ typedef enum slang_storage_type_ { @@ -55,42 +55,50 @@ typedef enum slang_storage_type_ slang_stor_vec4 } slang_storage_type; -/* - * The slang_storage_array structure groups data slots of the same type into an array. This - * array has a fixed length. Arrays are required to have a size equal to the sum of sizes of its - * elements. They are also required to support indirect addressing. That is, if B references - * first data slot in the array, S is the size of the data slot and I is the integral index that - * is not known at compile time, B+I*S references I-th data slot. + +/** + * The slang_storage_array structure groups data slots of the same + * type into an array. This array has a fixed length. Arrays are + * required to have a size equal to the sum of sizes of its + * elements. They are also required to support indirect + * addressing. That is, if B references first data slot in the array, + * S is the size of the data slot and I is the integral index that is + * not known at compile time, B+I*S references I-th data slot. * - * This structure is also used to break down built-in data types that are not supported directly. - * Vectors, like vec3, are constructed from arrays of their basic types. Matrices are formed of - * an array of column vectors, which are in turn processed as other vectors. + * This structure is also used to break down built-in data types that + * are not supported directly. Vectors, like vec3, are constructed + * from arrays of their basic types. Matrices are formed of an array + * of column vectors, which are in turn processed as other vectors. */ typedef struct slang_storage_array_ { - slang_storage_type type; - struct slang_storage_aggregate_ *aggregate; /* slang_stor_aggregate */ - GLuint length; + slang_storage_type type; + struct slang_storage_aggregate_ *aggregate; + GLuint length; } slang_storage_array; GLboolean slang_storage_array_construct (slang_storage_array *); GLvoid slang_storage_array_destruct (slang_storage_array *); -/* - * The slang_storage_aggregate structure relaxes the indirect addressing requirement for - * slang_storage_array structure. Aggregates are always accessed statically - its member - * addresses are well-known at compile time. For example, user-defined types are implemented as - * aggregates. Aggregates can collect data of a different type. + +/** + * The slang_storage_aggregate structure relaxes the indirect + * addressing requirement for slang_storage_array + * structure. Aggregates are always accessed statically - its member + * addresses are well-known at compile time. For example, user-defined + * types are implemented as aggregates. Aggregates can collect data of + * a different type. */ typedef struct slang_storage_aggregate_ { - slang_storage_array *arrays; - GLuint count; + slang_storage_array *arrays; + GLuint count; } slang_storage_aggregate; GLboolean slang_storage_aggregate_construct (slang_storage_aggregate *); GLvoid slang_storage_aggregate_destruct (slang_storage_aggregate *); + extern GLboolean _slang_aggregate_variable(slang_storage_aggregate *agg, slang_type_specifier *spec, @@ -98,9 +106,6 @@ _slang_aggregate_variable(slang_storage_aggregate *agg, slang_function_scope *funcs, slang_struct_scope *structs, slang_variable_scope *vars, -#if 0 - slang_assembly_file *file, -#endif slang_atom_pool *atoms); /* @@ -111,23 +116,24 @@ _slang_aggregate_variable(slang_storage_aggregate *agg, extern GLuint _slang_sizeof_type (slang_storage_type); -/* + +/** * Returns total size (in machine units) of the given aggregate. * Returns 0 on error. */ -GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *); +extern GLuint +_slang_sizeof_aggregate (const slang_storage_aggregate *); -/* - * Converts structured aggregate to a flat one, with arrays of generic type being - * one-element long. - * Returns GL_TRUE on success. - * Returns GL_FALSE otherwise. + +/** + * Converts structured aggregate to a flat one, with arrays of generic + * type being one-element long. Returns GL_TRUE on success. Returns + * GL_FALSE otherwise. */ -GLboolean _slang_flatten_aggregate (slang_storage_aggregate *, const slang_storage_aggregate *); +extern GLboolean +_slang_flatten_aggregate (slang_storage_aggregate *, + const slang_storage_aggregate *); -#ifdef __cplusplus -} -#endif #endif -- cgit v1.2.3 From d9dbb3e15442635df10333fbf31dbede0ce2797a Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:14:55 -0700 Subject: remove slang_export.[ch] --- src/mesa/shader/slang/slang_export.c | 386 ----------------------------------- src/mesa/shader/slang/slang_export.h | 183 ----------------- 2 files changed, 569 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_export.c delete mode 100644 src/mesa/shader/slang/slang_export.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_export.c b/src/mesa/shader/slang/slang_export.c deleted file mode 100644 index 9620ef0790..0000000000 --- a/src/mesa/shader/slang/slang_export.c +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file slang_export.c - * interface between assembly code and the application - * \author Michal Krol - */ - -#include "imports.h" -#include "slang_export.h" - -/* - * slang_export_data_quant - */ - -GLvoid slang_export_data_quant_ctr (slang_export_data_quant *self) -{ - self->name = SLANG_ATOM_NULL; - self->size = 0; - self->array_len = 0; - self->structure = NULL; - self->u.basic_type = GL_FLOAT; -} - -GLvoid slang_export_data_quant_dtr (slang_export_data_quant *self) -{ - if (self->structure != NULL) - { - GLuint i; - - for (i = 0; i < self->u.field_count; i++) - slang_export_data_quant_dtr (&self->structure[i]); - slang_alloc_free (self->structure); - } -} - -slang_export_data_quant *slang_export_data_quant_add_field (slang_export_data_quant *self) -{ - const GLuint n = self->u.field_count; - - self->structure = (slang_export_data_quant *) slang_alloc_realloc (self->structure, - n * sizeof (slang_export_data_quant), (n + 1) * sizeof (slang_export_data_quant)); - if (self->structure == NULL) - return NULL; - slang_export_data_quant_ctr (&self->structure[n]); - self->u.field_count++; - return &self->structure[n]; -} - -GLboolean slang_export_data_quant_array (slang_export_data_quant *self) -{ - return self->array_len != 0; -} - -GLboolean slang_export_data_quant_struct (slang_export_data_quant *self) -{ - return self->structure != NULL; -} - -GLboolean slang_export_data_quant_simple (slang_export_data_quant *self) -{ - return self->array_len == 0 && self->structure == NULL; -} - -GLenum slang_export_data_quant_type (slang_export_data_quant *self) -{ - assert (self->structure == NULL); - return self->u.basic_type; -} - -GLuint slang_export_data_quant_fields (slang_export_data_quant *self) -{ - assert (self->structure != NULL); - return self->u.field_count; -} - -GLuint slang_export_data_quant_elements (slang_export_data_quant *self) -{ - if (self->array_len == 0) - return 1; - return self->array_len; -} - -GLuint slang_export_data_quant_components (slang_export_data_quant *self) -{ - return self->size / 4; -} - -GLuint slang_export_data_quant_size (slang_export_data_quant *self) -{ - return self->size; -} - -/* - * slang_export_data_entry - */ - -GLvoid slang_export_data_entry_ctr (slang_export_data_entry *self) -{ - slang_export_data_quant_ctr (&self->quant); - self->access = slang_exp_uniform; - self->address = ~0; -} - -GLvoid slang_export_data_entry_dtr (slang_export_data_entry *self) -{ - slang_export_data_quant_dtr (&self->quant); -} - -/* - * slang_export_data_table - */ - -GLvoid slang_export_data_table_ctr (slang_export_data_table *self) -{ - self->entries = NULL; - self->count = 0; - self->atoms = NULL; -} - -GLvoid slang_export_data_table_dtr (slang_export_data_table *self) -{ - if (self->entries != NULL) - { - GLuint i; - - for (i = 0; i < self->count; i++) - slang_export_data_entry_dtr (&self->entries[i]); - slang_alloc_free (self->entries); - } -} - -slang_export_data_entry *slang_export_data_table_add (slang_export_data_table *self) -{ - const GLuint n = self->count; - - self->entries = (slang_export_data_entry *) slang_alloc_realloc (self->entries, - n * sizeof (slang_export_data_entry), (n + 1) * sizeof (slang_export_data_entry)); - if (self->entries == NULL) - return NULL; - slang_export_data_entry_ctr (&self->entries[n]); - self->count++; - return &self->entries[n]; -} - -/* - * slang_export_code_entry - */ - -static GLvoid slang_export_code_entry_ctr (slang_export_code_entry *self) -{ - self->name = SLANG_ATOM_NULL; - self->address = ~0; -} - -static GLvoid slang_export_code_entry_dtr (slang_export_code_entry *self) -{ -} - -/* - * slang_export_code_table - */ - -GLvoid slang_export_code_table_ctr (slang_export_code_table *self) -{ - self->entries = NULL; - self->count = 0; - self->atoms = NULL; -} - -GLvoid slang_export_code_table_dtr (slang_export_code_table *self) -{ - if (self->entries != NULL) - { - GLuint i; - - for (i = 0; i < self->count; i++) - slang_export_code_entry_dtr (&self->entries[i]); - slang_alloc_free (self->entries); - } -} - -slang_export_code_entry *slang_export_code_table_add (slang_export_code_table *self) -{ - const GLuint n = self->count; - - self->entries = (slang_export_code_entry *) slang_alloc_realloc (self->entries, - n * sizeof (slang_export_code_entry), (n + 1) * sizeof (slang_export_code_entry)); - if (self->entries == NULL) - return NULL; - slang_export_code_entry_ctr (&self->entries[n]); - self->count++; - return &self->entries[n]; -} - -/* - * _slang_find_exported_data() - */ - -#define EXTRACT_ERROR 0 -#define EXTRACT_BASIC 1 -#define EXTRACT_ARRAY 2 -#define EXTRACT_STRUCT 3 -#define EXTRACT_STRUCT_ARRAY 4 - -#define EXTRACT_MAXLEN 255 - -static GLuint extract_name (const char *name, char *parsed, GLuint *element, const char **end) -{ - GLuint i; - - if ((name[0] >= 'a' && name[0] <= 'z') || (name[0] >= 'A' && name[0] <= 'Z') || name[0] == '_') - { - parsed[0] = name[0]; - - for (i = 1; i < EXTRACT_MAXLEN; i++) - { - if ((name[i] >= 'a' && name[i] <= 'z') || (name[i] >= 'A' && name[i] <= 'Z') || - (name[i] >= '0' && name[i] <= '9') || name[0] == '_') - { - parsed[i] = name[i]; - } - else - { - if (name[i] == '\0') - { - parsed[i] = '\0'; - return EXTRACT_BASIC; - } - if (name[i] == '.') - { - parsed[i] = '\0'; - *end = &name[i + 1]; - return EXTRACT_STRUCT; - } - if (name[i] == '[') - { - parsed[i] = '\0'; - i++; - if (name[i] >= '0' && name[i] <= '9') - { - *element = name[i] - '0'; - for (i++; ; i++) - { - if (name[i] >= '0' && name[i] <= '9') - *element = *element * 10 + (name[i] - '0'); - else - { - if (name[i] == ']') - { - i++; - if (name[i] == '.') - { - *end = &name[i + 1]; - return EXTRACT_STRUCT_ARRAY; - } - *end = &name[i]; - return EXTRACT_ARRAY; - } - break; - } - } - } - } - break; - } - } - } - return EXTRACT_ERROR; -} - -static GLboolean validate_extracted (slang_export_data_quant *q, GLuint element, GLuint extr) -{ - switch (extr) - { - case EXTRACT_BASIC: - return GL_TRUE; - case EXTRACT_ARRAY: - return element < slang_export_data_quant_elements (q); - case EXTRACT_STRUCT: - return slang_export_data_quant_struct (q); - case EXTRACT_STRUCT_ARRAY: - return slang_export_data_quant_struct (q) && element < slang_export_data_quant_elements (q); - } - return GL_FALSE; -} - -static GLuint calculate_offset (slang_export_data_quant *q, GLuint element) -{ - if (slang_export_data_quant_array (q)) - return element * slang_export_data_quant_size (q); - return 0; -} - -static GLboolean find_exported_data (slang_export_data_quant *q, const char *name, - slang_export_data_quant **quant, GLuint *offset, slang_atom_pool *atoms) -{ - char parsed[EXTRACT_MAXLEN]; - GLuint result, element, i; - const char *end; - slang_atom atom; - const GLuint fields = slang_export_data_quant_fields (q); - - result = extract_name (name, parsed, &element, &end); - if (result == EXTRACT_ERROR) - return GL_FALSE; - - atom = slang_atom_pool_atom (atoms, parsed); - if (atom == SLANG_ATOM_NULL) - return GL_FALSE; - - for (i = 0; i < fields; i++) - if (q->structure[i].name == atom) - { - if (!validate_extracted (&q->structure[i], element, result)) - return GL_FALSE; - *offset += calculate_offset (&q->structure[i], element); - if (result == EXTRACT_BASIC || result == EXTRACT_ARRAY) - { - if (*end != '\0') - return GL_FALSE; - *quant = &q->structure[i]; - return GL_TRUE; - } - return find_exported_data (&q->structure[i], end, quant, offset, atoms); - } - return GL_FALSE; -} - -GLboolean _slang_find_exported_data (slang_export_data_table *table, const char *name, - slang_export_data_entry **entry, slang_export_data_quant **quant, GLuint *offset) -{ - char parsed[EXTRACT_MAXLEN]; - GLuint result, element, i; - const char *end; - slang_atom atom; - - result = extract_name (name, parsed, &element, &end); - if (result == EXTRACT_ERROR) - return GL_FALSE; - - atom = slang_atom_pool_atom (table->atoms, parsed); - if (atom == SLANG_ATOM_NULL) - return GL_FALSE; - - for (i = 0; i < table->count; i++) - if (table->entries[i].quant.name == atom) - { - if (!validate_extracted (&table->entries[i].quant, element, result)) - return GL_FALSE; - *entry = &table->entries[i]; - *offset = calculate_offset (&table->entries[i].quant, element); - if (result == EXTRACT_BASIC || result == EXTRACT_ARRAY) - { - if (*end != '\0') - return GL_FALSE; - *quant = &table->entries[i].quant; - return GL_TRUE; - } - return find_exported_data (&table->entries[i].quant, end, quant, offset, table->atoms); - } - return GL_FALSE; -} - diff --git a/src/mesa/shader/slang/slang_export.h b/src/mesa/shader/slang/slang_export.h deleted file mode 100644 index 40ceac19e1..0000000000 --- a/src/mesa/shader/slang/slang_export.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#if !defined SLANG_EXPORT_H -#define SLANG_EXPORT_H - -#include "slang_utility.h" - -#if defined __cplusplus -extern "C" { -#endif - -/* - * Basic data quantity to transfer between application and assembly. - * The is the actual size of the data quantity including padding, if any. It is - * used to calculate offsets from the beginning of the data. - * If the is not 0, the data quantity is an array of size. - * If the is not NULL, the data quantity is a struct. The is - * invalid and the holds the size of the array. - * The values match those of parameter for glGetActiveUniformARB. - */ - -typedef struct slang_export_data_quant_ -{ - slang_atom name; - GLuint size; - GLuint array_len; - struct slang_export_data_quant_ *structure; - union - { - GLenum basic_type; - GLuint field_count; - } u; -} slang_export_data_quant; - -GLvoid slang_export_data_quant_ctr (slang_export_data_quant *); -GLvoid slang_export_data_quant_dtr (slang_export_data_quant *); -slang_export_data_quant *slang_export_data_quant_add_field (slang_export_data_quant *); - -/* - * Returns GL_FALSE if the quant is not an array. - */ -GLboolean slang_export_data_quant_array (slang_export_data_quant *); - -/* - * Returns GL_FALSE if the quant is not a structure. - */ -GLboolean slang_export_data_quant_struct (slang_export_data_quant *); - -/* - * Returns GL_TRUE if the quant is neither an array nor a structure. - */ -GLboolean slang_export_data_quant_simple (slang_export_data_quant *); - -/* - * Returns basic type of the quant. It must not be a structure. - */ -GLenum slang_export_data_quant_type (slang_export_data_quant *); - -/* - * Returns number of fields in the quant that is a structure. - */ -GLuint slang_export_data_quant_fields (slang_export_data_quant *); - -/* - * Return number of elements in the quant. - * For arrays, return the size of the array. - * Otherwise, return 1. - */ -GLuint slang_export_data_quant_elements (slang_export_data_quant *); - -/* - * Returns total number of components withing the quant element. - */ -GLuint slang_export_data_quant_components (slang_export_data_quant *); - -/* - * Returns size of the quant element. - */ -GLuint slang_export_data_quant_size (slang_export_data_quant *); - -/* - * Data access pattern. Specifies how data is accessed at what frequency. - */ - -typedef enum -{ - slang_exp_uniform, - slang_exp_varying, - slang_exp_attribute -} slang_export_data_access; - -/* - * Data export entry. Holds the data type information, access pattern and base address. - */ - -typedef struct -{ - slang_export_data_quant quant; - slang_export_data_access access; - GLuint address; -} slang_export_data_entry; - -GLvoid slang_export_data_entry_ctr (slang_export_data_entry *); -GLvoid slang_export_data_entry_dtr (slang_export_data_entry *); - -/* - * Data export table. - */ - -typedef struct -{ - slang_export_data_entry *entries; - GLuint count; - slang_atom_pool *atoms; -} slang_export_data_table; - -GLvoid slang_export_data_table_ctr (slang_export_data_table *); -GLvoid slang_export_data_table_dtr (slang_export_data_table *); -slang_export_data_entry *slang_export_data_table_add (slang_export_data_table *); - -/* - * Code export entry. Contains label name and its entry point (label, address). - */ - -typedef struct -{ - slang_atom name; - GLuint address; -} slang_export_code_entry; - -/* - * Code export table. - */ - -typedef struct -{ - slang_export_code_entry *entries; - GLuint count; - slang_atom_pool *atoms; -} slang_export_code_table; - -GLvoid slang_export_code_table_ctr (slang_export_code_table *); -GLvoid slang_export_code_table_dtr (slang_export_code_table *); -slang_export_code_entry *slang_export_code_table_add (slang_export_code_table *); - -/* - * _slang_find_exported_data() - * - * Parses the name string and returns corresponding data entry, data quantity and offset. - * Returns GL_TRUE if the data is found, returns GL_FALSE otherwise. - */ - -GLboolean _slang_find_exported_data (slang_export_data_table *, const char *, - slang_export_data_entry **, slang_export_data_quant **, GLuint *); - -#ifdef __cplusplus -} -#endif - -#endif - -- cgit v1.2.3 From 4bbef7a6442bfecb6291e981c3a42eda83faa9c2 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:38:00 -0700 Subject: remove slang_builtin_vec4.gc --- .../shader/slang/library/slang_builtin_vec4.gc | 216 --------------------- 1 file changed, 216 deletions(-) delete mode 100644 src/mesa/shader/slang/library/slang_builtin_vec4.gc (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_builtin_vec4.gc b/src/mesa/shader/slang/library/slang_builtin_vec4.gc deleted file mode 100644 index f075a886bd..0000000000 --- a/src/mesa/shader/slang/library/slang_builtin_vec4.gc +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -// -// This file overrides most of the standard built-in functions that operate on vec4 data type. -// This file also overrides most commonly used functions that do not neccessarily operate -// on vec4 data type, like dot(vec3,vec3). Those are adapted to vec4 instructions and are believed -// to execute faster. -// This file replaces parts of the core.gc and common.gc, so it must be included somewhere after -// the common.gc file. -// -// Assembly instructions required: -// float_to_vec4 -// vec4_add -// vec4_subtract -// vec4_multiply -// vec4_divide -// vec4_negate -// vec4_dot -// - - -vec4 __constructor (const float f) { - vec4 v; - __asm float_to_vec4 v, f; - return v; -} - - -void __operator += (inout vec4 v, const vec4 u) { - __asm vec4_add v, u; -} - -void __operator -= (inout vec4 v, const vec4 u) { - __asm vec4_subtract v, u; -} - -void __operator *= (inout vec4 v, const vec4 u) { - __asm vec4_multiply v, u; -} - -void __operator /= (inout vec4 v, const vec4 u) { - __asm vec4_divide v, u; -} - - -void __operator += (inout vec4 v, const float a) { - vec4 u; - __asm float_to_vec4 u, a; - __asm vec4_add v, u; -} - -void __operator -= (inout vec4 v, const float a) { - vec4 u; - __asm float_to_vec4 u, a; - __asm vec4_subtract v, u; -} - -void __operator *= (inout vec4 v, const float a) { - vec4 u; - __asm float_to_vec4 u, a; - __asm vec4_multiply v, u; -} - -void __operator /= (inout vec4 v, const float a) { - vec4 u; - __asm float_to_vec4 u, a; - __asm vec4_divide v, u; -} - - -vec4 __operator + (vec4 v, const vec4 u) { - __asm vec4_add v, u; - return v; -} - -vec4 __operator - (vec4 v, const vec4 u) { - __asm vec4_subtract v, u; - return v; -} - -vec4 __operator * (vec4 v, const vec4 u) { - __asm vec4_multiply v, u; - return v; -} - -vec4 __operator / (vec4 v, const vec4 u) { - __asm vec4_divide v, u; - return v; -} - - -vec4 __operator + (const float a, const vec4 u) { - vec4 v; - __asm float_to_vec4 v, a; - __asm vec4_add v, u; - return v; -} - -vec4 __operator + (const vec4 v, const float b) { - vec4 u; - __asm float_to_vec4 u, b; - __asm vec4_add u, v; - return u; -} - -vec4 __operator - (const float a, const vec4 u) { - vec4 v; - __asm float_to_vec4 v, a; - __asm vec4_subtract v, u; - return v; -} - -vec4 __operator - (vec4 v, const float b) { - vec4 u; - __asm float_to_vec4 u, b; - __asm vec4_subtract v, u; - return v; -} - -vec4 __operator * (const float a, const vec4 u) { - vec4 v; - __asm float_to_vec4 v, a; - __asm vec4_multiply v, u; - return v; -} - -vec4 __operator * (const vec4 v, const float b) { - vec4 u; - __asm float_to_vec4 u, b; - __asm vec4_multiply u, v; - return u; -} - -vec4 __operator / (const float a, const vec4 u) { - vec4 v; - __asm float_to_vec4 v, a; - __asm vec4_divide v, u; - return v; -} - -vec4 __operator / (vec4 v, const float b) { - vec4 u; - __asm float_to_vec4 u, b; - __asm vec4_divide v, u; - return v; -} - - -vec4 __operator - (vec4 v) { - __asm vec4_negate v; - return v; -} - - -float dot (vec3 v, vec3 u) { - vec4 v4 = vec4 (v, 0.0); - vec4 u4 = vec4 (u, 0.0); - __asm vec4_dot v4, u4; - return v4.x; -} - -//float dot (vec4 v, vec4 u) { -// __asm vec4_dot v, u; -// return v.x; -//} - - -float length (vec3 v) { - vec4 u = vec4 (v, 0.0); - __asm vec4_dot u, u; - return sqrt (u.x); -} - -float length (vec4 v) { - __asm vec4_dot v, v; - return sqrt (v.x); -} - - -vec3 normalize (vec3 v) -{ - float s = inversesqrt(dot(v,v)); - __retVal = v * s; -} - -vec4 normalize (vec4 v) { - vec4 w = v; - __asm vec4_dot v, v; - float l = sqrt (v.x); - __asm float_to_vec4 v, l; - __asm vec4_divide w, v; - return w; -} - -- cgit v1.2.3 From b4f38a4d60bec9ceb68cc62546be0f418351fc23 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:38:04 -0700 Subject: remove slang_builtin_vec4.gc --- src/mesa/shader/slang/library/Makefile | 6 +-- .../shader/slang/library/slang_builtin_vec4_gc.h | 58 ---------------------- 2 files changed, 1 insertion(+), 63 deletions(-) delete mode 100644 src/mesa/shader/slang/library/slang_builtin_vec4_gc.h (limited to 'src') diff --git a/src/mesa/shader/slang/library/Makefile b/src/mesa/shader/slang/library/Makefile index 67c00398e3..dc67b59088 100644 --- a/src/mesa/shader/slang/library/Makefile +++ b/src/mesa/shader/slang/library/Makefile @@ -21,7 +21,7 @@ clean: syntax: slang_pp_directives_syn.h slang_pp_expression_syn.h slang_shader_syn.h slang_pp_version_syn.h -builtin: builtin_110 builtin_120 builtin_vec4 +builtin: builtin_110 builtin_120 # # executables @@ -57,7 +57,6 @@ builtin_110: slang_common_builtin_gc.h slang_core_gc.h slang_fragment_builtin_gc builtin_120: slang_120_core_gc.h slang_builtin_120_common_gc.h slang_builtin_120_fragment_gc.h -builtin_vec4: slang_builtin_vec4_gc.h slang_120_core_gc.h: gc_to_bin slang_120_core.gc ./gc_to_bin 1 slang_120_core.gc slang_120_core_gc.h @@ -68,9 +67,6 @@ slang_builtin_120_common_gc.h: gc_to_bin slang_builtin_120_common.gc slang_builtin_120_fragment_gc.h: gc_to_bin slang_builtin_120_fragment.gc ./gc_to_bin 1 slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h -slang_builtin_vec4_gc.h: gc_to_bin slang_builtin_vec4.gc - ./gc_to_bin 1 slang_builtin_vec4.gc slang_builtin_vec4_gc.h - slang_common_builtin_gc.h: gc_to_bin slang_common_builtin.gc ./gc_to_bin 1 slang_common_builtin.gc slang_common_builtin_gc.h diff --git a/src/mesa/shader/slang/library/slang_builtin_vec4_gc.h b/src/mesa/shader/slang/library/slang_builtin_vec4_gc.h deleted file mode 100644 index 081bb6fa56..0000000000 --- a/src/mesa/shader/slang/library/slang_builtin_vec4_gc.h +++ /dev/null @@ -1,58 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_builtin_vec4.gc */ - -3,1,0,12,1,1,1,0,9,102,0,0,0,1,3,2,0,12,1,118,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99, -52,0,18,118,0,0,18,102,0,0,0,8,18,118,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, -101,99,52,95,97,100,100,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0, -1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12, -118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, -117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,100,105,118,105,100, -101,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,12,1,117,0,0,0, -4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,117,0,0,18,97,0,0,0,4,118,101,99,52,95,97, -100,100,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,12,1,117,0, -0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,117,0,0,18,97,0,0,0,4,118,101,99,52,95, -115,117,98,116,114,97,99,116,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0, -0,1,3,2,0,12,1,117,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,117,0,0,18,97,0,0,0, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12, -118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,12,1,117,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0, -18,117,0,0,18,97,0,0,0,4,118,101,99,52,95,100,105,118,105,100,101,0,18,118,0,0,18,117,0,0,0,0,1,0, -12,2,26,1,0,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,117,0, -0,0,8,18,118,0,0,0,1,0,12,2,27,1,0,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,118,0,0,18,117,0,0,0,8,18,118,0,0,0,1,0,12,2,21,1,0,0,12,118,0,0,1,1,0,12, -117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,117,0,0,0,8,18,118, -0,0,0,1,0,12,2,22,1,0,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,100,105,118,105,100,101, -0,18,118,0,0,18,117,0,0,0,8,18,118,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12, -1,118,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,118,0,0,18,97,0,0,0,4,118,101,99, -52,95,97,100,100,0,18,118,0,0,18,117,0,0,0,8,18,118,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98, -0,0,0,1,3,2,0,12,1,117,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,117,0,0,18,98,0, -0,0,4,118,101,99,52,95,97,100,100,0,18,117,0,0,18,118,0,0,0,8,18,117,0,0,0,1,0,12,2,27,1,1,0,9,97, -0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,118,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0, -18,118,0,0,18,97,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,117,0,0,0,8, -18,118,0,0,0,1,0,12,2,27,1,0,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,12,1,117,0,0,0,4,102,108,111,97, -116,95,116,111,95,118,101,99,52,0,18,117,0,0,18,98,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,118,0,0,18,117,0,0,0,8,18,118,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3, -2,0,12,1,118,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,118,0,0,18,97,0,0,0,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,117,0,0,0,8,18,118,0,0,0,1,0,12,2,21, -1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,12,1,117,0,0,0,4,102,108,111,97,116,95,116,111,95,118, -101,99,52,0,18,117,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,117,0,0, -18,118,0,0,0,8,18,117,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,118,0,0,0,4, -102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,118,0,0,18,97,0,0,0,4,118,101,99,52,95,100,105, -118,105,100,101,0,18,118,0,0,18,117,0,0,0,8,18,118,0,0,0,1,0,12,2,22,1,0,0,12,118,0,0,1,1,0,9,98,0, -0,0,1,3,2,0,12,1,117,0,0,0,4,102,108,111,97,116,95,116,111,95,118,101,99,52,0,18,117,0,0,18,98,0,0, -0,4,118,101,99,52,95,100,105,118,105,100,101,0,18,118,0,0,18,117,0,0,0,8,18,118,0,0,0,1,0,12,2,27, -1,0,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,118,0,0,0,8,18,118,0,0,0,1,0,9, -0,100,111,116,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,3,2,0,12,1,118,52,0,2,58,118,101,99,52,0,18, -118,0,0,17,48,0,48,0,0,0,0,0,0,3,2,0,12,1,117,52,0,2,58,118,101,99,52,0,18,117,0,0,17,48,0,48,0,0, -0,0,0,0,4,118,101,99,52,95,100,111,116,0,18,118,52,0,0,18,117,52,0,0,0,8,18,118,52,0,59,120,0,0,0, -1,0,9,0,108,101,110,103,116,104,0,1,0,0,11,118,0,0,0,1,3,2,0,12,1,117,0,2,58,118,101,99,52,0,18, -118,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,100,111,116,0,18,117,0,0,18,117,0,0,0,8,58,115, -113,114,116,0,18,117,0,59,120,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,12,118,0,0,0,1,4, -118,101,99,52,95,100,111,116,0,18,118,0,0,18,118,0,0,0,8,58,115,113,114,116,0,18,118,0,59,120,0,0, -0,0,0,1,0,11,0,110,111,114,109,97,108,105,122,101,0,1,0,0,11,118,0,0,0,1,3,2,0,9,1,115,0,2,58,105, -110,118,101,114,115,101,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,18,115,0,48,20,0,0,1,0,12,0,110,111,114,109,97,108,105,122,101, -0,1,0,0,12,118,0,0,0,1,3,2,0,12,1,119,0,2,18,118,0,0,0,4,118,101,99,52,95,100,111,116,0,18,118,0,0, -18,118,0,0,0,3,2,0,9,1,108,0,2,58,115,113,114,116,0,18,118,0,59,120,0,0,0,0,0,4,102,108,111,97,116, -95,116,111,95,118,101,99,52,0,18,118,0,0,18,108,0,0,0,4,118,101,99,52,95,100,105,118,105,100,101,0, -18,119,0,0,18,118,0,0,0,8,18,119,0,0,0,0 -- cgit v1.2.3 From 31d2a0019249256705ae00984e80b5d768fd3a73 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:41:52 -0700 Subject: clean-ups --- src/mesa/shader/slang/slang_compile.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 2f4d458b36..619fe50ce5 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1472,7 +1472,6 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, return 0; } -#if 111 /* if the function returns a value, append a hidden __retVal 'out' * parameter that corresponds to the return value. */ @@ -1484,7 +1483,6 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, p->type = func->header.type; p->type.qualifier = slang_qual_out; } -#endif /* function formal parameters and local variables share the same * scope, so save the information about param count in a seperate @@ -1654,7 +1652,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (!parse_expression(C, O, var->initializer)) return 0; break; -#if 0 case VARIABLE_ARRAY_UNKNOWN: /* unsized array - mark it as array and copy the specifier to the array element @@ -1662,7 +1659,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (!convert_to_array(C, var, &type->specifier)) return GL_FALSE; break; -#endif case VARIABLE_ARRAY_EXPLICIT: if (!convert_to_array(C, var, &type->specifier)) return GL_FALSE; @@ -1673,20 +1669,17 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, return 0; } -#if 1 + /* emit code for global var decl */ if (C->global_scope) { slang_assemble_ctx A; - A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; A.space.vars = O->vars; A.program = O->program; A.vartable = O->vartable; - _slang_codegen_global_variable(&A, var, C->type); } -#endif /* allocate global address space for a variable with a known size */ if (C->global_scope @@ -1995,8 +1988,7 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, /* Finally check the syntax and generate its binary representation. */ if (!grammar_fast_check(id, (const byte *) (slang_string_cstr(&preprocessed)), - &prod, &size, - 65536)) { + &prod, &size, 65536)) { char buf[1024]; GLint pos; @@ -2133,14 +2125,6 @@ compile_shader(GLcontext *ctx, slang_code_object * object, if (!success) return GL_FALSE; -#if NEW_SLANG - { - slang_create_uniforms(&object->expdata, shader); - _mesa_print_program(program); - _mesa_print_program_parameters(ctx, program); - } -#endif - return GL_TRUE; } -- cgit v1.2.3 From 670e9007196fdabb698e2390dc55c0b26781cff4 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:45:07 -0700 Subject: clean-ups --- src/mesa/shader/slang/slang_storage.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 747d8e1d29..9f824371c5 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -76,14 +76,10 @@ slang_storage_aggregate_push_new(slang_storage_aggregate * agg) { slang_storage_array *arr = NULL; - agg->arrays = - (slang_storage_array *) slang_alloc_realloc(agg->arrays, - agg->count * - sizeof(slang_storage_array), - (agg->count + - 1) * - sizeof - (slang_storage_array)); + agg->arrays = (slang_storage_array *) + slang_alloc_realloc(agg->arrays, + agg->count * sizeof(slang_storage_array), + (agg->count + 1) * sizeof(slang_storage_array)); if (agg->arrays != NULL) { arr = agg->arrays + agg->count; if (!slang_storage_array_construct(arr)) @@ -131,6 +127,7 @@ aggregate_matrix(slang_storage_aggregate * agg, slang_storage_type basic_type, return GL_TRUE; } + static GLboolean aggregate_variables(slang_storage_aggregate * agg, slang_variable_scope * vars, slang_function_scope * funcs, @@ -148,6 +145,7 @@ aggregate_variables(slang_storage_aggregate * agg, return GL_TRUE; } + GLboolean _slang_aggregate_variable(slang_storage_aggregate * agg, slang_type_specifier * spec, GLuint array_len, @@ -227,7 +225,6 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, } } -/* _slang_sizeof_type() */ GLuint _slang_sizeof_type(slang_storage_type type) @@ -239,7 +236,6 @@ _slang_sizeof_type(slang_storage_type type) return sizeof(GLfloat); } -/* _slang_sizeof_aggregate() */ GLuint _slang_sizeof_aggregate(const slang_storage_aggregate * agg) @@ -259,7 +255,6 @@ _slang_sizeof_aggregate(const slang_storage_aggregate * agg) return size; } -/* _slang_flatten_aggregate () */ GLboolean _slang_flatten_aggregate(slang_storage_aggregate * flat, -- cgit v1.2.3 From bf823b6b77d01b4c4839f4ad05383fc9ec8095be Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 16:46:50 -0700 Subject: clean-ups --- src/mesa/shader/slang/slang_compile_variable.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index c8ffaf296a..25fbc21f82 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -313,6 +313,7 @@ slang_variable_copy(slang_variable * x, const slang_variable * y) return 1; } + slang_variable * _slang_locate_variable(const slang_variable_scope * scope, const slang_atom a_name, GLboolean all) @@ -327,10 +328,7 @@ _slang_locate_variable(const slang_variable_scope * scope, return NULL; } -/* - * _slang_build_export_data_table() - */ - +#if 0 static GLenum gl_type_from_specifier(const slang_type_specifier * type) { @@ -383,3 +381,5 @@ gl_type_from_specifier(const slang_type_specifier * type) return GL_FLOAT; } } +#endif + -- cgit v1.2.3 From 1b3092e4bb89b7a5bd64a3e27f82299d4b2669a2 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 18:00:03 -0700 Subject: add _slang_multiply_swizzles() --- src/mesa/shader/slang/slang_typeinfo.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index 8bedb40435..5a3c2eac6b 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -151,6 +151,22 @@ _slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows) } +/** + * Combines (multiplies) two swizzles to form single swizzle. + * Example: "vec.wzyx.yx" --> "vec.zw". + */ +GLvoid +_slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left, + const slang_swizzle * right) +{ + GLuint i; + + dst->num_components = right->num_components; + for (i = 0; i < right->num_components; i++) + dst->swizzle[i] = left->swizzle[right->swizzle[i]]; +} + + GLvoid slang_type_specifier_ctr(slang_type_specifier * self) { -- cgit v1.2.3 From a90e4c3ddfcdf9f0b9a0424a1a6a9d6496c6f218 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 18:00:26 -0700 Subject: add vec4_texcube to AsmInfo[] --- src/mesa/shader/slang/slang_codegen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 17d1a6bb82..4cb161a5b6 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -460,6 +460,7 @@ static slang_asm_info AsmInfo[] = { { "vec4_tex3d", IR_TEX, 1, 2 }, { "vec4_texb3d", IR_TEXB, 1, 2 }, /* 3d w/ bias */ { "vec4_texp3d", IR_TEXP, 1, 2 }, /* 3d w/ projection */ + { "vec4_texcube", IR_TEX, 1, 2 }, /* cubemap */ /* unary op */ { "int_to_float", IR_I_TO_F, 1, 1 }, -- cgit v1.2.3 From fee9bbe4751eb11947c1d739fbf1dd5e352fc433 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 2 Feb 2007 18:05:43 -0700 Subject: Only glUniform1i() can be used to set sampler uniforms. Generate error otherwise. --- src/mesa/shader/shader_api.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index e2fedf7fa6..1914adb54c 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -891,8 +891,22 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, FLUSH_VERTICES(ctx, _NEW_PROGRAM); + /* + * If we're setting a sampler, we must use glUniformi1()! + */ + if (shProg->Uniforms->Parameters[location].Type == PROGRAM_SAMPLER) { + if (type != GL_INT || count != 1) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glUniform(only glUniform1i can be used " + "to set sampler uniforms)"); + return; + } + } + uniformVal = shProg->Uniforms->ParameterValues[location]; + /* XXX obey 'count' parameter! */ + if (type == GL_INT || type == GL_INT_VEC2 || type == GL_INT_VEC3 || -- cgit v1.2.3 From 68fc4ff1d7f749670684119647e0ef945d23dfa9 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 3 Feb 2007 10:31:16 -0700 Subject: Add _NEW_PROGRAM flag to _MESA_NEW_NEED_EYE_COORDS. This fixes a segfault in the texgen code that can occur after we've disabled a vertex program. --- src/mesa/main/mtypes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 7cd407a274..76b36d60f1 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2746,6 +2746,7 @@ struct matrix_stack #define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \ _NEW_TEXTURE | \ _NEW_POINT | \ + _NEW_PROGRAM | \ _NEW_MODELVIEW) #define _MESA_NEW_NEED_NORMALS (_NEW_LIGHT | \ -- cgit v1.2.3 From 00d63aafc6d938f13acc9b136ff210fb0bbb15f9 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 3 Feb 2007 11:35:02 -0700 Subject: added FLUSH_VERTICES() in _mesa_use_program() --- src/mesa/shader/shader_api.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 1914adb54c..842960099e 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -842,6 +842,14 @@ _mesa_link_program(GLcontext *ctx, GLuint program) void _mesa_use_program(GLcontext *ctx, GLuint program) { + if (ctx->Shader.CurrentProgram && + ctx->Shader.CurrentProgram->Name == program) { + /* no-op */ + return; + } + + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + /* unbind old */ if (ctx->Shader.CurrentProgram) { ctx->Shader.CurrentProgram->RefCount--; -- cgit v1.2.3 From 82f53f45d96871cdaba3886275be78162ef838f5 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 3 Feb 2007 16:25:44 -0700 Subject: remove unused slang_operation fields --- src/mesa/shader/slang/slang_compile_operation.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index 0ce9bbad81..121b5832ef 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -121,8 +121,6 @@ typedef struct slang_operation_ slang_variable_scope *locals; /**< local vars for scope */ struct slang_function_ *fun; /**< If type == slang_oper_call */ struct slang_variable_ *var; /**< If type == slang_oper_identier */ - slang_fully_specified_type *datatype; /**< Type of this operation */ - slang_typeinfo ti; } slang_operation; -- cgit v1.2.3 From 5ee684cba9b1f63090e184125e5890da4fc1d28c Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 3 Feb 2007 17:21:33 -0700 Subject: minor tweaks to distance() funcs --- .../shader/slang/library/slang_common_builtin.gc | 14 +- .../shader/slang/library/slang_common_builtin_gc.h | 511 +++++++++++---------- 2 files changed, 263 insertions(+), 262 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 5a25bbc30b..c8931d259e 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1175,25 +1175,25 @@ float length(const vec4 v) float distance(const float x, const float y) { const float d = x - y; - return length(d); + __retVal = length(d); } float distance(const vec2 v, const vec2 u) { - const vec2 d = v - u; - return length(d); + const vec2 d2 = v - u; + __retVal = length(d2); } float distance(const vec3 v, const vec3 u) { - const vec3 d = v - u; - return length(d); + const vec3 d3 = v - u; + __retVal = length(d3); } float distance(const vec4 v, const vec4 u) { - const vec4 d = v - u; - return length(d); + const vec4 d4 = v - u; + __retVal = length(d4); } diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index ed59b07c76..cfb9f58b9b 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -506,270 +506,271 @@ 2,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18, 112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, 0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,3,2,1,9,1,100, -0,2,18,120,0,18,121,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115, -116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,1,10,1,100,0,2,18,118,0,18,117,0,47, -0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0, -11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,1,11,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103, -116,104,0,18,100,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12,118,0,0,1,1,0,12,117,0, -0,0,1,3,2,1,12,1,100,0,2,18,118,0,18,117,0,47,0,0,8,58,108,101,110,103,116,104,0,18,100,0,0,0,0,0, -1,0,11,0,99,114,111,115,115,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,51,95,99,114,111, -115,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,9,0, -102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1,1,0,9,78,114,101,102,0, -0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0, -4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105, -120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114,100,0, -1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1,0,10,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0, -18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115, -0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0, -0,0,1,0,11,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,11,78,0,0,1,1,0,11,73,0,0,1,1,0,11, -78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3, -2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0, -0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97,99,101,102,111,114, -119,97,114,100,0,1,1,0,12,78,0,0,1,1,0,12,73,0,0,1,1,0,12,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2, -58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115, -103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78, -0,0,18,115,0,0,0,0,0,1,0,9,0,114,101,102,108,101,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,0,1,8,18, -73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101, -102,108,101,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0, -18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,1,0,11,73,0,0,1, -1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47, -0,0,1,0,12,0,114,101,102,108,101,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48, -0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116, -0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101, -116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0, -18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8, -18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113, -114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,1,0,10,73,0,0,1, -1,0,10,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101, -116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73, -0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0, -18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0, -0,0,46,18,78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,1,1, -0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0, -48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0, -0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101, +0,2,18,120,0,18,121,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103,116,104,0,18, +100,0,0,0,20,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2, +1,10,1,100,50,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103, +116,104,0,18,100,50,0,0,0,20,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,11,118,0,0,1,1,0,11, +117,0,0,0,1,3,2,1,11,1,100,51,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58, +108,101,110,103,116,104,0,18,100,51,0,0,0,20,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,1,0,12, +118,0,0,1,1,0,12,117,0,0,0,1,3,2,1,12,1,100,52,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116, +86,97,108,0,58,108,101,110,103,116,104,0,18,100,52,0,0,0,20,0,0,1,0,11,0,99,114,111,115,115,0,1,1, +0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,51,95,99,114,111,115,115,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114, +100,0,1,1,0,9,78,0,0,1,1,0,9,73,0,0,1,1,0,9,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111, +116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0, +18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115, +0,0,0,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,10,78,0,0,1,1,0,10,73,0,0,1,1, +0,10,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0, +0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100, +0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,11,0,102,97,99,101,102,111, +114,119,97,114,100,0,1,1,0,11,78,0,0,1,1,0,11,73,0,0,1,1,0,11,78,114,101,102,0,0,0,1,3,2,1,9,1,100, +0,2,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95, +115,103,116,0,18,115,0,59,120,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18, +78,0,0,18,115,0,0,0,0,0,1,0,12,0,102,97,99,101,102,111,114,119,97,114,100,0,1,1,0,12,78,0,0,1,1,0, +12,73,0,0,1,1,0,12,78,114,101,102,0,0,0,1,3,2,1,9,1,100,0,2,58,100,111,116,0,18,78,114,101,102,0,0, +18,73,0,0,0,0,0,3,2,0,9,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,59,120,0,0,17,48,0, +48,0,0,0,18,100,0,0,0,8,58,109,105,120,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,0,9,0,114,101, +102,108,101,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0, +18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101,102,108,101,99,116,0,1,1,0,10,73,0,0,1, +1,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47, +0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,0,1,8,18,73,0,17,50,0,48, +0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,12,0,114,101,102,108,101,99, +116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18, +73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116,0,1,1,0,9,73,0,0,1,1,0,9,78,0,0,1, +1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49, +0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47, +0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101, 116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48, -47,0,0,1,0,12,0,114,101,102,114,97,99,116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,1,1,0,9,101,116,97,0,0, +47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,1,0,10,73,0,0,1,1,0,10,78,0,0,1,1,0,9,101,116,97,0,0, 0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111, 116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17, 48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111, -116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109, -97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109, -97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10, -49,0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0, -0,1,0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0, -0,0,0,1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15, -110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,10,118, -0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0, -11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117, -0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, -0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, -115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0, -108,101,115,115,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, -115,115,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69, -113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97, -110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115, -84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, -97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84, -104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101, -115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95, -115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97, -116,101,114,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, -116,101,114,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101, -97,116,101,114,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101, -114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101, -114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116, -101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104, -97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, -116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99, -52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0, -1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117, -0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0, -0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6, +116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,11,0,114, +101,102,114,97,99,116,0,1,1,0,11,73,0,0,1,1,0,11,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0, +2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18, +73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8, +17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18, +73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,12,0,114,101,102,114,97,99, +116,0,1,1,0,12,73,0,0,1,1,0,12,78,0,0,1,1,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0, +18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100, +111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0, +9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58, +115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109,97,116,114,105,120,67,111,109,112, +77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,14,0,109, +97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0,0,1,0,0,14,110,0,0,0,1,8,58,109, +97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10, +49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,15,0,109,97,116,114,105, +120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0, +18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57, +48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, +99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, +0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, +103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0, +108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, +97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0, +7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,8,118,0,0, +1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0, +18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10, 117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0, +117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0, +1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0, +12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0, +0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118, +0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0, 7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113, -117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, -101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0, -0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115, -101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108, -0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0, -7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118, -101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0, -110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,110, +120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108, +0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97, +108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,10,118, +0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,11,118, +0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,12, +118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0, +6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7, +117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0, +8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0, +1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0, +1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97, +110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, +95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84, +104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, +116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52, +95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0, +4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0, +1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1, +0,2,0,101,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97, +108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118, +0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101, +99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1, +0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97, +108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86, +97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1, +0,10,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118, +0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4, +118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2, +0,110,111,116,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110, 101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111, -116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69, -113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95, -114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0, -6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1, -0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0, -0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, -100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0, -0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100, -100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97, -100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101, -99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17, -48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,115,117,109,0,0,0,4,118,101, -99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118, -101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122, -0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18, -118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1, -112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59, -120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,8,18,118,0,59, -120,0,18,118,0,59,121,0,34,0,0,1,0,1,0,97,108,108,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1,112,114,111,100, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118, -0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114, -111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0, -0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,4,118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0, -59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0, -18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,119,0,0,0,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59, -120,0,0,17,48,0,48,0,0,0,0,0,1,0,2,0,110,111,116,0,1,1,0,2,118,0,0,0,1,4,118,101,99,52,95,115,101, -113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,3,0,110, -111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0,110,111,116,0,1,1,0,4,118,0,0,0,1,4,118, -101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0, -12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99,111, -111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101, -49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1, -3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100, -0,59,120,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,121,0,20,0,4,118, -101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106, -0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, -116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, -99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,1,0,17,115,97,109,112, -108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,50,100,0,18,95, -95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0, -12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1, -1,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100, -52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0, -18,99,111,111,114,100,0,59,122,0,20,0,4,118,101,99,52,95,116,101,120,112,50,100,0,18,95,95,114,101, +116,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113, +117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115, +117,109,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18, +118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1, +115,117,109,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0, +18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0, +59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0, +59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,4,118,0,0,0, +1,3,2,0,9,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0, +59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18, +115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59, +120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95, +95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97, +108,108,0,1,1,0,10,118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118, +101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,114,111,100,0,59,120, +0,0,17,48,0,48,0,0,0,0,8,18,118,0,59,120,0,18,118,0,59,121,0,34,0,0,1,0,1,0,97,108,108,0,1,1,0,3, +118,0,0,0,1,3,2,0,9,1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,112,114,111,100,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18, +118,0,59,122,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,108,108,0,1,1,0,4,118,0,0,0,1,3,2,0,9, +1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0, +59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,18,118,0,59,122,0,0,0,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,59,120,0,0,18,112,114,111, +100,0,59,120,0,0,18,118,0,59,119,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97, +108,0,59,120,0,0,18,112,114,111,100,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,2,0,110,111,116,0,1,1,0, +2,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,17,48,0,48,0,0,0,0,0,1,0,3,0,110,111,116,0,1,1,0,3,118,0,0,0,1,4,118,101,99,52,95,115,101, +113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,4,0, +110,111,116,0,1,1,0,4,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108, +0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,0,1,1,0,16,115,97, +109,112,108,101,114,0,0,1,1,0,9,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,49,100,0, +18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0, +1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0, +0,1,1,0,10,99,111,111,114,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114, +100,52,0,59,120,0,18,99,111,111,114,100,0,59,120,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18, +99,111,111,114,100,0,59,121,0,20,0,4,118,101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101, 116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116, -101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,12,99, -111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,50,100,0,18,95,95,114,101,116,86,97,108, +101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99, +111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,49,100,0,18,95,95,114,101,116,86,97,108, 0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117, -114,101,51,68,0,1,1,0,18,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118, -101,99,52,95,116,101,120,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1, -0,18,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101, -120,112,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,1,0,19,115,97,109,112, -108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,99,117,98,101,0, -18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0, -1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111, -111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100, -0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0, -48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1, -0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111, -119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0, -18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111, -111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109, -112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118, -101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97, -100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114, -100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51, -0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0, -59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114, -100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,1,0,9,120,0,0,0,1,4,102,108,111, -97,116,95,110,111,105,115,101,49,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,9,0,110, -111,105,115,101,49,0,1,1,0,10,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,50,0,18,95, -95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,1,0,11,120,0,0,0,1, -4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0, -1,0,9,0,110,111,105,115,101,49,0,1,1,0,12,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101, -52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,1,0,9, +114,101,50,68,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118, +101,99,52,95,116,101,120,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, +0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1, +0,17,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,99,111,111,114, +100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,20,0,9, +18,99,111,111,114,100,52,0,59,119,0,18,99,111,111,114,100,0,59,122,0,20,0,4,118,101,99,52,95,116, +101,120,112,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99, +111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,17, +115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120, +112,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111, +114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,1,0,18,115,97,109,112,108,101,114,0, +0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,51,100,0,18,95,95,114,101,116, +86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120, +116,117,114,101,51,68,80,114,111,106,0,1,1,0,18,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111, +114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,112,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18, +115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101, +67,117,98,101,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,4,118, +101,99,52,95,116,101,120,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108, +101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97, +109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4, +118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114, +0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104, +97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111, +114,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101, +99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18, +99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97, +100,111,119,50,68,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3, +2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101, +108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116, +101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109, +112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115, +97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114, +100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99, +111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115, +101,49,0,1,1,0,9,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,95,95,114,101,116, +86,97,108,0,0,18,120,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,1,0,10,120,0,0,0,1,4,102,108,111, +97,116,95,110,111,105,115,101,50,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,9,0,110, +111,105,115,101,49,0,1,1,0,11,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,95, +95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,1,0,12,120,0,0,0,1, +4,102,108,111,97,116,95,110,111,105,115,101,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0, +1,0,10,0,110,111,105,115,101,50,0,1,1,0,9,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0, +58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110, +111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105,115,101,50,0, +1,1,0,10,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18, +120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58, +118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105, +115,101,50,0,1,1,0,11,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115, +101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0, +0,20,0,0,1,0,10,0,110,111,105,115,101,50,0,1,1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, +17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1,0,9, 120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0, 20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0, -51,52,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105,115,101,50,0,1,1,0,10,120,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0, -17,55,0,54,54,0,0,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105,115,101,50,0,1,1,0,11,120,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51, -52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,0,1,0,10,0,110,111,105,115,101,50,0, -1,1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18, -120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58, -118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0, -0,46,0,0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1,0,9,120,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -121,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0,0,1,0,11,0, -110,111,105,115,101,51,0,1,1,0,10,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110, -111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105, -115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50, -0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1, -0,11,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53, -0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,20,0,0,1,0,11,0,110,111,105, -115,101,51,0,1,1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115, +51,52,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18, +120,0,17,53,0,52,55,0,0,46,0,0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1,0,10,120,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57, +0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110, +111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0, +0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1,0,11,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0, +58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0, +17,51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115, +101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0, +0,0,0,46,0,0,20,0,0,1,0,11,0,110,111,105,115,101,51,0,1,1,0,12,120,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17, +55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17, +49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,0,1,0,12,0,110,111, +105,115,101,52,0,1,1,0,9,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105, +115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101, +49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110, +111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, +119,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51,0,53,52,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105, +115,101,52,0,1,1,0,10,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115, 101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0, -18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0, -55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0, -18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17, -49,51,0,49,57,0,0,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0,9,120,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0, -46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120,0,17,50, -51,0,53,52,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0,10,120,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0, -0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115, -101,49,0,18,120,0,58,118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17, -50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0, -11,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101, -99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0, -52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0, -17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1, -1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120, -0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118, -101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0, -46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58, -118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57, -0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,18,120, -0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55, -0,52,56,0,0,0,0,46,0,0,20,0,0,0 +18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,53,0, +52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58, +110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0, +0,46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0,11,120,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +59,121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54, +54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111, +105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0, +48,52,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0, +18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0, +46,0,0,20,0,0,1,0,12,0,110,111,105,115,101,52,0,1,1,0,12,120,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,110,111,105,115,101,49,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, +121,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54, +0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, +122,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53, +0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,59,119,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57, +0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,20,0,0,0 -- cgit v1.2.3 From 93b975a1d9fcc4a10987676f7368809522f27d71 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 3 Feb 2007 17:24:24 -0700 Subject: Add literal_size field to slang_operation. Used to track the number of components in a float/int/bool literal. Helps with some typechecking things. Fixes problems with calls such as "distance(v2, vec2(1.0, 2.0))" --- src/mesa/shader/slang/slang_codegen.c | 14 +++++++- src/mesa/shader/slang/slang_compile.c | 3 ++ src/mesa/shader/slang/slang_compile_operation.c | 2 ++ src/mesa/shader/slang/slang_compile_operation.h | 1 + src/mesa/shader/slang/slang_simplify.c | 30 +++++++++++++---- src/mesa/shader/slang/slang_typeinfo.c | 45 +++++++++++++++++++++++-- 6 files changed, 85 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 4cb161a5b6..6b7df0597b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1040,7 +1040,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, static slang_ir_node * _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, - slang_operation *oper, slang_operation *dest) + slang_operation *oper, slang_operation *dest) { slang_ir_node *n; slang_operation *inlined; @@ -1694,6 +1694,7 @@ _slang_gen_logical_and(slang_assemble_ctx *A, slang_operation *oper) slang_operation_copy(&select->children[1], &oper->children[1]); select->children[2].type = slang_oper_literal_bool; ASSIGN_4V(select->children[2].literal, 0, 0, 0, 0); + select->children[2].literal_size = 2; n = _slang_gen_select(A, select); @@ -1724,6 +1725,7 @@ _slang_gen_logical_or(slang_assemble_ctx *A, slang_operation *oper) select->children[1].type = slang_oper_literal_bool; ASSIGN_4V(select->children[2].literal, 1, 1, 1, 1); slang_operation_copy(&select->children[2], &oper->children[1]); + select->children[2].literal_size = 2; n = _slang_gen_select(A, select); @@ -1867,9 +1869,19 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) if (!var) { RETURN_ERROR2("Undefined variable:", varName, 0); } +#if 0 /* XXX make copy of this initializer? */ + { + slang_operation dup; + slang_operation_construct(&dup); + slang_operation_copy(&dup, v->initializer); + _slang_simplify(&dup, &A->space, A->atoms); + rhs = _slang_gen_operation(A, &dup); + } +#else _slang_simplify(v->initializer, &A->space, A->atoms); rhs = _slang_gen_operation(A, v->initializer); +#endif assert(rhs); init = new_node(IR_MOVE, var, rhs); /* diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 619fe50ce5..199f96e441 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1029,6 +1029,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, op->literal[1] = op->literal[2] = op->literal[3] = (GLfloat) number; + op->literal_size = 1; break; case OP_PUSH_INT: op->type = slang_oper_literal_int; @@ -1038,6 +1039,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, op->literal[1] = op->literal[2] = op->literal[3] = (GLfloat) number; + op->literal_size = 1; break; case OP_PUSH_FLOAT: op->type = slang_oper_literal_float; @@ -1046,6 +1048,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, op->literal[1] = op->literal[2] = op->literal[3] = op->literal[0]; + op->literal_size = 1; break; case OP_PUSH_IDENTIFIER: op->type = slang_oper_identifier; diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index c16ec7f807..51a64ca30b 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -60,6 +60,7 @@ slang_operation_destruct(slang_operation * oper) for (i = 0; i < oper->num_children; i++) slang_operation_destruct(oper->children + i); slang_alloc_free(oper->children); + /*#define FREE_MEMORY*/ #ifdef FREE_MEMORY /* XXX revisit and fix memory coruption here ! */ slang_variable_scope_destruct(oper->locals); @@ -106,6 +107,7 @@ slang_operation_copy(slang_operation * x, const slang_operation * y) z.literal[1] = y->literal[1]; z.literal[2] = y->literal[2]; z.literal[3] = y->literal[3]; + z.literal_size = y->literal_size; z.a_id = y->a_id; if (y->locals) { if (!slang_variable_scope_copy(z.locals, y->locals)) { diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index 121b5832ef..3f5b1bb8f3 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -117,6 +117,7 @@ typedef struct slang_operation_ struct slang_operation_ *children; GLuint num_children; GLfloat literal[4]; /**< Used for float, int and bool values */ + GLuint literal_size; /**< 1, 2, 3, or 4 */ slang_atom a_id; /**< type: asm, identifier, call, field */ slang_variable_scope *locals; /**< local vars for scope */ struct slang_function_ *fun; /**< If type == slang_oper_call */ diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index ef8b2fedd8..0e433281e8 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -123,7 +123,7 @@ _slang_simplify(slang_operation *oper, isBool[i] = (oper->children[i].type == slang_oper_literal_bool); } - if (n == 2 && isFloat[0] && isFloat[1]) { + if (oper->num_children == 2 && isFloat[0] && isFloat[1]) { /* probably simple arithmetic */ switch (oper->type) { case slang_oper_add: @@ -131,6 +131,7 @@ _slang_simplify(slang_operation *oper, oper->literal[i] = oper->children[0].literal[i] + oper->children[1].literal[i]; } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; @@ -139,6 +140,7 @@ _slang_simplify(slang_operation *oper, oper->literal[i] = oper->children[0].literal[i] - oper->children[1].literal[i]; } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; @@ -147,6 +149,7 @@ _slang_simplify(slang_operation *oper, oper->literal[i] = oper->children[0].literal[i] * oper->children[1].literal[i]; } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; @@ -155,6 +158,7 @@ _slang_simplify(slang_operation *oper, oper->literal[i] = oper->children[0].literal[i] / oper->children[1].literal[i]; } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; @@ -163,17 +167,19 @@ _slang_simplify(slang_operation *oper, } } - if (n == 1 && isFloat[0]) { + if (oper->num_children == 1 && isFloat[0]) { switch (oper->type) { case slang_oper_minus: for (i = 0; i < 4; i++) { oper->literal[i] = -oper->children[0].literal[i]; } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; case slang_oper_plus: COPY_4V(oper->literal, oper->children[0].literal); + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; @@ -182,7 +188,7 @@ _slang_simplify(slang_operation *oper, } } - if (n == 2 && isBool[0] && isBool[1]) { + if (oper->num_children == 2 && isBool[0] && isBool[1]) { /* simple boolean expression */ switch (oper->type) { case slang_oper_logicaland: @@ -191,6 +197,7 @@ _slang_simplify(slang_operation *oper, const GLint b = oper->children[1].literal[i] ? 1 : 0; oper->literal[i] = (GLfloat) (a && b); } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_bool; return; @@ -200,6 +207,7 @@ _slang_simplify(slang_operation *oper, const GLint b = oper->children[1].literal[i] ? 1 : 0; oper->literal[i] = (GLfloat) (a || b); } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_bool; return; @@ -209,6 +217,7 @@ _slang_simplify(slang_operation *oper, const GLint b = oper->children[1].literal[i] ? 1 : 0; oper->literal[i] = (GLfloat) (a ^ b); } + oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); oper->type = slang_oper_literal_bool; return; @@ -217,7 +226,8 @@ _slang_simplify(slang_operation *oper, } } - if (n == 4 && isFloat[0] && isFloat[1] && isFloat[2] && isFloat[3]) { + if (oper->num_children == 4 + && isFloat[0] && isFloat[1] && isFloat[2] && isFloat[3]) { /* vec4(flt, flt, flt, flt) constructor */ if (oper->type == slang_oper_call) { if (strcmp((char *) oper->a_id, "vec4") == 0) { @@ -225,6 +235,7 @@ _slang_simplify(slang_operation *oper, oper->literal[1] = oper->children[1].literal[0]; oper->literal[2] = oper->children[2].literal[0]; oper->literal[3] = oper->children[3].literal[0]; + oper->literal_size = 4; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; @@ -232,7 +243,7 @@ _slang_simplify(slang_operation *oper, } } - if (n == 3 && isFloat[0] && isFloat[1] && isFloat[2]) { + if (oper->num_children == 3 && isFloat[0] && isFloat[1] && isFloat[2]) { /* vec3(flt, flt, flt) constructor */ if (oper->type == slang_oper_call) { if (strcmp((char *) oper->a_id, "vec3") == 0) { @@ -240,6 +251,7 @@ _slang_simplify(slang_operation *oper, oper->literal[1] = oper->children[1].literal[0]; oper->literal[2] = oper->children[2].literal[0]; oper->literal[3] = oper->literal[2]; + oper->literal_size = 3; slang_operation_destruct(oper); oper->type = slang_oper_literal_float; return; @@ -247,16 +259,20 @@ _slang_simplify(slang_operation *oper, } } - if (n == 2 && isFloat[0] && isFloat[1]) { - /* vec4(flt, flt) constructor */ + if (oper->num_children == 2 && isFloat[0] && isFloat[1]) { + /* vec2(flt, flt) constructor */ if (oper->type == slang_oper_call) { if (strcmp((char *) oper->a_id, "vec2") == 0) { + printf("SIMPLIFY vec2 constructor scope = %p\n", + (void*) oper->locals); oper->literal[0] = oper->children[0].literal[0]; oper->literal[1] = oper->children[1].literal[0]; oper->literal[2] = oper->literal[1]; oper->literal[3] = oper->literal[1]; + oper->literal_size = 2; slang_operation_destruct(oper); /* XXX oper->locals goes NULL! */ oper->type = slang_oper_literal_float; + assert(oper->num_children == 0); return; } } diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index 5a3c2eac6b..eef2cb96db 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -341,6 +341,21 @@ _slang_typeof_operation_(const slang_operation * op, return GL_FALSE; break; case slang_oper_literal_bool: + if (op->literal_size == 1) + ti->spec.type = slang_spec_bool; + else if (op->literal_size == 2) + ti->spec.type = slang_spec_bvec2; + else if (op->literal_size == 3) + ti->spec.type = slang_spec_bvec3; + else if (op->literal_size == 4) + ti->spec.type = slang_spec_bvec4; + else { + _mesa_problem(NULL, + "Unexpected bool literal_size %d in _slang_typeof_operation()", + op->literal_size); + ti->spec.type = slang_spec_bool; + } + break; case slang_oper_logicalor: case slang_oper_logicalxor: case slang_oper_logicaland: @@ -354,10 +369,36 @@ _slang_typeof_operation_(const slang_operation * op, ti->spec.type = slang_spec_bool; break; case slang_oper_literal_int: - ti->spec.type = slang_spec_int; + if (op->literal_size == 1) + ti->spec.type = slang_spec_int; + else if (op->literal_size == 2) + ti->spec.type = slang_spec_ivec2; + else if (op->literal_size == 3) + ti->spec.type = slang_spec_ivec3; + else if (op->literal_size == 4) + ti->spec.type = slang_spec_ivec4; + else { + _mesa_problem(NULL, + "Unexpected int literal_size %d in _slang_typeof_operation()", + op->literal_size); + ti->spec.type = slang_spec_int; + } break; case slang_oper_literal_float: - ti->spec.type = slang_spec_float; + if (op->literal_size == 1) + ti->spec.type = slang_spec_float; + else if (op->literal_size == 2) + ti->spec.type = slang_spec_vec2; + else if (op->literal_size == 3) + ti->spec.type = slang_spec_vec3; + else if (op->literal_size == 4) + ti->spec.type = slang_spec_vec4; + else { + _mesa_problem(NULL, + "Unexpected float literal_size %d in _slang_typeof_operation()", + op->literal_size); + ti->spec.type = slang_spec_float; + } break; case slang_oper_identifier: { -- cgit v1.2.3 From dd34fe8679fa200e55cfaf8e80bbecdecea084e3 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 10:10:01 -0700 Subject: Merge SWvertex texcoord and varying fields into attrib[] array field. Fragment texcoords and varying code is now unified in the point/line/triangle rasterization code. In the future, merge color, fog, etc. attribs. --- src/mesa/swrast/s_aaline.c | 51 ++++----- src/mesa/swrast/s_aalinetemp.h | 121 ++++++++------------ src/mesa/swrast/s_aatriangle.c | 52 ++------- src/mesa/swrast/s_aatritemp.h | 217 ++++++++++++++--------------------- src/mesa/swrast/s_context.c | 56 ++++++++- src/mesa/swrast/s_context.h | 7 ++ src/mesa/swrast/s_feedback.c | 17 ++- src/mesa/swrast/s_linetemp.h | 81 ++++--------- src/mesa/swrast/s_pointtemp.h | 59 +++++----- src/mesa/swrast/s_triangle.c | 31 +---- src/mesa/swrast/s_tritemp.h | 229 ++++++++++++------------------------- src/mesa/swrast/swrast.h | 3 +- src/mesa/swrast_setup/ss_context.c | 13 ++- 13 files changed, 372 insertions(+), 565 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c index b3a209923f..c81095163b 100644 --- a/src/mesa/swrast/s_aaline.c +++ b/src/mesa/swrast/s_aaline.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -67,14 +67,14 @@ struct LineInfo GLfloat iPlane[4]; /* DO_SPEC */ GLfloat srPlane[4], sgPlane[4], sbPlane[4]; - /* DO_TEX or DO_MULTITEX */ - GLfloat sPlane[MAX_TEXTURE_COORD_UNITS][4]; - GLfloat tPlane[MAX_TEXTURE_COORD_UNITS][4]; - GLfloat uPlane[MAX_TEXTURE_COORD_UNITS][4]; - GLfloat vPlane[MAX_TEXTURE_COORD_UNITS][4]; - GLfloat lambda[MAX_TEXTURE_COORD_UNITS]; - GLfloat texWidth[MAX_TEXTURE_COORD_UNITS]; - GLfloat texHeight[MAX_TEXTURE_COORD_UNITS]; + /* DO_TEXVAR */ + GLfloat sPlane[FRAG_ATTRIB_MAX][4]; + GLfloat tPlane[FRAG_ATTRIB_MAX][4]; + GLfloat uPlane[FRAG_ATTRIB_MAX][4]; + GLfloat vPlane[FRAG_ATTRIB_MAX][4]; + GLfloat lambda[FRAG_ATTRIB_MAX]; + GLfloat texWidth[FRAG_ATTRIB_MAX]; + GLfloat texHeight[FRAG_ATTRIB_MAX]; SWspan span; }; @@ -499,15 +499,7 @@ segment(GLcontext *ctx, #define DO_Z #define DO_FOG #define DO_RGBA -#define DO_TEX -#include "s_aalinetemp.h" - - -#define NAME(x) aa_multitex_rgba_##x -#define DO_Z -#define DO_FOG -#define DO_RGBA -#define DO_MULTITEX +#define DO_TEXVAR #include "s_aalinetemp.h" @@ -515,7 +507,7 @@ segment(GLcontext *ctx, #define DO_Z #define DO_FOG #define DO_RGBA -#define DO_MULTITEX +#define DO_TEXVAR #define DO_SPEC #include "s_aalinetemp.h" @@ -530,18 +522,15 @@ _swrast_choose_aa_line_function(GLcontext *ctx) if (ctx->Visual.rgbMode) { /* RGBA */ - if (ctx->Texture._EnabledCoordUnits != 0) { - if (ctx->Texture._EnabledCoordUnits > 1) { - /* Multitextured! */ - if (ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR || - ctx->Fog.ColorSumEnabled) - swrast->Line = aa_multitex_spec_line; - else - swrast->Line = aa_multitex_rgba_line; - } - else { + if (ctx->Texture._EnabledCoordUnits != 0 + || ctx->FragmentProgram._Current) { + + if (ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR || + ctx->Fog.ColorSumEnabled) + swrast->Line = aa_multitex_spec_line; + else swrast->Line = aa_tex_rgba_line; - } + } else { swrast->Line = aa_rgba_line; diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index b977ab8325..4d33b7dff7 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -36,6 +36,7 @@ static void NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) { + const SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLfloat fx = (GLfloat) ix; const GLfloat fy = (GLfloat) iy; #ifdef DO_INDEX @@ -45,6 +46,8 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) #endif const GLuint i = line->span.end; + (void) swrast; + if (coverage == 0.0) return; @@ -77,41 +80,29 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) line->span.array->spec[i][GCOMP] = solve_plane_chan(fx, fy, line->sgPlane); line->span.array->spec[i][BCOMP] = solve_plane_chan(fx, fy, line->sbPlane); #endif -#ifdef DO_TEX - { - GLfloat invQ; - if (ctx->FragmentProgram._Current) { - invQ = 1.0F; - } - else { - invQ = solve_plane_recip(fx, fy, line->vPlane[0]); - } - line->span.array->attribs[FRAG_ATTRIB_TEX0][i][0] = solve_plane(fx, fy, line->sPlane[0]) * invQ; - line->span.array->attribs[FRAG_ATTRIB_TEX0][i][1] = solve_plane(fx, fy, line->tPlane[0]) * invQ; - line->span.array->attribs[FRAG_ATTRIB_TEX0][i][2] = solve_plane(fx, fy, line->uPlane[0]) * invQ; - line->span.array->lambda[0][i] = compute_lambda(line->sPlane[0], - line->tPlane[0], invQ, - line->texWidth[0], - line->texHeight[0]); - } -#elif defined(DO_MULTITEX) +#if defined(DO_TEXVAR) { - GLuint unit; - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - if (ctx->Texture.Unit[unit]._ReallyEnabled) { + GLuint attr; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + GLfloat (*attribArray)[4] = line->span.array->attribs[attr]; GLfloat invQ; if (ctx->FragmentProgram._Current) { invQ = 1.0F; } else { - invQ = solve_plane_recip(fx, fy, line->vPlane[unit]); + invQ = solve_plane_recip(fx, fy, line->vPlane[attr]); + } + attribArray[i][0] = solve_plane(fx, fy, line->sPlane[attr]) * invQ; + attribArray[i][1] = solve_plane(fx, fy, line->tPlane[attr]) * invQ; + attribArray[i][2] = solve_plane(fx, fy, line->uPlane[attr]) * invQ; + if (attr < FRAG_ATTRIB_VAR0) { + const GLuint unit = attr - FRAG_ATTRIB_TEX0; + line->span.array->lambda[unit][i] + = compute_lambda(line->sPlane[attr], + line->tPlane[attr], invQ, + line->texWidth[attr], line->texHeight[attr]); } - line->span.array->attribs[FRAG_ATTRIB_TEX0 + unit][i][0] = solve_plane(fx, fy, line->sPlane[unit]) * invQ; - line->span.array->attribs[FRAG_ATTRIB_TEX0 + unit][i][1] = solve_plane(fx, fy, line->tPlane[unit]) * invQ; - line->span.array->attribs[FRAG_ATTRIB_TEX0 + unit][i][2] = solve_plane(fx, fy, line->uPlane[unit]) * invQ; - line->span.array->lambda[unit][i] = compute_lambda(line->sPlane[unit], - line->tPlane[unit], invQ, - line->texWidth[unit], line->texHeight[unit]); } } } @@ -214,52 +205,33 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) constant_plane(v1->index, line.iPlane); } #endif -#ifdef DO_TEX +#if defined(DO_TEXVAR) { - const struct gl_texture_object *obj = ctx->Texture.Unit[0]._Current; - const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel]; + GLuint attr; const GLfloat invW0 = v0->win[3]; const GLfloat invW1 = v1->win[3]; - const GLfloat s0 = v0->texcoord[0][0] * invW0; - const GLfloat s1 = v1->texcoord[0][0] * invW1; - const GLfloat t0 = v0->texcoord[0][1] * invW0; - const GLfloat t1 = v1->texcoord[0][1] * invW1; - const GLfloat r0 = v0->texcoord[0][2] * invW0; - const GLfloat r1 = v1->texcoord[0][2] * invW1; - const GLfloat q0 = v0->texcoord[0][3] * invW0; - const GLfloat q1 = v1->texcoord[0][3] * invW1; - line.span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA); - compute_plane(line.x0, line.y0, line.x1, line.y1, s0, s1, line.sPlane[0]); - compute_plane(line.x0, line.y0, line.x1, line.y1, t0, t1, line.tPlane[0]); - compute_plane(line.x0, line.y0, line.x1, line.y1, r0, r1, line.uPlane[0]); - compute_plane(line.x0, line.y0, line.x1, line.y1, q0, q1, line.vPlane[0]); - line.texWidth[0] = (GLfloat) texImage->Width; - line.texHeight[0] = (GLfloat) texImage->Height; - } -#elif defined(DO_MULTITEX) - { - GLuint u; - line.span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA); - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture.Unit[u]._ReallyEnabled) { - const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; - const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel]; - const GLfloat invW0 = v0->win[3]; - const GLfloat invW1 = v1->win[3]; - const GLfloat s0 = v0->texcoord[u][0] * invW0; - const GLfloat s1 = v1->texcoord[u][0] * invW1; - const GLfloat t0 = v0->texcoord[u][1] * invW0; - const GLfloat t1 = v1->texcoord[u][1] * invW1; - const GLfloat r0 = v0->texcoord[u][2] * invW0; - const GLfloat r1 = v1->texcoord[u][2] * invW1; - const GLfloat q0 = v0->texcoord[u][3] * invW0; - const GLfloat q1 = v1->texcoord[u][3] * invW1; - compute_plane(line.x0, line.y0, line.x1, line.y1, s0, s1, line.sPlane[u]); - compute_plane(line.x0, line.y0, line.x1, line.y1, t0, t1, line.tPlane[u]); - compute_plane(line.x0, line.y0, line.x1, line.y1, r0, r1, line.uPlane[u]); - compute_plane(line.x0, line.y0, line.x1, line.y1, q0, q1, line.vPlane[u]); - line.texWidth[u] = (GLfloat) texImage->Width; - line.texHeight[u] = (GLfloat) texImage->Height; + line.span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA | SPAN_VARYING); + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + const GLfloat s0 = v0->attrib[attr][0] * invW0; + const GLfloat s1 = v1->attrib[attr][0] * invW1; + const GLfloat t0 = v0->attrib[attr][1] * invW0; + const GLfloat t1 = v1->attrib[attr][1] * invW1; + const GLfloat r0 = v0->attrib[attr][2] * invW0; + const GLfloat r1 = v1->attrib[attr][2] * invW1; + const GLfloat q0 = v0->attrib[attr][3] * invW0; + const GLfloat q1 = v1->attrib[attr][3] * invW1; + compute_plane(line.x0, line.y0, line.x1, line.y1, s0, s1, line.sPlane[attr]); + compute_plane(line.x0, line.y0, line.x1, line.y1, t0, t1, line.tPlane[attr]); + compute_plane(line.x0, line.y0, line.x1, line.y1, r0, r1, line.uPlane[attr]); + compute_plane(line.x0, line.y0, line.x1, line.y1, q0, q1, line.vPlane[attr]); + if (attr < FRAG_ATTRIB_VAR0) { + const GLuint u = attr - FRAG_ATTRIB_TEX0; + const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; + const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel]; + line.texWidth[attr] = (GLfloat) texImage->Width; + line.texHeight[attr] = (GLfloat) texImage->Height; + } } } } @@ -324,6 +296,5 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) #undef DO_RGBA #undef DO_INDEX #undef DO_SPEC -#undef DO_TEX -#undef DO_MULTITEX +#undef DO_TEXVAR #undef NAME diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c index 63a13cf3fb..5e3059af93 100644 --- a/src/mesa/swrast/s_aatriangle.c +++ b/src/mesa/swrast/s_aatriangle.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.5.3 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -408,7 +408,7 @@ tex_aa_tri(GLcontext *ctx, #define DO_Z #define DO_FOG #define DO_RGBA -#define DO_TEX +#define DO_TEXVAR #include "s_aatritemp.h" } @@ -422,39 +422,12 @@ spec_tex_aa_tri(GLcontext *ctx, #define DO_Z #define DO_FOG #define DO_RGBA -#define DO_TEX +#define DO_TEXVAR #define DO_SPEC #include "s_aatritemp.h" } -static void -multitex_aa_tri(GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2) -{ -#define DO_Z -#define DO_FOG -#define DO_RGBA -#define DO_MULTITEX -#include "s_aatritemp.h" -} - -static void -spec_multitex_aa_tri(GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2) -{ -#define DO_Z -#define DO_FOG -#define DO_RGBA -#define DO_MULTITEX -#define DO_SPEC -#include "s_aatritemp.h" -} - /* * Examine GL state and set swrast->Triangle to an @@ -465,22 +438,13 @@ _swrast_set_aa_triangle_function(GLcontext *ctx) { ASSERT(ctx->Polygon.SmoothFlag); - if (ctx->Texture._EnabledCoordUnits != 0) { + if (ctx->Texture._EnabledCoordUnits != 0 + || ctx->FragmentProgram._Current) { if (NEED_SECONDARY_COLOR(ctx)) { - if (ctx->Texture._EnabledCoordUnits > 1) { - SWRAST_CONTEXT(ctx)->Triangle = spec_multitex_aa_tri; - } - else { - SWRAST_CONTEXT(ctx)->Triangle = spec_tex_aa_tri; - } + SWRAST_CONTEXT(ctx)->Triangle = spec_tex_aa_tri; } else { - if (ctx->Texture._EnabledCoordUnits > 1) { - SWRAST_CONTEXT(ctx)->Triangle = multitex_aa_tri; - } - else { - SWRAST_CONTEXT(ctx)->Triangle = tex_aa_tri; - } + SWRAST_CONTEXT(ctx)->Triangle = tex_aa_tri; } } else if (ctx->Visual.rgbMode) { diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h index 3359a919e5..bbf9cc611d 100644 --- a/src/mesa/swrast/s_aatritemp.h +++ b/src/mesa/swrast/s_aatritemp.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -36,12 +36,12 @@ * DO_RGBA - if defined, compute RGBA values * DO_INDEX - if defined, compute color index values * DO_SPEC - if defined, compute specular RGB values - * DO_TEX - if defined, compute unit 0 STRQ texcoords - * DO_MULTITEX - if defined, compute all unit's STRQ texcoords + * DO_TEXVAR - if defined, compute texcoords, varying */ /*void triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint pv )*/ { + const SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLfloat *p0 = v0->win; const GLfloat *p1 = v1->win; const GLfloat *p2 = v2->win; @@ -70,20 +70,18 @@ #ifdef DO_SPEC GLfloat srPlane[4], sgPlane[4], sbPlane[4]; #endif -#ifdef DO_TEX - GLfloat sPlane[4], tPlane[4], uPlane[4], vPlane[4]; - GLfloat texWidth, texHeight; -#elif defined(DO_MULTITEX) - GLfloat sPlane[MAX_TEXTURE_COORD_UNITS][4]; /* texture S */ - GLfloat tPlane[MAX_TEXTURE_COORD_UNITS][4]; /* texture T */ - GLfloat uPlane[MAX_TEXTURE_COORD_UNITS][4]; /* texture R */ - GLfloat vPlane[MAX_TEXTURE_COORD_UNITS][4]; /* texture Q */ - GLfloat texWidth[MAX_TEXTURE_COORD_UNITS]; - GLfloat texHeight[MAX_TEXTURE_COORD_UNITS]; +#if defined(DO_TEXVAR) + GLfloat sPlane[FRAG_ATTRIB_MAX][4]; /* texture S */ + GLfloat tPlane[FRAG_ATTRIB_MAX][4]; /* texture T */ + GLfloat uPlane[FRAG_ATTRIB_MAX][4]; /* texture R */ + GLfloat vPlane[FRAG_ATTRIB_MAX][4]; /* texture Q */ + GLfloat texWidth[FRAG_ATTRIB_MAX]; + GLfloat texHeight[FRAG_ATTRIB_MAX]; #endif GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; - + (void) swrast; + INIT_SPAN(span, GL_POLYGON, 0, 0, SPAN_COVERAGE); /* determine bottom to top order of vertices */ @@ -179,65 +177,44 @@ } span.arrayMask |= SPAN_SPEC; #endif -#ifdef DO_TEX +#if defined(DO_TEXVAR) { - const struct gl_texture_object *obj = ctx->Texture.Unit[0]._Current; - const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel]; + GLuint attr; const GLfloat invW0 = v0->win[3]; const GLfloat invW1 = v1->win[3]; const GLfloat invW2 = v2->win[3]; - const GLfloat s0 = v0->texcoord[0][0] * invW0; - const GLfloat s1 = v1->texcoord[0][0] * invW1; - const GLfloat s2 = v2->texcoord[0][0] * invW2; - const GLfloat t0 = v0->texcoord[0][1] * invW0; - const GLfloat t1 = v1->texcoord[0][1] * invW1; - const GLfloat t2 = v2->texcoord[0][1] * invW2; - const GLfloat r0 = v0->texcoord[0][2] * invW0; - const GLfloat r1 = v1->texcoord[0][2] * invW1; - const GLfloat r2 = v2->texcoord[0][2] * invW2; - const GLfloat q0 = v0->texcoord[0][3] * invW0; - const GLfloat q1 = v1->texcoord[0][3] * invW1; - const GLfloat q2 = v2->texcoord[0][3] * invW2; - compute_plane(p0, p1, p2, s0, s1, s2, sPlane); - compute_plane(p0, p1, p2, t0, t1, t2, tPlane); - compute_plane(p0, p1, p2, r0, r1, r2, uPlane); - compute_plane(p0, p1, p2, q0, q1, q2, vPlane); - texWidth = (GLfloat) texImage->Width; - texHeight = (GLfloat) texImage->Height; - } - span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA); -#elif defined(DO_MULTITEX) - { - GLuint u; - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture.Unit[u]._ReallyEnabled) { - const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; - const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel]; - const GLfloat invW0 = v0->win[3]; - const GLfloat invW1 = v1->win[3]; - const GLfloat invW2 = v2->win[3]; - const GLfloat s0 = v0->texcoord[u][0] * invW0; - const GLfloat s1 = v1->texcoord[u][0] * invW1; - const GLfloat s2 = v2->texcoord[u][0] * invW2; - const GLfloat t0 = v0->texcoord[u][1] * invW0; - const GLfloat t1 = v1->texcoord[u][1] * invW1; - const GLfloat t2 = v2->texcoord[u][1] * invW2; - const GLfloat r0 = v0->texcoord[u][2] * invW0; - const GLfloat r1 = v1->texcoord[u][2] * invW1; - const GLfloat r2 = v2->texcoord[u][2] * invW2; - const GLfloat q0 = v0->texcoord[u][3] * invW0; - const GLfloat q1 = v1->texcoord[u][3] * invW1; - const GLfloat q2 = v2->texcoord[u][3] * invW2; - compute_plane(p0, p1, p2, s0, s1, s2, sPlane[u]); - compute_plane(p0, p1, p2, t0, t1, t2, tPlane[u]); - compute_plane(p0, p1, p2, r0, r1, r2, uPlane[u]); - compute_plane(p0, p1, p2, q0, q1, q2, vPlane[u]); - texWidth[u] = (GLfloat) texImage->Width; - texHeight[u] = (GLfloat) texImage->Height; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + const GLfloat s0 = v0->attrib[attr][0] * invW0; + const GLfloat s1 = v1->attrib[attr][0] * invW1; + const GLfloat s2 = v2->attrib[attr][0] * invW2; + const GLfloat t0 = v0->attrib[attr][1] * invW0; + const GLfloat t1 = v1->attrib[attr][1] * invW1; + const GLfloat t2 = v2->attrib[attr][1] * invW2; + const GLfloat r0 = v0->attrib[attr][2] * invW0; + const GLfloat r1 = v1->attrib[attr][2] * invW1; + const GLfloat r2 = v2->attrib[attr][2] * invW2; + const GLfloat q0 = v0->attrib[attr][3] * invW0; + const GLfloat q1 = v1->attrib[attr][3] * invW1; + const GLfloat q2 = v2->attrib[attr][3] * invW2; + compute_plane(p0, p1, p2, s0, s1, s2, sPlane[attr]); + compute_plane(p0, p1, p2, t0, t1, t2, tPlane[attr]); + compute_plane(p0, p1, p2, r0, r1, r2, uPlane[attr]); + compute_plane(p0, p1, p2, q0, q1, q2, vPlane[attr]); + if (attr < FRAG_ATTRIB_VAR0) { + const GLuint u = attr - FRAG_ATTRIB_TEX0; + const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; + const struct gl_texture_image *texImage = obj->Image[0][obj->BaseLevel]; + texWidth[attr] = (GLfloat) texImage->Width; + texHeight[attr] = (GLfloat) texImage->Height; + } + else { + texWidth[attr] = texHeight[attr] = 1.0; + } } } } - span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA); + span.arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA | SPAN_VARYING); #endif /* Begin bottom-to-top scan over the triangle. @@ -305,28 +282,21 @@ array->spec[count][GCOMP] = solve_plane_chan(cx, cy, sgPlane); array->spec[count][BCOMP] = solve_plane_chan(cx, cy, sbPlane); #endif -#ifdef DO_TEX +#if defined(DO_TEXVAR) { - const GLfloat invQ = solve_plane_recip(cx, cy, vPlane); - array->attribs[FRAG_ATTRIB_TEX0 + 0][count][0] = solve_plane(cx, cy, sPlane) * invQ; - array->attribs[FRAG_ATTRIB_TEX0 + 0][count][1] = solve_plane(cx, cy, tPlane) * invQ; - array->attribs[FRAG_ATTRIB_TEX0 + 0][count][2] = solve_plane(cx, cy, uPlane) * invQ; - array->lambda[0][count] = compute_lambda(sPlane, tPlane, vPlane, - cx, cy, invQ, - texWidth, texHeight); - } -#elif defined(DO_MULTITEX) - { - GLuint unit; - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - if (ctx->Texture.Unit[unit]._ReallyEnabled) { - GLfloat invQ = solve_plane_recip(cx, cy, vPlane[unit]); - array->attribs[FRAG_ATTRIB_TEX0 + unit][count][0] = solve_plane(cx, cy, sPlane[unit]) * invQ; - array->attribs[FRAG_ATTRIB_TEX0 + unit][count][1] = solve_plane(cx, cy, tPlane[unit]) * invQ; - array->attribs[FRAG_ATTRIB_TEX0 + unit][count][2] = solve_plane(cx, cy, uPlane[unit]) * invQ; - array->lambda[unit][count] = compute_lambda(sPlane[unit], - tPlane[unit], vPlane[unit], cx, cy, invQ, - texWidth[unit], texHeight[unit]); + GLuint attr; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + GLfloat invQ = solve_plane_recip(cx, cy, vPlane[attr]); + array->attribs[attr][count][0] = solve_plane(cx, cy, sPlane[attr]) * invQ; + array->attribs[attr][count][1] = solve_plane(cx, cy, tPlane[attr]) * invQ; + array->attribs[attr][count][2] = solve_plane(cx, cy, uPlane[attr]) * invQ; + if (attr < FRAG_ATTRIB_VAR0) { + const GLuint unit = attr - FRAG_ATTRIB_TEX0; + array->lambda[unit][count] = compute_lambda(sPlane[attr], tPlane[attr], + vPlane[attr], cx, cy, invQ, + texWidth[attr], texHeight[attr]); + } } } } @@ -409,30 +379,24 @@ array->spec[ix][GCOMP] = solve_plane_chan(cx, cy, sgPlane); array->spec[ix][BCOMP] = solve_plane_chan(cx, cy, sbPlane); #endif -#ifdef DO_TEX - { - const GLfloat invQ = solve_plane_recip(cx, cy, vPlane); - array->attribs[FRAG_ATTRIB_TEX0][ix][0] = solve_plane(cx, cy, sPlane) * invQ; - array->attribs[FRAG_ATTRIB_TEX0][ix][1] = solve_plane(cx, cy, tPlane) * invQ; - array->attribs[FRAG_ATTRIB_TEX0][ix][2] = solve_plane(cx, cy, uPlane) * invQ; - array->lambda[0][ix] = compute_lambda(sPlane, tPlane, vPlane, - cx, cy, invQ, texWidth, texHeight); - } -#elif defined(DO_MULTITEX) +#if defined(DO_TEXVAR) { - GLuint unit; - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - if (ctx->Texture.Unit[unit]._ReallyEnabled) { - GLfloat invQ = solve_plane_recip(cx, cy, vPlane[unit]); - array->attribs[FRAG_ATTRIB_TEX0 + unit][ix][0] = solve_plane(cx, cy, sPlane[unit]) * invQ; - array->attribs[FRAG_ATTRIB_TEX0 + unit][ix][1] = solve_plane(cx, cy, tPlane[unit]) * invQ; - array->attribs[FRAG_ATTRIB_TEX0 + unit][ix][2] = solve_plane(cx, cy, uPlane[unit]) * invQ; - array->lambda[unit][ix] = compute_lambda(sPlane[unit], - tPlane[unit], - vPlane[unit], - cx, cy, invQ, - texWidth[unit], - texHeight[unit]); + GLuint attr; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + GLfloat invQ = solve_plane_recip(cx, cy, vPlane[attr]); + array->attribs[attr][ix][0] = solve_plane(cx, cy, sPlane[attr]) * invQ; + array->attribs[attr][ix][1] = solve_plane(cx, cy, tPlane[attr]) * invQ; + array->attribs[attr][ix][2] = solve_plane(cx, cy, uPlane[attr]) * invQ; + if (attr < FRAG_ATTRIB_VAR0) { + const GLuint unit = attr - FRAG_ATTRIB_TEX0; + array->lambda[unit][ix] = compute_lambda(sPlane[attr], + tPlane[attr], + vPlane[attr], + cx, cy, invQ, + texWidth[attr], + texHeight[attr]); + } } } } @@ -471,28 +435,25 @@ array->attribs[FRAG_ATTRIB_FOGC][j][0] = array->attribs[FRAG_ATTRIB_FOGC][j + left][0]; #endif -#ifdef DO_TEX - COPY_4V(array->attribs[FRAG_ATTRIB_TEX0 + 0][j], array->attribs[FRAG_ATTRIB_TEX0 + 0][j + left]); -#endif -#if defined(DO_MULTITEX) || defined(DO_TEX) +#if defined(DO_TEXVAR) array->lambda[0][j] = array->lambda[0][j + left]; #endif array->coverage[j] = array->coverage[j + left]; } } -#ifdef DO_MULTITEX - /* shift texcoords */ +#ifdef DO_TEXVAR + /* shift texcoords, varying */ { SWspanarrays *array = span.array; - GLuint unit; - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - if (ctx->Texture.Unit[unit]._ReallyEnabled) { + GLuint attr; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { GLint j; for (j = 0; j < (GLint) n; j++) { - array->attribs[FRAG_ATTRIB_TEX0 + unit][j][0] = array->attribs[FRAG_ATTRIB_TEX0 + unit][j + left][0]; - array->attribs[FRAG_ATTRIB_TEX0 + unit][j][1] = array->attribs[FRAG_ATTRIB_TEX0 + unit][j + left][1]; - array->attribs[FRAG_ATTRIB_TEX0 + unit][j][2] = array->attribs[FRAG_ATTRIB_TEX0 + unit][j + left][2]; - array->lambda[unit][j] = array->lambda[unit][j + left]; + array->attribs[attr][j][0] = array->attribs[attr][j + left][0]; + array->attribs[attr][j][1] = array->attribs[attr][j + left][1]; + array->attribs[attr][j][2] = array->attribs[attr][j + left][2]; + /*array->lambda[unit][j] = array->lambda[unit][j + left];*/ } } } @@ -533,12 +494,8 @@ #undef DO_SPEC #endif -#ifdef DO_TEX -#undef DO_TEX -#endif - -#ifdef DO_MULTITEX -#undef DO_MULTITEX +#ifdef DO_TEXVAR +#undef DO_TEXVAR #endif #ifdef DO_OCCLUSION_TEST diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index ec2f3d68b8..d8a5520f6b 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -507,6 +507,50 @@ _swrast_update_texture_samplers(GLcontext *ctx) } +/** + * Update the swrast->_FragmentAttribs field. + */ +static void +_swrast_update_fragment_attribs(GLcontext *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + + if (ctx->FragmentProgram._Current) { + swrast->_FragmentAttribs + = ctx->FragmentProgram._Current->Base.InputsRead; + } + else { + GLuint u; + swrast->_FragmentAttribs = 0x0; + + if (ctx->Depth.Test) + swrast->_FragmentAttribs |= FRAG_BIT_WPOS; + if (NEED_SECONDARY_COLOR(ctx)) + swrast->_FragmentAttribs |= FRAG_BIT_COL1; + if (swrast->_FogEnabled) + swrast->_FragmentAttribs |= FRAG_BIT_FOGC; + + for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { + if (ctx->Texture.Unit[u]._ReallyEnabled) { + swrast->_FragmentAttribs |= FRAG_BIT_TEX(u); + } + } + } + + /* Find lowest, highest bit set in _FragmentAttribs */ + { + GLuint bits = swrast->_FragmentAttribs; + GLuint i = 0;; + while (bits) { + i++; + bits = bits >> 1; + } + swrast->_MaxFragmentAttrib = i; + swrast->_MinFragmentAttrib = FRAG_ATTRIB_TEX0; /* XXX temporary */ + } +} + + void _swrast_validate_derived( GLcontext *ctx ) { @@ -547,6 +591,12 @@ _swrast_validate_derived( GLcontext *ctx ) if (swrast->NewState & _SWRAST_NEW_RASTERMASK) _swrast_update_rasterflags( ctx ); + if (swrast->NewState & (_NEW_DEPTH | + _NEW_FOG | + _NEW_PROGRAM | + _NEW_TEXTURE)) + _swrast_update_fragment_attribs(ctx); + swrast->NewState = 0; swrast->StateChanges = 0; swrast->InvalidateState = _swrast_invalidate_state; @@ -806,8 +856,10 @@ _swrast_print_vertex( GLcontext *ctx, const SWvertex *v ) for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) if (ctx->Texture.Unit[i]._ReallyEnabled) _mesa_debug(ctx, "texcoord[%d] %f %f %f %f\n", i, - v->texcoord[i][0], v->texcoord[i][1], - v->texcoord[i][2], v->texcoord[i][3]); + v->attrib[FRAG_ATTRIB_TEX0 + i][0], + v->attrib[FRAG_ATTRIB_TEX0 + i][1], + v->attrib[FRAG_ATTRIB_TEX0 + i][2], + v->attrib[FRAG_ATTRIB_TEX0 + i][3]); #if CHAN_TYPE == GL_FLOAT _mesa_debug(ctx, "color %f %f %f %f\n", diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index b15a22dbf0..a3f61cd5e5 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -133,6 +133,13 @@ typedef struct GLboolean _FogEnabled; GLenum _FogMode; /* either GL_FOG_MODE or fragment program's fog mode */ + /** Fragment attributes to compute during rasterization. + * Mask of FRAG_BIT_* flags. + */ + GLbitfield _FragmentAttribs; + GLuint _MinFragmentAttrib; /**< Lowest bit set in _FragmentAttribs */ + GLuint _MaxFragmentAttrib; /**< Highest bit set in _FragmentAttribs + 1 */ + /* Accum buffer temporaries. */ GLboolean _IntegerAccumMode; /**< Storing unscaled integers? */ diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c index 26cb05cd56..5d3fbdfeb6 100644 --- a/src/mesa/swrast/s_feedback.c +++ b/src/mesa/swrast/s_feedback.c @@ -46,10 +46,10 @@ static void feedback_vertex( GLcontext *ctx, const SWvertex *v, const SWvertex *pv ) { - const GLuint texUnit = 0; /* See section 5.3 of 1.2.1 spec */ GLfloat win[4]; GLfloat color[4]; GLfloat tc[4]; + const GLfloat *vtc = v->attrib[FRAG_ATTRIB_TEX0]; win[0] = v->win[0]; win[1] = v->win[1]; @@ -61,16 +61,15 @@ static void feedback_vertex( GLcontext *ctx, color[2] = CHAN_TO_FLOAT(pv->color[2]); color[3] = CHAN_TO_FLOAT(pv->color[3]); - if (v->texcoord[texUnit][3] != 1.0 && - v->texcoord[texUnit][3] != 0.0) { - GLfloat invq = 1.0F / v->texcoord[texUnit][3]; - tc[0] = v->texcoord[texUnit][0] * invq; - tc[1] = v->texcoord[texUnit][1] * invq; - tc[2] = v->texcoord[texUnit][2] * invq; - tc[3] = v->texcoord[texUnit][3]; + if (vtc[3] != 1.0 && vtc[3] != 0.0) { + GLfloat invq = 1.0F / vtc[3]; + tc[0] = vtc[0] * invq; + tc[1] = vtc[1] * invq; + tc[2] = vtc[2] * invq; + tc[3] = vtc[3]; } else { - COPY_4V(tc, v->texcoord[texUnit]); + COPY_4V(tc, vtc); } _mesa_feedback_vertex( ctx, win, color, (GLfloat) v->index, tc ); diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index e3ca4bd0ac..d2f37bf391 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -71,6 +71,7 @@ static void NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) { + const SWcontext *swrast = SWRAST_CONTEXT(ctx); SWspan span; GLuint interpFlags = 0; GLint x0 = (GLint) vert0->win[0]; @@ -99,6 +100,8 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) SETUP_CODE #endif + (void) swrast; + /* Cull primitives with malformed coordinates. */ { @@ -286,14 +289,14 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) const GLfloat invw1 = vert1->win[3]; const GLfloat invLen = 1.0F / numPixels; GLfloat ds, dt, dr, dq; - span.attrStart[FRAG_ATTRIB_TEX0][0] = invw0 * vert0->texcoord[0][0]; - span.attrStart[FRAG_ATTRIB_TEX0][1] = invw0 * vert0->texcoord[0][1]; - span.attrStart[FRAG_ATTRIB_TEX0][2] = invw0 * vert0->texcoord[0][2]; - span.attrStart[FRAG_ATTRIB_TEX0][3] = invw0 * vert0->texcoord[0][3]; - ds = (invw1 * vert1->texcoord[0][0]) - span.attrStart[FRAG_ATTRIB_TEX0][0]; - dt = (invw1 * vert1->texcoord[0][1]) - span.attrStart[FRAG_ATTRIB_TEX0][1]; - dr = (invw1 * vert1->texcoord[0][2]) - span.attrStart[FRAG_ATTRIB_TEX0][2]; - dq = (invw1 * vert1->texcoord[0][3]) - span.attrStart[FRAG_ATTRIB_TEX0][3]; + span.attrStart[FRAG_ATTRIB_TEX0][0] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][0]; + span.attrStart[FRAG_ATTRIB_TEX0][1] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][1]; + span.attrStart[FRAG_ATTRIB_TEX0][2] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][2]; + span.attrStart[FRAG_ATTRIB_TEX0][3] = invw0 * vert0->attrib[FRAG_ATTRIB_TEX0][3]; + ds = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][0]) - span.attrStart[FRAG_ATTRIB_TEX0][0]; + dt = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][1]) - span.attrStart[FRAG_ATTRIB_TEX0][1]; + dr = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][2]) - span.attrStart[FRAG_ATTRIB_TEX0][2]; + dq = (invw1 * vert1->attrib[FRAG_ATTRIB_TEX0][3]) - span.attrStart[FRAG_ATTRIB_TEX0][3]; span.attrStepX[FRAG_ATTRIB_TEX0][0] = ds * invLen; span.attrStepX[FRAG_ATTRIB_TEX0][1] = dt * invLen; span.attrStepX[FRAG_ATTRIB_TEX0][2] = dr * invLen; @@ -304,58 +307,24 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) span.attrStepY[FRAG_ATTRIB_TEX0][3] = 0.0F; } #endif -#ifdef INTERP_MULTITEX - interpFlags |= SPAN_TEXTURE; +#if defined(INTERP_MULTITEX) || defined(INTERP_VARYING) + interpFlags |= (SPAN_TEXTURE | SPAN_VARYING); { const GLfloat invLen = 1.0F / numPixels; - GLuint u; - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture.Unit[u]._ReallyEnabled) { - const GLuint attr = FRAG_ATTRIB_TEX0 + u; - const GLfloat invw0 = vert0->win[3]; - const GLfloat invw1 = vert1->win[3]; - GLfloat ds, dt, dr, dq; - span.attrStart[attr][0] = invw0 * vert0->texcoord[u][0]; - span.attrStart[attr][1] = invw0 * vert0->texcoord[u][1]; - span.attrStart[attr][2] = invw0 * vert0->texcoord[u][2]; - span.attrStart[attr][3] = invw0 * vert0->texcoord[u][3]; - ds = (invw1 * vert1->texcoord[u][0]) - span.attrStart[attr][0]; - dt = (invw1 * vert1->texcoord[u][1]) - span.attrStart[attr][1]; - dr = (invw1 * vert1->texcoord[u][2]) - span.attrStart[attr][2]; - dq = (invw1 * vert1->texcoord[u][3]) - span.attrStart[attr][3]; - span.attrStepX[attr][0] = ds * invLen; - span.attrStepX[attr][1] = dt * invLen; - span.attrStepX[attr][2] = dr * invLen; - span.attrStepX[attr][3] = dq * invLen; - span.attrStepY[attr][0] = 0.0F; - span.attrStepY[attr][1] = 0.0F; - span.attrStepY[attr][2] = 0.0F; - span.attrStepY[attr][3] = 0.0F; - } - } - } -#endif -#ifdef INTERP_VARYING - interpFlags |= SPAN_VARYING; - { - const GLfloat invLen = 1.0F / numPixels; - const GLbitfield inputsUsed = ctx->FragmentProgram._Current ? - ctx->FragmentProgram._Current->Base.InputsRead : 0x0; const GLfloat invw0 = vert0->win[3]; const GLfloat invw1 = vert1->win[3]; - GLuint v; - for (v = 0; v < MAX_VARYING; v++) { - if (inputsUsed & FRAG_BIT_VAR(v)) { - GLuint attr = FRAG_ATTRIB_VAR0 + v; + GLuint attr; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { GLfloat ds, dt, dr, dq; - span.attrStart[attr][0] = invw0 * vert0->varying[v][0]; - span.attrStart[attr][1] = invw0 * vert0->varying[v][1]; - span.attrStart[attr][2] = invw0 * vert0->varying[v][2]; - span.attrStart[attr][3] = invw0 * vert0->varying[v][3]; - ds = (invw1 * vert1->varying[v][0]) - span.attrStart[attr][0]; - dt = (invw1 * vert1->varying[v][1]) - span.attrStart[attr][1]; - dr = (invw1 * vert1->varying[v][2]) - span.attrStart[attr][2]; - dq = (invw1 * vert1->varying[v][3]) - span.attrStart[attr][3]; + span.attrStart[attr][0] = invw0 * vert0->attrib[attr][0]; + span.attrStart[attr][1] = invw0 * vert0->attrib[attr][1]; + span.attrStart[attr][2] = invw0 * vert0->attrib[attr][2]; + span.attrStart[attr][3] = invw0 * vert0->attrib[attr][3]; + ds = (invw1 * vert1->attrib[attr][0]) - span.attrStart[attr][0]; + dt = (invw1 * vert1->attrib[attr][1]) - span.attrStart[attr][1]; + dr = (invw1 * vert1->attrib[attr][2]) - span.attrStart[attr][2]; + dq = (invw1 * vert1->attrib[attr][3]) - span.attrStart[attr][3]; span.attrStepX[attr][0] = ds * invLen; span.attrStepX[attr][1] = dt * invLen; span.attrStepX[attr][2] = dr * invLen; @@ -364,7 +333,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) span.attrStepY[attr][1] = 0.0F; span.attrStepY[attr][2] = 0.0F; span.attrStepY[attr][3] = 0.0F; - } + } } } #endif diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index d211a5a3a2..eca0b9d38d 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -88,8 +88,8 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) const GLuint colorIndex = (GLuint) vert->index; /* XXX round? */ #endif #if FLAGS & TEXTURE - GLfloat texcoord[MAX_TEXTURE_COORD_UNITS][4]; - GLuint u; + GLfloat attrib[FRAG_ATTRIB_MAX][4]; /* texture & varying */ + GLuint attr; #endif SWcontext *swrast = SWRAST_CONTEXT(ctx); SWspan *span = &(swrast->PointSpan); @@ -123,22 +123,22 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) span->arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA); if (ctx->FragmentProgram._Current) { /* Don't divide texture s,t,r by q (use TXP to do that) */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture._EnabledCoordUnits & (1 << u)) { - COPY_4V(texcoord[u], vert->texcoord[u]); + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + COPY_4V(attrib[attr], vert->attrib[attr]); } } } else { /* Divide texture s,t,r by q here */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture._EnabledCoordUnits & (1 << u)) { - const GLfloat q = vert->texcoord[u][3]; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + const GLfloat q = vert->attrib[attr][3]; const GLfloat invQ = (q == 0.0F || q == 1.0F) ? 1.0F : (1.0F / q); - texcoord[u][0] = vert->texcoord[u][0] * invQ; - texcoord[u][1] = vert->texcoord[u][1] * invQ; - texcoord[u][2] = vert->texcoord[u][2] * invQ; - texcoord[u][3] = q; + attrib[attr][0] = vert->attrib[attr][0] * invQ; + attrib[attr][1] = vert->attrib[attr][1] * invQ; + attrib[attr][2] = vert->attrib[attr][2] * invQ; + attrib[attr][3] = q; } } } @@ -260,7 +260,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) count = span->end = 0; } for (x = xmin; x <= xmax; x++) { -#if FLAGS & (SPRITE | TEXTURE) +#if FLAGS & SPRITE GLuint u; #endif @@ -279,10 +279,13 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) span->array->index[count] = colorIndex; #endif #if FLAGS & TEXTURE - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture._EnabledCoordUnits & (1 << u)) { - COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], texcoord[u]); - span->array->lambda[u][count] = 0.0; + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + COPY_4V(span->array->attribs[attr][count], attrib[attr]); + if (attr < FRAG_ATTRIB_VAR0) { + const GLuint u = attr - FRAG_ATTRIB_TEX0; + span->array->lambda[u][count] = 0.0; + } } } #endif @@ -329,6 +332,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #if FLAGS & SPRITE for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { + GLuint attr = FRAG_ATTRIB_TEX0 + u; if (ctx->Texture.Unit[u]._ReallyEnabled) { if (ctx->Point.CoordReplace[u]) { GLfloat s = 0.5F + (x + 0.5F - vert->win[0]) / size; @@ -340,17 +344,18 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) if (ctx->Point.SpriteRMode == GL_ZERO) r = 0.0F; else if (ctx->Point.SpriteRMode == GL_S) - r = vert->texcoord[u][0]; + r = vert->attrib[attr][0]; else /* GL_R */ - r = vert->texcoord[u][2]; - span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][0] = s; - span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][1] = t; - span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][2] = r; - span->array->attribs[FRAG_ATTRIB_TEX0 + u][count][3] = 1.0F; + r = vert->attrib[attr][2]; + span->array->attribs[attr][count][0] = s; + span->array->attribs[attr][count][1] = t; + span->array->attribs[attr][count][2] = r; + span->array->attribs[attr][count][3] = 1.0F; span->array->lambda[u][count] = 0.0; /* XXX fix? */ } else { - COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], vert->texcoord[u]); + COPY_4V(span->array->attribs[attr][count], + vert->attrib[attr]); } } } @@ -401,9 +406,9 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) span->array->index[count] = colorIndex; #endif #if FLAGS & TEXTURE - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture.Unit[u]._ReallyEnabled) { - COPY_4V(span->array->attribs[FRAG_ATTRIB_TEX0 + u][count], texcoord[u]); + for (attr = swrast->_MinFragmentAttrib; attr < swrast->_MaxFragmentAttrib; attr++) { + if (swrast->_FragmentAttribs & (1 << attr)) { + COPY_4V(span->array->attribs[attr][count], attribs[attr]); } } #endif diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 6c2e3862a3..3b7960bf80 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -866,7 +866,6 @@ fast_persp_span(GLcontext *ctx, SWspan *span, /* * Render a smooth-shaded, textured, RGBA triangle. - * Interpolate S,T,R with perspective correction, w/out mipmapping. */ #define NAME general_textured_triangle #define INTERP_Z 1 @@ -881,24 +880,6 @@ fast_persp_span(GLcontext *ctx, SWspan *span, -/* - * This is the big one! - * Interpolate Z, RGB, Alpha, specular, fog, N sets of texture coordinates, - * and varying floats. Yup, it's slow. - */ -#define NAME multitextured_triangle -#define INTERP_Z 1 -#define INTERP_W 1 -#define INTERP_FOG 1 -#define INTERP_RGB 1 -#define INTERP_ALPHA 1 -#define INTERP_SPEC 1 -#define INTERP_MULTITEX 1 -#define INTERP_VARYING 1 -#define RENDER_SPAN( span ) _swrast_write_rgba_span(ctx, &span); -#include "s_tritemp.h" - - /* * Special tri function for occlusion testing @@ -1137,13 +1118,7 @@ _swrast_choose_triangle( GLcontext *ctx ) } else { /* general case textured triangles */ - if (ctx->Texture._EnabledCoordUnits > 1 || - ctx->FragmentProgram._Current) { - USE(multitextured_triangle); - } - else { - USE(general_textured_triangle); - } + USE(general_textured_triangle); } } else { diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index 83b2f03781..435491a0c8 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -38,10 +38,8 @@ * INTERP_INDEX - if defined, interpolate color index values * INTERP_INT_TEX - if defined, interpolate integer ST texcoords * (fast, simple 2-D texture mapping) - * INTERP_TEX - if defined, interpolate set 0 float STRQ texcoords + * INTERP_TEX - if defined, interpolate texcoords and varying vars * NOTE: OpenGL STRQ = Mesa STUV (R was taken for red) - * INTERP_MULTITEX - if defined, interpolate N units of STRQ texcoords - * INTERP_VARYING - if defined, interpolate M GLSL varyings * * When one can directly address pixels in the color buffer the following * macros can be defined and used to compute pixel addresses during @@ -119,52 +117,19 @@ #endif -/* - * Either loop over all texture units, or just use unit zero. - */ -#ifdef INTERP_MULTITEX -#define TEX_UNIT_LOOP(CODE) \ - { \ - GLuint u; \ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { \ - if (ctx->Texture._EnabledCoordUnits & (1 << u)) { \ - const GLuint attr = FRAG_ATTRIB_TEX0 + u; \ - (void) attr; \ - CODE \ - } \ - } \ +#define TEXVAR_LOOP(CODE) \ + { \ + GLuint attr; \ + for (attr = swrast->_MinFragmentAttrib; \ + attr < swrast->_MaxFragmentAttrib; attr++) { \ + if (swrast->_FragmentAttribs & (1 << attr)) { \ + CODE \ + } \ + } \ } -#define INTERP_TEX -#elif defined(INTERP_TEX) -#define TEX_UNIT_LOOP(CODE) \ - { \ - const GLuint u = 0; \ - const GLuint attr = FRAG_ATTRIB_TEX0 + u; \ - (void) attr; \ - CODE \ - } -#endif -#ifdef INTERP_VARYING - -#define VARYING_LOOP(CODE) \ - { \ - GLuint iv, ic; \ - for (iv = 0; iv < MAX_VARYING; iv++) { \ - if (inputsUsed & FRAG_BIT_VAR(iv)) { \ - GLuint attr = FRAG_ATTRIB_VAR0 + iv; \ - (void) attr; \ - for (ic = 0; ic < 4; ic++) { \ - CODE \ - } \ - } \ - } \ - } -#endif - - /* * Some code we unfortunately need to prevent negative interpolated colors. @@ -210,6 +175,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLint lines; /* number of lines to be sampled on this edge */ } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); #ifdef INTERP_Z const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; const GLint fixedToDepthShift = depthBits <= 16 ? FIXED_SHIFT : 0; @@ -224,13 +190,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, const GLint snapMask = ~((FIXED_ONE / (1 << SUB_PIXEL_BITS)) - 1); /* for x/y coord snapping */ #endif GLinterp vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; -#ifdef INTERP_VARYING - const GLbitfield inputsUsed = ctx->FragmentProgram._Current ? - ctx->FragmentProgram._Current->Base.InputsRead : 0x0; -#endif SWspan span; + (void) swrast; + INIT_SPAN(span, GL_POLYGON, 0, 0, 0); #ifdef INTERP_Z @@ -638,10 +602,10 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_INT_TEX span.interpMask |= SPAN_INT_TEXTURE; { - GLfloat eMaj_ds = (vMax->texcoord[0][0] - vMin->texcoord[0][0]) * S_SCALE; - GLfloat eBot_ds = (vMid->texcoord[0][0] - vMin->texcoord[0][0]) * S_SCALE; - GLfloat eMaj_dt = (vMax->texcoord[0][1] - vMin->texcoord[0][1]) * T_SCALE; - GLfloat eBot_dt = (vMid->texcoord[0][1] - vMin->texcoord[0][1]) * T_SCALE; + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * S_SCALE; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * S_SCALE; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * T_SCALE; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * T_SCALE; span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); @@ -651,19 +615,19 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, } #endif #ifdef INTERP_TEX - span.interpMask |= SPAN_TEXTURE; + span.interpMask |= (SPAN_TEXTURE | SPAN_VARYING); { /* win[3] is 1/W */ const GLfloat wMax = vMax->win[3], wMin = vMin->win[3], wMid = vMid->win[3]; - TEX_UNIT_LOOP( - GLfloat eMaj_ds = vMax->texcoord[u][0] * wMax - vMin->texcoord[u][0] * wMin; - GLfloat eBot_ds = vMid->texcoord[u][0] * wMid - vMin->texcoord[u][0] * wMin; - GLfloat eMaj_dt = vMax->texcoord[u][1] * wMax - vMin->texcoord[u][1] * wMin; - GLfloat eBot_dt = vMid->texcoord[u][1] * wMid - vMin->texcoord[u][1] * wMin; - GLfloat eMaj_du = vMax->texcoord[u][2] * wMax - vMin->texcoord[u][2] * wMin; - GLfloat eBot_du = vMid->texcoord[u][2] * wMid - vMin->texcoord[u][2] * wMin; - GLfloat eMaj_dv = vMax->texcoord[u][3] * wMax - vMin->texcoord[u][3] * wMin; - GLfloat eBot_dv = vMid->texcoord[u][3] * wMid - vMin->texcoord[u][3] * wMin; + TEXVAR_LOOP( + GLfloat eMaj_ds = vMax->attrib[attr][0] * wMax - vMin->attrib[attr][0] * wMin; + GLfloat eBot_ds = vMid->attrib[attr][0] * wMid - vMin->attrib[attr][0] * wMin; + GLfloat eMaj_dt = vMax->attrib[attr][1] * wMax - vMin->attrib[attr][1] * wMin; + GLfloat eBot_dt = vMid->attrib[attr][1] * wMid - vMin->attrib[attr][1] * wMin; + GLfloat eMaj_du = vMax->attrib[attr][2] * wMax - vMin->attrib[attr][2] * wMin; + GLfloat eBot_du = vMid->attrib[attr][2] * wMid - vMin->attrib[attr][2] * wMin; + GLfloat eMaj_dv = vMax->attrib[attr][3] * wMax - vMin->attrib[attr][3] * wMin; + GLfloat eBot_dv = vMid->attrib[attr][3] * wMid - vMin->attrib[attr][3] * wMin; span.attrStepX[attr][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); span.attrStepY[attr][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); span.attrStepX[attr][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); @@ -675,19 +639,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, ) } #endif -#ifdef INTERP_VARYING - span.interpMask |= SPAN_VARYING; - { - /* win[3] is 1/W */ - const GLfloat wMax = vMax->win[3], wMin = vMin->win[3], wMid = vMid->win[3]; - VARYING_LOOP( - GLfloat eMaj_dvar = vMax->varying[iv][ic] * wMax - vMin->varying[iv][ic] * wMin; - GLfloat eBot_dvar = vMid->varying[iv][ic] * wMid - vMin->varying[iv][ic] * wMin; - span.attrStepX[attr][ic] = oneOverArea * (eMaj_dvar * eBot.dy - eMaj.dy * eBot_dvar); - span.attrStepY[attr][ic] = oneOverArea * (eMaj.dx * eBot_dvar - eMaj_dvar * eBot.dx); - ) - } -#endif /* * We always sample at pixel centers. However, we avoid @@ -782,19 +733,14 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, GLfixed tLeft=0, dtOuter=0, dtInner; #endif #ifdef INTERP_TEX - GLfloat sLeft[MAX_TEXTURE_COORD_UNITS]; - GLfloat tLeft[MAX_TEXTURE_COORD_UNITS]; - GLfloat uLeft[MAX_TEXTURE_COORD_UNITS]; - GLfloat vLeft[MAX_TEXTURE_COORD_UNITS]; - GLfloat dsOuter[MAX_TEXTURE_COORD_UNITS], dsInner[MAX_TEXTURE_COORD_UNITS]; - GLfloat dtOuter[MAX_TEXTURE_COORD_UNITS], dtInner[MAX_TEXTURE_COORD_UNITS]; - GLfloat duOuter[MAX_TEXTURE_COORD_UNITS], duInner[MAX_TEXTURE_COORD_UNITS]; - GLfloat dvOuter[MAX_TEXTURE_COORD_UNITS], dvInner[MAX_TEXTURE_COORD_UNITS]; -#endif -#ifdef INTERP_VARYING - GLfloat varLeft[MAX_VARYING][4]; - GLfloat dvarOuter[MAX_VARYING][4]; - GLfloat dvarInner[MAX_VARYING][4]; + GLfloat sLeft[FRAG_ATTRIB_MAX]; + GLfloat tLeft[FRAG_ATTRIB_MAX]; + GLfloat uLeft[FRAG_ATTRIB_MAX]; + GLfloat vLeft[FRAG_ATTRIB_MAX]; + GLfloat dsOuter[FRAG_ATTRIB_MAX], dsInner[FRAG_ATTRIB_MAX]; + GLfloat dtOuter[FRAG_ATTRIB_MAX], dtInner[FRAG_ATTRIB_MAX]; + GLfloat duOuter[FRAG_ATTRIB_MAX], duInner[FRAG_ATTRIB_MAX]; + GLfloat dvOuter[FRAG_ATTRIB_MAX], dvInner[FRAG_ATTRIB_MAX]; #endif for (subTriangle=0; subTriangle<=1; subTriangle++) { @@ -1042,41 +988,32 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_INT_TEX { GLfloat s0, t0; - s0 = vLower->texcoord[0][0] * S_SCALE; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * S_SCALE; sLeft = (GLfixed)(s0 * FIXED_SCALE + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + FIXED_HALF; dsOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]); - t0 = vLower->texcoord[0][1] * T_SCALE; + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * T_SCALE; tLeft = (GLfixed)(t0 * FIXED_SCALE + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + FIXED_HALF; dtOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]); } #endif #ifdef INTERP_TEX - TEX_UNIT_LOOP( + TEXVAR_LOOP( const GLfloat invW = vLower->win[3]; - const GLfloat s0 = vLower->texcoord[u][0] * invW; - const GLfloat t0 = vLower->texcoord[u][1] * invW; - const GLfloat u0 = vLower->texcoord[u][2] * invW; - const GLfloat v0 = vLower->texcoord[u][3] * invW; - sLeft[u] = s0 + (span.attrStepX[attr][0] * adjx + span.attrStepY[attr][0] * adjy) * (1.0F/FIXED_SCALE); - tLeft[u] = t0 + (span.attrStepX[attr][1] * adjx + span.attrStepY[attr][1] * adjy) * (1.0F/FIXED_SCALE); - uLeft[u] = u0 + (span.attrStepX[attr][2] * adjx + span.attrStepY[attr][2] * adjy) * (1.0F/FIXED_SCALE); - vLeft[u] = v0 + (span.attrStepX[attr][3] * adjx + span.attrStepY[attr][3] * adjy) * (1.0F/FIXED_SCALE); - dsOuter[u] = span.attrStepY[attr][0] + dxOuter * span.attrStepX[attr][0]; - dtOuter[u] = span.attrStepY[attr][1] + dxOuter * span.attrStepX[attr][1]; - duOuter[u] = span.attrStepY[attr][2] + dxOuter * span.attrStepX[attr][2]; - dvOuter[u] = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; - ) -#endif -#ifdef INTERP_VARYING - VARYING_LOOP( - const GLfloat invW = vLower->win[3]; - const GLfloat var0 = vLower->varying[iv][ic] * invW; - varLeft[iv][ic] = var0 + (span.attrStepX[attr][ic] * adjx + - span.attrStepY[attr][ic] * adjy) * (1.0f / FIXED_SCALE); - dvarOuter[iv][ic] = span.attrStepY[attr][ic] + dxOuter * span.attrStepX[attr][ic]; + const GLfloat s0 = vLower->attrib[attr][0] * invW; + const GLfloat t0 = vLower->attrib[attr][1] * invW; + const GLfloat u0 = vLower->attrib[attr][2] * invW; + const GLfloat v0 = vLower->attrib[attr][3] * invW; + sLeft[attr] = s0 + (span.attrStepX[attr][0] * adjx + span.attrStepY[attr][0] * adjy) * (1.0F/FIXED_SCALE); + tLeft[attr] = t0 + (span.attrStepX[attr][1] * adjx + span.attrStepY[attr][1] * adjy) * (1.0F/FIXED_SCALE); + uLeft[attr] = u0 + (span.attrStepX[attr][2] * adjx + span.attrStepY[attr][2] * adjy) * (1.0F/FIXED_SCALE); + vLeft[attr] = v0 + (span.attrStepX[attr][3] * adjx + span.attrStepY[attr][3] * adjy) * (1.0F/FIXED_SCALE); + dsOuter[attr] = span.attrStepY[attr][0] + dxOuter * span.attrStepX[attr][0]; + dtOuter[attr] = span.attrStepY[attr][1] + dxOuter * span.attrStepX[attr][1]; + duOuter[attr] = span.attrStepY[attr][2] + dxOuter * span.attrStepX[attr][2]; + dvOuter[attr] = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; ) #endif } /*if setupLeft*/ @@ -1134,16 +1071,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, dtInner = dtOuter + span.intTexStep[1]; #endif #ifdef INTERP_TEX - TEX_UNIT_LOOP( - dsInner[u] = dsOuter[u] + span.attrStepX[attr][0]; - dtInner[u] = dtOuter[u] + span.attrStepX[attr][1]; - duInner[u] = duOuter[u] + span.attrStepX[attr][2]; - dvInner[u] = dvOuter[u] + span.attrStepX[attr][3]; - ) -#endif -#ifdef INTERP_VARYING - VARYING_LOOP( - dvarInner[iv][ic] = dvarOuter[iv][ic] + span.attrStepX[attr][ic]; + TEXVAR_LOOP( + dsInner[attr] = dsOuter[attr] + span.attrStepX[attr][0]; + dtInner[attr] = dtOuter[attr] + span.attrStepX[attr][1]; + duInner[attr] = duOuter[attr] + span.attrStepX[attr][2]; + dvInner[attr] = dvOuter[attr] + span.attrStepX[attr][3]; ) #endif @@ -1188,16 +1120,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #endif #ifdef INTERP_TEX - TEX_UNIT_LOOP( - span.attrStart[attr][0] = sLeft[u]; - span.attrStart[attr][1] = tLeft[u]; - span.attrStart[attr][2] = uLeft[u]; - span.attrStart[attr][3] = vLeft[u]; - ) -#endif -#ifdef INTERP_VARYING - VARYING_LOOP( - span.attrStart[attr][ic] = varLeft[iv][ic]; + TEXVAR_LOOP( + span.attrStart[attr][0] = sLeft[attr]; + span.attrStart[attr][1] = tLeft[attr]; + span.attrStart[attr][2] = uLeft[attr]; + span.attrStart[attr][3] = vLeft[attr]; ) #endif @@ -1281,16 +1208,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, tLeft += dtOuter; #endif #ifdef INTERP_TEX - TEX_UNIT_LOOP( - sLeft[u] += dsOuter[u]; - tLeft[u] += dtOuter[u]; - uLeft[u] += duOuter[u]; - vLeft[u] += dvOuter[u]; - ) -#endif -#ifdef INTERP_VARYING - VARYING_LOOP( - varLeft[iv][ic] += dvarOuter[iv][ic]; + TEXVAR_LOOP( + sLeft[attr] += dsOuter[attr]; + tLeft[attr] += dtOuter[attr]; + uLeft[attr] += duOuter[attr]; + vLeft[attr] += dvOuter[attr]; ) #endif } @@ -1331,16 +1253,11 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, tLeft += dtInner; #endif #ifdef INTERP_TEX - TEX_UNIT_LOOP( - sLeft[u] += dsInner[u]; - tLeft[u] += dtInner[u]; - uLeft[u] += duInner[u]; - vLeft[u] += dvInner[u]; - ) -#endif -#ifdef INTERP_VARYING - VARYING_LOOP( - varLeft[iv][ic] += dvarInner[iv][ic]; + TEXVAR_LOOP( + sLeft[attr] += dsInner[attr]; + tLeft[attr] += dtInner[attr]; + uLeft[attr] += duInner[attr]; + vLeft[attr] += dvInner[attr]; ) #endif } @@ -1373,8 +1290,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #undef INTERP_INDEX #undef INTERP_INT_TEX #undef INTERP_TEX -#undef INTERP_MULTITEX -#undef INTERP_VARYING #undef TEX_UNIT_LOOP #undef VARYING_LOOP diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h index 2c1c0952af..9e1fe24bb4 100644 --- a/src/mesa/swrast/swrast.h +++ b/src/mesa/swrast/swrast.h @@ -67,13 +67,12 @@ typedef struct { * that clip{XYZ} were multiplied by to get ndc{XYZ}. */ GLfloat win[4]; - GLfloat texcoord[MAX_TEXTURE_COORD_UNITS][4]; GLchan color[4]; GLchan specular[4]; GLfloat fog; GLfloat index; GLfloat pointSize; - GLfloat varying[MAX_VERTEX_ATTRIBS][4]; + GLfloat attrib[FRAG_ATTRIB_MAX][4]; /**< texcoords & varying, more to come */ } SWvertex; diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index f17e69bfb2..e1b60d0e85 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -145,7 +145,7 @@ _swsetup_RenderStart( GLcontext *ctx ) if (RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_FIRST_TEX, _TNL_LAST_TEX )) { for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX(i) )) { - EMIT_ATTR( _TNL_ATTRIB_TEX(i), EMIT_4F, texcoord[i] ); + EMIT_ATTR( _TNL_ATTRIB_TEX(i), EMIT_4F, attrib[FRAG_ATTRIB_TEX0 + i] ); } } } @@ -156,7 +156,7 @@ _swsetup_RenderStart( GLcontext *ctx ) for (i = 0; i < ctx->Const.MaxVarying; i++) { if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_GENERIC(i) )) { EMIT_ATTR( _TNL_ATTRIB_GENERIC(i), VARYING_EMIT_STYLE, - varying[i] ); + attrib[FRAG_ATTRIB_VAR0 + i] ); } } } @@ -242,8 +242,13 @@ _swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest ) for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) - _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_TEX0+i, dest->texcoord[i] ); - + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_TEX0+i, + dest->attrib[FRAG_ATTRIB_TEX0 + i] ); + + for (i = 0 ; i < ctx->Const.MaxVarying ; i++) + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_GENERIC0+i, + dest->attrib[FRAG_ATTRIB_VAR0 + i] ); + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0, tmp ); UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->color, tmp ); -- cgit v1.2.3 From 01001d80e26143ac768115ccb2266db2b24d4fa0 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 11:28:15 -0700 Subject: Initial support of loop and subroutine instructions. New high-level flow-control instructions, both at IR level and GPU instructions for looping and subroutines. --- src/mesa/shader/prog_instruction.c | 6 ++++++ src/mesa/shader/prog_instruction.h | 12 +++++++++--- src/mesa/shader/slang/slang_codegen.c | 5 +++-- src/mesa/shader/slang/slang_emit.c | 29 ++++++++++++++++++++++++++--- src/mesa/shader/slang/slang_ir.h | 23 ++++++++++++++++++++--- src/mesa/swrast/s_fragprog.c | 13 +++++++++++++ src/mesa/tnl/t_vb_arbprogram.c | 6 ++++++ 7 files changed, 83 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index 0523f42125..c67831385f 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -120,9 +120,13 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_ARL, "ARL", 1 }, { OPCODE_ARL_NV, "ARL", 1 }, { OPCODE_ARR, "ARL", 1 }, + { OPCODE_BGNLOOP,"BGNLOOP", 0 }, + { OPCODE_BGNSUB, "BGNSUB", 0 }, { OPCODE_BRA, "BRA", 0 }, + { OPCODE_BRK, "BRK", 0 }, { OPCODE_CAL, "CAL", 0 }, { OPCODE_CMP, "CMP", 3 }, + { OPCODE_CONT, "CONT", 1 }, { OPCODE_COS, "COS", 1 }, { OPCODE_DDX, "DDX", 1 }, { OPCODE_DDY, "DDY", 1 }, @@ -133,6 +137,8 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_ELSE, "ELSE", 0 }, { OPCODE_END, "END", 0 }, { OPCODE_ENDIF, "ENDIF", 0 }, + { OPCODE_ENDLOOP,"ENDLOOP", 0 }, + { OPCODE_ENDSUB, "ENDSUB", 0 }, { OPCODE_EX2, "EX2", 1 }, { OPCODE_EXP, "EXP", 1 }, { OPCODE_FLR, "FLR", 1 }, diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index f018de82b3..100aac4b97 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -143,9 +143,13 @@ typedef enum prog_opcode { OPCODE_ARL, /* X X */ OPCODE_ARL_NV, /* 2 */ OPCODE_ARR, /* 2 */ + OPCODE_BGNLOOP, /* opt */ + OPCODE_BGNSUB, /* opt */ OPCODE_BRA, /* 2 X */ + OPCODE_BRK, /* 2 opt */ OPCODE_CAL, /* 2 2 */ OPCODE_CMP, /* X */ + OPCODE_CONT, /* opt */ OPCODE_COS, /* X 2 X X */ OPCODE_DDX, /* X X */ OPCODE_DDY, /* X X */ @@ -154,13 +158,15 @@ typedef enum prog_opcode { OPCODE_DPH, /* X X 1.1 */ OPCODE_DST, /* X X X X */ OPCODE_ELSE, /* X */ - OPCODE_END, /* X X X X X */ - OPCODE_ENDIF, /* X */ + OPCODE_END, /* X X X X opt */ + OPCODE_ENDIF, /* opt */ + OPCODE_ENDLOOP, /* opt */ + OPCODE_ENDSUB, /* opt */ OPCODE_EX2, /* X X 2 X X */ OPCODE_EXP, /* X X X */ OPCODE_FLR, /* X X 2 X X */ OPCODE_FRC, /* X X 2 X X */ - OPCODE_IF, /* X */ + OPCODE_IF, /* opt */ OPCODE_INT, /* X */ OPCODE_KIL, /* X */ OPCODE_KIL_NV, /* X X */ diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6b7df0597b..72f58a9ebd 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1463,7 +1463,7 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) /** - * Generate IR tree for an if/then/else conditional. + * Generate IR tree for an if/then/else conditional using BRAnch instructions. */ static slang_ir_node * _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) @@ -1513,7 +1513,8 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) /** - * Use high-level IF/ELSE/ENDIF instructions + * Generate IR tree for an if/then/else conditional using high-level + * IF/ELSE/ENDIF instructions */ static slang_ir_node * _slang_gen_if2(slang_assemble_ctx * A, const slang_operation *oper) diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 01fb5a41da..756bbe9587 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -297,6 +297,32 @@ slang_print_ir(const slang_ir_node *n, int indent) printf("ENDIF\n"); break; + case IR_BEGIN_SUB: + printf("BEGIN_SUB\n"); + break; + case IR_END_SUB: + printf("END_SUB\n"); + break; + case IR_RETURN: + printf("RETURN\n"); + break; + case IR_CALL: + printf("CALL\n"); + break; + + case IR_BEGIN_LOOP: + printf("BEGIN_LOOP\n"); + break; + case IR_END_LOOP: + printf("END_LOOP\n"); + break; + case IR_CONT: + printf("CONT\n"); + break; + case IR_BREAK: + printf("BREAK\n"); + break; + case IR_VAR: printf("VAR %s%s at %s store %p\n", (n->Var ? (char *) n->Var->a_name : "TEMP"), @@ -313,9 +339,6 @@ slang_print_ir(const slang_ir_node *n, int indent) printf("FIELD %s of\n", n->Target); slang_print_ir(n->Children[0], indent+3); break; - case IR_CALL: - printf("ASMCALL %s(%d args)\n", n->Target, 0/*XXX*/); - break; case IR_FLOAT: printf("FLOAT %f %f %f %f\n", n->Value[0], n->Value[1], n->Value[2], n->Value[3]); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 5fd72be36a..ac1ea4dbb4 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -46,15 +46,27 @@ typedef enum IR_NOP = 0, IR_SEQ, /* sequence (eval left, then right) */ IR_SCOPE, /* new variable scope (one child) */ + IR_LABEL, /* target of a jump or cjump */ IR_JUMP, /* unconditional jump */ IR_CJUMP0, /* conditional jump if zero */ IR_CJUMP1, /* conditional jump if one (or non-zero) */ - IR_COND, /* conditional expression */ + IR_COND, /* conditional expression/predicate */ + IR_IF, /* high-level IF */ IR_ELSE, /* high-level ELSE */ IR_ENDIF, /* high-level ENDIF */ - IR_CALL, /* call subroutine */ + + IR_BEGIN_SUB, /* begin subroutine */ + IR_END_SUB, /* end subroutine */ + IR_RETURN, /* return from subroutine */ + IR_CALL, /* call subroutine */ + + IR_BEGIN_LOOP,/* begin loop */ + IR_END_LOOP, /* end loop */ + IR_CONT, /* continue loop */ + IR_BREAK, /* break loop */ + IR_MOVE, IR_ADD, IR_SUB, @@ -90,17 +102,22 @@ typedef enum IR_NOISE3, /* noise(x, y, z) */ IR_NOISE4, /* noise(x, y, z, w) */ IR_NOT, /* logical not */ + IR_VAR, /* variable reference */ IR_VAR_DECL,/* var declaration */ + IR_ELEMENT, /* array element */ + IR_FIELD, /* struct field */ IR_SWIZZLE, /* swizzled storage access */ + IR_TEX, /* texture lookup */ IR_TEXB, /* texture lookup with LOD bias */ IR_TEXP, /* texture lookup with projection */ + IR_FLOAT, - IR_FIELD, IR_I_TO_F, /* int[4] to float[4] conversion */ IR_F_TO_I, /* float[4] to int[4] conversion */ + IR_KILL /* fragment kill/discard */ } slang_ir_opcode; diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 740360d460..00231aeae8 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -675,6 +675,14 @@ execute_program( GLcontext *ctx, } } break; + case OPCODE_BGNLOOP: /* begin loop */ + break; + case OPCODE_ENDLOOP: /* end loop */ + break; + case OPCODE_BGNSUB: /* begin subroutine */ + break; + case OPCODE_ENDSUB: /* end subroutine */ + break; case OPCODE_BRA: /* conditional branch */ { /* NOTE: The branch is conditional! */ @@ -692,6 +700,9 @@ execute_program( GLcontext *ctx, } } break; + case OPCODE_BRK: /* break out of loop */ + /* assert inside loop */ + break; case OPCODE_CAL: /* Call subroutine */ { /* NOTE: The call is conditional! */ @@ -722,6 +733,8 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; + case OPCODE_CONT: /* continue loop */ + break; case OPCODE_COS: { GLfloat a[4], result[4]; diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 22b6089fc8..0a443b3e01 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -736,9 +736,13 @@ static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union i do_NOP,/*ARL*/ do_NOP,/*ARL_NV*/ do_NOP,/*ARR*/ + do_NOP,/*BGNLOOP*/ + do_NOP,/*BGNSUB*/ do_NOP,/*BRA*/ + do_NOP,/*BRK*/ do_NOP,/*CAL*/ do_NOP,/*CMP*/ + do_NOP,/*CONT*/ do_NOP,/*COS*/ do_NOP,/*DDX*/ do_NOP,/*DDY*/ @@ -749,6 +753,8 @@ static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union i do_NOP,/*ELSE*/ do_NOP,/*END*/ do_NOP,/*ENDIF*/ + do_NOP,/*ENDLOOP*/ + do_NOP,/*ENDSUB*/ do_EX2, do_EXP, do_FLR, -- cgit v1.2.3 From 5db088d70fbd14620c2fc7840096a05993f8e2b9 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 14:58:15 -0700 Subject: indentation for program instructions (if/else, loops) --- src/mesa/shader/prog_print.c | 56 ++++++++++++++++++++++++++++++++++++-------- src/mesa/shader/prog_print.h | 6 ++--- 2 files changed, 49 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 63ff84e345..9474fe995f 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -238,9 +238,22 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, /** * Print a single vertex/fragment program instruction. */ -void -_mesa_print_instruction(const struct prog_instruction *inst) +GLint +_mesa_print_instruction(const struct prog_instruction *inst, GLint indent) { + GLuint i; + + if (inst->Opcode == OPCODE_ELSE || + inst->Opcode == OPCODE_ENDIF || + inst->Opcode == OPCODE_ENDLOOP || + inst->Opcode == OPCODE_ENDSUB) { + indent -= 3; + } + assert(indent >= 0); + for (i = 0; i < indent; i++) { + _mesa_printf(" "); + } + switch (inst->Opcode) { case OPCODE_PRINT: _mesa_printf("PRINT '%s'", inst->Data); @@ -306,16 +319,38 @@ _mesa_print_instruction(const struct prog_instruction *inst) print_comment(inst); break; case OPCODE_IF: - _mesa_printf(" IF (%s%s)", + _mesa_printf("IF (%s%s)", condcode_string(inst->DstReg.CondMask), swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); print_comment(inst); - break; + return indent + 3; case OPCODE_ELSE: - _mesa_printf(" ELSE;\n"); - break; + _mesa_printf("ELSE;\n"); + return indent + 3; case OPCODE_ENDIF: - _mesa_printf(" ENDIF;\n"); + _mesa_printf("ENDIF;\n"); + break; + case OPCODE_BGNLOOP: + _mesa_printf("LOOP;\n"); + return indent + 3; + case OPCODE_ENDLOOP: + _mesa_printf("ENDLOOP;\n"); + break; + case OPCODE_BRK: + /* XXX just like BRA */ + _mesa_printf("BRK %u (%s%s)", + inst->BranchTarget, + condcode_string(inst->DstReg.CondMask), + swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); + print_comment(inst); + break; + case OPCODE_BGNSUB: + _mesa_printf("SUB;\n"); + print_comment(inst); + return indent + 3; + case OPCODE_ENDSUB: + _mesa_printf("ENDSUB;\n"); + print_comment(inst); break; case OPCODE_END: _mesa_printf("END"); @@ -333,6 +368,7 @@ _mesa_print_instruction(const struct prog_instruction *inst) _mesa_num_inst_src_regs(inst->Opcode)); break; } + return indent; } @@ -343,10 +379,10 @@ _mesa_print_instruction(const struct prog_instruction *inst) void _mesa_print_program(const struct gl_program *prog) { - GLuint i; + GLuint i, indent = 0; for (i = 0; i < prog->NumInstructions; i++) { _mesa_printf("%3d: ", i); - _mesa_print_instruction(prog->Instructions + i); + indent = _mesa_print_instruction(prog->Instructions + i, indent); } } diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h index 8bc2c69c6f..19aaa53800 100644 --- a/src/mesa/shader/prog_print.h +++ b/src/mesa/shader/prog_print.h @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -27,8 +27,8 @@ #define PROG_PRINT_H -extern void -_mesa_print_instruction(const struct prog_instruction *inst); +extern GLint +_mesa_print_instruction(const struct prog_instruction *inst, GLint indent); extern void _mesa_print_alu_instruction(const struct prog_instruction *inst, -- cgit v1.2.3 From cf92c727979e434d148b23d20f2e4e0f4bc4de61 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 15:00:07 -0700 Subject: Initial implementation of high-level flow-control instructions. IF/ELSE/ENDIF and BEGIN_LOOP/END_LOOP/BREAK instructions seem to work. Disabled by default though until better tested. Implemented IR_NOT, but needs optimization. --- src/mesa/shader/slang/slang_codegen.c | 88 ++++++++++++++++++++++++++++++++--- src/mesa/shader/slang/slang_emit.c | 72 ++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_ir.h | 2 + src/mesa/swrast/s_fragprog.c | 38 ++++++++++++--- src/mesa/tnl/t_vp_build.c | 2 +- 5 files changed, 189 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 72f58a9ebd..2dd9ccc6fd 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -47,6 +47,8 @@ #include "slang_print.h" +static GLboolean UseHighLevelInstructions = GL_TRUE; + static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); @@ -506,6 +508,7 @@ new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) n->Children[0] = left; n->Children[1] = right; n->Writemask = WRITEMASK_XYZW; + n->InstLocation = -1; } return n; } @@ -567,6 +570,26 @@ new_jump(slang_atom target) } +static slang_ir_node * +new_begin_loop(void) +{ + slang_ir_node *n = new_node(IR_BEGIN_LOOP, NULL, NULL); + return n; +} + + +static slang_ir_node * +new_end_loop(slang_ir_node *beginNode) +{ + slang_ir_node *n = new_node(IR_END_LOOP, NULL, NULL); + assert(beginNode); + if (n) { + n->BranchNode = beginNode; + } + return n; +} + + /** * New IR_VAR node - a reference to a previously declared variable. */ @@ -1304,7 +1327,7 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, /** - * Generate IR tree for a while-loop. + * Generate IR tree for a while-loop. Use BRA-nch instruction. */ static slang_ir_node * _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) @@ -1313,7 +1336,7 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) * label "__startWhile" * eval expr (child[0]), updating condcodes * branch if false to "__endWhile" - * code body + * body code * jump "__startWhile" * label "__endWhile" */ @@ -1353,6 +1376,51 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Generate IR tree for a while-loop using high-level BGNLOOP/ENDLOOP, + * IF/ENDIF instructions. + */ +static slang_ir_node * +_slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) +{ + /* + * BGNLOOP + * eval expr (child[0]), updating condcodes + * IF !expr THEN + * BRK + * ENDIF + * body code + * ENDLOOP + */ + slang_ir_node *beginLoop, *endLoop, *ifThen, *endif; + slang_ir_node *brk, *cond, *body, *tree; + + beginLoop = new_begin_loop(); + + cond = _slang_gen_operation(A, &oper->children[0]); + cond = new_node(IR_NOT, cond, NULL); + cond = _slang_gen_cond(cond); + + ifThen = new_node(IR_IF, cond, NULL); + tree = new_seq(beginLoop, ifThen); + + brk = new_node(IR_BREAK, NULL, NULL); + tree = new_seq(tree, brk); + + endif = new_node(IR_ENDIF, NULL, NULL); + tree = new_seq(tree, endif); + + body = _slang_gen_operation(A, &oper->children[1]); + if (body) + tree = new_seq(tree, body); + + endLoop = new_end_loop(beginLoop); + tree = new_seq(tree, endLoop); + + return tree; +} + + /** * Generate IR tree for a do-while-loop. */ @@ -1517,7 +1585,7 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) * IF/ELSE/ENDIF instructions */ static slang_ir_node * -_slang_gen_if2(slang_assemble_ctx * A, const slang_operation *oper) +_slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) { /* * eval expr (child[0]), updating condcodes @@ -1529,6 +1597,10 @@ _slang_gen_if2(slang_assemble_ctx * A, const slang_operation *oper) * "false" code block * label "__endif" */ + /* XXX special cases to check for: + * if body of conditiona is just a "break", emit a conditional break + * instruction. + */ const GLboolean haveElseClause = !_slang_is_noop(&oper->children[2]); slang_ir_node *ifNode, *cond, *trueBody, *elseNode, *falseBody, *endifNode; slang_ir_node *tree; @@ -2261,7 +2333,10 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return _slang_gen_operation(A, &oper->children[0]); break; case slang_oper_while: - return _slang_gen_while(A, oper); + if (UseHighLevelInstructions) + return _slang_gen_hl_while(A, oper); + else + return _slang_gen_while(A, oper); case slang_oper_do: return _slang_gen_do(A, oper); case slang_oper_for: @@ -2427,8 +2502,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_identifier: return _slang_gen_variable(A, oper); case slang_oper_if: - if (A->program->Target == GL_FRAGMENT_PROGRAM_ARB) { - return _slang_gen_if(A, oper); + if (A->program->Target == GL_FRAGMENT_PROGRAM_ARB + && UseHighLevelInstructions) { + return _slang_gen_hl_if(A, oper); } else { /* XXX update tnl executor */ diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 756bbe9587..311eea1e6a 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1005,6 +1005,42 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +/** + * Logical-NOT + */ +static struct prog_instruction * +emit_not(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + GLfloat zero = 0.0; + slang_ir_storage st; + struct prog_instruction *inst; + + /* need zero constant */ + st.File = PROGRAM_CONSTANT; + st.Size = 1; + st.Index = _mesa_add_unnamed_constant(prog->Parameters, &zero, + 1, &st.Swizzle); + + /* child expr */ + (void) emit(vt, n->Children[0], prog); + /* XXXX if child instr is SGT convert to SLE, if SEQ, SNE, etc */ + + if (!n->Store) + if (!alloc_temp_storage(vt, n, n->Children[0]->Store->Size)) + return NULL; + + inst = new_instruction(prog, OPCODE_SEQ); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], &st); + + free_temp_storage(vt, n->Children[0]); + + return inst; +} + + + /** * Remove any SWIZZLE_NIL terms from given swizzle mask (smear prev term). * Ex: fix_swizzle("zyNN") -> "zyyy" @@ -1202,6 +1238,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_COND: return emit_cond(vt, n, prog); + case IR_NOT: + return emit_not(vt, n, prog); + case IR_LABEL: return emit_label(n->Target, prog); case IR_JUMP: @@ -1235,6 +1274,39 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return inst; } + case IR_BEGIN_LOOP: + { + /* save location of this instruction, used by OPCODE_ENDLOOP */ + n->InstLocation = prog->NumInstructions; + (void) new_instruction(prog, OPCODE_BGNLOOP); + } + break; + case IR_END_LOOP: + { + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_ENDLOOP); + assert(n->BranchNode); + assert(n->BranchNode->InstLocation >= 0); + /* The instruction BranchTarget points to top of loop */ + inst->BranchTarget = n->BranchNode->InstLocation; + return inst; + } + case IR_CONT: + return new_instruction(prog, OPCODE_CONT); + case IR_BREAK: + { + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_BRK); + inst->DstReg.CondMask = COND_TR; /* always true */ + return inst; + } + case IR_BEGIN_SUB: + return new_instruction(prog, OPCODE_BGNSUB); + case IR_END_SUB: + return new_instruction(prog, OPCODE_ENDSUB); + case IR_RETURN: + return new_instruction(prog, OPCODE_RET); + default: _mesa_problem(NULL, "Unexpected IR opcode in emit()\n"); abort(); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index ac1ea4dbb4..df5fc06779 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -150,6 +150,8 @@ typedef struct slang_ir_node_ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; /**< If Opcode == IR_VAR or IR_VAR_DECL */ slang_ir_storage *Store; /**< location of result of this operation */ + GLint InstLocation; /**< Location of instruction emitted for this node */ + struct slang_ir_node_ *BranchNode; /**< Used for branch instructions */ } slang_ir_node; diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 00231aeae8..287dd9b1db 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -625,7 +625,7 @@ execute_program( GLcontext *ctx, GLuint column ) { const GLuint MAX_EXEC = 10000; - GLuint pc, total = 0; + GLint pc, total = 0, loopDepth = 0; if (DEBUG_FRAG) { printf("execute fragment program --------------------\n"); @@ -642,7 +642,7 @@ execute_program( GLcontext *ctx, } if (DEBUG_FRAG) { - _mesa_print_instruction(inst); + _mesa_print_instruction(inst, 0); } switch (inst->Opcode) { @@ -676,8 +676,13 @@ execute_program( GLcontext *ctx, } break; case OPCODE_BGNLOOP: /* begin loop */ + loopDepth++; break; case OPCODE_ENDLOOP: /* end loop */ + loopDepth--; + assert(loopDepth >= 0); + /* subtract 1 here since pc is incremented by for(pc) loop */ + pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ break; case OPCODE_BGNSUB: /* begin subroutine */ break; @@ -701,7 +706,19 @@ execute_program( GLcontext *ctx, } break; case OPCODE_BRK: /* break out of loop */ - /* assert inside loop */ + if (loopDepth == 0) { + _mesa_problem(ctx, "BRK not inside a loop"); + } + /* search for OPCODE_ENDLOOP */ + do { + pc++; + inst = program->Base.Instructions + pc; + if (inst->Opcode == OPCODE_ENDLOOP) { + loopDepth--; + assert(loopDepth >= 0); + break; + } + } while (pc < maxInst); break; case OPCODE_CAL: /* Call subroutine */ { @@ -880,20 +897,25 @@ execute_program( GLcontext *ctx, /* do if-clause (just continue execution) */ } else { - /* do else-clause, or go to endif */ + /* search for else-clause or endif */ + /* XXX could encode location of the else/endif statement + * in the IF instruction to avoid searching... + */ GLint ifDepth = 1; do { pc++; inst = program->Base.Instructions + pc; if (inst->Opcode == OPCODE_END) { /* mal-formed program! */ - abort(); + _mesa_problem(ctx, "END found before ELSE/ENDIF"); + return GL_FALSE; } else if (inst->Opcode == OPCODE_IF) { + /* nested if */ ifDepth++; } else if (inst->Opcode == OPCODE_ELSE) { - if (ifDepth == 0) { + if (ifDepth == 1) { /* ok, continue normal execution */ break; } @@ -1335,6 +1357,10 @@ execute_program( GLcontext *ctx, result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; store_vector4( inst, machine, result ); + if (DEBUG_FRAG) { + printf("SGT %g %g %g %g\n", + result[0], result[1], result[2], result[3]); + } } break; case OPCODE_SIN: diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 47fed32904..6fb14e7caa 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -497,7 +497,7 @@ static void debug_insn( struct prog_instruction *inst, const char *fn, } _mesa_printf("%d:\t", line); - _mesa_print_instruction(inst); + _mesa_print_instruction(inst, 0); } } -- cgit v1.2.3 From 5e73284cee882bc3463e013c9b468a9b84c6dbc1 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 15:00:48 -0700 Subject: set UseHighLevelInstructions = false for now --- src/mesa/shader/slang/slang_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 2dd9ccc6fd..c70f73f15a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -47,7 +47,7 @@ #include "slang_print.h" -static GLboolean UseHighLevelInstructions = GL_TRUE; +static GLboolean UseHighLevelInstructions = GL_FALSE; static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); -- cgit v1.2.3 From d9731b26e759671d63e357eee2c921e90448ada2 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 15:17:06 -0700 Subject: minor formatting changes --- src/mesa/shader/prog_print.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 9474fe995f..208c998661 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -325,16 +325,16 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) print_comment(inst); return indent + 3; case OPCODE_ELSE: - _mesa_printf("ELSE;\n"); + _mesa_printf("ELSE\n"); return indent + 3; case OPCODE_ENDIF: - _mesa_printf("ENDIF;\n"); + _mesa_printf("ENDIF\n"); break; case OPCODE_BGNLOOP: - _mesa_printf("LOOP;\n"); + _mesa_printf("BGNLOOP\n"); return indent + 3; case OPCODE_ENDLOOP: - _mesa_printf("ENDLOOP;\n"); + _mesa_printf("ENDLOOP (goto %d)\n", inst->BranchTarget); break; case OPCODE_BRK: /* XXX just like BRA */ -- cgit v1.2.3 From 86080796471df6a9e126fd536b21c3b10cb5310c Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 17:18:10 -0700 Subject: Use IR node's BranchNode field for IF/ELSE/ENDIF instructions. This allows us to back-patch the IF/ELSE instruction's BranchTarget field to point to the location of the ELSE/ENDIF instructions. No longer have to search for ELSE/ENDIF in the interpreter. Also makes it trivial to translate IF/ELSE instructions into conditional/unconditional BRA instructions. --- src/mesa/shader/prog_print.c | 7 ++-- src/mesa/shader/slang/slang_codegen.c | 64 ++++++++++++++++++++++++++++------- src/mesa/shader/slang/slang_emit.c | 12 +++++++ src/mesa/swrast/s_fragprog.c | 57 ++++--------------------------- 4 files changed, 73 insertions(+), 67 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 208c998661..aea11da0db 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -319,13 +319,14 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) print_comment(inst); break; case OPCODE_IF: - _mesa_printf("IF (%s%s)", + _mesa_printf("IF (%s%s) (if false, goto %d)", condcode_string(inst->DstReg.CondMask), - swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); + swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), + inst->BranchTarget); print_comment(inst); return indent + 3; case OPCODE_ELSE: - _mesa_printf("ELSE\n"); + _mesa_printf("ELSE (goto %d)\n", inst->BranchTarget); return indent + 3; case OPCODE_ENDIF: _mesa_printf("ENDIF\n"); diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index c70f73f15a..7a1881c68e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -590,6 +590,47 @@ new_end_loop(slang_ir_node *beginNode) } +/** + * Child[0] is the condition. + * XXX we might re-design IR_IF so Children[1] is the "then" body and + * Children[0] is the "else" body. + */ +static slang_ir_node * +new_if(slang_ir_node *cond) +{ + slang_ir_node *n = new_node(IR_IF, NULL, NULL); + assert(cond); + if (n) { + n->Children[0] = cond; + } + return n; +} + + +static slang_ir_node * +new_else(slang_ir_node *ifNode) +{ + slang_ir_node *n = new_node(IR_ELSE, NULL, NULL); + assert(ifNode); + if (n) { + n->BranchNode = ifNode; + } + return n; +} + + +static slang_ir_node * +new_endif(slang_ir_node *elseOrIfNode) +{ + slang_ir_node *n = new_node(IR_ENDIF, NULL, NULL); + assert(elseOrIfNode); + if (n) { + n->BranchNode = elseOrIfNode; + } + return n; +} + + /** * New IR_VAR node - a reference to a previously declared variable. */ @@ -1401,13 +1442,13 @@ _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) cond = new_node(IR_NOT, cond, NULL); cond = _slang_gen_cond(cond); - ifThen = new_node(IR_IF, cond, NULL); + ifThen = new_if(cond); tree = new_seq(beginLoop, ifThen); brk = new_node(IR_BREAK, NULL, NULL); tree = new_seq(tree, brk); - endif = new_node(IR_ENDIF, NULL, NULL); + endif = new_endif(ifThen); tree = new_seq(tree, endif); body = _slang_gen_operation(A, &oper->children[1]); @@ -1589,13 +1630,11 @@ _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) { /* * eval expr (child[0]), updating condcodes - * branch if false to _else or _endif - * "true" code block - * if haveElseClause clause: - * jump "__endif" - * label "__else" - * "false" code block - * label "__endif" + * IF expr THEN + * if-body code + * ELSE + * else-body code + * ENDIF */ /* XXX special cases to check for: * if body of conditiona is just a "break", emit a conditional break @@ -1608,21 +1647,20 @@ _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) cond = _slang_gen_operation(A, &oper->children[0]); cond = _slang_gen_cond(cond); /*assert(cond->Store);*/ - ifNode = new_node(IR_IF, cond, NULL); + ifNode = new_if(cond); trueBody = _slang_gen_operation(A, &oper->children[1]); tree = new_seq(ifNode, trueBody); if (haveElseClause) { - /* else clause */ - elseNode = new_node(IR_ELSE, NULL, NULL); + elseNode = new_else(ifNode); tree = new_seq(tree, elseNode); falseBody = _slang_gen_operation(A, &oper->children[2]); tree = new_seq(tree, falseBody); } - endifNode = new_node(IR_ENDIF, NULL, NULL); + endifNode = new_endif(haveElseClause ? elseNode : ifNode); tree = new_seq(tree, endifNode); return tree; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 311eea1e6a..b890a6d93c 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1036,6 +1036,7 @@ emit_not(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) free_temp_storage(vt, n->Children[0]); + inst->Comment = _mesa_strdup("NOT"); return inst; } @@ -1259,18 +1260,29 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst = new_instruction(prog, OPCODE_IF); inst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ inst->DstReg.CondSwizzle = SWIZZLE_X; + n->InstLocation = prog->NumInstructions - 1; return inst; } case IR_ELSE: { struct prog_instruction *inst; + n->InstLocation = prog->NumInstructions; inst = new_instruction(prog, OPCODE_ELSE); + /* point IF's BranchTarget just after this instruction */ + assert(n->BranchNode); + assert(n->BranchNode->InstLocation >= 0); + prog->Instructions[n->BranchNode->InstLocation].BranchTarget = prog->NumInstructions; return inst; } case IR_ENDIF: { struct prog_instruction *inst; + n->InstLocation = prog->NumInstructions; inst = new_instruction(prog, OPCODE_ENDIF); + /* point ELSE's BranchTarget to just after this inst */ + assert(n->BranchNode); + assert(n->BranchNode->InstLocation >= 0); + prog->Instructions[n->BranchNode->InstLocation].BranchTarget = prog->NumInstructions; return inst; } diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 287dd9b1db..fbd25c0fbf 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -897,62 +897,17 @@ execute_program( GLcontext *ctx, /* do if-clause (just continue execution) */ } else { - /* search for else-clause or endif */ - /* XXX could encode location of the else/endif statement - * in the IF instruction to avoid searching... - */ - GLint ifDepth = 1; - do { - pc++; - inst = program->Base.Instructions + pc; - if (inst->Opcode == OPCODE_END) { - /* mal-formed program! */ - _mesa_problem(ctx, "END found before ELSE/ENDIF"); - return GL_FALSE; - } - else if (inst->Opcode == OPCODE_IF) { - /* nested if */ - ifDepth++; - } - else if (inst->Opcode == OPCODE_ELSE) { - if (ifDepth == 1) { - /* ok, continue normal execution */ - break; - } - } - else if (inst->Opcode == OPCODE_ENDIF) { - ifDepth--; - if (ifDepth == 0) { - /* ok, continue normal execution */ - break; - } - } - assert(ifDepth >= 0); - } while (pc < maxInst); + /* go to the instruction after ELSE or ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; } } break; case OPCODE_ELSE: { - /* find/goto ENDIF */ - GLint ifDepth = 1; - do { - pc++; - inst = program->Base.Instructions + pc; - if (inst->Opcode == OPCODE_END) { - /* mal-formed program! */ - abort(); - } - else if (inst->Opcode == OPCODE_IF) { - ifDepth++; - } - else if (inst->Opcode == OPCODE_ENDIF) { - ifDepth--; - if (ifDepth == 0) - break; - } - assert(ifDepth >= 0); - } while (pc < maxInst); + /* goto ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; } break; case OPCODE_ENDIF: -- cgit v1.2.3 From 2755c798f3cb89fcd4ece16cd740af1cd86a6b99 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 18:01:02 -0700 Subject: BRK instruction's BranchTarget field now used for efficiently breaking out of loops. BRK's BranchTarget field actually points to the top of the loop, not the bottom, since we don't know the later's location yet. In the interpreter, basically do an indirect jump to update the PC. --- src/mesa/shader/prog_print.c | 8 ++-- src/mesa/shader/slang/slang_codegen.c | 90 +++++++++++++++++++++++++++++++++-- src/mesa/shader/slang/slang_emit.c | 24 ++++++++-- src/mesa/swrast/s_fragprog.c | 30 +++++------- 4 files changed, 123 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index aea11da0db..3d4a474b05 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -332,17 +332,17 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) _mesa_printf("ENDIF\n"); break; case OPCODE_BGNLOOP: - _mesa_printf("BGNLOOP\n"); + _mesa_printf("BGNLOOP (end at %d)\n", inst->BranchTarget); return indent + 3; case OPCODE_ENDLOOP: _mesa_printf("ENDLOOP (goto %d)\n", inst->BranchTarget); break; case OPCODE_BRK: /* XXX just like BRA */ - _mesa_printf("BRK %u (%s%s)", - inst->BranchTarget, + _mesa_printf("BRK (%s%s) (for loop beginning at %d)", condcode_string(inst->DstReg.CondMask), - swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); + swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), + inst->BranchTarget); print_comment(inst); break; case OPCODE_BGNSUB: diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 7a1881c68e..a5f033d912 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -590,6 +590,18 @@ new_end_loop(slang_ir_node *beginNode) } +static slang_ir_node * +new_break(slang_ir_node *beginNode) +{ + slang_ir_node *n = new_node(IR_BREAK, NULL, NULL); + assert(beginNode); + if (n) { + n->BranchNode = beginNode; + } + return n; +} + + /** * Child[0] is the condition. * XXX we might re-design IR_IF so Children[1] is the "then" body and @@ -1430,7 +1442,7 @@ _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) * IF !expr THEN * BRK * ENDIF - * body code + * body code (child[1]) * ENDLOOP */ slang_ir_node *beginLoop, *endLoop, *ifThen, *endif; @@ -1445,7 +1457,7 @@ _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) ifThen = new_if(cond); tree = new_seq(beginLoop, ifThen); - brk = new_node(IR_BREAK, NULL, NULL); + brk = new_break(beginLoop); tree = new_seq(tree, brk); endif = new_endif(ifThen); @@ -1571,6 +1583,73 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Generate IR tree for a for-loop, using high-level BGNLOOP/ENDLOOP and + * IF/ENDIF instructions. + * + * XXX note done yet! + */ +static slang_ir_node * +_slang_gen_hl_for(slang_assemble_ctx * A, const slang_operation *oper) +{ + /* + * init code (child[0]) + * BGNLOOP + * eval expr (child[1]), updating condcodes + * IF !expr THEN + * BRK + * ENDIF + * code body (child[3]) + * label "__continueFor" // jump here for "continue" + * incr code (child[2]) + * ENDLOOP + */ + slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startFor"); + slang_atom contAtom = slang_atom_pool_gen(A->atoms, "__continueFor"); + slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endFor"); + slang_ir_node *init, *startLab, *cond, *bra, *body, *contLab; + slang_ir_node *incr, *jump, *endLab, *tree; + slang_atom prevLoopBreak = A->CurLoopBreak; + slang_atom prevLoopCont = A->CurLoopCont; + + /* Push this loop */ + A->CurLoopBreak = endAtom; + A->CurLoopCont = contAtom; + + init = _slang_gen_operation(A, &oper->children[0]); + startLab = new_label(startAtom); + tree = new_seq(init, startLab); + + cond = _slang_gen_operation(A, &oper->children[1]); + cond = _slang_gen_cond(cond); + tree = new_seq(tree, cond); + + bra = new_cjump(endAtom, 0); + tree = new_seq(tree, bra); + + body = _slang_gen_operation(A, &oper->children[3]); + tree = new_seq(tree, body); + + contLab = new_label(contAtom); + tree = new_seq(tree, contLab); + + incr = _slang_gen_operation(A, &oper->children[2]); + tree = new_seq(tree, incr); + + jump = new_jump(startAtom); + tree = new_seq(tree, jump); + + endLab = new_label(endAtom); + tree = new_seq(tree, endLab); + + /* Pop this loop */ + A->CurLoopBreak = prevLoopBreak; + A->CurLoopCont = prevLoopCont; + + return tree; +} + + /** * Generate IR tree for an if/then/else conditional using BRAnch instructions. */ @@ -2378,16 +2457,21 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_do: return _slang_gen_do(A, oper); case slang_oper_for: - return _slang_gen_for(A, oper); + if (UseHighLevelInstructions) + return _slang_gen_hl_for(A, oper); + else + return _slang_gen_for(A, oper); case slang_oper_break: if (!A->CurLoopBreak) { RETURN_ERROR("'break' not in loop", 0); } + /* XXX emit IR_BREAK instruction */ return new_jump(A->CurLoopBreak); case slang_oper_continue: if (!A->CurLoopCont) { RETURN_ERROR("'continue' not in loop", 0); } + /* XXX emit IR_CONT instruction */ return new_jump(A->CurLoopCont); case slang_oper_discard: return new_node(IR_KILL, NULL, NULL); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index b890a6d93c..3faacdd4cf 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1265,24 +1265,29 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } case IR_ELSE: { - struct prog_instruction *inst; + struct prog_instruction *inst, *ifInst; n->InstLocation = prog->NumInstructions; inst = new_instruction(prog, OPCODE_ELSE); /* point IF's BranchTarget just after this instruction */ assert(n->BranchNode); assert(n->BranchNode->InstLocation >= 0); - prog->Instructions[n->BranchNode->InstLocation].BranchTarget = prog->NumInstructions; + ifInst = prog->Instructions + n->BranchNode->InstLocation; + assert(ifInst->Opcode == OPCODE_IF); + ifInst->BranchTarget = prog->NumInstructions; return inst; } case IR_ENDIF: { - struct prog_instruction *inst; + struct prog_instruction *inst, *elseInst; n->InstLocation = prog->NumInstructions; inst = new_instruction(prog, OPCODE_ENDIF); /* point ELSE's BranchTarget to just after this inst */ assert(n->BranchNode); assert(n->BranchNode->InstLocation >= 0); - prog->Instructions[n->BranchNode->InstLocation].BranchTarget = prog->NumInstructions; + elseInst = prog->Instructions + n->BranchNode->InstLocation; + assert(elseInst->Opcode == OPCODE_ELSE || + elseInst->Opcode == OPCODE_IF); + elseInst->BranchTarget = prog->NumInstructions; return inst; } @@ -1295,12 +1300,15 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) break; case IR_END_LOOP: { - struct prog_instruction *inst; + struct prog_instruction *inst, *beginInst; inst = new_instruction(prog, OPCODE_ENDLOOP); assert(n->BranchNode); assert(n->BranchNode->InstLocation >= 0); /* The instruction BranchTarget points to top of loop */ inst->BranchTarget = n->BranchNode->InstLocation; + /* Update BEGIN_LOOP's BranchTarget to point to this instruction */ + beginInst = prog->Instructions + n->BranchNode->InstLocation; + beginInst->BranchTarget = prog->NumInstructions - 1; return inst; } case IR_CONT: @@ -1310,6 +1318,12 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) struct prog_instruction *inst; inst = new_instruction(prog, OPCODE_BRK); inst->DstReg.CondMask = COND_TR; /* always true */ + /* This instruction's branch target is top of loop, not bottom of + * loop because we don't know where it is yet! + */ + assert(n->BranchNode); + assert(n->BranchNode->InstLocation >= 0); + inst->BranchTarget = n->BranchNode->InstLocation; return inst; } case IR_BEGIN_SUB: diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index fbd25c0fbf..12c8aee6ea 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -625,7 +625,7 @@ execute_program( GLcontext *ctx, GLuint column ) { const GLuint MAX_EXEC = 10000; - GLint pc, total = 0, loopDepth = 0; + GLint pc, total = 0; if (DEBUG_FRAG) { printf("execute fragment program --------------------\n"); @@ -676,11 +676,8 @@ execute_program( GLcontext *ctx, } break; case OPCODE_BGNLOOP: /* begin loop */ - loopDepth++; break; case OPCODE_ENDLOOP: /* end loop */ - loopDepth--; - assert(loopDepth >= 0); /* subtract 1 here since pc is incremented by for(pc) loop */ pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ break; @@ -706,19 +703,18 @@ execute_program( GLcontext *ctx, } break; case OPCODE_BRK: /* break out of loop */ - if (loopDepth == 0) { - _mesa_problem(ctx, "BRK not inside a loop"); - } - /* search for OPCODE_ENDLOOP */ - do { - pc++; - inst = program->Base.Instructions + pc; - if (inst->Opcode == OPCODE_ENDLOOP) { - loopDepth--; - assert(loopDepth >= 0); - break; - } - } while (pc < maxInst); + { + /* The location of the ENDLOOP instruction is saved in the + * BGNLOOP instruction. Get that instruction and jump to + * its BranchTarget + 1. + */ + const struct prog_instruction *loopBeginInst + = program->Base.Instructions + inst->BranchTarget; + ASSERT(loopBeginInst->Opcode == OPCODE_BGNLOOP); + ASSERT(loopBeginInst->BranchTarget >= 0); + /* we'll add one at bottom of for-loop */ + pc = loopBeginInst->BranchTarget; + } break; case OPCODE_CAL: /* Call subroutine */ { -- cgit v1.2.3 From d434019633ccc537f07ec4e7d409bc93134367c8 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 5 Feb 2007 18:04:35 -0700 Subject: additional comments for BranchTarget --- src/mesa/shader/prog_instruction.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index 100aac4b97..a9156bcad5 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -400,6 +400,10 @@ struct prog_instruction /** * For BRA and CAL instructions, the location to jump to. + * For BGNLOOP, points to ENDLOOP (and vice-versa). + * For BRK, points to BGNLOOP (which points to ENDLOOP). + * For IF, points to else or endif. + * For ELSE, points to endif. */ GLuint BranchTarget; -- cgit v1.2.3 From 204336451678ba8710756111e6cf4867d6adb40e Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Feb 2007 20:45:43 -0700 Subject: redo IR_IF node, removing IR_ELSE, IR_ENDIF --- src/mesa/shader/slang/slang_codegen.c | 79 ++++++-------------------- src/mesa/shader/slang/slang_emit.c | 102 +++++++++++++++++++--------------- src/mesa/shader/slang/slang_ir.h | 4 +- 3 files changed, 75 insertions(+), 110 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a5f033d912..780c9c1cfe 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -47,7 +47,7 @@ #include "slang_print.h" -static GLboolean UseHighLevelInstructions = GL_FALSE; +static GLboolean UseHighLevelInstructions = GL_TRUE; static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); @@ -602,42 +602,13 @@ new_break(slang_ir_node *beginNode) } -/** - * Child[0] is the condition. - * XXX we might re-design IR_IF so Children[1] is the "then" body and - * Children[0] is the "else" body. - */ static slang_ir_node * -new_if(slang_ir_node *cond) +new_if(slang_ir_node *cond, slang_ir_node *ifPart, slang_ir_node *elsePart) { - slang_ir_node *n = new_node(IR_IF, NULL, NULL); + slang_ir_node *n = new_node(IR_IF, cond, ifPart); assert(cond); if (n) { - n->Children[0] = cond; - } - return n; -} - - -static slang_ir_node * -new_else(slang_ir_node *ifNode) -{ - slang_ir_node *n = new_node(IR_ELSE, NULL, NULL); - assert(ifNode); - if (n) { - n->BranchNode = ifNode; - } - return n; -} - - -static slang_ir_node * -new_endif(slang_ir_node *elseOrIfNode) -{ - slang_ir_node *n = new_node(IR_ENDIF, NULL, NULL); - assert(elseOrIfNode); - if (n) { - n->BranchNode = elseOrIfNode; + n->Children[2] = elsePart; } return n; } @@ -1445,8 +1416,8 @@ _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) * body code (child[1]) * ENDLOOP */ - slang_ir_node *beginLoop, *endLoop, *ifThen, *endif; - slang_ir_node *brk, *cond, *body, *tree; + slang_ir_node *beginLoop, *endLoop, *ifThen; + slang_ir_node *cond, *body, *tree; beginLoop = new_begin_loop(); @@ -1454,15 +1425,11 @@ _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) cond = new_node(IR_NOT, cond, NULL); cond = _slang_gen_cond(cond); - ifThen = new_if(cond); + ifThen = new_if(cond, + new_break(beginLoop), + NULL); tree = new_seq(beginLoop, ifThen); - brk = new_break(beginLoop); - tree = new_seq(tree, brk); - - endif = new_endif(ifThen); - tree = new_seq(tree, endif); - body = _slang_gen_operation(A, &oper->children[1]); if (body) tree = new_seq(tree, body); @@ -1702,7 +1669,7 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) /** * Generate IR tree for an if/then/else conditional using high-level - * IF/ELSE/ENDIF instructions + * IR_IF instruction. */ static slang_ir_node * _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) @@ -1720,29 +1687,19 @@ _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) * instruction. */ const GLboolean haveElseClause = !_slang_is_noop(&oper->children[2]); - slang_ir_node *ifNode, *cond, *trueBody, *elseNode, *falseBody, *endifNode; - slang_ir_node *tree; + slang_ir_node *ifNode, *cond, *ifBody, *elseBody; cond = _slang_gen_operation(A, &oper->children[0]); cond = _slang_gen_cond(cond); - /*assert(cond->Store);*/ - ifNode = new_if(cond); - - trueBody = _slang_gen_operation(A, &oper->children[1]); - tree = new_seq(ifNode, trueBody); - - if (haveElseClause) { - elseNode = new_else(ifNode); - tree = new_seq(tree, elseNode); - - falseBody = _slang_gen_operation(A, &oper->children[2]); - tree = new_seq(tree, falseBody); - } + ifBody = _slang_gen_operation(A, &oper->children[1]); + if (haveElseClause) + elseBody = _slang_gen_operation(A, &oper->children[2]); + else + elseBody = NULL; - endifNode = new_endif(haveElseClause ? elseNode : ifNode); - tree = new_seq(tree, endifNode); + ifNode = new_if(cond, ifBody, elseBody); - return tree; + return ifNode; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 3faacdd4cf..82a8f0befb 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -103,8 +103,6 @@ static slang_ir_info IrInfo[] = { { IR_CJUMP0, "IR_CJUMP0", OPCODE_NOP, 0, 0 }, { IR_CJUMP1, "IR_CJUMP1", OPCODE_NOP, 0, 0 }, { IR_IF, "IR_IF", OPCODE_NOP, 0, 0 }, - { IR_ELSE, "IR_ELSE", OPCODE_NOP, 0, 0 }, - { IR_ENDIF, "IR_ENDIF", OPCODE_NOP, 0, 0 }, { IR_KILL, "IR_KILL", OPCODE_NOP, 0, 0 }, { IR_COND, "IR_COND", OPCODE_NOP, 0, 0 }, { IR_CALL, "IR_CALL", OPCODE_NOP, 0, 0 }, @@ -232,11 +230,18 @@ storage_string(const slang_ir_storage *st) } +static void +spaces(int n) +{ + while (n-- > 0) { + printf(" "); + } +} + #define IND 0 void slang_print_ir(const slang_ir_node *n, int indent) { - int i; if (!n) return; #if !IND @@ -244,8 +249,7 @@ slang_print_ir(const slang_ir_node *n, int indent) #else printf("%3d:", indent); #endif - for (i = 0; i < indent; i++) - printf(" "); + spaces(indent); switch (n->Opcode) { case IR_SEQ: @@ -289,11 +293,14 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_IF: printf("IF \n"); slang_print_ir(n->Children[0], indent+3); - break; - case IR_ELSE: - printf("ELSE\n"); - break; - case IR_ENDIF: + spaces(indent); + printf("THEN\n"); + slang_print_ir(n->Children[1], indent+3); + if (n->Children[2]) { + spaces(indent); + printf("ELSE\n"); + slang_print_ir(n->Children[2], indent+3); + } printf("ENDIF\n"); break; @@ -1041,6 +1048,44 @@ emit_not(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +static struct prog_instruction * +emit_if(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *ifInst; + GLuint ifInstLoc, elseInstLoc; + + emit(vt, n->Children[0], prog); /* the condition */ + ifInstLoc = prog->NumInstructions; + ifInst = new_instruction(prog, OPCODE_IF); + ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ + ifInst->DstReg.CondSwizzle = SWIZZLE_X; + + /* if body */ + emit(vt, n->Children[1], prog); + + if (n->Children[2]) { + /* else body */ + elseInstLoc = prog->NumInstructions; + (void) new_instruction(prog, OPCODE_ELSE); + ifInst = prog->Instructions + ifInstLoc; + ifInst->BranchTarget = prog->NumInstructions; + + emit(vt, n->Children[2], prog); + } + else { + ifInst = prog->Instructions + ifInstLoc; + ifInst->BranchTarget = prog->NumInstructions + 1; + } + + (void) new_instruction(prog, OPCODE_ENDIF); + if (n->Children[2]) { + struct prog_instruction *elseInst; + elseInst = prog->Instructions + elseInstLoc; + elseInst->BranchTarget = prog->NumInstructions; + } + return NULL; +} + /** * Remove any SWIZZLE_NIL terms from given swizzle mask (smear prev term). @@ -1254,42 +1299,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return emit_kill(prog); case IR_IF: - { - struct prog_instruction *inst; - emit(vt, n->Children[0], prog); /* the condition */ - inst = new_instruction(prog, OPCODE_IF); - inst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ - inst->DstReg.CondSwizzle = SWIZZLE_X; - n->InstLocation = prog->NumInstructions - 1; - return inst; - } - case IR_ELSE: - { - struct prog_instruction *inst, *ifInst; - n->InstLocation = prog->NumInstructions; - inst = new_instruction(prog, OPCODE_ELSE); - /* point IF's BranchTarget just after this instruction */ - assert(n->BranchNode); - assert(n->BranchNode->InstLocation >= 0); - ifInst = prog->Instructions + n->BranchNode->InstLocation; - assert(ifInst->Opcode == OPCODE_IF); - ifInst->BranchTarget = prog->NumInstructions; - return inst; - } - case IR_ENDIF: - { - struct prog_instruction *inst, *elseInst; - n->InstLocation = prog->NumInstructions; - inst = new_instruction(prog, OPCODE_ENDIF); - /* point ELSE's BranchTarget to just after this inst */ - assert(n->BranchNode); - assert(n->BranchNode->InstLocation >= 0); - elseInst = prog->Instructions + n->BranchNode->InstLocation; - assert(elseInst->Opcode == OPCODE_ELSE || - elseInst->Opcode == OPCODE_IF); - elseInst->BranchTarget = prog->NumInstructions; - return inst; - } + return emit_if(vt, n, prog); case IR_BEGIN_LOOP: { diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index df5fc06779..0f2ceb03c0 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -53,9 +53,7 @@ typedef enum IR_CJUMP1, /* conditional jump if one (or non-zero) */ IR_COND, /* conditional expression/predicate */ - IR_IF, /* high-level IF */ - IR_ELSE, /* high-level ELSE */ - IR_ENDIF, /* high-level ENDIF */ + IR_IF, /* high-level IF/then/else */ IR_BEGIN_SUB, /* begin subroutine */ IR_END_SUB, /* end subroutine */ -- cgit v1.2.3 From 7e73bc32f565b3d07e9a5cfbe0736d1d6bd6a2c1 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Feb 2007 20:53:09 -0700 Subject: new_node[0123]() functions --- src/mesa/shader/slang/slang_codegen.c | 108 +++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 47 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 780c9c1cfe..88d61a5a68 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -500,32 +500,53 @@ _slang_free_ir_tree(slang_ir_node *n) static slang_ir_node * -new_node(slang_ir_opcode op, slang_ir_node *left, slang_ir_node *right) +new_node3(slang_ir_opcode op, + slang_ir_node *c0, slang_ir_node *c1, slang_ir_node *c2) { slang_ir_node *n = (slang_ir_node *) calloc(1, sizeof(slang_ir_node)); if (n) { n->Opcode = op; - n->Children[0] = left; - n->Children[1] = right; + n->Children[0] = c0; + n->Children[1] = c1; + n->Children[2] = c2; n->Writemask = WRITEMASK_XYZW; n->InstLocation = -1; } return n; } +static slang_ir_node * +new_node2(slang_ir_opcode op, slang_ir_node *c0, slang_ir_node *c1) +{ + return new_node3(op, c0, c1, NULL); +} + +static slang_ir_node * +new_node1(slang_ir_opcode op, slang_ir_node *c0) +{ + return new_node3(op, c0, NULL, NULL); +} + +static slang_ir_node * +new_node0(slang_ir_opcode op) +{ + return new_node3(op, NULL, NULL, NULL); +} + + static slang_ir_node * new_seq(slang_ir_node *left, slang_ir_node *right) { /* XXX if either left or right is null, just return pointer to other?? */ assert(left); assert(right); - return new_node(IR_SEQ, left, right); + return new_node2(IR_SEQ, left, right); } static slang_ir_node * new_label(slang_atom labName) { - slang_ir_node *n = new_node(IR_LABEL, NULL, NULL); + slang_ir_node *n = new_node0(IR_LABEL); n->Target = (char *) labName; /*_mesa_strdup(name);*/ return n; } @@ -534,7 +555,7 @@ static slang_ir_node * new_float_literal(const float v[4]) { const GLuint size = (v[0] == v[1] && v[0] == v[2] && v[0] == v[3]) ? 1 : 4; - slang_ir_node *n = new_node(IR_FLOAT, NULL, NULL); + slang_ir_node *n = new_node0(IR_FLOAT); COPY_4V(n->Value, v); /* allocate a storage object, but compute actual location (Index) later */ n->Store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); @@ -550,7 +571,7 @@ new_float_literal(const float v[4]) static slang_ir_node * new_cjump(slang_atom target, GLuint zeroOrOne) { - slang_ir_node *n = new_node(zeroOrOne ? IR_CJUMP1 : IR_CJUMP0, NULL, NULL); + slang_ir_node *n = new_node0(zeroOrOne ? IR_CJUMP1 : IR_CJUMP0); if (n) n->Target = (char *) target; return n; @@ -563,7 +584,7 @@ new_cjump(slang_atom target, GLuint zeroOrOne) static slang_ir_node * new_jump(slang_atom target) { - slang_ir_node *n = new_node(IR_JUMP, NULL, NULL); + slang_ir_node *n = new_node0(IR_JUMP); if (n) n->Target = (char *) target; return n; @@ -573,7 +594,7 @@ new_jump(slang_atom target) static slang_ir_node * new_begin_loop(void) { - slang_ir_node *n = new_node(IR_BEGIN_LOOP, NULL, NULL); + slang_ir_node *n = new_node0(IR_BEGIN_LOOP); return n; } @@ -581,7 +602,7 @@ new_begin_loop(void) static slang_ir_node * new_end_loop(slang_ir_node *beginNode) { - slang_ir_node *n = new_node(IR_END_LOOP, NULL, NULL); + slang_ir_node *n = new_node0(IR_END_LOOP); assert(beginNode); if (n) { n->BranchNode = beginNode; @@ -593,7 +614,7 @@ new_end_loop(slang_ir_node *beginNode) static slang_ir_node * new_break(slang_ir_node *beginNode) { - slang_ir_node *n = new_node(IR_BREAK, NULL, NULL); + slang_ir_node *n = new_node0(IR_BREAK); assert(beginNode); if (n) { n->BranchNode = beginNode; @@ -605,12 +626,7 @@ new_break(slang_ir_node *beginNode) static slang_ir_node * new_if(slang_ir_node *cond, slang_ir_node *ifPart, slang_ir_node *elsePart) { - slang_ir_node *n = new_node(IR_IF, cond, ifPart); - assert(cond); - if (n) { - n->Children[2] = elsePart; - } - return n; + return new_node3(IR_IF, cond, ifPart, elsePart); } @@ -621,7 +637,7 @@ static slang_ir_node * new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) { slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE); - slang_ir_node *n = new_node(IR_VAR, NULL, NULL); + slang_ir_node *n = new_node0(IR_VAR); if (!v) return NULL; assert(!oper->var || oper->var == v); @@ -1222,9 +1238,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, kids[j] = _slang_gen_operation(A, &oper->children[firstOperand + j]); } - n = new_node(info->Opcode, kids[0], kids[1]); - if (kids[2]) - n->Children[2] = kids[2]; + n = new_node3(info->Opcode, kids[0], kids[1], kids[2]); if (firstOperand) { /* Setup n->Store to be a particular location. Otherwise, storage @@ -1271,7 +1285,7 @@ _slang_is_noop(const slang_operation *oper) static slang_ir_node * _slang_gen_cond(slang_ir_node *n) { - slang_ir_node *c = new_node(IR_COND, n, NULL); + slang_ir_node *c = new_node1(IR_COND, n); return c; } @@ -1422,7 +1436,7 @@ _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) beginLoop = new_begin_loop(); cond = _slang_gen_operation(A, &oper->children[0]); - cond = new_node(IR_NOT, cond, NULL); + cond = new_node1(IR_NOT, cond); cond = _slang_gen_cond(cond); ifThen = new_if(cond, @@ -1715,7 +1729,7 @@ _slang_gen_temporary(GLint size) store = _slang_new_ir_storage(PROGRAM_TEMPORARY, -1, size); if (store) { - n = new_node(IR_VAR_DECL, NULL, NULL); + n = new_node0(IR_VAR_DECL); if (n) { n->Store = store; } @@ -1734,7 +1748,7 @@ static slang_ir_node * _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) { slang_ir_node *n; - n = new_node(IR_VAR_DECL, NULL, NULL); + n = new_node0(IR_VAR_DECL); if (n) { n->Var = var; slang_allocate_storage(A, n); @@ -1788,10 +1802,10 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(tree, cjump); /* evaluate child 1 (x) and assign to tmp */ - tmpVar = new_node(IR_VAR, NULL, NULL); + tmpVar = new_node0(IR_VAR); tmpVar->Store = tmpDecl->Store; body = _slang_gen_operation(A, &oper->children[1]); - assigny = new_node(IR_MOVE, tmpVar, body); + assigny = new_node2(IR_MOVE, tmpVar, body); tree = new_seq(tree, assigny); /* jump to "end" label */ @@ -1803,10 +1817,10 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(tree, altLab); /* evaluate child 2 (y) and assign to tmp */ - tmpVar = new_node(IR_VAR, NULL, NULL); + tmpVar = new_node0(IR_VAR); tmpVar->Store = tmpDecl->Store; bodx = _slang_gen_operation(A, &oper->children[2]); - assignx = new_node(IR_MOVE, tmpVar, bodx); + assignx = new_node2(IR_MOVE, tmpVar, bodx); tree = new_seq(tree, assignx); /* "end" label */ @@ -1814,7 +1828,7 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(tree, endLab); /* tmp var value */ - tmpVar = new_node(IR_VAR, NULL, NULL); + tmpVar = new_node0(IR_VAR); tmpVar->Store = tmpDecl->Store; tree = new_seq(tree, tmpVar); @@ -2006,7 +2020,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) /* XXX make copy of this initializer? */ rhs = _slang_gen_operation(A, &oper->children[0]); assert(rhs); - init = new_node(IR_MOVE, var, rhs); + init = new_node2(IR_MOVE, var, rhs); /*assert(rhs->Opcode != IR_SEQ);*/ n = new_seq(varDecl, init); } @@ -2030,7 +2044,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) rhs = _slang_gen_operation(A, v->initializer); #endif assert(rhs); - init = new_node(IR_MOVE, var, rhs); + init = new_node2(IR_MOVE, var, rhs); /* assert(rhs->Opcode != IR_SEQ); */ @@ -2157,7 +2171,7 @@ swizzle_to_writemask(GLuint swizzle, static slang_ir_node * _slang_gen_swizzle(slang_ir_node *child, GLuint swizzle) { - slang_ir_node *n = new_node(IR_SWIZZLE, child, NULL); + slang_ir_node *n = new_node1(IR_SWIZZLE, child); if (n) { n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -1); n->Store->Swizzle = swizzle; @@ -2201,7 +2215,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) */ rhs = _slang_gen_swizzle(rhs, newSwizzle); } - n = new_node(IR_MOVE, lhs, rhs); + n = new_node2(IR_MOVE, lhs, rhs); n->Writemask = writemask; return n; } @@ -2322,7 +2336,7 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) array = _slang_gen_operation(A, &oper->children[0]); index = _slang_gen_operation(A, &oper->children[1]); if (array && index) { - elem = new_node(IR_ELEMENT, array, index); + elem = new_node2(IR_ELEMENT, array, index); elem->Store = _slang_new_ir_storage(array->Store->File, array->Store->Index, elemSize); @@ -2356,7 +2370,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) _slang_pop_var_table(A->vartable); if (n) - n = new_node(IR_SCOPE, n, NULL); + n = new_node1(IR_SCOPE, n); return n; } break; @@ -2431,32 +2445,32 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) /* XXX emit IR_CONT instruction */ return new_jump(A->CurLoopCont); case slang_oper_discard: - return new_node(IR_KILL, NULL, NULL); + return new_node0(IR_KILL); case slang_oper_equal: - return new_node(IR_SEQUAL, + return new_node2(IR_SEQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case slang_oper_notequal: - return new_node(IR_SNEQUAL, + return new_node2(IR_SNEQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case slang_oper_greater: - return new_node(IR_SGT, + return new_node2(IR_SGT, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case slang_oper_less: /* child[0] < child[1] ----> child[1] > child[0] */ - return new_node(IR_SGT, + return new_node2(IR_SGT, _slang_gen_operation(A, &oper->children[1]), _slang_gen_operation(A, &oper->children[0])); case slang_oper_greaterequal: - return new_node(IR_SGE, + return new_node2(IR_SGE, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case slang_oper_lessequal: /* child[0] <= child[1] ----> child[1] >= child[0] */ - return new_node(IR_SGE, + return new_node2(IR_SGE, _slang_gen_operation(A, &oper->children[1]), _slang_gen_operation(A, &oper->children[0])); case slang_oper_add: @@ -2648,7 +2662,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) default: printf("Unhandled node type %d\n", oper->type); abort(); - return new_node(IR_NOP, NULL, NULL); + return new_node0(IR_NOP); } abort(); return NULL; @@ -2793,7 +2807,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, slang_ir_node *lhs, *rhs, *init; /* Generate IR_MOVE instruction to initialize the variable */ - lhs = new_node(IR_VAR, NULL, NULL); + lhs = new_node0(IR_VAR); lhs->Var = var; lhs->Store = n->Store; @@ -2802,7 +2816,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, rhs = _slang_gen_operation(A, var->initializer); assert(rhs); - init = new_node(IR_MOVE, lhs, rhs); + init = new_node2(IR_MOVE, lhs, rhs); n = new_seq(n, init); } @@ -2866,7 +2880,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* Generate IR tree for the function body code */ n = _slang_gen_operation(A, fun->body); if (n) - n = new_node(IR_SCOPE, n, NULL); + n = new_node1(IR_SCOPE, n); /* pop vartable, restore previous */ _slang_pop_var_table(A->vartable); -- cgit v1.2.3 From 5f7d4668c4b7de1c0d2269809d30aef6d0a089e9 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Feb 2007 21:33:29 -0700 Subject: replace IR_BEGIN_LOOP/IR_END_LOOP with IR_LOOP --- src/mesa/shader/slang/slang_codegen.c | 79 ++++++++++++++++------------------ src/mesa/shader/slang/slang_emit.c | 35 ++++++++------- src/mesa/shader/slang/slang_ir.h | 3 +- src/mesa/shader/slang/slang_typeinfo.h | 1 + 4 files changed, 58 insertions(+), 60 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 88d61a5a68..a4e2935ea8 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -490,10 +490,12 @@ static void _slang_free_ir_tree(slang_ir_node *n) { #if 0 + GLuint i; if (!n) return; - _slang_free_ir_tree(n->Children[0]); - _slang_free_ir_tree(n->Children[1]); + for (i = 0; i < 3; i++) + _slang_free_ir_tree(n->Children[i]); + /* Do not free n->BranchNode since it's a child elsewhere */ free(n); #endif } @@ -537,9 +539,10 @@ new_node0(slang_ir_opcode op) static slang_ir_node * new_seq(slang_ir_node *left, slang_ir_node *right) { - /* XXX if either left or right is null, just return pointer to other?? */ - assert(left); - assert(right); + if (!left) + return right; + if (!right) + return left; return new_node2(IR_SEQ, left, right); } @@ -592,32 +595,20 @@ new_jump(slang_atom target) static slang_ir_node * -new_begin_loop(void) -{ - slang_ir_node *n = new_node0(IR_BEGIN_LOOP); - return n; -} - - -static slang_ir_node * -new_end_loop(slang_ir_node *beginNode) +new_loop(slang_ir_node *body) { - slang_ir_node *n = new_node0(IR_END_LOOP); - assert(beginNode); - if (n) { - n->BranchNode = beginNode; - } - return n; + return new_node1(IR_LOOP, body); } static slang_ir_node * -new_break(slang_ir_node *beginNode) +new_break(slang_ir_node *loopNode) { slang_ir_node *n = new_node0(IR_BREAK); - assert(beginNode); + assert(loopNode); + assert(loopNode->Opcode == IR_LOOP); if (n) { - n->BranchNode = beginNode; + n->BranchNode = loopNode; } return n; } @@ -1415,43 +1406,43 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) /** - * Generate IR tree for a while-loop using high-level BGNLOOP/ENDLOOP, - * IF/ENDIF instructions. + * Generate IR tree for a while-loop using high-level LOOP, IF instructions. */ static slang_ir_node * _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) { + slang_ir_node *prevLoop; /* - * BGNLOOP + * LOOP: * eval expr (child[0]), updating condcodes - * IF !expr THEN + * IF !expr: * BRK - * ENDIF * body code (child[1]) - * ENDLOOP */ - slang_ir_node *beginLoop, *endLoop, *ifThen; - slang_ir_node *cond, *body, *tree; + slang_ir_node *ifThen, *cond, *body, *loop; - beginLoop = new_begin_loop(); + loop = new_loop(NULL); + + /* save old, push new loop */ + prevLoop = A->CurLoop; + A->CurLoop = loop; cond = _slang_gen_operation(A, &oper->children[0]); cond = new_node1(IR_NOT, cond); cond = _slang_gen_cond(cond); ifThen = new_if(cond, - new_break(beginLoop), + new_break(A->CurLoop), NULL); - tree = new_seq(beginLoop, ifThen); body = _slang_gen_operation(A, &oper->children[1]); - if (body) - tree = new_seq(tree, body); - endLoop = new_end_loop(beginLoop); - tree = new_seq(tree, endLoop); + loop->Children[0] = new_seq(ifThen, body); - return tree; + + A->CurLoop = prevLoop; /* pop loop, restore prev */ + + return loop; } @@ -2433,11 +2424,15 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) else return _slang_gen_for(A, oper); case slang_oper_break: - if (!A->CurLoopBreak) { + if (!A->CurLoop && !A->CurLoopBreak) { RETURN_ERROR("'break' not in loop", 0); } - /* XXX emit IR_BREAK instruction */ - return new_jump(A->CurLoopBreak); + if (UseHighLevelInstructions) { + return new_break(A->CurLoop); + } + else { + return new_jump(A->CurLoopBreak); + } case slang_oper_continue: if (!A->CurLoopCont) { RETURN_ERROR("'continue' not in loop", 0); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 82a8f0befb..c18f1e364c 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -317,11 +317,11 @@ slang_print_ir(const slang_ir_node *n, int indent) printf("CALL\n"); break; - case IR_BEGIN_LOOP: - printf("BEGIN_LOOP\n"); - break; - case IR_END_LOOP: - printf("END_LOOP\n"); + case IR_LOOP: + printf("LOOP\n"); + slang_print_ir(n->Children[0], indent+3); + spaces(indent); + printf("ENDLOOP\n"); break; case IR_CONT: printf("CONT\n"); @@ -1301,23 +1301,22 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_IF: return emit_if(vt, n, prog); - case IR_BEGIN_LOOP: + case IR_LOOP: { + struct prog_instruction *beginInst; + /* save location of this instruction, used by OPCODE_ENDLOOP */ n->InstLocation = prog->NumInstructions; (void) new_instruction(prog, OPCODE_BGNLOOP); - } - break; - case IR_END_LOOP: - { - struct prog_instruction *inst, *beginInst; + + /* body */ + emit(vt, n->Children[0], prog); + inst = new_instruction(prog, OPCODE_ENDLOOP); - assert(n->BranchNode); - assert(n->BranchNode->InstLocation >= 0); /* The instruction BranchTarget points to top of loop */ - inst->BranchTarget = n->BranchNode->InstLocation; - /* Update BEGIN_LOOP's BranchTarget to point to this instruction */ - beginInst = prog->Instructions + n->BranchNode->InstLocation; + inst->BranchTarget = n->InstLocation; + /* Update BGNLOOP's BranchTarget to point to this instruction */ + beginInst = prog->Instructions + n->InstLocation; beginInst->BranchTarget = prog->NumInstructions - 1; return inst; } @@ -1336,6 +1335,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst->BranchTarget = n->BranchNode->InstLocation; return inst; } + case IR_BEGIN_SUB: return new_instruction(prog, OPCODE_BGNSUB); case IR_END_SUB: @@ -1343,6 +1343,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_RETURN: return new_instruction(prog, OPCODE_RET); + case IR_NOP: + return NULL; + default: _mesa_problem(NULL, "Unexpected IR opcode in emit()\n"); abort(); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 0f2ceb03c0..a7c858c69f 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -60,8 +60,7 @@ typedef enum IR_RETURN, /* return from subroutine */ IR_CALL, /* call subroutine */ - IR_BEGIN_LOOP,/* begin loop */ - IR_END_LOOP, /* end loop */ + IR_LOOP, /* high-level loop-begin / loop-end */ IR_CONT, /* continue loop */ IR_BREAK, /* break loop */ diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 6e27079ff8..d23bb6be14 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -63,6 +63,7 @@ typedef struct slang_assemble_ctx_ struct slang_function_ *CurFunction; slang_atom CurLoopBreak; slang_atom CurLoopCont; + struct slang_ir_node_ *CurLoop; } slang_assemble_ctx; -- cgit v1.2.3 From f22ed0986a743e033d827c78371612c7115ff913 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Feb 2007 22:31:19 -0700 Subject: Implement CONT, improve BRK. IR_LOOP's BranchNode ptr is the head of a linked list of CONT and BRK nodes. After emitting loop, walk over the linked list, filling in the CONT/BRK instruction's BranchTarget field (location of the ENDLOOP instruction, or one past). --- src/mesa/shader/prog_print.c | 10 ++++++-- src/mesa/shader/slang/slang_codegen.c | 29 ++++++++++++++++++--- src/mesa/shader/slang/slang_emit.c | 47 ++++++++++++++++++++++++++--------- src/mesa/swrast/s_fragprog.c | 6 +++++ 4 files changed, 74 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 3d4a474b05..6c303de9b5 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -338,8 +338,14 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) _mesa_printf("ENDLOOP (goto %d)\n", inst->BranchTarget); break; case OPCODE_BRK: - /* XXX just like BRA */ - _mesa_printf("BRK (%s%s) (for loop beginning at %d)", + _mesa_printf("BRK (%s%s) (goto %d)", + condcode_string(inst->DstReg.CondMask), + swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), + inst->BranchTarget); + print_comment(inst); + break; + case OPCODE_CONT: + _mesa_printf("CONT (%s%s) (goto %d)", condcode_string(inst->DstReg.CondMask), swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a4e2935ea8..42c1f0897e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -608,7 +608,24 @@ new_break(slang_ir_node *loopNode) assert(loopNode); assert(loopNode->Opcode == IR_LOOP); if (n) { - n->BranchNode = loopNode; + /* insert this node at head of linked list */ + n->BranchNode = loopNode->BranchNode; + loopNode->BranchNode = n; + } + return n; +} + + +static slang_ir_node * +new_cont(slang_ir_node *loopNode) +{ + slang_ir_node *n = new_node0(IR_CONT); + assert(loopNode); + assert(loopNode->Opcode == IR_LOOP); + if (n) { + /* insert this node at head of linked list */ + n->BranchNode = loopNode->BranchNode; + loopNode->BranchNode = n; } return n; } @@ -2434,11 +2451,15 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return new_jump(A->CurLoopBreak); } case slang_oper_continue: - if (!A->CurLoopCont) { + if (!A->CurLoop && !A->CurLoopCont) { RETURN_ERROR("'continue' not in loop", 0); } - /* XXX emit IR_CONT instruction */ - return new_jump(A->CurLoopCont); + if (UseHighLevelInstructions) { + return new_cont(A->CurLoop); + } + else { + return new_jump(A->CurLoopCont); + } case slang_oper_discard: return new_node0(IR_KILL); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c18f1e364c..2d5a7cf6f9 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1303,7 +1303,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_LOOP: { - struct prog_instruction *beginInst; + struct prog_instruction *beginInst, *endInst; + GLuint endInstLoc; + slang_ir_node *p; /* save location of this instruction, used by OPCODE_ENDLOOP */ n->InstLocation = prog->NumInstructions; @@ -1312,27 +1314,48 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* body */ emit(vt, n->Children[0], prog); - inst = new_instruction(prog, OPCODE_ENDLOOP); - /* The instruction BranchTarget points to top of loop */ - inst->BranchTarget = n->InstLocation; + endInstLoc = prog->NumInstructions; + endInst = new_instruction(prog, OPCODE_ENDLOOP); + /* The ENDLOOP's BranchTarget points to top of loop */ + endInst->BranchTarget = n->InstLocation; /* Update BGNLOOP's BranchTarget to point to this instruction */ beginInst = prog->Instructions + n->InstLocation; beginInst->BranchTarget = prog->NumInstructions - 1; - return inst; + + /* Done emitting loop code. Now walk over the loop's linked list + * of BREAK and CONT nodes, filling in their BranchTarget fields. + */ + for (p = n->BranchNode; p; p = p->BranchNode) { + if (p->Opcode == IR_BREAK) { + struct prog_instruction *brkInst + = prog->Instructions + p->InstLocation; + assert(brkInst->Opcode == OPCODE_BRK); + brkInst->BranchTarget = endInstLoc + 1; + } + else { + assert(p->Opcode == IR_CONT); + struct prog_instruction *contInst + = prog->Instructions + p->InstLocation; + assert(contInst->Opcode == OPCODE_CONT); + contInst->BranchTarget = endInstLoc; + } + } + return NULL; } case IR_CONT: - return new_instruction(prog, OPCODE_CONT); + { + struct prog_instruction *inst; + n->InstLocation = prog->NumInstructions; + inst = new_instruction(prog, OPCODE_CONT); + inst->DstReg.CondMask = COND_TR; /* always true */ + return inst; + } case IR_BREAK: { struct prog_instruction *inst; + n->InstLocation = prog->NumInstructions; inst = new_instruction(prog, OPCODE_BRK); inst->DstReg.CondMask = COND_TR; /* always true */ - /* This instruction's branch target is top of loop, not bottom of - * loop because we don't know where it is yet! - */ - assert(n->BranchNode); - assert(n->BranchNode->InstLocation >= 0); - inst->BranchTarget = n->BranchNode->InstLocation; return inst; } diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 12c8aee6ea..63974b30f2 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -704,6 +704,7 @@ execute_program( GLcontext *ctx, break; case OPCODE_BRK: /* break out of loop */ { +#if 0 /* The location of the ENDLOOP instruction is saved in the * BGNLOOP instruction. Get that instruction and jump to * its BranchTarget + 1. @@ -714,6 +715,9 @@ execute_program( GLcontext *ctx, ASSERT(loopBeginInst->BranchTarget >= 0); /* we'll add one at bottom of for-loop */ pc = loopBeginInst->BranchTarget; +#else + pc = inst->BranchTarget - 1; +#endif } break; case OPCODE_CAL: /* Call subroutine */ @@ -747,6 +751,8 @@ execute_program( GLcontext *ctx, } break; case OPCODE_CONT: /* continue loop */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; break; case OPCODE_COS: { -- cgit v1.2.3 From 1f99a7514e9c36b7ce2c6c1724a6584790656415 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Feb 2007 22:34:09 -0700 Subject: BRK and CONT work the same --- src/mesa/swrast/s_fragprog.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 63974b30f2..403a03aa32 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -703,22 +703,10 @@ execute_program( GLcontext *ctx, } break; case OPCODE_BRK: /* break out of loop */ - { -#if 0 - /* The location of the ENDLOOP instruction is saved in the - * BGNLOOP instruction. Get that instruction and jump to - * its BranchTarget + 1. - */ - const struct prog_instruction *loopBeginInst - = program->Base.Instructions + inst->BranchTarget; - ASSERT(loopBeginInst->Opcode == OPCODE_BGNLOOP); - ASSERT(loopBeginInst->BranchTarget >= 0); - /* we'll add one at bottom of for-loop */ - pc = loopBeginInst->BranchTarget; -#else - pc = inst->BranchTarget - 1; -#endif - } + /* fall-through */ + case OPCODE_CONT: /* continue loop */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; break; case OPCODE_CAL: /* Call subroutine */ { @@ -750,10 +738,6 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; - case OPCODE_CONT: /* continue loop */ - /* Subtract 1 here since we'll do pc++ at end of for-loop */ - pc = inst->BranchTarget - 1; - break; case OPCODE_COS: { GLfloat a[4], result[4]; -- cgit v1.2.3 From 4aa487e7968d015af4fe729f697105448fcb843f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Feb 2007 15:12:13 -0700 Subject: Use IR_LOOP to represent do-while and for-loops. Also, start moving high vs. low-level instruction selection into slang_emit.c --- src/mesa/shader/slang/slang_codegen.c | 110 ++++++++++++++++++++-------------- src/mesa/shader/slang/slang_emit.c | 82 +++++++++++++++---------- src/mesa/shader/slang/slang_ir.h | 7 ++- src/mesa/shader/slang/slang_link.c | 2 +- src/mesa/swrast/s_fragprog.c | 12 ++-- 5 files changed, 128 insertions(+), 85 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 42c1f0897e..14870f57ae 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1423,7 +1423,7 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) /** - * Generate IR tree for a while-loop using high-level LOOP, IF instructions. + * Generate loop code using high-level IR_LOOP instruction */ static slang_ir_node * _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) @@ -1509,6 +1509,46 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Generate IR tree for a do-while loop using high-level LOOP, IF instructions. + */ +static slang_ir_node * +_slang_gen_hl_do(slang_assemble_ctx * A, const slang_operation *oper) +{ + slang_ir_node *prevLoop; + /* + * LOOP: + * body code (child[0]) + * eval expr (child[1]), updating condcodes + * IF !expr: + * BRK + */ + slang_ir_node *ifThen, *cond, *body, *loop; + + loop = new_loop(NULL); + + /* save old, push new loop */ + prevLoop = A->CurLoop; + A->CurLoop = loop; + + body = _slang_gen_operation(A, &oper->children[0]); + + cond = _slang_gen_operation(A, &oper->children[1]); + cond = new_node1(IR_NOT, cond); + cond = _slang_gen_cond(cond); + + ifThen = new_if(cond, + new_break(A->CurLoop), + NULL); + + loop->Children[0] = new_seq(body, ifThen); + + A->CurLoop = prevLoop; /* pop loop, restore prev */ + + return loop; +} + + /** * Generate IR tree for a for-loop. */ @@ -1573,69 +1613,48 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) /** - * Generate IR tree for a for-loop, using high-level BGNLOOP/ENDLOOP and - * IF/ENDIF instructions. - * - * XXX note done yet! + * Generate for-loop using high-level IR_LOOP instruction. */ static slang_ir_node * _slang_gen_hl_for(slang_assemble_ctx * A, const slang_operation *oper) { + slang_ir_node *prevLoop; /* - * init code (child[0]) - * BGNLOOP + * init (child[0]) + * LOOP: * eval expr (child[1]), updating condcodes - * IF !expr THEN + * IF !expr: * BRK - * ENDIF - * code body (child[3]) - * label "__continueFor" // jump here for "continue" - * incr code (child[2]) - * ENDLOOP + * body code (child[3]) + * incr code (child[2]) // XXX continue here */ - slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startFor"); - slang_atom contAtom = slang_atom_pool_gen(A->atoms, "__continueFor"); - slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endFor"); - slang_ir_node *init, *startLab, *cond, *bra, *body, *contLab; - slang_ir_node *incr, *jump, *endLab, *tree; - slang_atom prevLoopBreak = A->CurLoopBreak; - slang_atom prevLoopCont = A->CurLoopCont; - - /* Push this loop */ - A->CurLoopBreak = endAtom; - A->CurLoopCont = contAtom; + slang_ir_node *init, *ifThen, *cond, *body, *loop, *incr; init = _slang_gen_operation(A, &oper->children[0]); - startLab = new_label(startAtom); - tree = new_seq(init, startLab); + loop = new_loop(NULL); + + /* save old, push new loop */ + prevLoop = A->CurLoop; + A->CurLoop = loop; cond = _slang_gen_operation(A, &oper->children[1]); + cond = new_node1(IR_NOT, cond); cond = _slang_gen_cond(cond); - tree = new_seq(tree, cond); - bra = new_cjump(endAtom, 0); - tree = new_seq(tree, bra); + ifThen = new_if(cond, + new_break(A->CurLoop), + NULL); body = _slang_gen_operation(A, &oper->children[3]); - tree = new_seq(tree, body); - - contLab = new_label(contAtom); - tree = new_seq(tree, contLab); incr = _slang_gen_operation(A, &oper->children[2]); - tree = new_seq(tree, incr); - - jump = new_jump(startAtom); - tree = new_seq(tree, jump); - endLab = new_label(endAtom); - tree = new_seq(tree, endLab); + loop->Children[0] = new_seq(ifThen, + new_seq(body,incr)); - /* Pop this loop */ - A->CurLoopBreak = prevLoopBreak; - A->CurLoopCont = prevLoopCont; + A->CurLoop = prevLoop; /* pop loop, restore prev */ - return tree; + return new_seq(init, loop); } @@ -2434,7 +2453,10 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) else return _slang_gen_while(A, oper); case slang_oper_do: - return _slang_gen_do(A, oper); + if (UseHighLevelInstructions) + return _slang_gen_hl_do(A, oper); + else + return _slang_gen_do(A, oper); case slang_oper_for: if (UseHighLevelInstructions) return _slang_gen_hl_for(A, oper); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 2d5a7cf6f9..29588379a2 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -43,6 +43,9 @@ #define ANNOTATE 1 +static GLboolean EmitHighLevelInstructions = GL_FALSE; + + /** * Assembly and IR info */ @@ -1304,57 +1307,72 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_LOOP: { struct prog_instruction *beginInst, *endInst; - GLuint endInstLoc; - slang_ir_node *p; + GLuint beginInstLoc, endInstLoc; + slang_ir_node *ir; - /* save location of this instruction, used by OPCODE_ENDLOOP */ - n->InstLocation = prog->NumInstructions; - (void) new_instruction(prog, OPCODE_BGNLOOP); + /* emit OPCODE_BGNLOOP */ + beginInstLoc = prog->NumInstructions; + if (EmitHighLevelInstructions) { + (void) new_instruction(prog, OPCODE_BGNLOOP); + } /* body */ emit(vt, n->Children[0], prog); endInstLoc = prog->NumInstructions; - endInst = new_instruction(prog, OPCODE_ENDLOOP); - /* The ENDLOOP's BranchTarget points to top of loop */ - endInst->BranchTarget = n->InstLocation; - /* Update BGNLOOP's BranchTarget to point to this instruction */ - beginInst = prog->Instructions + n->InstLocation; - beginInst->BranchTarget = prog->NumInstructions - 1; + if (EmitHighLevelInstructions) { + /* emit OPCODE_ENDLOOP */ + endInst = new_instruction(prog, OPCODE_ENDLOOP); + } + else { + /* emit unconditional BRA-nch */ + endInst = new_instruction(prog, OPCODE_BRA); + endInst->DstReg.CondMask = COND_TR; /* always true */ + } + /* end instruction's BranchTarget points to top of loop */ + endInst->BranchTarget = beginInstLoc; + + if (EmitHighLevelInstructions) { + /* BGNLOOP's BranchTarget points to the ENDLOOP inst */ + beginInst = prog->Instructions + beginInstLoc; + beginInst->BranchTarget = prog->NumInstructions - 1; + } /* Done emitting loop code. Now walk over the loop's linked list - * of BREAK and CONT nodes, filling in their BranchTarget fields. + * of BREAK and CONT nodes, filling in their BranchTarget fields + * (which will point to the ENDLOOP or ENDLOOP+1 instructions). */ - for (p = n->BranchNode; p; p = p->BranchNode) { - if (p->Opcode == IR_BREAK) { - struct prog_instruction *brkInst - = prog->Instructions + p->InstLocation; - assert(brkInst->Opcode == OPCODE_BRK); - brkInst->BranchTarget = endInstLoc + 1; + for (ir = n->BranchNode; ir; ir = ir->BranchNode) { + struct prog_instruction *inst + = prog->Instructions + ir->InstLocation; + if (ir->Opcode == IR_BREAK) { + assert(inst->Opcode == OPCODE_BRK || + inst->Opcode == OPCODE_BRA); + inst->BranchTarget = endInstLoc + 1; } else { - assert(p->Opcode == IR_CONT); - struct prog_instruction *contInst - = prog->Instructions + p->InstLocation; - assert(contInst->Opcode == OPCODE_CONT); - contInst->BranchTarget = endInstLoc; + assert(ir->Opcode == IR_CONT); + assert(inst->Opcode == OPCODE_CONT || + inst->Opcode == OPCODE_BRA); + inst->BranchTarget = endInstLoc; } } return NULL; } - case IR_CONT: - { - struct prog_instruction *inst; - n->InstLocation = prog->NumInstructions; - inst = new_instruction(prog, OPCODE_CONT); - inst->DstReg.CondMask = COND_TR; /* always true */ - return inst; - } case IR_BREAK: + /* fall-through */ + case IR_CONT: { + gl_inst_opcode opcode; struct prog_instruction *inst; n->InstLocation = prog->NumInstructions; - inst = new_instruction(prog, OPCODE_BRK); + if (EmitHighLevelInstructions) { + opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; + } + else { + opcode = OPCODE_BRA; + } + inst = new_instruction(prog, opcode); inst->DstReg.CondMask = COND_TR; /* always true */ return inst; } diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index a7c858c69f..0c827d9cd8 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -39,7 +39,7 @@ /** - * Intermediate Representation opcode + * Intermediate Representation opcodes */ typedef enum { @@ -64,6 +64,11 @@ typedef enum IR_CONT, /* continue loop */ IR_BREAK, /* break loop */ + IR_BREAK_IF_TRUE, + IR_BREAK_IF_FALSE, + IR_CONT_IF_TRUE, + IR_CONT_IF_FALSE, + IR_MOVE, IR_ADD, IR_SUB, diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 017cf6078c..b1d355ff80 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -298,7 +298,7 @@ _slang_resolve_branches(struct gl_program *prog) for (i = 0; i < prog->NumInstructions; i++) { struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_BRA) { + if (inst->Opcode == OPCODE_BRA && inst->BranchTarget < 0) { for (j = 0; j < numTargets; j++) { if (!strcmp(inst->Comment, targets[j].Name)) { inst->BranchTarget = targets[j].Pos; diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 403a03aa32..ace10a9222 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -675,9 +675,10 @@ execute_program( GLcontext *ctx, } } break; - case OPCODE_BGNLOOP: /* begin loop */ + case OPCODE_BGNLOOP: + /* no-op */ break; - case OPCODE_ENDLOOP: /* end loop */ + case OPCODE_ENDLOOP: /* subtract 1 here since pc is incremented by for(pc) loop */ pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ break; @@ -695,10 +696,7 @@ execute_program( GLcontext *ctx, test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { /* take branch */ - pc = inst->BranchTarget; - /* - printf("Take branch to %u\n", pc); - */ + pc = inst->BranchTarget - 1; } } break; @@ -721,7 +719,7 @@ execute_program( GLcontext *ctx, return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ } machine->CallStack[machine->StackDepth++] = pc + 1; - pc = inst->BranchTarget; + pc = inst->BranchTarget; /* XXX - 1 ??? */ } } break; -- cgit v1.2.3 From a7c2c7d6b28570230fb1b4fbc47b94581ef7e6fa Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Feb 2007 15:14:20 -0700 Subject: Remove old functions for generating BRA-based looping. --- src/mesa/shader/slang/slang_codegen.c | 184 ++-------------------------------- 1 file changed, 8 insertions(+), 176 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 14870f57ae..61b5df5a78 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1372,61 +1372,11 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, } -/** - * Generate IR tree for a while-loop. Use BRA-nch instruction. - */ -static slang_ir_node * -_slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) -{ - /* - * label "__startWhile" - * eval expr (child[0]), updating condcodes - * branch if false to "__endWhile" - * body code - * jump "__startWhile" - * label "__endWhile" - */ - slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startWhile"); - slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endWhile"); - slang_ir_node *startLab, *cond, *bra, *body, *jump, *endLab, *tree; - slang_atom prevLoopBreak = A->CurLoopBreak; - slang_atom prevLoopCont = A->CurLoopCont; - - /* Push this loop */ - A->CurLoopBreak = endAtom; - A->CurLoopCont = startAtom; - - startLab = new_label(startAtom); - cond = _slang_gen_operation(A, &oper->children[0]); - cond = _slang_gen_cond(cond); - tree = new_seq(startLab, cond); - - bra = new_cjump(endAtom, 0); - tree = new_seq(tree, bra); - - body = _slang_gen_operation(A, &oper->children[1]); - if (body) - tree = new_seq(tree, body); - - jump = new_jump(startAtom); - tree = new_seq(tree, jump); - - endLab = new_label(endAtom); - tree = new_seq(tree, endLab); - - /* Pop this loop */ - A->CurLoopBreak = prevLoopBreak; - A->CurLoopCont = prevLoopCont; - - return tree; -} - - /** * Generate loop code using high-level IR_LOOP instruction */ static slang_ir_node * -_slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) +_slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) { slang_ir_node *prevLoop; /* @@ -1463,57 +1413,11 @@ _slang_gen_hl_while(slang_assemble_ctx * A, const slang_operation *oper) } -/** - * Generate IR tree for a do-while-loop. - */ -static slang_ir_node * -_slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) -{ - /* - * label "__startDo" - * code body - * eval expr (child[0]), updating condcodes - * branch if true to "__startDo" - * label "__endDo" - */ - slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startDo"); - slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endDo"); - slang_ir_node *startLab, *cond, *bra, *body, *endLab, *tree; - slang_atom prevLoopBreak = A->CurLoopBreak; - slang_atom prevLoopCont = A->CurLoopCont; - - /* Push this loop */ - A->CurLoopBreak = endAtom; - A->CurLoopCont = startAtom; - - startLab = new_label(startAtom); - - body = _slang_gen_operation(A, &oper->children[0]); - tree = new_seq(startLab, body); - - cond = _slang_gen_operation(A, &oper->children[1]); - cond = _slang_gen_cond(cond); - tree = new_seq(tree, cond); - - bra = new_cjump(startAtom, 1); - tree = new_seq(tree, bra); - - endLab = new_label(endAtom); - tree = new_seq(tree, endLab); - - /* Pop this loop */ - A->CurLoopBreak = prevLoopBreak; - A->CurLoopCont = prevLoopCont; - - return tree; -} - - /** * Generate IR tree for a do-while loop using high-level LOOP, IF instructions. */ static slang_ir_node * -_slang_gen_hl_do(slang_assemble_ctx * A, const slang_operation *oper) +_slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) { slang_ir_node *prevLoop; /* @@ -1549,74 +1453,11 @@ _slang_gen_hl_do(slang_assemble_ctx * A, const slang_operation *oper) } -/** - * Generate IR tree for a for-loop. - */ -static slang_ir_node * -_slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) -{ - /* - * init code (child[0]) - * label "__startFor" - * eval expr (child[1]), updating condcodes - * branch if false to "__endFor" - * code body (child[3]) - * label "__continueFor" - * incr code (child[2]) - * jump "__startFor" - * label "__endFor" - */ - slang_atom startAtom = slang_atom_pool_gen(A->atoms, "__startFor"); - slang_atom contAtom = slang_atom_pool_gen(A->atoms, "__continueFor"); - slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__endFor"); - slang_ir_node *init, *startLab, *cond, *bra, *body, *contLab; - slang_ir_node *incr, *jump, *endLab, *tree; - slang_atom prevLoopBreak = A->CurLoopBreak; - slang_atom prevLoopCont = A->CurLoopCont; - - /* Push this loop */ - A->CurLoopBreak = endAtom; - A->CurLoopCont = contAtom; - - init = _slang_gen_operation(A, &oper->children[0]); - startLab = new_label(startAtom); - tree = new_seq(init, startLab); - - cond = _slang_gen_operation(A, &oper->children[1]); - cond = _slang_gen_cond(cond); - tree = new_seq(tree, cond); - - bra = new_cjump(endAtom, 0); - tree = new_seq(tree, bra); - - body = _slang_gen_operation(A, &oper->children[3]); - tree = new_seq(tree, body); - - contLab = new_label(contAtom); - tree = new_seq(tree, contLab); - - incr = _slang_gen_operation(A, &oper->children[2]); - tree = new_seq(tree, incr); - - jump = new_jump(startAtom); - tree = new_seq(tree, jump); - - endLab = new_label(endAtom); - tree = new_seq(tree, endLab); - - /* Pop this loop */ - A->CurLoopBreak = prevLoopBreak; - A->CurLoopCont = prevLoopCont; - - return tree; -} - - /** * Generate for-loop using high-level IR_LOOP instruction. */ static slang_ir_node * -_slang_gen_hl_for(slang_assemble_ctx * A, const slang_operation *oper) +_slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) { slang_ir_node *prevLoop; /* @@ -2447,21 +2288,12 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_expression: return _slang_gen_operation(A, &oper->children[0]); break; - case slang_oper_while: - if (UseHighLevelInstructions) - return _slang_gen_hl_while(A, oper); - else - return _slang_gen_while(A, oper); - case slang_oper_do: - if (UseHighLevelInstructions) - return _slang_gen_hl_do(A, oper); - else - return _slang_gen_do(A, oper); case slang_oper_for: - if (UseHighLevelInstructions) - return _slang_gen_hl_for(A, oper); - else - return _slang_gen_for(A, oper); + return _slang_gen_for(A, oper); + case slang_oper_do: + return _slang_gen_do(A, oper); + case slang_oper_while: + return _slang_gen_while(A, oper); case slang_oper_break: if (!A->CurLoop && !A->CurLoopBreak) { RETURN_ERROR("'break' not in loop", 0); -- cgit v1.2.3 From c5e6bf63e6f8256c9e10bbbe8fb7a38de9d22921 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Feb 2007 16:09:13 -0700 Subject: s/%f/%g/ --- src/mesa/shader/prog_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 6c303de9b5..0adb589daa 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -429,7 +429,7 @@ _mesa_print_parameter_list(const struct gl_program_parameter_list *list) for (i = 0; i < list->NumParameters; i++){ struct gl_program_parameter *param = list->Parameters + i; const GLfloat *v = list->ParameterValues[i]; - _mesa_printf("param[%d] sz=%d %s %s = {%.3f, %.3f, %.3f, %.3f};\n", + _mesa_printf("param[%d] sz=%d %s %s = {%.3g, %.3g, %.3g, %.3g};\n", i, param->Size, program_file_string(list->Parameters[i].Type), param->Name, v[0], v[1], v[2], v[3]); -- cgit v1.2.3 From b35b4566c2d3bbf21c8fd955912f4c3c671f2bb9 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Feb 2007 16:11:00 -0700 Subject: high vs. low level if/then/else code emit --- src/mesa/shader/slang/slang_emit.c | 189 ++++++++++++++++++++++--------------- 1 file changed, 112 insertions(+), 77 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 29588379a2..6e2394f265 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -43,7 +43,7 @@ #define ANNOTATE 1 -static GLboolean EmitHighLevelInstructions = GL_FALSE; +static GLboolean EmitHighLevelInstructions = GL_TRUE; /** @@ -523,9 +523,9 @@ storage_annotation(const slang_ir_node *n, const struct gl_program *prog) if (st->Index >= 0) { const GLfloat *val = prog->Parameters->ParameterValues[st->Index]; if (st->Swizzle == SWIZZLE_NOOP) - sprintf(s, "{%f, %f, %f, %f}", val[0], val[1], val[2], val[3]); + sprintf(s, "{%g, %g, %g, %g}", val[0], val[1], val[2], val[3]); else { - sprintf(s, "%f", val[GET_SWZ(st->Swizzle, 0)]); + sprintf(s, "%g", val[GET_SWZ(st->Swizzle, 0)]); } } break; @@ -1059,28 +1059,50 @@ emit_if(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) emit(vt, n->Children[0], prog); /* the condition */ ifInstLoc = prog->NumInstructions; - ifInst = new_instruction(prog, OPCODE_IF); - ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ - ifInst->DstReg.CondSwizzle = SWIZZLE_X; + if (EmitHighLevelInstructions) { + ifInst = new_instruction(prog, OPCODE_IF); + ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ + ifInst->DstReg.CondSwizzle = SWIZZLE_X; + } + else { + /* conditional jump to else, or endif */ + ifInst = new_instruction(prog, OPCODE_BRA); + ifInst->DstReg.CondMask = COND_EQ; /* BRA if cond is zero */ + ifInst->DstReg.CondSwizzle = SWIZZLE_X; + ifInst->Comment = _mesa_strdup("if zero"); + } /* if body */ emit(vt, n->Children[1], prog); if (n->Children[2]) { - /* else body */ + /* have else body */ elseInstLoc = prog->NumInstructions; - (void) new_instruction(prog, OPCODE_ELSE); + if (EmitHighLevelInstructions) { + (void) new_instruction(prog, OPCODE_ELSE); + } + else { + /* jump to endif instruction */ + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_BRA); + inst->Comment = _mesa_strdup("else"); + inst->DstReg.CondMask = COND_TR; /* always branch */ + } ifInst = prog->Instructions + ifInstLoc; ifInst->BranchTarget = prog->NumInstructions; emit(vt, n->Children[2], prog); } else { + /* no else body */ ifInst = prog->Instructions + ifInstLoc; ifInst->BranchTarget = prog->NumInstructions + 1; } - (void) new_instruction(prog, OPCODE_ENDIF); + if (EmitHighLevelInstructions) { + (void) new_instruction(prog, OPCODE_ENDIF); + } + if (n->Children[2]) { struct prog_instruction *elseInst; elseInst = prog->Instructions + elseInstLoc; @@ -1090,6 +1112,85 @@ emit_if(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +static struct prog_instruction * +emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + struct prog_instruction *beginInst, *endInst; + GLuint beginInstLoc, endInstLoc; + slang_ir_node *ir; + + /* emit OPCODE_BGNLOOP */ + beginInstLoc = prog->NumInstructions; + if (EmitHighLevelInstructions) { + (void) new_instruction(prog, OPCODE_BGNLOOP); + } + + /* body */ + emit(vt, n->Children[0], prog); + + endInstLoc = prog->NumInstructions; + if (EmitHighLevelInstructions) { + /* emit OPCODE_ENDLOOP */ + endInst = new_instruction(prog, OPCODE_ENDLOOP); + } + else { + /* emit unconditional BRA-nch */ + endInst = new_instruction(prog, OPCODE_BRA); + endInst->DstReg.CondMask = COND_TR; /* always true */ + } + /* end instruction's BranchTarget points to top of loop */ + endInst->BranchTarget = beginInstLoc; + + if (EmitHighLevelInstructions) { + /* BGNLOOP's BranchTarget points to the ENDLOOP inst */ + beginInst = prog->Instructions + beginInstLoc; + beginInst->BranchTarget = prog->NumInstructions - 1; + } + + /* Done emitting loop code. Now walk over the loop's linked list + * of BREAK and CONT nodes, filling in their BranchTarget fields + * (which will point to the ENDLOOP or ENDLOOP+1 instructions). + */ + for (ir = n->BranchNode; ir; ir = ir->BranchNode) { + struct prog_instruction *inst = prog->Instructions + ir->InstLocation; + if (ir->Opcode == IR_BREAK) { + assert(inst->Opcode == OPCODE_BRK || + inst->Opcode == OPCODE_BRA); + inst->BranchTarget = endInstLoc + 1; + } + else { + assert(ir->Opcode == IR_CONT); + assert(inst->Opcode == OPCODE_CONT || + inst->Opcode == OPCODE_BRA); + /* XXX goto top of loop instead! */ + inst->BranchTarget = endInstLoc; + } + } + return NULL; +} + + +/** + * Emit code for IR_CONT or IR_BREAK. + */ +static struct prog_instruction * +emit_cont_break(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + gl_inst_opcode opcode; + struct prog_instruction *inst; + n->InstLocation = prog->NumInstructions; + if (EmitHighLevelInstructions) { + opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; + } + else { + opcode = OPCODE_BRA; + } + inst = new_instruction(prog, opcode); + inst->DstReg.CondMask = COND_TR; /* always true */ + return inst; +} + + /** * Remove any SWIZZLE_NIL terms from given swizzle mask (smear prev term). * Ex: fix_swizzle("zyNN") -> "zyyy" @@ -1305,77 +1406,11 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return emit_if(vt, n, prog); case IR_LOOP: - { - struct prog_instruction *beginInst, *endInst; - GLuint beginInstLoc, endInstLoc; - slang_ir_node *ir; - - /* emit OPCODE_BGNLOOP */ - beginInstLoc = prog->NumInstructions; - if (EmitHighLevelInstructions) { - (void) new_instruction(prog, OPCODE_BGNLOOP); - } - - /* body */ - emit(vt, n->Children[0], prog); - - endInstLoc = prog->NumInstructions; - if (EmitHighLevelInstructions) { - /* emit OPCODE_ENDLOOP */ - endInst = new_instruction(prog, OPCODE_ENDLOOP); - } - else { - /* emit unconditional BRA-nch */ - endInst = new_instruction(prog, OPCODE_BRA); - endInst->DstReg.CondMask = COND_TR; /* always true */ - } - /* end instruction's BranchTarget points to top of loop */ - endInst->BranchTarget = beginInstLoc; - - if (EmitHighLevelInstructions) { - /* BGNLOOP's BranchTarget points to the ENDLOOP inst */ - beginInst = prog->Instructions + beginInstLoc; - beginInst->BranchTarget = prog->NumInstructions - 1; - } - - /* Done emitting loop code. Now walk over the loop's linked list - * of BREAK and CONT nodes, filling in their BranchTarget fields - * (which will point to the ENDLOOP or ENDLOOP+1 instructions). - */ - for (ir = n->BranchNode; ir; ir = ir->BranchNode) { - struct prog_instruction *inst - = prog->Instructions + ir->InstLocation; - if (ir->Opcode == IR_BREAK) { - assert(inst->Opcode == OPCODE_BRK || - inst->Opcode == OPCODE_BRA); - inst->BranchTarget = endInstLoc + 1; - } - else { - assert(ir->Opcode == IR_CONT); - assert(inst->Opcode == OPCODE_CONT || - inst->Opcode == OPCODE_BRA); - inst->BranchTarget = endInstLoc; - } - } - return NULL; - } + return emit_loop(vt, n, prog); case IR_BREAK: /* fall-through */ case IR_CONT: - { - gl_inst_opcode opcode; - struct prog_instruction *inst; - n->InstLocation = prog->NumInstructions; - if (EmitHighLevelInstructions) { - opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; - } - else { - opcode = OPCODE_BRA; - } - inst = new_instruction(prog, opcode); - inst->DstReg.CondMask = COND_TR; /* always true */ - return inst; - } + return emit_cont_break(vt, n, prog); case IR_BEGIN_SUB: return new_instruction(prog, OPCODE_BGNSUB); -- cgit v1.2.3 From 2c75ef62ea8dfd690aab6fa4f2c85afba569a21f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Feb 2007 16:19:19 -0700 Subject: remove old loop break/cont stuff --- src/mesa/shader/slang/slang_codegen.c | 18 ++++-------------- src/mesa/shader/slang/slang_typeinfo.h | 2 -- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 61b5df5a78..bd7b30cd13 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2295,25 +2295,15 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_while: return _slang_gen_while(A, oper); case slang_oper_break: - if (!A->CurLoop && !A->CurLoopBreak) { + if (!A->CurLoop) { RETURN_ERROR("'break' not in loop", 0); } - if (UseHighLevelInstructions) { - return new_break(A->CurLoop); - } - else { - return new_jump(A->CurLoopBreak); - } + return new_break(A->CurLoop); case slang_oper_continue: - if (!A->CurLoop && !A->CurLoopCont) { + if (!A->CurLoop) { RETURN_ERROR("'continue' not in loop", 0); } - if (UseHighLevelInstructions) { - return new_cont(A->CurLoop); - } - else { - return new_jump(A->CurLoopCont); - } + return new_cont(A->CurLoop); case slang_oper_discard: return new_node0(IR_KILL); diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index d23bb6be14..0f72fad090 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -61,8 +61,6 @@ typedef struct slang_assemble_ctx_ struct gl_program *program; slang_var_table *vartable; struct slang_function_ *CurFunction; - slang_atom CurLoopBreak; - slang_atom CurLoopCont; struct slang_ir_node_ *CurLoop; } slang_assemble_ctx; -- cgit v1.2.3 From 97125fb370faa6aee0967254fad69f27189b9325 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 13:22:31 -0700 Subject: Simplify code with eval_condition(). Implement conditional BRK. --- src/mesa/swrast/s_fragprog.c | 125 +++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 69 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index ace10a9222..ce028f72bf 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -417,6 +417,29 @@ test_cc(GLuint condCode, GLuint ccMaskRule) } +/** + * Evaluate the 4 condition codes against a predicate and return GL_TRUE + * or GL_FALSE to indicate result. + */ +static INLINE GLboolean +eval_condition(const struct fp_machine *machine, + const struct prog_instruction *inst) +{ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + return GL_TRUE; + } + else { + return GL_FALSE; + } +} + + + /** * Store 4 floats into a register. Observe the instructions saturate and * set-condition-code flags. @@ -687,40 +710,28 @@ execute_program( GLcontext *ctx, case OPCODE_ENDSUB: /* end subroutine */ break; case OPCODE_BRA: /* conditional branch */ - { - /* NOTE: The branch is conditional! */ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - /* take branch */ - pc = inst->BranchTarget - 1; - } + if (eval_condition(machine, inst)) { + /* take branch */ + pc = inst->BranchTarget - 1; } break; - case OPCODE_BRK: /* break out of loop */ + case OPCODE_BRK: /* break out of loop (conditional) */ /* fall-through */ - case OPCODE_CONT: /* continue loop */ + case OPCODE_CONT: /* continue loop (conditional) */ /* Subtract 1 here since we'll do pc++ at end of for-loop */ - pc = inst->BranchTarget - 1; + if (eval_condition(machine, inst)) { + /* take branch */ + pc = inst->BranchTarget - 1; + } break; - case OPCODE_CAL: /* Call subroutine */ - { - /* NOTE: The call is conditional! */ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - machine->CallStack[machine->StackDepth++] = pc + 1; - pc = inst->BranchTarget; /* XXX - 1 ??? */ + case OPCODE_CAL: /* Call subroutine (conditional) */ + if (eval_condition(machine, inst)) { + /* call the subroutine */ + if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ } + machine->CallStack[machine->StackDepth++] = pc + 1; + pc = inst->BranchTarget; /* XXX - 1 ??? */ } break; case OPCODE_CMP: @@ -871,29 +882,20 @@ execute_program( GLcontext *ctx, } break; case OPCODE_IF: - { - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - /* do if-clause (just continue execution) */ - } - else { - /* go to the instruction after ELSE or ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; - } + if (eval_condition(machine, inst)) { + /* do if-clause (just continue execution) */ } - break; - case OPCODE_ELSE: - { - /* goto ENDIF */ + else { + /* go to the instruction after ELSE or ENDIF */ assert(inst->BranchTarget >= 0); pc = inst->BranchTarget - 1; } break; + case OPCODE_ELSE: + /* goto ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + break; case OPCODE_ENDIF: /* nothing */ break; @@ -908,16 +910,9 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; - case OPCODE_KIL_NV: /* NV_f_p only */ - { - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - return GL_FALSE; - } + case OPCODE_KIL_NV: /* NV_f_p only (conditional) */ + if (eval_condition(machine, inst)) { + return GL_FALSE; } break; case OPCODE_KIL: /* ARB_f_p only */ @@ -1203,20 +1198,12 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; - case OPCODE_RET: /* return from subroutine */ - { - /* NOTE: The return is conditional! */ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - if (machine->StackDepth == 0) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - pc = machine->CallStack[--machine->StackDepth]; + case OPCODE_RET: /* return from subroutine (conditional) */ + if (eval_condition(machine, inst)) { + if (machine->StackDepth == 0) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ } + pc = machine->CallStack[--machine->StackDepth]; } break; case OPCODE_RFL: /* reflection vector */ -- cgit v1.2.3 From b768c485474baefdde63098776e9d32c17b859ab Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 13:23:17 -0700 Subject: Use conditional break in for/do/while loops. --- src/mesa/shader/slang/slang_codegen.c | 106 +++++++++++++++------------------- src/mesa/shader/slang/slang_emit.c | 44 +++++++++++++- 2 files changed, 88 insertions(+), 62 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index bd7b30cd13..6671f31c47 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -616,6 +616,21 @@ new_break(slang_ir_node *loopNode) } +static slang_ir_node * +new_break_if_false(slang_ir_node *loopNode, slang_ir_node *cond) +{ + slang_ir_node *n = new_node1(IR_BREAK_IF_FALSE, cond); + assert(loopNode); + assert(loopNode->Opcode == IR_LOOP); + if (n) { + /* insert this node at head of linked list */ + n->BranchNode = loopNode->BranchNode; + loopNode->BranchNode = n; + } + return n; +} + + static slang_ir_node * new_cont(slang_ir_node *loopNode) { @@ -631,6 +646,14 @@ new_cont(slang_ir_node *loopNode) } +static slang_ir_node * +new_cond(slang_ir_node *n) +{ + slang_ir_node *c = new_node1(IR_COND, n); + return c; +} + + static slang_ir_node * new_if(slang_ir_node *cond, slang_ir_node *ifPart, slang_ir_node *elsePart) { @@ -1290,14 +1313,6 @@ _slang_is_noop(const slang_operation *oper) } -static slang_ir_node * -_slang_gen_cond(slang_ir_node *n) -{ - slang_ir_node *c = new_node1(IR_COND, n); - return c; -} - - static void print_funcs(struct slang_function_scope_ *scope, const char *name) { @@ -1381,12 +1396,10 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) slang_ir_node *prevLoop; /* * LOOP: - * eval expr (child[0]), updating condcodes - * IF !expr: - * BRK + * BREAK if !expr (child[0]) * body code (child[1]) */ - slang_ir_node *ifThen, *cond, *body, *loop; + slang_ir_node *loop, *cond, *breakIf, *body; loop = new_loop(NULL); @@ -1395,19 +1408,12 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) A->CurLoop = loop; cond = _slang_gen_operation(A, &oper->children[0]); - cond = new_node1(IR_NOT, cond); - cond = _slang_gen_cond(cond); - - ifThen = new_if(cond, - new_break(A->CurLoop), - NULL); - + breakIf = new_break_if_false(A->CurLoop, cond); body = _slang_gen_operation(A, &oper->children[1]); + loop->Children[0] = new_seq(breakIf, body); - loop->Children[0] = new_seq(ifThen, body); - - - A->CurLoop = prevLoop; /* pop loop, restore prev */ + /* pop loop, restore prev */ + A->CurLoop = prevLoop; return loop; } @@ -1423,11 +1429,9 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) /* * LOOP: * body code (child[0]) - * eval expr (child[1]), updating condcodes - * IF !expr: - * BRK + * BREAK if !expr (child[1]) */ - slang_ir_node *ifThen, *cond, *body, *loop; + slang_ir_node *loop, *cond, *breakIf, *body; loop = new_loop(NULL); @@ -1436,18 +1440,12 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) A->CurLoop = loop; body = _slang_gen_operation(A, &oper->children[0]); - cond = _slang_gen_operation(A, &oper->children[1]); - cond = new_node1(IR_NOT, cond); - cond = _slang_gen_cond(cond); + breakIf = new_break_if_false(A->CurLoop, cond); + loop->Children[0] = new_seq(body, breakIf); - ifThen = new_if(cond, - new_break(A->CurLoop), - NULL); - - loop->Children[0] = new_seq(body, ifThen); - - A->CurLoop = prevLoop; /* pop loop, restore prev */ + /* pop loop, restore prev */ + A->CurLoop = prevLoop; return loop; } @@ -1463,13 +1461,11 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) /* * init (child[0]) * LOOP: - * eval expr (child[1]), updating condcodes - * IF !expr: - * BRK + * BREAK if !expr (child[1]) * body code (child[3]) * incr code (child[2]) // XXX continue here */ - slang_ir_node *init, *ifThen, *cond, *body, *loop, *incr; + slang_ir_node *loop, *cond, *breakIf, *body, *init, *incr; init = _slang_gen_operation(A, &oper->children[0]); loop = new_loop(NULL); @@ -1479,21 +1475,14 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) A->CurLoop = loop; cond = _slang_gen_operation(A, &oper->children[1]); - cond = new_node1(IR_NOT, cond); - cond = _slang_gen_cond(cond); - - ifThen = new_if(cond, - new_break(A->CurLoop), - NULL); - + breakIf = new_break_if_false(A->CurLoop, cond); body = _slang_gen_operation(A, &oper->children[3]); - incr = _slang_gen_operation(A, &oper->children[2]); + loop->Children[0] = new_seq(breakIf, + new_seq(body, incr)); - loop->Children[0] = new_seq(ifThen, - new_seq(body,incr)); - - A->CurLoop = prevLoop; /* pop loop, restore prev */ + /* pop loop, restore prev */ + A->CurLoop = prevLoop; return new_seq(init, loop); } @@ -1521,7 +1510,7 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) slang_atom endifAtom = slang_atom_pool_gen(A->atoms, "__endif"); cond = _slang_gen_operation(A, &oper->children[0]); - cond = _slang_gen_cond(cond); + cond = new_cond(cond); /*assert(cond->Store);*/ bra = new_cjump(haveElseClause ? elseAtom : endifAtom, 0); tree = new_seq(cond, bra); @@ -1572,7 +1561,7 @@ _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) slang_ir_node *ifNode, *cond, *ifBody, *elseBody; cond = _slang_gen_operation(A, &oper->children[0]); - cond = _slang_gen_cond(cond); + cond = new_cond(cond); ifBody = _slang_gen_operation(A, &oper->children[1]); if (haveElseClause) elseBody = _slang_gen_operation(A, &oper->children[2]); @@ -1662,7 +1651,7 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) /* eval condition */ cond = _slang_gen_operation(A, &oper->children[0]); - cond = _slang_gen_cond(cond); + cond = new_cond(cond); tree = new_seq(tmpDecl, cond); /* jump if false to "alt" label */ @@ -2245,9 +2234,6 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_block_no_new_scope: /* list of operations */ - /* - assert(oper->num_children > 0); - */ if (oper->num_children > 0) { slang_ir_node *n, *tree = NULL; @@ -2287,7 +2273,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) break; case slang_oper_expression: return _slang_gen_operation(A, &oper->children[0]); - break; + case slang_oper_for: return _slang_gen_for(A, oper); case slang_oper_do: diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6e2394f265..d83880a26f 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -332,6 +332,9 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_BREAK: printf("BREAK\n"); break; + case IR_BREAK_IF_FALSE: + printf("BREAK_IF_FALSE\n"); + break; case IR_VAR: printf("VAR %s%s at %s store %p\n", @@ -1153,13 +1156,17 @@ emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) */ for (ir = n->BranchNode; ir; ir = ir->BranchNode) { struct prog_instruction *inst = prog->Instructions + ir->InstLocation; - if (ir->Opcode == IR_BREAK) { + if (ir->Opcode == IR_BREAK || + ir->Opcode == IR_BREAK_IF_FALSE || + ir->Opcode == IR_BREAK_IF_TRUE) { assert(inst->Opcode == OPCODE_BRK || inst->Opcode == OPCODE_BRA); inst->BranchTarget = endInstLoc + 1; } else { - assert(ir->Opcode == IR_CONT); + assert(ir->Opcode == IR_CONT || + ir->Opcode == IR_CONT_IF_FALSE || + ir->Opcode == IR_CONT_IF_TRUE); assert(inst->Opcode == OPCODE_CONT || inst->Opcode == OPCODE_BRA); /* XXX goto top of loop instead! */ @@ -1191,6 +1198,35 @@ emit_cont_break(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +/** + * Conditional loop continue/break. + */ +static struct prog_instruction * +emit_cont_break_if(slang_var_table *vt, slang_ir_node *n, + struct gl_program *prog, GLboolean breakTrue) +{ + gl_inst_opcode opcode; + struct prog_instruction *inst; + + /* evaluate condition expr, setting cond codes */ + inst = emit(vt, n->Children[0], prog); + assert(inst); + inst->CondUpdate = GL_TRUE; + + n->InstLocation = prog->NumInstructions; + if (EmitHighLevelInstructions) { + opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; + } + else { + opcode = OPCODE_BRA; + } + inst = new_instruction(prog, opcode); + inst->DstReg.CondMask = breakTrue ? COND_NE : COND_EQ; + return inst; +} + + + /** * Remove any SWIZZLE_NIL terms from given swizzle mask (smear prev term). * Ex: fix_swizzle("zyNN") -> "zyyy" @@ -1407,6 +1443,10 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_LOOP: return emit_loop(vt, n, prog); + case IR_BREAK_IF_FALSE: + return emit_cont_break_if(vt, n, prog, GL_FALSE); + case IR_BREAK_IF_TRUE: + return emit_cont_break_if(vt, n, prog, GL_TRUE); case IR_BREAK: /* fall-through */ case IR_CONT: -- cgit v1.2.3 From c81aedeaeca431b6e91e34559eaabfce80a9796f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 14:09:34 -0700 Subject: change BranchTarget to GLint --- src/mesa/shader/prog_instruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index 100aac4b97..8514cf69ec 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -401,7 +401,7 @@ struct prog_instruction /** * For BRA and CAL instructions, the location to jump to. */ - GLuint BranchTarget; + GLint BranchTarget; /** * For TEX instructions in shaders, the sampler to use for the -- cgit v1.2.3 From 34af2b7194ad473c8ae20bcff933910f8386c3f0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 14:10:19 -0700 Subject: consolidate BRA with BRK, CONT --- src/mesa/swrast/s_fragprog.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index ce028f72bf..fe41c0b5f4 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -709,18 +709,14 @@ execute_program( GLcontext *ctx, break; case OPCODE_ENDSUB: /* end subroutine */ break; - case OPCODE_BRA: /* conditional branch */ - if (eval_condition(machine, inst)) { - /* take branch */ - pc = inst->BranchTarget - 1; - } - break; + case OPCODE_BRA: /* branch (conditional) */ + /* fall-through */ case OPCODE_BRK: /* break out of loop (conditional) */ /* fall-through */ case OPCODE_CONT: /* continue loop (conditional) */ - /* Subtract 1 here since we'll do pc++ at end of for-loop */ if (eval_condition(machine, inst)) { /* take branch */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ pc = inst->BranchTarget - 1; } break; -- cgit v1.2.3 From fbf0f400b743686ccdf78b927fd5de477d764a9d Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 14:10:54 -0700 Subject: fix broken BRA for return stmts --- src/mesa/shader/slang/slang_codegen.c | 6 +++--- src/mesa/shader/slang/slang_emit.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6671f31c47..f71bbead0a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1407,7 +1407,7 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) prevLoop = A->CurLoop; A->CurLoop = loop; - cond = _slang_gen_operation(A, &oper->children[0]); + cond = new_cond(_slang_gen_operation(A, &oper->children[0])); breakIf = new_break_if_false(A->CurLoop, cond); body = _slang_gen_operation(A, &oper->children[1]); loop->Children[0] = new_seq(breakIf, body); @@ -1440,7 +1440,7 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) A->CurLoop = loop; body = _slang_gen_operation(A, &oper->children[0]); - cond = _slang_gen_operation(A, &oper->children[1]); + cond = new_cond(_slang_gen_operation(A, &oper->children[1])); breakIf = new_break_if_false(A->CurLoop, cond); loop->Children[0] = new_seq(body, breakIf); @@ -1474,7 +1474,7 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) prevLoop = A->CurLoop; A->CurLoop = loop; - cond = _slang_gen_operation(A, &oper->children[1]); + cond = new_cond(_slang_gen_operation(A, &oper->children[1])); breakIf = new_break_if_false(A->CurLoop, cond); body = _slang_gen_operation(A, &oper->children[3]); incr = _slang_gen_operation(A, &oper->children[2]); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index d83880a26f..e572712026 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -487,6 +487,7 @@ new_instruction(struct gl_program *prog, gl_inst_opcode opcode) prog->NumInstructions++; _mesa_init_instructions(inst, 1); inst->Opcode = opcode; + inst->BranchTarget = -1; /* invalid */ return inst; } -- cgit v1.2.3 From a1c2e87c4b7958b0f1a884bba893153b382973df Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 15:08:16 -0700 Subject: remove some cruft --- src/mesa/shader/slang/slang_codegen.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index f71bbead0a..2da53171ed 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -47,8 +47,6 @@ #include "slang_print.h" -static GLboolean UseHighLevelInstructions = GL_TRUE; - static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); @@ -2441,8 +2439,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case slang_oper_identifier: return _slang_gen_variable(A, oper); case slang_oper_if: - if (A->program->Target == GL_FRAGMENT_PROGRAM_ARB - && UseHighLevelInstructions) { + if (A->program->Target == GL_FRAGMENT_PROGRAM_ARB) { return _slang_gen_hl_if(A, oper); } else { -- cgit v1.2.3 From 6230ae7faf46e0ebcb4807df051c8b50482089dd Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 15:09:47 -0700 Subject: cont at top of loop, little clean-ups --- src/mesa/shader/slang/slang_emit.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index e572712026..c43f79cc72 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -40,7 +40,7 @@ #define PEEPHOLE_OPTIMIZATIONS 1 -#define ANNOTATE 1 +#define ANNOTATE 0 static GLboolean EmitHighLevelInstructions = GL_TRUE; @@ -59,7 +59,7 @@ typedef struct -static slang_ir_info IrInfo[] = { +static const slang_ir_info IrInfo[] = { /* binary ops */ { IR_ADD, "IR_ADD", OPCODE_ADD, 4, 2 }, { IR_SUB, "IR_SUB", OPCODE_SUB, 4, 2 }, @@ -124,7 +124,7 @@ static slang_ir_info IrInfo[] = { }; -static slang_ir_info * +static const slang_ir_info * slang_find_ir_info(slang_ir_opcode opcode) { GLuint i; @@ -334,6 +334,11 @@ slang_print_ir(const slang_ir_node *n, int indent) break; case IR_BREAK_IF_FALSE: printf("BREAK_IF_FALSE\n"); + slang_print_ir(n->Children[0], indent+3); + break; + case IR_BREAK_IF_TRUE: + printf("BREAK_IF_TRUE\n"); + slang_print_ir(n->Children[0], indent+3); break; case IR_VAR: @@ -1157,11 +1162,13 @@ emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) */ for (ir = n->BranchNode; ir; ir = ir->BranchNode) { struct prog_instruction *inst = prog->Instructions + ir->InstLocation; + assert(inst->BranchTarget < 0); if (ir->Opcode == IR_BREAK || ir->Opcode == IR_BREAK_IF_FALSE || ir->Opcode == IR_BREAK_IF_TRUE) { assert(inst->Opcode == OPCODE_BRK || inst->Opcode == OPCODE_BRA); + /* go to instruction after end of loop */ inst->BranchTarget = endInstLoc + 1; } else { @@ -1170,8 +1177,8 @@ emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) ir->Opcode == IR_CONT_IF_TRUE); assert(inst->Opcode == OPCODE_CONT || inst->Opcode == OPCODE_BRA); - /* XXX goto top of loop instead! */ - inst->BranchTarget = endInstLoc; + /* to go instruction at top of loop */ + inst->BranchTarget = beginInstLoc; } } return NULL; -- cgit v1.2.3 From c0a9f554be0b82f2e6ce2d9318854ecd24a1a890 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 17:11:18 -0700 Subject: optimize conditional breaks/continues --- src/mesa/shader/slang/slang_codegen.c | 90 ++++++++++++++++++++++++++++------- src/mesa/shader/slang/slang_emit.c | 20 +++++--- 2 files changed, 87 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 2da53171ed..7566ad2e9f 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -614,12 +614,35 @@ new_break(slang_ir_node *loopNode) } +/** + * Make new IR_BREAK_IF_TRUE or IR_BREAK_IF_FALSE node. + */ static slang_ir_node * -new_break_if_false(slang_ir_node *loopNode, slang_ir_node *cond) +new_break_if(slang_ir_node *loopNode, slang_ir_node *cond, GLboolean breakTrue) { - slang_ir_node *n = new_node1(IR_BREAK_IF_FALSE, cond); + slang_ir_node *n; + assert(loopNode); + assert(loopNode->Opcode == IR_LOOP); + n = new_node1(breakTrue ? IR_BREAK_IF_TRUE : IR_BREAK_IF_FALSE, cond); + if (n) { + /* insert this node at head of linked list */ + n->BranchNode = loopNode->BranchNode; + loopNode->BranchNode = n; + } + return n; +} + + +/** + * Make new IR_CONT_IF_TRUE or IR_CONT_IF_FALSE node. + */ +static slang_ir_node * +new_cont_if(slang_ir_node *loopNode, slang_ir_node *cond, GLboolean contTrue) +{ + slang_ir_node *n; assert(loopNode); assert(loopNode->Opcode == IR_LOOP); + n = new_node1(contTrue ? IR_CONT_IF_TRUE : IR_CONT_IF_FALSE, cond); if (n) { /* insert this node at head of linked list */ n->BranchNode = loopNode->BranchNode; @@ -1406,7 +1429,7 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) A->CurLoop = loop; cond = new_cond(_slang_gen_operation(A, &oper->children[0])); - breakIf = new_break_if_false(A->CurLoop, cond); + breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); body = _slang_gen_operation(A, &oper->children[1]); loop->Children[0] = new_seq(breakIf, body); @@ -1439,7 +1462,7 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) body = _slang_gen_operation(A, &oper->children[0]); cond = new_cond(_slang_gen_operation(A, &oper->children[1])); - breakIf = new_break_if_false(A->CurLoop, cond); + breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); loop->Children[0] = new_seq(body, breakIf); /* pop loop, restore prev */ @@ -1473,7 +1496,7 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) A->CurLoop = loop; cond = new_cond(_slang_gen_operation(A, &oper->children[1])); - breakIf = new_break_if_false(A->CurLoop, cond); + breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); body = _slang_gen_operation(A, &oper->children[3]); incr = _slang_gen_operation(A, &oper->children[2]); loop->Children[0] = new_seq(breakIf, @@ -1536,6 +1559,23 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) } +/** + * Determine if the given operation is of a specific type. + */ +static GLboolean +is_operation_type(const const slang_operation *oper, slang_operation_type type) +{ + if (oper->type == type) + return GL_TRUE; + else if ((oper->type == slang_oper_block_new_scope || + oper->type == slang_oper_block_no_new_scope) && + oper->num_children == 1) + return is_operation_type(&oper->children[0], type); + else + return GL_FALSE; +} + + /** * Generate IR tree for an if/then/else conditional using high-level * IR_IF instruction. @@ -1551,24 +1591,40 @@ _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) * else-body code * ENDIF */ - /* XXX special cases to check for: - * if body of conditiona is just a "break", emit a conditional break - * instruction. - */ const GLboolean haveElseClause = !_slang_is_noop(&oper->children[2]); slang_ir_node *ifNode, *cond, *ifBody, *elseBody; cond = _slang_gen_operation(A, &oper->children[0]); cond = new_cond(cond); - ifBody = _slang_gen_operation(A, &oper->children[1]); - if (haveElseClause) - elseBody = _slang_gen_operation(A, &oper->children[2]); - else - elseBody = NULL; - - ifNode = new_if(cond, ifBody, elseBody); - return ifNode; + if (is_operation_type(&oper->children[1], slang_oper_break)) { + /* Special case: generate a conditional break */ + ifBody = new_break_if(A->CurLoop, cond, GL_TRUE); + if (haveElseClause) { + elseBody = _slang_gen_operation(A, &oper->children[2]); + return new_seq(ifBody, elseBody); + } + return ifBody; + } + else if (is_operation_type(&oper->children[1], slang_oper_continue)) { + /* Special case: generate a conditional break */ + ifBody = new_cont_if(A->CurLoop, cond, GL_TRUE); + if (haveElseClause) { + elseBody = _slang_gen_operation(A, &oper->children[2]); + return new_seq(ifBody, elseBody); + } + return ifBody; + } + else { + /* general case */ + ifBody = _slang_gen_operation(A, &oper->children[1]); + if (haveElseClause) + elseBody = _slang_gen_operation(A, &oper->children[2]); + else + elseBody = NULL; + ifNode = new_if(cond, ifBody, elseBody); + return ifNode; + } } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c43f79cc72..1b43042e2d 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1156,9 +1156,9 @@ emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) beginInst->BranchTarget = prog->NumInstructions - 1; } - /* Done emitting loop code. Now walk over the loop's linked list - * of BREAK and CONT nodes, filling in their BranchTarget fields - * (which will point to the ENDLOOP or ENDLOOP+1 instructions). + /* Done emitting loop code. Now walk over the loop's linked list of + * BREAK and CONT nodes, filling in their BranchTarget fields (which + * will point to the ENDLOOP+1 or BGNLOOP instructions, respectively). */ for (ir = n->BranchNode; ir; ir = ir->BranchNode) { struct prog_instruction *inst = prog->Instructions + ir->InstLocation; @@ -1186,7 +1186,8 @@ emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /** - * Emit code for IR_CONT or IR_BREAK. + * "Continue" or "break" statement. + * Either OPCODE_CONT, OPCODE_BRK or OPCODE_BRA will be emitted. */ static struct prog_instruction * emit_cont_break(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) @@ -1207,7 +1208,8 @@ emit_cont_break(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /** - * Conditional loop continue/break. + * Conditional "continue" or "break" statement. + * Either OPCODE_CONT, OPCODE_BRK or OPCODE_BRA will be emitted. */ static struct prog_instruction * emit_cont_break_if(slang_var_table *vt, slang_ir_node *n, @@ -1223,7 +1225,11 @@ emit_cont_break_if(slang_var_table *vt, slang_ir_node *n, n->InstLocation = prog->NumInstructions; if (EmitHighLevelInstructions) { - opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; + if (n->Opcode == IR_CONT_IF_TRUE || + n->Opcode == IR_CONT_IF_FALSE) + opcode = OPCODE_CONT; + else + opcode = OPCODE_BRK; } else { opcode = OPCODE_BRA; @@ -1452,8 +1458,10 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_LOOP: return emit_loop(vt, n, prog); case IR_BREAK_IF_FALSE: + case IR_CONT_IF_FALSE: return emit_cont_break_if(vt, n, prog, GL_FALSE); case IR_BREAK_IF_TRUE: + case IR_CONT_IF_TRUE: return emit_cont_break_if(vt, n, prog, GL_TRUE); case IR_BREAK: /* fall-through */ -- cgit v1.2.3 From bd9615bbc59b0ce626bb32e2a005fccec20e7331 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 17:40:29 -0700 Subject: Check for constant-valued while/do loop conditions. Allows us to: 1. avoid generating constant-valued BRK test for while(1).. 2. discard entire loop for while(0). 3. detection infinite loops at compile-time. --- src/mesa/shader/slang/slang_codegen.c | 66 ++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 7566ad2e9f..6285454860 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1408,19 +1408,48 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, } +static GLboolean +_slang_is_constant_cond(const slang_operation *oper, GLboolean *value) +{ + if (oper->type == slang_oper_literal_float || + oper->type == slang_oper_literal_int || + oper->type == slang_oper_literal_bool) { + if (oper->literal[0]) + *value = GL_TRUE; + else + *value = GL_FALSE; + return GL_TRUE; + } + else if (oper->type == slang_oper_expression && + oper->num_children == 1) { + return _slang_is_constant_cond(&oper->children[0], value); + } + return GL_FALSE; +} + + + /** * Generate loop code using high-level IR_LOOP instruction */ static slang_ir_node * _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) { - slang_ir_node *prevLoop; /* * LOOP: * BREAK if !expr (child[0]) * body code (child[1]) */ - slang_ir_node *loop, *cond, *breakIf, *body; + slang_ir_node *prevLoop, *loop, *cond, *breakIf, *body; + GLboolean isConst, constTrue; + + /* Check if loop condition is a constant */ + isConst = _slang_is_constant_cond(&oper->children[0], &constTrue); + + if (isConst && !constTrue) { + /* loop is never executed! */ + return new_node0(IR_NOP); + } loop = new_loop(NULL); @@ -1429,10 +1458,23 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) A->CurLoop = loop; cond = new_cond(_slang_gen_operation(A, &oper->children[0])); - breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); + if (isConst && constTrue) { + /* while(nonzero constant), no conditional break */ + breakIf = NULL; + } + else { + breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); + } body = _slang_gen_operation(A, &oper->children[1]); loop->Children[0] = new_seq(breakIf, body); + /* Do infinite loop detection */ + if (loop->BranchNode == 0 && isConst && constTrue) { + /* infinite loop detected */ + A->CurLoop = prevLoop; /* clean-up */ + RETURN_ERROR("Infinite loop detected!", 0); + } + /* pop loop, restore prev */ A->CurLoop = prevLoop; @@ -1446,13 +1488,16 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) static slang_ir_node * _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) { - slang_ir_node *prevLoop; /* * LOOP: * body code (child[0]) * BREAK if !expr (child[1]) */ - slang_ir_node *loop, *cond, *breakIf, *body; + slang_ir_node *prevLoop, *loop, *cond, *breakIf, *body; + GLboolean isConst, constTrue; + + /* Check if loop condition is a constant */ + isConst = _slang_is_constant_cond(&oper->children[0], &constTrue); loop = new_loop(NULL); @@ -1462,7 +1507,13 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) body = _slang_gen_operation(A, &oper->children[0]); cond = new_cond(_slang_gen_operation(A, &oper->children[1])); - breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); + if (isConst && constTrue) { + /* while(nonzero constant), no conditional break */ + breakIf = NULL; + } + else { + breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); + } loop->Children[0] = new_seq(body, breakIf); /* pop loop, restore prev */ @@ -1478,7 +1529,6 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) static slang_ir_node * _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) { - slang_ir_node *prevLoop; /* * init (child[0]) * LOOP: @@ -1486,7 +1536,7 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) * body code (child[3]) * incr code (child[2]) // XXX continue here */ - slang_ir_node *loop, *cond, *breakIf, *body, *init, *incr; + slang_ir_node *prevLoop, *loop, *cond, *breakIf, *body, *init, *incr; init = _slang_gen_operation(A, &oper->children[0]); loop = new_loop(NULL); -- cgit v1.2.3 From 5e6908944bbc76be020a3f5306c2a674f944f42e Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Feb 2007 20:39:42 -0700 Subject: do full swizzled matching in _mesa_lookup_parameter_constant() --- src/mesa/shader/prog_parameter.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index a87dafc598..870e826460 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -493,17 +493,28 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, } } } - else if (list->Parameters[i].Size >= vSize) { - /* see if we can match this constant */ - GLuint match = 0, j; + else if (vSize <= list->Parameters[i].Size) { + /* see if we can match this constant (with a swizzle) */ + GLuint swz[4]; + GLuint match = 0, j, k; for (j = 0; j < vSize; j++) { - if (list->ParameterValues[i][j] == v[j]) { + if (v[j] == list->ParameterValues[i][j]) { + swz[j] = j; match++; } + else { + for (k = 0; k < list->Parameters[i].Size; k++) { + if (v[j] == list->ParameterValues[i][k]) { + swz[j] = k; + match++; + break; + } + } + } } if (match == vSize) { *posOut = i; - *swizzleOut = SWIZZLE_NOOP; + *swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); return GL_TRUE; } } -- cgit v1.2.3 From cf490a7f81b393242ab5eeec085e79a60bcf6345 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Feb 2007 12:04:52 -0700 Subject: always init param vars to silence valgrind warnings --- src/mesa/shader/prog_parameter.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 870e826460..3ebd559119 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -131,6 +131,10 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, COPY_4V(paramList->ParameterValues[oldNum + i], values); values += 4; } + else { + /* silence valgrind */ + ASSIGN_4V(paramList->ParameterValues[oldNum + i], 0, 0, 0, 0); + } size -= 4; } -- cgit v1.2.3 From 3d479b96385963dd7aacfa9f17cd480256ca6b4f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Feb 2007 14:18:41 -0700 Subject: re-enable free'ing of IR trees --- src/mesa/shader/slang/slang_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6285454860..0edd471f64 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -487,7 +487,7 @@ static slang_asm_info AsmInfo[] = { static void _slang_free_ir_tree(slang_ir_node *n) { -#if 0 +#if 1 GLuint i; if (!n) return; -- cgit v1.2.3 From b3893baf80f913499092d4339b3131527b912188 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Feb 2007 14:19:12 -0700 Subject: comments, etc --- src/mesa/shader/slang/slang_emit.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 1b43042e2d..b15d7372a7 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -43,9 +43,11 @@ #define ANNOTATE 0 +/* XXX temporarily here */ static GLboolean EmitHighLevelInstructions = GL_TRUE; + /** * Assembly and IR info */ @@ -116,7 +118,7 @@ static const slang_ir_info IrInfo[] = { { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 1 }, { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 1 }, - { IR_FLOAT, "IR_FLOAT", OPCODE_NOP, 0, 0 }, + { IR_FLOAT, "IR_FLOAT", OPCODE_NOP, 0, 0 }, /* float literal */ { IR_FIELD, "IR_FIELD", OPCODE_NOP, 0, 0 }, { IR_ELEMENT, "IR_ELEMENT", OPCODE_NOP, 0, 0 }, { IR_SWIZZLE, "IR_SWIZZLE", OPCODE_NOP, 0, 0 }, @@ -340,6 +342,14 @@ slang_print_ir(const slang_ir_node *n, int indent) printf("BREAK_IF_TRUE\n"); slang_print_ir(n->Children[0], indent+3); break; + case IR_CONT_IF_FALSE: + printf("CONT_IF_FALSE\n"); + slang_print_ir(n->Children[0], indent+3); + break; + case IR_CONT_IF_TRUE: + printf("CONT_IF_TRUE\n"); + slang_print_ir(n->Children[0], indent+3); + break; case IR_VAR: printf("VAR %s%s at %s store %p\n", @@ -358,11 +368,16 @@ slang_print_ir(const slang_ir_node *n, int indent) slang_print_ir(n->Children[0], indent+3); break; case IR_FLOAT: - printf("FLOAT %f %f %f %f\n", + printf("FLOAT %g %g %g %g\n", n->Value[0], n->Value[1], n->Value[2], n->Value[3]); break; case IR_I_TO_F: - printf("INT_TO_FLOAT %d\n", (int) n->Value[0]); + printf("INT_TO_FLOAT\n"); + slang_print_ir(n->Children[0], indent+3); + break; + case IR_F_TO_I: + printf("FLOAT_TO_INT\n"); + slang_print_ir(n->Children[0], indent+3); break; case IR_SWIZZLE: printf("SWIZZLE %s of (store %p) \n", @@ -1386,6 +1401,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_FLOOR: case IR_FRAC: case IR_F_TO_I: + case IR_I_TO_F: case IR_ABS: case IR_SIN: case IR_COS: -- cgit v1.2.3 From 383ecc0374582900016c6411aff65d27829f876d Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Feb 2007 15:39:32 -0700 Subject: Move experimental GL_MESA_program_debug functions into new file. --- src/mesa/shader/prog_debug.c | 265 +++++++++++++++++++++++++++++++++++++++++++ src/mesa/shader/prog_debug.h | 44 +++++++ 2 files changed, 309 insertions(+) create mode 100644 src/mesa/shader/prog_debug.c create mode 100644 src/mesa/shader/prog_debug.h (limited to 'src') diff --git a/src/mesa/shader/prog_debug.c b/src/mesa/shader/prog_debug.c new file mode 100644 index 0000000000..e3e5396bb1 --- /dev/null +++ b/src/mesa/shader/prog_debug.c @@ -0,0 +1,265 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "glheader.h" +#include "context.h" +#include "macros.h" +#include "nvfragparse.h" +#include "nvvertparse.h" +#include "program.h" +#include "prog_debug.h" +#include "prog_parameter.h" +#include "prog_instruction.h" + + + +/** + * Functions for the experimental GL_MESA_program_debug extension. + */ + + +/* XXX temporary */ +GLAPI void GLAPIENTRY +glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, + GLvoid *data) +{ + _mesa_ProgramCallbackMESA(target, callback, data); +} + + +void +_mesa_ProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, + GLvoid *data) +{ + GET_CURRENT_CONTEXT(ctx); + + switch (target) { + case GL_FRAGMENT_PROGRAM_ARB: + if (!ctx->Extensions.ARB_fragment_program) { + _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); + return; + } + ctx->FragmentProgram.Callback = callback; + ctx->FragmentProgram.CallbackData = data; + break; + case GL_FRAGMENT_PROGRAM_NV: + if (!ctx->Extensions.NV_fragment_program) { + _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); + return; + } + ctx->FragmentProgram.Callback = callback; + ctx->FragmentProgram.CallbackData = data; + break; + case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ + if (!ctx->Extensions.ARB_vertex_program && + !ctx->Extensions.NV_vertex_program) { + _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); + return; + } + ctx->VertexProgram.Callback = callback; + ctx->VertexProgram.CallbackData = data; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); + return; + } +} + + +/* XXX temporary */ +GLAPI void GLAPIENTRY +glGetProgramRegisterfvMESA(GLenum target, + GLsizei len, const GLubyte *registerName, + GLfloat *v) +{ + _mesa_GetProgramRegisterfvMESA(target, len, registerName, v); +} + + +void +_mesa_GetProgramRegisterfvMESA(GLenum target, + GLsizei len, const GLubyte *registerName, + GLfloat *v) +{ + char reg[1000]; + GET_CURRENT_CONTEXT(ctx); + + /* We _should_ be inside glBegin/glEnd */ +#if 0 + if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramRegisterfvMESA"); + return; + } +#endif + + /* make null-terminated copy of registerName */ + len = MIN2((unsigned int) len, sizeof(reg) - 1); + _mesa_memcpy(reg, registerName, len); + reg[len] = 0; + + switch (target) { + case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ + if (!ctx->Extensions.ARB_vertex_program && + !ctx->Extensions.NV_vertex_program) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetProgramRegisterfvMESA(target)"); + return; + } + if (!ctx->VertexProgram._Enabled) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetProgramRegisterfvMESA"); + return; + } + /* GL_NV_vertex_program */ + if (reg[0] == 'R') { + /* Temp register */ + GLint i = _mesa_atoi(reg + 1); + if (i >= (GLint)ctx->Const.VertexProgram.MaxTemps) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetProgramRegisterfvMESA(registerName)"); + return; + } +#if 0 /* FIX ME */ + ctx->Driver.GetVertexProgramRegister(ctx, PROGRAM_TEMPORARY, i, v); +#endif + } + else if (reg[0] == 'v' && reg[1] == '[') { + /* Vertex Input attribute */ + GLuint i; + for (i = 0; i < ctx->Const.VertexProgram.MaxAttribs; i++) { + const char *name = _mesa_nv_vertex_input_register_name(i); + char number[10]; + _mesa_sprintf(number, "%d", i); + if (_mesa_strncmp(reg + 2, name, 4) == 0 || + _mesa_strncmp(reg + 2, number, _mesa_strlen(number)) == 0) { +#if 0 /* FIX ME */ + ctx->Driver.GetVertexProgramRegister(ctx, PROGRAM_INPUT, + i, v); +#endif + return; + } + } + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetProgramRegisterfvMESA(registerName)"); + return; + } + else if (reg[0] == 'o' && reg[1] == '[') { + /* Vertex output attribute */ + } + /* GL_ARB_vertex_program */ + else if (_mesa_strncmp(reg, "vertex.", 7) == 0) { + + } + else { + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetProgramRegisterfvMESA(registerName)"); + return; + } + break; + case GL_FRAGMENT_PROGRAM_ARB: + if (!ctx->Extensions.ARB_fragment_program) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetProgramRegisterfvMESA(target)"); + return; + } + if (!ctx->FragmentProgram._Enabled) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetProgramRegisterfvMESA"); + return; + } + /* XXX to do */ + break; + case GL_FRAGMENT_PROGRAM_NV: + if (!ctx->Extensions.NV_fragment_program) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetProgramRegisterfvMESA(target)"); + return; + } + if (!ctx->FragmentProgram._Enabled) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetProgramRegisterfvMESA"); + return; + } + if (reg[0] == 'R') { + /* Temp register */ + GLint i = _mesa_atoi(reg + 1); + if (i >= (GLint)ctx->Const.FragmentProgram.MaxTemps) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetProgramRegisterfvMESA(registerName)"); + return; + } + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_TEMPORARY, + i, v); + } + else if (reg[0] == 'f' && reg[1] == '[') { + /* Fragment input attribute */ + GLuint i; + for (i = 0; i < ctx->Const.FragmentProgram.MaxAttribs; i++) { + const char *name = _mesa_nv_fragment_input_register_name(i); + if (_mesa_strncmp(reg + 2, name, 4) == 0) { + ctx->Driver.GetFragmentProgramRegister(ctx, + PROGRAM_INPUT, i, v); + return; + } + } + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetProgramRegisterfvMESA(registerName)"); + return; + } + else if (_mesa_strcmp(reg, "o[COLR]") == 0) { + /* Fragment output color */ + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_COLR, v); + } + else if (_mesa_strcmp(reg, "o[COLH]") == 0) { + /* Fragment output color */ + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_COLH, v); + } + else if (_mesa_strcmp(reg, "o[DEPR]") == 0) { + /* Fragment output depth */ + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_DEPR, v); + } + else { + /* try user-defined identifiers */ + const GLfloat *value = _mesa_lookup_parameter_value( + ctx->FragmentProgram.Current->Base.Parameters, -1, reg); + if (value) { + COPY_4V(v, value); + } + else { + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetProgramRegisterfvMESA(registerName)"); + return; + } + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetProgramRegisterfvMESA(target)"); + return; + } +} diff --git a/src/mesa/shader/prog_debug.h b/src/mesa/shader/prog_debug.h new file mode 100644 index 0000000000..fc400e19de --- /dev/null +++ b/src/mesa/shader/prog_debug.h @@ -0,0 +1,44 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef PROG_DEBUG_H +#define PROG_DEBUG_H 1 + + +/* + * GL_MESA_program_debug + */ + +extern void +_mesa_ProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, + GLvoid *data); + +extern void +_mesa_GetProgramRegisterfvMESA(GLenum target, GLsizei len, + const GLubyte *registerName, GLfloat *v); + + + +#endif /* PROG_DEBUG_H */ -- cgit v1.2.3 From 942ee025908a95afc57990c57d6754ca1a626b04 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Feb 2007 15:40:00 -0700 Subject: move GL_MESA_program_debug funcs to prog_debug.c --- src/mesa/shader/program.c | 250 +--------------------------------------------- src/mesa/shader/program.h | 17 +--- 2 files changed, 6 insertions(+), 261 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 7a31949673..ae26c3cc14 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,25 +32,13 @@ #include "glheader.h" #include "context.h" #include "hash.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" -#include "nvfragparse.h" #include "program.h" #include "prog_parameter.h" #include "prog_instruction.h" -#include "prog_statevars.h" -#include "nvvertparse.h" -#include "atifragshader.h" - -/**********************************************************************/ -/* Utility functions */ -/**********************************************************************/ - - -/* A pointer to this dummy program is put into the hash table when +/** + * A pointer to this dummy program is put into the hash table when * glGenPrograms is called. */ struct gl_program _mesa_DummyProgram; @@ -629,233 +617,3 @@ _mesa_GenPrograms(GLsizei n, GLuint *ids) ids[i] = first + i; } } - - -/**********************************************************************/ -/* GL_MESA_program_debug extension */ -/**********************************************************************/ - - -/* XXX temporary */ -GLAPI void GLAPIENTRY -glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, - GLvoid *data) -{ - _mesa_ProgramCallbackMESA(target, callback, data); -} - - -void -_mesa_ProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, - GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - - switch (target) { - case GL_FRAGMENT_PROGRAM_ARB: - if (!ctx->Extensions.ARB_fragment_program) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); - return; - } - ctx->FragmentProgram.Callback = callback; - ctx->FragmentProgram.CallbackData = data; - break; - case GL_FRAGMENT_PROGRAM_NV: - if (!ctx->Extensions.NV_fragment_program) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); - return; - } - ctx->FragmentProgram.Callback = callback; - ctx->FragmentProgram.CallbackData = data; - break; - case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ - if (!ctx->Extensions.ARB_vertex_program && - !ctx->Extensions.NV_vertex_program) { - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); - return; - } - ctx->VertexProgram.Callback = callback; - ctx->VertexProgram.CallbackData = data; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glProgramCallbackMESA(target)"); - return; - } -} - - -/* XXX temporary */ -GLAPI void GLAPIENTRY -glGetProgramRegisterfvMESA(GLenum target, - GLsizei len, const GLubyte *registerName, - GLfloat *v) -{ - _mesa_GetProgramRegisterfvMESA(target, len, registerName, v); -} - - -void -_mesa_GetProgramRegisterfvMESA(GLenum target, - GLsizei len, const GLubyte *registerName, - GLfloat *v) -{ - char reg[1000]; - GET_CURRENT_CONTEXT(ctx); - - /* We _should_ be inside glBegin/glEnd */ -#if 0 - if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetProgramRegisterfvMESA"); - return; - } -#endif - - /* make null-terminated copy of registerName */ - len = MIN2((unsigned int) len, sizeof(reg) - 1); - _mesa_memcpy(reg, registerName, len); - reg[len] = 0; - - switch (target) { - case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ - if (!ctx->Extensions.ARB_vertex_program && - !ctx->Extensions.NV_vertex_program) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetProgramRegisterfvMESA(target)"); - return; - } - if (!ctx->VertexProgram._Enabled) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetProgramRegisterfvMESA"); - return; - } - /* GL_NV_vertex_program */ - if (reg[0] == 'R') { - /* Temp register */ - GLint i = _mesa_atoi(reg + 1); - if (i >= (GLint)ctx->Const.VertexProgram.MaxTemps) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetProgramRegisterfvMESA(registerName)"); - return; - } -#if 0 /* FIX ME */ - ctx->Driver.GetVertexProgramRegister(ctx, PROGRAM_TEMPORARY, i, v); -#endif - } - else if (reg[0] == 'v' && reg[1] == '[') { - /* Vertex Input attribute */ - GLuint i; - for (i = 0; i < ctx->Const.VertexProgram.MaxAttribs; i++) { - const char *name = _mesa_nv_vertex_input_register_name(i); - char number[10]; - _mesa_sprintf(number, "%d", i); - if (_mesa_strncmp(reg + 2, name, 4) == 0 || - _mesa_strncmp(reg + 2, number, _mesa_strlen(number)) == 0) { -#if 0 /* FIX ME */ - ctx->Driver.GetVertexProgramRegister(ctx, PROGRAM_INPUT, - i, v); -#endif - return; - } - } - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetProgramRegisterfvMESA(registerName)"); - return; - } - else if (reg[0] == 'o' && reg[1] == '[') { - /* Vertex output attribute */ - } - /* GL_ARB_vertex_program */ - else if (_mesa_strncmp(reg, "vertex.", 7) == 0) { - - } - else { - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetProgramRegisterfvMESA(registerName)"); - return; - } - break; - case GL_FRAGMENT_PROGRAM_ARB: - if (!ctx->Extensions.ARB_fragment_program) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetProgramRegisterfvMESA(target)"); - return; - } - if (!ctx->FragmentProgram._Enabled) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetProgramRegisterfvMESA"); - return; - } - /* XXX to do */ - break; - case GL_FRAGMENT_PROGRAM_NV: - if (!ctx->Extensions.NV_fragment_program) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetProgramRegisterfvMESA(target)"); - return; - } - if (!ctx->FragmentProgram._Enabled) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetProgramRegisterfvMESA"); - return; - } - if (reg[0] == 'R') { - /* Temp register */ - GLint i = _mesa_atoi(reg + 1); - if (i >= (GLint)ctx->Const.FragmentProgram.MaxTemps) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetProgramRegisterfvMESA(registerName)"); - return; - } - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_TEMPORARY, - i, v); - } - else if (reg[0] == 'f' && reg[1] == '[') { - /* Fragment input attribute */ - GLuint i; - for (i = 0; i < ctx->Const.FragmentProgram.MaxAttribs; i++) { - const char *name = _mesa_nv_fragment_input_register_name(i); - if (_mesa_strncmp(reg + 2, name, 4) == 0) { - ctx->Driver.GetFragmentProgramRegister(ctx, - PROGRAM_INPUT, i, v); - return; - } - } - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetProgramRegisterfvMESA(registerName)"); - return; - } - else if (_mesa_strcmp(reg, "o[COLR]") == 0) { - /* Fragment output color */ - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, - FRAG_RESULT_COLR, v); - } - else if (_mesa_strcmp(reg, "o[COLH]") == 0) { - /* Fragment output color */ - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, - FRAG_RESULT_COLH, v); - } - else if (_mesa_strcmp(reg, "o[DEPR]") == 0) { - /* Fragment output depth */ - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, - FRAG_RESULT_DEPR, v); - } - else { - /* try user-defined identifiers */ - const GLfloat *value = _mesa_lookup_parameter_value( - ctx->FragmentProgram.Current->Base.Parameters, -1, reg); - if (value) { - COPY_4V(v, value); - } - else { - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetProgramRegisterfvMESA(registerName)"); - return; - } - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetProgramRegisterfvMESA(target)"); - return; - } -} diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index 73f5238928..52704856ab 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -103,17 +103,4 @@ _mesa_GenPrograms(GLsizei n, GLuint *ids); -/* - * GL_MESA_program_debug - */ - -extern void -_mesa_ProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, - GLvoid *data); - -extern void -_mesa_GetProgramRegisterfvMESA(GLenum target, GLsizei len, - const GLubyte *registerName, GLfloat *v); - - #endif /* PROGRAM_H */ -- cgit v1.2.3 From 5620392d67278714f7c2a5ccc3101334ac35ab3f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Feb 2007 15:40:15 -0700 Subject: add prog_debug.c --- src/mesa/sources | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index 4d8055b4bf..b35e56abad 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -158,6 +158,7 @@ SHADER_SOURCES = \ shader/nvvertexec.c \ shader/nvvertparse.c \ shader/program.c \ + shader/prog_debug.c \ shader/prog_instruction.c \ shader/prog_parameter.c \ shader/prog_print.c \ -- cgit v1.2.3 From ed490e4643f4b20b2b4b745f0285e32d099663a0 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Feb 2007 09:23:00 -0700 Subject: remove dead code --- src/mesa/shader/slang/slang_typeinfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index eef2cb96db..154a1eeef4 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -690,7 +690,7 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, return NULL; } if (!slang_type_specifier_equal(&ti.spec, - &f->parameters->variables[j/* + haveRetValue*/]->type.specifier)) { + &f->parameters->variables[j]->type.specifier)) { slang_typeinfo_destruct(&ti); break; } @@ -698,8 +698,8 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ if (!ti.can_be_referenced && - (f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_out || - f->parameters->variables[j/* + haveRetValue*/]->type.qualifier == slang_qual_inout)) + (f->parameters->variables[j]->type.qualifier == slang_qual_out || + f->parameters->variables[j]->type.qualifier == slang_qual_inout)) break; } if (j == num_args) -- cgit v1.2.3 From d003877c669414474fbe00ca423ebbb462939529 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Feb 2007 08:58:42 -0700 Subject: implement IR_I_TO_F --- src/mesa/shader/slang/slang_emit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index b15d7372a7..955f428b95 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1394,6 +1394,12 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_SWIZZLE: return emit_swizzle(vt, n, prog); + case IR_I_TO_F: + { + n->Store = n->Children[0]->Store; + } + return NULL; + /* Simple arithmetic */ /* unary */ case IR_RSQ: @@ -1401,7 +1407,6 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_FLOOR: case IR_FRAC: case IR_F_TO_I: - case IR_I_TO_F: case IR_ABS: case IR_SIN: case IR_COS: -- cgit v1.2.3 From 9ea2315d2df7034db1cf8d00a6c3e71da5612969 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Feb 2007 09:04:53 -0700 Subject: Allow int->float argument conversion in _slang_locate_function(). --- src/mesa/shader/slang/slang_typeinfo.c | 44 ++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index 154a1eeef4..824bcc713f 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -231,17 +231,44 @@ slang_type_specifier_copy(slang_type_specifier * x, return GL_TRUE; } + +/** + * Test if two types are equal. + */ GLboolean slang_type_specifier_equal(const slang_type_specifier * x, const slang_type_specifier * y) { if (x->type != y->type) - return 0; + return GL_FALSE; if (x->type == slang_spec_struct) return slang_struct_equal(x->_struct, y->_struct); if (x->type == slang_spec_array) return slang_type_specifier_equal(x->_array, y->_array); - return 1; + return GL_TRUE; +} + + +/** + * As above, but allow float/int casting. + */ +static GLboolean +slang_type_specifier_compatible(const slang_type_specifier * x, + const slang_type_specifier * y) +{ + /* special case: float == int */ + if (x->type == slang_spec_int && y->type == slang_spec_float) { + return GL_TRUE; + } + /* XXX may need to add bool/int compatibility, etc */ + + if (x->type != y->type) + return GL_FALSE; + if (x->type == slang_spec_struct) + return slang_struct_equal(x->_struct, y->_struct); + if (x->type == slang_spec_array) + return slang_type_specifier_compatible(x->_array, y->_array); + return GL_TRUE; } @@ -660,12 +687,13 @@ _slang_typeof_operation_(const slang_operation * op, } - +/** + * Lookup a function according to name and parameter count/types. + */ slang_function * _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, const slang_operation * args, GLuint num_args, - const slang_name_space * space, - slang_atom_pool * atoms) + const slang_name_space * space, slang_atom_pool * atoms) { GLuint i; @@ -689,14 +717,16 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, slang_typeinfo_destruct(&ti); return NULL; } - if (!slang_type_specifier_equal(&ti.spec, + if (!slang_type_specifier_compatible(&ti.spec, &f->parameters->variables[j]->type.specifier)) { slang_typeinfo_destruct(&ti); break; } slang_typeinfo_destruct(&ti); - /* "out" and "inout" formal parameter requires the actual parameter to be l-value */ + /* "out" and "inout" formal parameter requires the actual + * parameter to be l-value. + */ if (!ti.can_be_referenced && (f->parameters->variables[j]->type.qualifier == slang_qual_out || f->parameters->variables[j]->type.qualifier == slang_qual_inout)) -- cgit v1.2.3 From d30806b0c54c39351096c29c382d727a821b7da0 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Feb 2007 09:05:11 -0700 Subject: added a comment --- src/mesa/shader/slang/slang_codegen.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 0edd471f64..c4535feac1 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1353,6 +1353,9 @@ print_funcs(struct slang_function_scope_ *scope, const char *name) * Return first function in the scope that has the given name. * This is the function we'll try to call when there is no exact match * between function parameters and call arguments. + * + * XXX we should really create a list of candidate functions and try + * all of them... */ static slang_function * _slang_first_function(struct slang_function_scope_ *scope, const char *name) -- cgit v1.2.3 From d15059b1283621ecbca3c24e89fdc449f15a9fa2 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Feb 2007 09:06:09 -0700 Subject: abort upon errors (temporary) --- src/mesa/shader/slang/slang_compile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 199f96e441..f73fccf436 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -162,6 +162,9 @@ slang_info_log_message(slang_info_log * log, const char *prefix, } slang_string_concat(log->text, msg); slang_string_concat(log->text, "\n"); +#if 1 + abort(); /* XXX temporary */ +#endif return 1; } @@ -214,7 +217,7 @@ slang_info_log_memory(slang_info_log * log) log->dont_free_text = 1; log->text = out_of_memory; } - abort(); + abort(); /* XXX temporary */ } /* slang_parse_ctx */ -- cgit v1.2.3 From 1c1a0a23d32f889971de61c2c25fa1eebb9889a3 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Feb 2007 09:31:35 -0700 Subject: change all enum tokens to uppercase --- src/mesa/shader/slang/slang_codegen.c | 318 ++++++++++++------------ src/mesa/shader/slang/slang_compile.c | 224 ++++++++--------- src/mesa/shader/slang/slang_compile.h | 13 +- src/mesa/shader/slang/slang_compile_function.c | 6 +- src/mesa/shader/slang/slang_compile_function.h | 6 +- src/mesa/shader/slang/slang_compile_operation.c | 2 +- src/mesa/shader/slang/slang_compile_operation.h | 130 +++++----- src/mesa/shader/slang/slang_compile_struct.c | 2 +- src/mesa/shader/slang/slang_compile_variable.c | 92 +++---- src/mesa/shader/slang/slang_compile_variable.h | 20 +- src/mesa/shader/slang/slang_print.c | 278 ++++++++++----------- src/mesa/shader/slang/slang_simplify.c | 66 ++--- src/mesa/shader/slang/slang_storage.c | 96 +++---- src/mesa/shader/slang/slang_storage.h | 17 +- src/mesa/shader/slang/slang_typeinfo.c | 318 ++++++++++++------------ src/mesa/shader/slang/slang_typeinfo.h | 48 ++-- 16 files changed, 819 insertions(+), 817 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index c4535feac1..a36a2d7bc9 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -142,12 +142,12 @@ static GLboolean is_sampler_type(const slang_fully_specified_type *t) { switch (t->specifier.type) { - case slang_spec_sampler1D: - case slang_spec_sampler2D: - case slang_spec_sampler3D: - case slang_spec_samplerCube: - case slang_spec_sampler1DShadow: - case slang_spec_sampler2DShadow: + case SLANG_SPEC_SAMPLER1D: + case SLANG_SPEC_SAMPLER2D: + case SLANG_SPEC_SAMPLER3D: + case SLANG_SPEC_SAMPLERCUBE: + case SLANG_SPEC_SAMPLER1DSHADOW: + case SLANG_SPEC_SAMPLER2DSHADOW: return GL_TRUE; default: return GL_FALSE; @@ -167,49 +167,49 @@ GLuint _slang_sizeof_type_specifier(const slang_type_specifier *spec) { switch (spec->type) { - case slang_spec_void: + case SLANG_SPEC_VOID: abort(); return 0; - case slang_spec_bool: + case SLANG_SPEC_BOOL: return 1; - case slang_spec_bvec2: + case SLANG_SPEC_BVEC2: return 2; - case slang_spec_bvec3: + case SLANG_SPEC_BVEC3: return 3; - case slang_spec_bvec4: + case SLANG_SPEC_BVEC4: return 4; - case slang_spec_int: + case SLANG_SPEC_INT: return 1; - case slang_spec_ivec2: + case SLANG_SPEC_IVEC2: return 2; - case slang_spec_ivec3: + case SLANG_SPEC_IVEC3: return 3; - case slang_spec_ivec4: + case SLANG_SPEC_IVEC4: return 4; - case slang_spec_float: + case SLANG_SPEC_FLOAT: return 1; - case slang_spec_vec2: + case SLANG_SPEC_VEC2: return 2; - case slang_spec_vec3: + case SLANG_SPEC_VEC3: return 3; - case slang_spec_vec4: + case SLANG_SPEC_VEC4: return 4; - case slang_spec_mat2: + case SLANG_SPEC_MAT2: return 2 * 2; - case slang_spec_mat3: + case SLANG_SPEC_MAT3: return 3 * 3; - case slang_spec_mat4: + case SLANG_SPEC_MAT4: return 4 * 4; - case slang_spec_sampler1D: - case slang_spec_sampler2D: - case slang_spec_sampler3D: - case slang_spec_samplerCube: - case slang_spec_sampler1DShadow: - case slang_spec_sampler2DShadow: + case SLANG_SPEC_SAMPLER1D: + case SLANG_SPEC_SAMPLER2D: + case SLANG_SPEC_SAMPLER3D: + case SLANG_SPEC_SAMPLERCUBE: + case SLANG_SPEC_SAMPLER1DSHADOW: + case SLANG_SPEC_SAMPLER2DSHADOW: return 1; /* special case */ - case slang_spec_struct: + case SLANG_SPEC_STRUCT: return _slang_sizeof_struct(spec->_struct); - case slang_spec_array: + case SLANG_SPEC_ARRAY: return 1; /* XXX */ default: abort(); @@ -295,17 +295,17 @@ static GLint sampler_to_texture_index(const slang_type_specifier_type type) { switch (type) { - case slang_spec_sampler1D: + case SLANG_SPEC_SAMPLER1D: return TEXTURE_1D_INDEX; - case slang_spec_sampler2D: + case SLANG_SPEC_SAMPLER2D: return TEXTURE_2D_INDEX; - case slang_spec_sampler3D: + case SLANG_SPEC_SAMPLER3D: return TEXTURE_3D_INDEX; - case slang_spec_samplerCube: + case SLANG_SPEC_SAMPLERCUBE: return TEXTURE_CUBE_INDEX; - case slang_spec_sampler1DShadow: + case SLANG_SPEC_SAMPLER1DSHADOW: return TEXTURE_1D_INDEX; /* XXX fix */ - case slang_spec_sampler2DShadow: + case SLANG_SPEC_SAMPLER2DSHADOW: return TEXTURE_2D_INDEX; /* XXX fix */ default: return -1; @@ -708,9 +708,9 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) static GLboolean slang_is_asm_function(const slang_function *fun) { - if (fun->body->type == slang_oper_block_no_new_scope && + if (fun->body->type == SLANG_OPER_BLOCK_NO_NEW_SCOPE && fun->body->num_children == 1 && - fun->body->children[0].type == slang_oper_asm) { + fun->body->children[0].type == SLANG_OPER_ASM) { return GL_TRUE; } return GL_FALSE; @@ -729,7 +729,7 @@ slang_inline_asm_function(slang_assemble_ctx *A, GLuint i; slang_operation *inlined = slang_operation_new(1); - /*assert(oper->type == slang_oper_call); or vec4_add, etc */ + /*assert(oper->type == SLANG_OPER_CALL); or vec4_add, etc */ /* printf("Inline asm %s\n", (char*) fun->header.a_name); */ @@ -755,7 +755,7 @@ slang_inline_asm_function(slang_assemble_ctx *A, static void slang_resolve_variable(slang_operation *oper) { - if (oper->type != slang_oper_identifier) + if (oper->type != SLANG_OPER_IDENTIFIER) return; if (!oper->var) { oper->var = _slang_locate_variable(oper->locals, @@ -768,7 +768,7 @@ slang_resolve_variable(slang_operation *oper) /** - * Replace particular variables (slang_oper_identifier) with new expressions. + * Replace particular variables (SLANG_OPER_IDENTIFIER) with new expressions. */ static void slang_substitute(slang_assemble_ctx *A, slang_operation *oper, @@ -776,7 +776,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, slang_operation **substNew, GLboolean isLHS) { switch (oper->type) { - case slang_oper_variable_decl: + case SLANG_OPER_VARIABLE_DECL: { slang_variable *v = _slang_locate_variable(oper->locals, oper->a_id, GL_TRUE); @@ -793,7 +793,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, } } break; - case slang_oper_identifier: + case SLANG_OPER_IDENTIFIER: assert(oper->num_children == 0); if (1/**!isLHS XXX FIX */) { slang_atom id = oper->a_id; @@ -811,9 +811,9 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, /* look for a substitution */ for (i = 0; i < substCount; i++) { if (v == substOld[i]) { - /* OK, replace this slang_oper_identifier with a new expr */ + /* OK, replace this SLANG_OPER_IDENTIFIER with a new expr */ #if 0 /* DEBUG only */ - if (substNew[i]->type == slang_oper_identifier) { + if (substNew[i]->type == SLANG_OPER_IDENTIFIER) { assert(substNew[i]->var); assert(substNew[i]->var->a_name); printf("Substitute %s with %s in id node %p\n", @@ -833,7 +833,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, } break; #if 1 /* XXX rely on default case below */ - case slang_oper_return: + case SLANG_OPER_RETURN: /* do return replacement here too */ assert(oper->num_children == 0 || oper->num_children == 1); if (oper->num_children == 1) { @@ -846,23 +846,23 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, */ slang_operation *blockOper, *assignOper, *returnOper; blockOper = slang_operation_new(1); - blockOper->type = slang_oper_block_no_new_scope; + blockOper->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; blockOper->num_children = 2; blockOper->children = slang_operation_new(2); assignOper = blockOper->children + 0; returnOper = blockOper->children + 1; - assignOper->type = slang_oper_assign; + assignOper->type = SLANG_OPER_ASSIGN; assignOper->num_children = 2; assignOper->children = slang_operation_new(2); - assignOper->children[0].type = slang_oper_identifier; + assignOper->children[0].type = SLANG_OPER_IDENTIFIER; assignOper->children[0].a_id = slang_atom_pool_atom(A->atoms, "__retVal"); assignOper->children[0].locals->outer_scope = oper->locals; assignOper->locals = oper->locals; slang_operation_copy(&assignOper->children[1], &oper->children[0]); - returnOper->type = slang_oper_return; + returnOper->type = SLANG_OPER_RETURN; assert(returnOper->num_children == 0); /* do substitutions on the "__retVal = expr" sub-tree */ @@ -875,8 +875,8 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, } break; #endif - case slang_oper_assign: - case slang_oper_subscript: + case SLANG_OPER_ASSIGN: + case SLANG_OPER_SUBSCRIPT: /* special case: * child[0] can't have substitutions but child[1] can. */ @@ -885,7 +885,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, slang_substitute(A, &oper->children[1], substCount, substOld, substNew, GL_FALSE); break; - case slang_oper_field: + case SLANG_OPER_FIELD: /* XXX NEW - test */ slang_substitute(A, &oper->children[0], substCount, substOld, substNew, GL_TRUE); @@ -925,7 +925,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, slang_operation **substNew; GLuint substCount, numCopyIn, i; - /*assert(oper->type == slang_oper_call); (or (matrix) multiply, etc) */ + /*assert(oper->type == SLANG_OPER_CALL); (or (matrix) multiply, etc) */ assert(fun->param_count == totalArgs); /* allocate temporary arrays */ @@ -953,7 +953,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, slang_variable *resultVar; commaSeq = slang_operation_new(1); - commaSeq->type = slang_oper_sequence; + commaSeq->type = SLANG_OPER_SEQUENCE; assert(commaSeq->locals); commaSeq->locals->outer_scope = oper->locals->outer_scope; commaSeq->num_children = 3; @@ -971,7 +971,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, /* child[0] = __resultTmp declaration */ declOper = &commaSeq->children[0]; - declOper->type = slang_oper_variable_decl; + declOper->type = SLANG_OPER_VARIABLE_DECL; declOper->a_id = resultVar->a_name; declOper->locals->outer_scope = commaSeq->locals; /*** ??? **/ @@ -982,7 +982,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, /* child[2] = __resultTmp reference */ returnOper = &commaSeq->children[2]; - returnOper->type = slang_oper_identifier; + returnOper->type = SLANG_OPER_IDENTIFIER; returnOper->a_id = resultVar->a_name; returnOper->locals->outer_scope = commaSeq->locals; declOper->locals->outer_scope = commaSeq->locals; @@ -1013,8 +1013,8 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, slang_type_qual_string(p->type.qualifier), (char *) p->a_name); */ - if (p->type.qualifier == slang_qual_inout || - p->type.qualifier == slang_qual_out) { + if (p->type.qualifier == SLANG_QUAL_INOUT || + p->type.qualifier == SLANG_QUAL_OUT) { /* an output param */ slang_operation *arg; if (i < numArgs) @@ -1023,7 +1023,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, arg = returnOper; paramMode[i] = SUBST; - if (arg->type == slang_oper_identifier) + if (arg->type == SLANG_OPER_IDENTIFIER) slang_resolve_variable(arg); /* replace parameter 'p' with argument 'arg' */ @@ -1031,10 +1031,10 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, substNew[substCount] = arg; /* will get copied */ substCount++; } - else if (p->type.qualifier == slang_qual_const) { + else if (p->type.qualifier == SLANG_QUAL_CONST) { /* a constant input param */ - if (args[i].type == slang_oper_identifier || - args[i].type == slang_oper_literal_float) { + if (args[i].type == SLANG_OPER_IDENTIFIER || + args[i].type == SLANG_OPER_LITERAL_FLOAT) { /* replace all occurances of this parameter variable with the * actual argument variable or a literal. */ @@ -1058,8 +1058,8 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, slang_operation_copy(inlined, fun->body); /*** XXX review this */ - assert(inlined->type = slang_oper_block_no_new_scope); - inlined->type = slang_oper_block_new_scope; + assert(inlined->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE); + inlined->type = SLANG_OPER_BLOCK_NEW_SCOPE; #if 0 printf("======================= orig body code ======================\n"); @@ -1092,7 +1092,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, /* printf("COPY_IN %s from expr\n", (char*)p->a_name); */ - decl->type = slang_oper_variable_decl; + decl->type = SLANG_OPER_VARIABLE_DECL; assert(decl->locals); decl->locals = fun->parameters; decl->a_id = p->a_name; @@ -1114,7 +1114,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, slang_operation *lab = slang_operation_insert(&inlined->num_children, &inlined->children, inlined->num_children); - lab->type = slang_oper_label; + lab->type = SLANG_OPER_LABEL; lab->a_id = slang_atom_pool_atom(A->atoms, (char *) A->CurFunction->end_label); } @@ -1127,13 +1127,13 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, slang_operation *ass = slang_operation_insert(&inlined->num_children, &inlined->children, inlined->num_children); - ass->type = slang_oper_assign; + ass->type = SLANG_OPER_ASSIGN; ass->num_children = 2; ass->locals = _slang_variable_scope_new(inlined->locals); assert(ass->locals); ass->children = slang_operation_new(2); ass->children[0] = args[i]; /*XXX copy */ - ass->children[1].type = slang_oper_identifier; + ass->children[1].type = SLANG_OPER_IDENTIFIER; ass->children[1].a_id = p->a_name; ass->children[1].locals = _slang_variable_scope_new(ass->locals); } @@ -1261,7 +1261,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, slang_ir_node *kids[3], *n; GLuint j, firstOperand; - assert(oper->type == slang_oper_asm); + assert(oper->type == SLANG_OPER_ASM); info = slang_find_asm_info((char *) oper->a_id); if (!info) { @@ -1301,7 +1301,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, slang_ir_node *n0; dest_oper = &oper->children[0]; - while /*if*/ (dest_oper->type == slang_oper_field) { + while /*if*/ (dest_oper->type == SLANG_OPER_FIELD) { /* writemask */ writemask &= /*=*/make_writemask((char*) dest_oper->a_id); dest_oper = &dest_oper->children[0]; @@ -1326,8 +1326,8 @@ static GLboolean _slang_is_noop(const slang_operation *oper) { if (!oper || - oper->type == slang_oper_void || - (oper->num_children == 1 && oper->children[0].type == slang_oper_void)) + oper->type == SLANG_OPER_VOID || + (oper->num_children == 1 && oper->children[0].type == SLANG_OPER_VOID)) return GL_TRUE; else return GL_FALSE; @@ -1414,16 +1414,16 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, static GLboolean _slang_is_constant_cond(const slang_operation *oper, GLboolean *value) { - if (oper->type == slang_oper_literal_float || - oper->type == slang_oper_literal_int || - oper->type == slang_oper_literal_bool) { + if (oper->type == SLANG_OPER_LITERAL_FLOAT || + oper->type == SLANG_OPER_LITERAL_INT || + oper->type == SLANG_OPER_LITERAL_BOOL) { if (oper->literal[0]) *value = GL_TRUE; else *value = GL_FALSE; return GL_TRUE; } - else if (oper->type == slang_oper_expression && + else if (oper->type == SLANG_OPER_EXPRESSION && oper->num_children == 1) { return _slang_is_constant_cond(&oper->children[0], value); } @@ -1620,8 +1620,8 @@ is_operation_type(const const slang_operation *oper, slang_operation_type type) { if (oper->type == type) return GL_TRUE; - else if ((oper->type == slang_oper_block_new_scope || - oper->type == slang_oper_block_no_new_scope) && + else if ((oper->type == SLANG_OPER_BLOCK_NEW_SCOPE || + oper->type == SLANG_OPER_BLOCK_NO_NEW_SCOPE) && oper->num_children == 1) return is_operation_type(&oper->children[0], type); else @@ -1650,7 +1650,7 @@ _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) cond = _slang_gen_operation(A, &oper->children[0]); cond = new_cond(cond); - if (is_operation_type(&oper->children[1], slang_oper_break)) { + if (is_operation_type(&oper->children[1], SLANG_OPER_BREAK)) { /* Special case: generate a conditional break */ ifBody = new_break_if(A->CurLoop, cond, GL_TRUE); if (haveElseClause) { @@ -1659,7 +1659,7 @@ _slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) } return ifBody; } - else if (is_operation_type(&oper->children[1], slang_oper_continue)) { + else if (is_operation_type(&oper->children[1], SLANG_OPER_CONTINUE)) { /* Special case: generate a conditional break */ ifBody = new_cont_if(A->CurLoop, cond, GL_TRUE); if (haveElseClause) { @@ -1744,7 +1744,7 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) slang_typeinfo type; int size; - assert(oper->type == slang_oper_select); + assert(oper->type == SLANG_OPER_SELECT); assert(oper->num_children == 3); /* size of x or y's type */ @@ -1811,13 +1811,13 @@ _slang_gen_logical_and(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *n; select = slang_operation_new(1); - select->type = slang_oper_select; + select->type = SLANG_OPER_SELECT; select->num_children = 3; select->children = slang_operation_new(3); slang_operation_copy(&select->children[0], &oper->children[0]); slang_operation_copy(&select->children[1], &oper->children[1]); - select->children[2].type = slang_oper_literal_bool; + select->children[2].type = SLANG_OPER_LITERAL_BOOL; ASSIGN_4V(select->children[2].literal, 0, 0, 0, 0); select->children[2].literal_size = 2; @@ -1842,12 +1842,12 @@ _slang_gen_logical_or(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *n; select = slang_operation_new(1); - select->type = slang_oper_select; + select->type = SLANG_OPER_SELECT; select->num_children = 3; select->children = slang_operation_new(3); slang_operation_copy(&select->children[0], &oper->children[0]); - select->children[1].type = slang_oper_literal_bool; + select->children[1].type = SLANG_OPER_LITERAL_BOOL; ASSIGN_4V(select->children[2].literal, 1, 1, 1, 1); slang_operation_copy(&select->children[2], &oper->children[1]); select->children[2].literal_size = 2; @@ -1871,7 +1871,7 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) { if (oper->num_children == 0 || (oper->num_children == 1 && - oper->children[0].type == slang_oper_void)) { + oper->children[0].type == SLANG_OPER_VOID)) { /* Convert from: * return; * To: @@ -1880,7 +1880,7 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n; slang_operation gotoOp; slang_operation_construct(&gotoOp); - gotoOp.type = slang_oper_goto; + gotoOp.type = SLANG_OPER_GOTO; /* XXX don't call function? */ gotoOp.a_id = slang_atom_pool_atom(A->atoms, (char *) A->CurFunction->end_label); @@ -1914,7 +1914,7 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) #endif block = slang_operation_new(1); - block->type = slang_oper_block_no_new_scope; + block->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; block->num_children = 2; block->children = slang_operation_new(2); assert(block->locals); @@ -1922,12 +1922,12 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) /* child[0]: __retVal = expr; */ assign = &block->children[0]; - assign->type = slang_oper_assign; + assign->type = SLANG_OPER_ASSIGN; assign->locals->outer_scope = block->locals; assign->num_children = 2; assign->children = slang_operation_new(2); /* lhs (__retVal) */ - assign->children[0].type = slang_oper_identifier; + assign->children[0].type = SLANG_OPER_IDENTIFIER; assign->children[0].a_id = a_retVal; assign->children[0].locals->outer_scope = assign->locals; /* rhs (expr) */ @@ -1936,7 +1936,7 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) /* child[1]: goto __endOfFunction */ jump = &block->children[1]; - jump->type = slang_oper_goto; + jump->type = SLANG_OPER_GOTO; assert(A->CurFunction->end_label); /* XXX don't call function? */ jump->a_id = slang_atom_pool_atom(A->atoms, @@ -2150,8 +2150,8 @@ _slang_gen_swizzle(slang_ir_node *child, GLuint swizzle) static slang_ir_node * _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) { - if (oper->children[0].type == slang_oper_identifier && - oper->children[1].type == slang_oper_call) { + if (oper->children[0].type == SLANG_OPER_IDENTIFIER && + oper->children[1].type == SLANG_OPER_CALL) { /* Special case of: x = f(a, b) * Replace with f(a, b, x) (where x == hidden __retVal out param) * @@ -2220,7 +2220,7 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) n = _slang_gen_swizzle(n, swizzle); return n; } - else if (ti.spec.type == slang_spec_float) { + else if (ti.spec.type == SLANG_SPEC_FLOAT) { const GLuint rows = 1; slang_swizzle swz; slang_ir_node *n; @@ -2267,7 +2267,7 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n; index = (GLint) oper->children[1].literal[0]; - if (oper->children[1].type != slang_oper_literal_int || + if (oper->children[1].type != SLANG_OPER_LITERAL_INT || index >= max) { RETURN_ERROR("Invalid array index for vector type", 0); } @@ -2321,15 +2321,15 @@ static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { switch (oper->type) { - case slang_oper_block_new_scope: + case SLANG_OPER_BLOCK_NEW_SCOPE: { slang_ir_node *n; _slang_push_var_table(A->vartable); - oper->type = slang_oper_block_no_new_scope; /* temp change */ + oper->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; /* temp change */ n = _slang_gen_operation(A, oper); - oper->type = slang_oper_block_new_scope; /* restore */ + oper->type = SLANG_OPER_BLOCK_NEW_SCOPE; /* restore */ _slang_pop_var_table(A->vartable); @@ -2339,7 +2339,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) } break; - case slang_oper_block_no_new_scope: + case SLANG_OPER_BLOCK_NO_NEW_SCOPE: /* list of operations */ if (oper->num_children > 0) { @@ -2378,104 +2378,104 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return tree; } break; - case slang_oper_expression: + case SLANG_OPER_EXPRESSION: return _slang_gen_operation(A, &oper->children[0]); - case slang_oper_for: + case SLANG_OPER_FOR: return _slang_gen_for(A, oper); - case slang_oper_do: + case SLANG_OPER_DO: return _slang_gen_do(A, oper); - case slang_oper_while: + case SLANG_OPER_WHILE: return _slang_gen_while(A, oper); - case slang_oper_break: + case SLANG_OPER_BREAK: if (!A->CurLoop) { RETURN_ERROR("'break' not in loop", 0); } return new_break(A->CurLoop); - case slang_oper_continue: + case SLANG_OPER_CONTINUE: if (!A->CurLoop) { RETURN_ERROR("'continue' not in loop", 0); } return new_cont(A->CurLoop); - case slang_oper_discard: + case SLANG_OPER_DISCARD: return new_node0(IR_KILL); - case slang_oper_equal: + case SLANG_OPER_EQUAL: return new_node2(IR_SEQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); - case slang_oper_notequal: + case SLANG_OPER_NOTEQUAL: return new_node2(IR_SNEQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); - case slang_oper_greater: + case SLANG_OPER_GREATER: return new_node2(IR_SGT, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); - case slang_oper_less: + case SLANG_OPER_LESS: /* child[0] < child[1] ----> child[1] > child[0] */ return new_node2(IR_SGT, _slang_gen_operation(A, &oper->children[1]), _slang_gen_operation(A, &oper->children[0])); - case slang_oper_greaterequal: + case SLANG_OPER_GREATERequal: return new_node2(IR_SGE, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); - case slang_oper_lessequal: + case SLANG_OPER_LESSequal: /* child[0] <= child[1] ----> child[1] >= child[0] */ return new_node2(IR_SGE, _slang_gen_operation(A, &oper->children[1]), _slang_gen_operation(A, &oper->children[0])); - case slang_oper_add: + case SLANG_OPER_ADD: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "+", oper, NULL); return n; } - case slang_oper_subtract: + case SLANG_OPER_SUBTRACT: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "-", oper, NULL); return n; } - case slang_oper_multiply: + case SLANG_OPER_MULTIPLY: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "*", oper, NULL); return n; } - case slang_oper_divide: + case SLANG_OPER_DIVIDE: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "/", oper, NULL); return n; } - case slang_oper_minus: + case SLANG_OPER_MINUS: { slang_ir_node *n; assert(oper->num_children == 1); n = _slang_gen_function_call_name(A, "-", oper, NULL); return n; } - case slang_oper_plus: + case SLANG_OPER_PLUS: /* +expr --> do nothing */ return _slang_gen_operation(A, &oper->children[0]); - case slang_oper_variable_decl: + case SLANG_OPER_VARIABLE_DECL: return _slang_gen_declaration(A, oper); - case slang_oper_assign: + case SLANG_OPER_ASSIGN: return _slang_gen_assignment(A, oper); - case slang_oper_addassign: + case SLANG_OPER_ADDASSIGN: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "+=", oper, &oper->children[0]); return n; } - case slang_oper_subassign: + case SLANG_OPER_SUBASSIGN: { slang_ir_node *n; assert(oper->num_children == 2); @@ -2483,42 +2483,42 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } break; - case slang_oper_mulassign: + case SLANG_OPER_MULASSIGN: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "*=", oper, &oper->children[0]); return n; } - case slang_oper_divassign: + case SLANG_OPER_DIVASSIGN: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "/=", oper, &oper->children[0]); return n; } - case slang_oper_logicaland: + case SLANG_OPER_LOGICALAND: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_logical_and(A, oper); return n; } - case slang_oper_logicalor: + case SLANG_OPER_LOGICALOR: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_logical_or(A, oper); return n; } - case slang_oper_logicalxor: + case SLANG_OPER_LOGICALXOR: { slang_ir_node *n; assert(oper->num_children == 2); n = _slang_gen_function_call_name(A, "__logicalXor", oper, NULL); return n; } - case slang_oper_not: + case SLANG_OPER_NOT: { slang_ir_node *n; assert(oper->num_children == 1); @@ -2526,7 +2526,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } - case slang_oper_select: /* b ? x : y */ + case SLANG_OPER_SELECT: /* b ? x : y */ { slang_ir_node *n; assert(oper->num_children == 3); @@ -2534,20 +2534,20 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } - case slang_oper_asm: + case SLANG_OPER_ASM: return _slang_gen_asm(A, oper, NULL); - case slang_oper_call: + case SLANG_OPER_CALL: return _slang_gen_function_call_name(A, (const char *) oper->a_id, oper, NULL); - case slang_oper_return: + case SLANG_OPER_RETURN: return _slang_gen_return(A, oper); - case slang_oper_goto: + case SLANG_OPER_GOTO: return new_jump((char*) oper->a_id); - case slang_oper_label: + case SLANG_OPER_LABEL: return new_label((char*) oper->a_id); - case slang_oper_identifier: + case SLANG_OPER_IDENTIFIER: return _slang_gen_variable(A, oper); - case slang_oper_if: + case SLANG_OPER_IF: if (A->program->Target == GL_FRAGMENT_PROGRAM_ARB) { return _slang_gen_hl_if(A, oper); } @@ -2555,39 +2555,39 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) /* XXX update tnl executor */ return _slang_gen_if(A, oper); } - case slang_oper_field: + case SLANG_OPER_FIELD: return _slang_gen_field(A, oper); - case slang_oper_subscript: + case SLANG_OPER_SUBSCRIPT: return _slang_gen_subscript(A, oper); - case slang_oper_literal_float: + case SLANG_OPER_LITERAL_FLOAT: /* fall-through */ - case slang_oper_literal_int: + case SLANG_OPER_LITERAL_INT: /* fall-through */ - case slang_oper_literal_bool: + case SLANG_OPER_LITERAL_BOOL: return new_float_literal(oper->literal); - case slang_oper_postincrement: /* var++ */ + case SLANG_OPER_POSTINCREMENT: /* var++ */ { slang_ir_node *n; assert(oper->num_children == 1); n = _slang_gen_function_call_name(A, "__postIncr", oper, NULL); return n; } - case slang_oper_postdecrement: /* var-- */ + case SLANG_OPER_POSTDECREMENT: /* var-- */ { slang_ir_node *n; assert(oper->num_children == 1); n = _slang_gen_function_call_name(A, "__postDecr", oper, NULL); return n; } - case slang_oper_preincrement: /* ++var */ + case SLANG_OPER_PREINCREMENT: /* ++var */ { slang_ir_node *n; assert(oper->num_children == 1); n = _slang_gen_function_call_name(A, "++", oper, NULL); return n; } - case slang_oper_predecrement: /* --var */ + case SLANG_OPER_PREDECREMENT: /* --var */ { slang_ir_node *n; assert(oper->num_children == 1); @@ -2595,7 +2595,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return n; } - case slang_oper_sequence: + case SLANG_OPER_SEQUENCE: { slang_ir_node *tree = NULL; GLuint i; @@ -2606,9 +2606,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return tree; } - case slang_oper_none: + case SLANG_OPER_NONE: return NULL; - case slang_oper_void: + case SLANG_OPER_VOID: return NULL; default: @@ -2658,7 +2658,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); if (dbg) printf("SAMPLER "); } - else if (var->type.qualifier == slang_qual_uniform) { + else if (var->type.qualifier == SLANG_QUAL_UNIFORM) { /* Uniform variable */ const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); if (prog) { @@ -2675,7 +2675,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } if (dbg) printf("UNIFORM "); } - else if (var->type.qualifier == slang_qual_varying) { + else if (var->type.qualifier == SLANG_QUAL_VARYING) { const GLint size = 4; /* XXX fix */ if (prog) { /* user-defined varying */ @@ -2684,7 +2684,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } else { /* pre-defined varying, like gl_Color or gl_TexCoord */ - if (type == slang_unit_fragment_builtin) { + if (type == SLANG_UNIT_FRAGMENT_BUILTIN) { GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); assert(index >= 0); store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); @@ -2693,7 +2693,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, else { GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); assert(index >= 0); - assert(type == slang_unit_vertex_builtin); + assert(type == SLANG_UNIT_VERTEX_BUILTIN); store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); assert(index < VERT_RESULT_MAX); } @@ -2701,7 +2701,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } if (dbg) printf("VARYING "); } - else if (var->type.qualifier == slang_qual_attribute) { + else if (var->type.qualifier == SLANG_QUAL_ATTRIBUTE) { if (prog) { /* user-defined vertex attribute */ const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); @@ -2721,27 +2721,27 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } if (dbg) printf("ATTRIB "); } - else if (var->type.qualifier == slang_qual_fixedinput) { + else if (var->type.qualifier == SLANG_QUAL_FIXEDINPUT) { GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); GLint size = 4; /* XXX? */ store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); if (dbg) printf("INPUT "); } - else if (var->type.qualifier == slang_qual_fixedoutput) { - if (type == slang_unit_vertex_builtin) { + else if (var->type.qualifier == SLANG_QUAL_FIXEDOUTPUT) { + if (type == SLANG_UNIT_VERTEX_BUILTIN) { GLint index = _slang_output_index(varName, GL_VERTEX_PROGRAM_ARB); GLint size = 4; /* XXX? */ store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); } else { - assert(type == slang_unit_fragment_builtin); + assert(type == SLANG_UNIT_FRAGMENT_BUILTIN); GLint index = _slang_output_index(varName, GL_FRAGMENT_PROGRAM_ARB); GLint size = 4; /* XXX? */ store = _slang_new_ir_storage(PROGRAM_OUTPUT, index, size); } if (dbg) printf("OUTPUT "); } - else if (var->type.qualifier == slang_qual_const && !prog) { + else if (var->type.qualifier == SLANG_QUAL_CONST && !prog) { /* pre-defined global constant, like gl_MaxLights */ const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); store = _slang_new_ir_storage(PROGRAM_CONSTANT, -1, size); diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index f73fccf436..f7aa297bfa 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -358,7 +358,7 @@ parse_array_len(slang_parse_ctx * C, slang_output_ctx * O, GLuint * len) /* evaluate compile-time expression which is array size */ _slang_simplify(&array_size, &space, C->atoms); - result = (array_size.type == slang_oper_literal_int); + result = (array_size.type == SLANG_OPER_LITERAL_INT); slang_operation_destruct(&array_size); return result; @@ -388,7 +388,7 @@ convert_to_array(slang_parse_ctx * C, slang_variable * var, { /* sized array - mark it as array, copy the specifier to the array element and * parse the expression */ - var->type.specifier.type = slang_spec_array; + var->type.specifier.type = SLANG_SPEC_ARRAY; var->type.specifier._array = (slang_type_specifier *) slang_alloc_malloc(sizeof(slang_type_specifier)); if (var->type.specifier._array == NULL) { @@ -540,25 +540,25 @@ parse_type_qualifier(slang_parse_ctx * C, slang_type_qualifier * qual) { switch (*C->I++) { case TYPE_QUALIFIER_NONE: - *qual = slang_qual_none; + *qual = SLANG_QUAL_NONE; break; case TYPE_QUALIFIER_CONST: - *qual = slang_qual_const; + *qual = SLANG_QUAL_CONST; break; case TYPE_QUALIFIER_ATTRIBUTE: - *qual = slang_qual_attribute; + *qual = SLANG_QUAL_ATTRIBUTE; break; case TYPE_QUALIFIER_VARYING: - *qual = slang_qual_varying; + *qual = SLANG_QUAL_VARYING; break; case TYPE_QUALIFIER_UNIFORM: - *qual = slang_qual_uniform; + *qual = SLANG_QUAL_UNIFORM; break; case TYPE_QUALIFIER_FIXEDOUTPUT: - *qual = slang_qual_fixedoutput; + *qual = SLANG_QUAL_FIXEDOUTPUT; break; case TYPE_QUALIFIER_FIXEDINPUT: - *qual = slang_qual_fixedinput; + *qual = SLANG_QUAL_FIXEDINPUT; break; default: return 0; @@ -598,78 +598,78 @@ parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O, { switch (*C->I++) { case TYPE_SPECIFIER_VOID: - spec->type = slang_spec_void; + spec->type = SLANG_SPEC_VOID; break; case TYPE_SPECIFIER_BOOL: - spec->type = slang_spec_bool; + spec->type = SLANG_SPEC_BOOL; break; case TYPE_SPECIFIER_BVEC2: - spec->type = slang_spec_bvec2; + spec->type = SLANG_SPEC_BVEC2; break; case TYPE_SPECIFIER_BVEC3: - spec->type = slang_spec_bvec3; + spec->type = SLANG_SPEC_BVEC3; break; case TYPE_SPECIFIER_BVEC4: - spec->type = slang_spec_bvec4; + spec->type = SLANG_SPEC_BVEC4; break; case TYPE_SPECIFIER_INT: - spec->type = slang_spec_int; + spec->type = SLANG_SPEC_INT; break; case TYPE_SPECIFIER_IVEC2: - spec->type = slang_spec_ivec2; + spec->type = SLANG_SPEC_IVEC2; break; case TYPE_SPECIFIER_IVEC3: - spec->type = slang_spec_ivec3; + spec->type = SLANG_SPEC_IVEC3; break; case TYPE_SPECIFIER_IVEC4: - spec->type = slang_spec_ivec4; + spec->type = SLANG_SPEC_IVEC4; break; case TYPE_SPECIFIER_FLOAT: - spec->type = slang_spec_float; + spec->type = SLANG_SPEC_FLOAT; break; case TYPE_SPECIFIER_VEC2: - spec->type = slang_spec_vec2; + spec->type = SLANG_SPEC_VEC2; break; case TYPE_SPECIFIER_VEC3: - spec->type = slang_spec_vec3; + spec->type = SLANG_SPEC_VEC3; break; case TYPE_SPECIFIER_VEC4: - spec->type = slang_spec_vec4; + spec->type = SLANG_SPEC_VEC4; break; case TYPE_SPECIFIER_MAT2: - spec->type = slang_spec_mat2; + spec->type = SLANG_SPEC_MAT2; break; case TYPE_SPECIFIER_MAT3: - spec->type = slang_spec_mat3; + spec->type = SLANG_SPEC_MAT3; break; case TYPE_SPECIFIER_MAT4: - spec->type = slang_spec_mat4; + spec->type = SLANG_SPEC_MAT4; break; case TYPE_SPECIFIER_SAMPLER1D: - spec->type = slang_spec_sampler1D; + spec->type = SLANG_SPEC_SAMPLER1D; break; case TYPE_SPECIFIER_SAMPLER2D: - spec->type = slang_spec_sampler2D; + spec->type = SLANG_SPEC_SAMPLER2D; break; case TYPE_SPECIFIER_SAMPLER3D: - spec->type = slang_spec_sampler3D; + spec->type = SLANG_SPEC_SAMPLER3D; break; case TYPE_SPECIFIER_SAMPLERCUBE: - spec->type = slang_spec_samplerCube; + spec->type = SLANG_SPEC_SAMPLERCUBE; break; case TYPE_SPECIFIER_SAMPLER1DSHADOW: - spec->type = slang_spec_sampler1DShadow; + spec->type = SLANG_SPEC_SAMPLER1DSHADOW; break; case TYPE_SPECIFIER_SAMPLER2DSHADOW: - spec->type = slang_spec_sampler2DShadow; + spec->type = SLANG_SPEC_SAMPLER2DSHADOW; break; case TYPE_SPECIFIER_STRUCT: - spec->type = slang_spec_struct; + spec->type = SLANG_SPEC_STRUCT; if (!parse_struct(C, O, &spec->_struct)) return 0; break; case TYPE_SPECIFIER_TYPENAME: - spec->type = slang_spec_struct; + spec->type = SLANG_SPEC_STRUCT; { slang_atom a_name; slang_struct *stru; @@ -817,7 +817,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, switch (*C->I++) { case OP_BLOCK_BEGIN_NO_NEW_SCOPE: /* parse child statements, do not create new variable scope */ - oper->type = slang_oper_block_no_new_scope; + oper->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; while (*C->I != OP_END) if (!parse_child_operation(C, O, oper, 1)) return 0; @@ -828,7 +828,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, { slang_output_ctx o = *O; - oper->type = slang_oper_block_new_scope; + oper->type = SLANG_OPER_BLOCK_NEW_SCOPE; o.vars = oper->locals; while (*C->I != OP_END) if (!parse_child_operation(C, &o, oper, 1)) @@ -840,7 +840,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, /* local variable declaration, individual declarators are stored as * children identifiers */ - oper->type = slang_oper_block_no_new_scope; + oper->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; { const unsigned int first_var = O->vars->num_variables; @@ -861,7 +861,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, } for (i = first_var; i < O->vars->num_variables; i++) { slang_operation *o = &oper->children[i - first_var]; - o->type = slang_oper_variable_decl; + o->type = SLANG_OPER_VARIABLE_DECL; o->locals->outer_scope = O->vars; o->a_id = O->vars->variables[i]->a_name; } @@ -872,7 +872,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, /* the __asm statement, parse the mnemonic and all its arguments * as expressions */ - oper->type = slang_oper_asm; + oper->type = SLANG_OPER_ASM; oper->a_id = parse_identifier(C); if (oper->a_id == SLANG_ATOM_NULL) return 0; @@ -883,26 +883,26 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, C->I++; break; case OP_BREAK: - oper->type = slang_oper_break; + oper->type = SLANG_OPER_BREAK; break; case OP_CONTINUE: - oper->type = slang_oper_continue; + oper->type = SLANG_OPER_CONTINUE; break; case OP_DISCARD: - oper->type = slang_oper_discard; + oper->type = SLANG_OPER_DISCARD; break; case OP_RETURN: - oper->type = slang_oper_return; + oper->type = SLANG_OPER_RETURN; if (!parse_child_operation(C, O, oper, 0)) return 0; break; case OP_EXPRESSION: - oper->type = slang_oper_expression; + oper->type = SLANG_OPER_EXPRESSION; if (!parse_child_operation(C, O, oper, 0)) return 0; break; case OP_IF: - oper->type = slang_oper_if; + oper->type = SLANG_OPER_IF; if (!parse_child_operation(C, O, oper, 0)) return 0; if (!parse_child_operation(C, O, oper, 1)) @@ -914,7 +914,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, { slang_output_ctx o = *O; - oper->type = slang_oper_while; + oper->type = SLANG_OPER_WHILE; o.vars = oper->locals; if (!parse_child_operation(C, &o, oper, 1)) return 0; @@ -923,7 +923,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, } break; case OP_DO: - oper->type = slang_oper_do; + oper->type = SLANG_OPER_DO; if (!parse_child_operation(C, O, oper, 1)) return 0; if (!parse_child_operation(C, O, oper, 0)) @@ -933,7 +933,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, { slang_output_ctx o = *O; - oper->type = slang_oper_for; + oper->type = SLANG_OPER_FOR; o.vars = oper->locals; if (!parse_child_operation(C, &o, oper, 1)) return 0; @@ -986,7 +986,7 @@ static int is_constructor_name(const char *name, slang_atom a_name, slang_struct_scope * structs) { - if (slang_type_specifier_type_from_string(name) != slang_spec_void) + if (slang_type_specifier_type_from_string(name) != SLANG_SPEC_VOID) return 1; return slang_struct_scope_find(structs, a_name, 1) != NULL; } @@ -1022,10 +1022,10 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, switch (op_code) { case OP_PUSH_VOID: - op->type = slang_oper_void; + op->type = SLANG_OPER_VOID; break; case OP_PUSH_BOOL: - op->type = slang_oper_literal_bool; + op->type = SLANG_OPER_LITERAL_BOOL; if (!parse_number(C, &number)) return 0; op->literal[0] = @@ -1035,7 +1035,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, op->literal_size = 1; break; case OP_PUSH_INT: - op->type = slang_oper_literal_int; + op->type = SLANG_OPER_LITERAL_INT; if (!parse_number(C, &number)) return 0; op->literal[0] = @@ -1045,7 +1045,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, op->literal_size = 1; break; case OP_PUSH_FLOAT: - op->type = slang_oper_literal_float; + op->type = SLANG_OPER_LITERAL_FLOAT; if (!parse_float(C, &op->literal[0])) return 0; op->literal[1] = @@ -1054,38 +1054,38 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, op->literal_size = 1; break; case OP_PUSH_IDENTIFIER: - op->type = slang_oper_identifier; + op->type = SLANG_OPER_IDENTIFIER; op->a_id = parse_identifier(C); if (op->a_id == SLANG_ATOM_NULL) return 0; break; case OP_SEQUENCE: - op->type = slang_oper_sequence; + op->type = SLANG_OPER_SEQUENCE; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_ASSIGN: - op->type = slang_oper_assign; + op->type = SLANG_OPER_ASSIGN; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_ADDASSIGN: - op->type = slang_oper_addassign; + op->type = SLANG_OPER_ADDASSIGN; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_SUBASSIGN: - op->type = slang_oper_subassign; + op->type = SLANG_OPER_SUBASSIGN; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_MULASSIGN: - op->type = slang_oper_mulassign; + op->type = SLANG_OPER_MULASSIGN; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_DIVASSIGN: - op->type = slang_oper_divassign; + op->type = SLANG_OPER_DIVASSIGN; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; @@ -1096,22 +1096,22 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, /*case OP_XORASSIGN: */ /*case OP_ANDASSIGN: */ case OP_SELECT: - op->type = slang_oper_select; + op->type = SLANG_OPER_SELECT; if (!handle_nary_expression(C, op, &ops, &num_ops, 3)) return 0; break; case OP_LOGICALOR: - op->type = slang_oper_logicalor; + op->type = SLANG_OPER_LOGICALOR; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_LOGICALXOR: - op->type = slang_oper_logicalxor; + op->type = SLANG_OPER_LOGICALXOR; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_LOGICALAND: - op->type = slang_oper_logicaland; + op->type = SLANG_OPER_LOGICALAND; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; @@ -1119,91 +1119,91 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, /*case OP_BITXOR: */ /*case OP_BITAND: */ case OP_EQUAL: - op->type = slang_oper_equal; + op->type = SLANG_OPER_EQUAL; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_NOTEQUAL: - op->type = slang_oper_notequal; + op->type = SLANG_OPER_NOTEQUAL; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_LESS: - op->type = slang_oper_less; + op->type = SLANG_OPER_LESS; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_GREATER: - op->type = slang_oper_greater; + op->type = SLANG_OPER_GREATER; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_LESSEQUAL: - op->type = slang_oper_lessequal; + op->type = SLANG_OPER_LESSequal; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_GREATEREQUAL: - op->type = slang_oper_greaterequal; + op->type = SLANG_OPER_GREATERequal; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; /*case OP_LSHIFT: */ /*case OP_RSHIFT: */ case OP_ADD: - op->type = slang_oper_add; + op->type = SLANG_OPER_ADD; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_SUBTRACT: - op->type = slang_oper_subtract; + op->type = SLANG_OPER_SUBTRACT; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_MULTIPLY: - op->type = slang_oper_multiply; + op->type = SLANG_OPER_MULTIPLY; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_DIVIDE: - op->type = slang_oper_divide; + op->type = SLANG_OPER_DIVIDE; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; /*case OP_MODULUS: */ case OP_PREINCREMENT: - op->type = slang_oper_preincrement; + op->type = SLANG_OPER_PREINCREMENT; if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) return 0; break; case OP_PREDECREMENT: - op->type = slang_oper_predecrement; + op->type = SLANG_OPER_PREDECREMENT; if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) return 0; break; case OP_PLUS: - op->type = slang_oper_plus; + op->type = SLANG_OPER_PLUS; if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) return 0; break; case OP_MINUS: - op->type = slang_oper_minus; + op->type = SLANG_OPER_MINUS; if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) return 0; break; case OP_NOT: - op->type = slang_oper_not; + op->type = SLANG_OPER_NOT; if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) return 0; break; /*case OP_COMPLEMENT: */ case OP_SUBSCRIPT: - op->type = slang_oper_subscript; + op->type = SLANG_OPER_SUBSCRIPT; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_CALL: - op->type = slang_oper_call; + op->type = SLANG_OPER_CALL; op->a_id = parse_identifier(C); if (op->a_id == SLANG_ATOM_NULL) return 0; @@ -1224,7 +1224,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, } break; case OP_FIELD: - op->type = slang_oper_field; + op->type = SLANG_OPER_FIELD; op->a_id = parse_identifier(C); if (op->a_id == SLANG_ATOM_NULL) return 0; @@ -1232,12 +1232,12 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, return 0; break; case OP_POSTINCREMENT: - op->type = slang_oper_postincrement; + op->type = SLANG_OPER_POSTINCREMENT; if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) return 0; break; case OP_POSTDECREMENT: - op->type = slang_oper_postdecrement; + op->type = SLANG_OPER_POSTDECREMENT; if (!handle_nary_expression(C, op, &ops, &num_ops, 1)) return 0; break; @@ -1273,23 +1273,23 @@ parse_parameter_declaration(slang_parse_ctx * C, slang_output_ctx * O, return 0; switch (*C->I++) { case PARAM_QUALIFIER_IN: - if (param->type.qualifier != slang_qual_const - && param->type.qualifier != slang_qual_none) { + if (param->type.qualifier != SLANG_QUAL_CONST + && param->type.qualifier != SLANG_QUAL_NONE) { slang_info_log_error(C->L, "Invalid type qualifier."); return 0; } break; case PARAM_QUALIFIER_OUT: - if (param->type.qualifier == slang_qual_none) - param->type.qualifier = slang_qual_out; + if (param->type.qualifier == SLANG_QUAL_NONE) + param->type.qualifier = SLANG_QUAL_OUT; else { slang_info_log_error(C->L, "Invalid type qualifier."); return 0; } break; case PARAM_QUALIFIER_INOUT: - if (param->type.qualifier == slang_qual_none) - param->type.qualifier = slang_qual_inout; + if (param->type.qualifier == SLANG_QUAL_NONE) + param->type.qualifier = SLANG_QUAL_INOUT; else { slang_info_log_error(C->L, "Invalid type qualifier."); return 0; @@ -1439,14 +1439,14 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, return 0; switch (*C->I++) { case FUNCTION_ORDINARY: - func->kind = slang_func_ordinary; + func->kind = SLANG_FUNC_ORDINARY; func->header.a_name = parse_identifier(C); if (func->header.a_name == SLANG_ATOM_NULL) return 0; break; case FUNCTION_CONSTRUCTOR: - func->kind = slang_func_constructor; - if (func->header.type.specifier.type == slang_spec_struct) + func->kind = SLANG_FUNC_CONSTRUCTOR; + if (func->header.type.specifier.type == SLANG_SPEC_STRUCT) return 0; func->header.a_name = slang_atom_pool_atom(C->atoms, @@ -1458,7 +1458,7 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, } break; case FUNCTION_OPERATOR: - func->kind = slang_func_operator; + func->kind = SLANG_FUNC_OPERATOR; func->header.a_name = parse_operator_name(C); if (func->header.a_name == SLANG_ATOM_NULL) return 0; @@ -1487,7 +1487,7 @@ parse_function_prototype(slang_parse_ctx * C, slang_output_ctx * O, assert(a_retVal); p->a_name = a_retVal; p->type = func->header.type; - p->type.qualifier = slang_qual_out; + p->type.qualifier = SLANG_QUAL_OUT; } /* function formal parameters and local variables share the same @@ -1546,7 +1546,7 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) /* construct the left side of assignment */ if (!slang_operation_construct(&op_id)) return GL_FALSE; - op_id.type = slang_oper_identifier; + op_id.type = SLANG_OPER_IDENTIFIER; op_id.a_id = var->a_name; /* put the variable into operation's scope */ @@ -1565,7 +1565,7 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) slang_operation_destruct(&op_id); return GL_FALSE; } - op_assign.type = slang_oper_assign; + op_assign.type = SLANG_OPER_ASSIGN; op_assign.children = (slang_operation *) slang_alloc_malloc(2 * sizeof(slang_operation)); if (op_assign.children == NULL) { @@ -1689,7 +1689,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, /* allocate global address space for a variable with a known size */ if (C->global_scope - && !(var->type.specifier.type == slang_spec_array + && !(var->type.specifier.type == SLANG_SPEC_ARRAY && var->array_len == 0)) { if (!calculate_var_size(C, O, var)) return GL_FALSE; @@ -1885,13 +1885,13 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, GLboolean success; GLuint maxRegs; - if (unit->type == slang_unit_fragment_builtin || - unit->type == slang_unit_fragment_shader) { + if (unit->type == SLANG_UNIT_FRAGMENT_BUILTIN || + unit->type == SLANG_UNIT_FRAGMENT_SHADER) { maxRegs = ctx->Const.FragmentProgram.MaxTemps; } else { - assert(unit->type == slang_unit_vertex_builtin || - unit->type == slang_unit_vertex_shader); + assert(unit->type == SLANG_UNIT_VERTEX_BUILTIN || + unit->type == SLANG_UNIT_VERTEX_SHADER); maxRegs = ctx->Const.VertexProgram.MaxTemps; } @@ -2055,8 +2055,8 @@ compile_object(grammar * id, const char *source, slang_code_object * object, } /* set shader type - the syntax is slightly different for different shaders */ - if (type == slang_unit_fragment_shader - || type == slang_unit_fragment_builtin) + if (type == SLANG_UNIT_FRAGMENT_SHADER + || type == SLANG_UNIT_FRAGMENT_BUILTIN) grammar_set_reg8(*id, (const byte *) "shader_type", 1); else grammar_set_reg8(*id, (const byte *) "shader_type", 2); @@ -2065,33 +2065,33 @@ compile_object(grammar * id, const char *source, slang_code_object * object, grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); /* if parsing user-specified shader, load built-in library */ - if (type == slang_unit_fragment_shader || type == slang_unit_vertex_shader) { + if (type == SLANG_UNIT_FRAGMENT_SHADER || type == SLANG_UNIT_VERTEX_SHADER) { /* compile core functionality first */ if (!compile_binary(slang_core_gc, &object->builtin[SLANG_BUILTIN_CORE], - slang_unit_fragment_builtin, infolog, + SLANG_UNIT_FRAGMENT_BUILTIN, infolog, NULL, NULL, NULL)) return GL_FALSE; /* compile common functions and variables, link to core */ if (!compile_binary(slang_common_builtin_gc, &object->builtin[SLANG_BUILTIN_COMMON], - slang_unit_fragment_builtin, infolog, NULL, + SLANG_UNIT_FRAGMENT_BUILTIN, infolog, NULL, &object->builtin[SLANG_BUILTIN_CORE], NULL)) return GL_FALSE; /* compile target-specific functions and variables, link to common */ - if (type == slang_unit_fragment_shader) { + if (type == SLANG_UNIT_FRAGMENT_SHADER) { if (!compile_binary(slang_fragment_builtin_gc, &object->builtin[SLANG_BUILTIN_TARGET], - slang_unit_fragment_builtin, infolog, NULL, + SLANG_UNIT_FRAGMENT_BUILTIN, infolog, NULL, &object->builtin[SLANG_BUILTIN_COMMON], NULL)) return GL_FALSE; } - else if (type == slang_unit_vertex_shader) { + else if (type == SLANG_UNIT_VERTEX_SHADER) { if (!compile_binary(slang_vertex_builtin_gc, &object->builtin[SLANG_BUILTIN_TARGET], - slang_unit_vertex_builtin, infolog, NULL, + SLANG_UNIT_VERTEX_BUILTIN, infolog, NULL, &object->builtin[SLANG_BUILTIN_COMMON], NULL)) return GL_FALSE; } @@ -2145,11 +2145,11 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) slang_unit_type type; if (shader->Type == GL_VERTEX_SHADER) { - type = slang_unit_vertex_shader; + type = SLANG_UNIT_VERTEX_SHADER; } else { assert(shader->Type == GL_FRAGMENT_SHADER); - type = slang_unit_fragment_shader; + type = SLANG_UNIT_FRAGMENT_SHADER; } /* XXX temporary hack */ diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index e7be7ef069..7abb92bd3b 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -39,17 +39,19 @@ extern "C" { typedef enum slang_unit_type_ { - slang_unit_fragment_shader, - slang_unit_vertex_shader, - slang_unit_fragment_builtin, - slang_unit_vertex_builtin + SLANG_UNIT_FRAGMENT_SHADER, + SLANG_UNIT_VERTEX_SHADER, + SLANG_UNIT_FRAGMENT_BUILTIN, + SLANG_UNIT_VERTEX_BUILTIN } slang_unit_type; + typedef struct slang_var_pool_ { - GLuint next_addr; + GLuint next_addr; } slang_var_pool; + typedef struct slang_code_unit_ { slang_variable_scope vars; @@ -59,6 +61,7 @@ typedef struct slang_code_unit_ struct slang_code_object_ *object; } slang_code_unit; + extern GLvoid _slang_code_unit_ctr (slang_code_unit *, struct slang_code_object_ *); diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index 00a85c2e7d..9b0bdaf406 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -71,7 +71,7 @@ slang_fixup_save(slang_fixup_table *fixups, GLuint address) int slang_function_construct(slang_function * func) { - func->kind = slang_func_ordinary; + func->kind = SLANG_FUNC_ORDINARY; if (!slang_variable_construct(&func->header)) return 0; @@ -133,7 +133,7 @@ slang_function_scope_destruct(slang_function_scope * scope) GLboolean _slang_function_has_return_value(const slang_function *fun) { - return fun->header.type.specifier.type != slang_spec_void; + return fun->header.type.specifier.type != SLANG_SPEC_VOID; } @@ -179,7 +179,7 @@ slang_function_scope_find(slang_function_scope * funcs, slang_function * fun, slang_function *f = &funcs->functions[i]; const GLuint haveRetValue = 0; #if 0 - = (f->header.type.specifier.type != slang_spec_void); + = (f->header.type.specifier.type != SLANG_SPEC_VOID); #endif unsigned int j; diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 99a6b2a034..b60b4a223f 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -36,9 +36,9 @@ struct slang_code_unit_; */ typedef enum slang_function_kind_ { - slang_func_ordinary, - slang_func_constructor, - slang_func_operator + SLANG_FUNC_ORDINARY, + SLANG_FUNC_CONSTRUCTOR, + SLANG_FUNC_OPERATOR } slang_function_kind; diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 51a64ca30b..288de2d4bf 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -38,7 +38,7 @@ GLboolean slang_operation_construct(slang_operation * oper) { - oper->type = slang_oper_none; + oper->type = SLANG_OPER_NONE; oper->children = NULL; oper->num_children = 0; oper->literal[0] = 0.0; diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index 3f5b1bb8f3..a59f968456 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -37,70 +37,70 @@ extern "C" { */ typedef enum slang_operation_type_ { - slang_oper_none, - slang_oper_block_no_new_scope, /* "{" sequence "}" */ - slang_oper_block_new_scope, /* "{" sequence "}" */ - slang_oper_variable_decl, /* [type] [var] or [var] = [expr] */ - slang_oper_asm, - slang_oper_break, /* "break" statement */ - slang_oper_continue, /* "continue" statement */ - slang_oper_discard, /* "discard" (kill fragment) statement */ - slang_oper_return, /* "return" [expr] */ - slang_oper_goto, /* jump to label */ - slang_oper_label, /* a jump target */ - slang_oper_expression, /* [expr] */ - slang_oper_if, /* "if" [0] then [1] else [2] */ - slang_oper_while, /* "while" [cond] [body] */ - slang_oper_do, /* "do" [body] "while" [cond] */ - slang_oper_for, /* "for" [init] [while] [incr] [body] */ - slang_oper_void, /* nop */ - slang_oper_literal_bool, /* "true" or "false" */ - slang_oper_literal_int, /* integer literal */ - slang_oper_literal_float, /* float literal */ - slang_oper_identifier, /* var name, func name, etc */ - slang_oper_sequence, /* [expr] "," [expr] "," etc */ - slang_oper_assign, /* [var] "=" [expr] */ - slang_oper_addassign, /* [var] "+=" [expr] */ - slang_oper_subassign, /* [var] "-=" [expr] */ - slang_oper_mulassign, /* [var] "*=" [expr] */ - slang_oper_divassign, /* [var] "/=" [expr] */ - /*slang_oper_modassign, */ - /*slang_oper_lshassign, */ - /*slang_oper_rshassign, */ - /*slang_oper_orassign, */ - /*slang_oper_xorassign, */ - /*slang_oper_andassign, */ - slang_oper_select, /* [expr] "?" [expr] ":" [expr] */ - slang_oper_logicalor, /* [expr] "||" [expr] */ - slang_oper_logicalxor, /* [expr] "^^" [expr] */ - slang_oper_logicaland, /* [expr] "&&" [expr] */ - /*slang_oper_bitor, */ - /*slang_oper_bitxor, */ - /*slang_oper_bitand, */ - slang_oper_equal, /* [expr] "==" [expr] */ - slang_oper_notequal, /* [expr] "!=" [expr] */ - slang_oper_less, /* [expr] "<" [expr] */ - slang_oper_greater, /* [expr] ">" [expr] */ - slang_oper_lessequal, /* [expr] "<=" [expr] */ - slang_oper_greaterequal, /* [expr] ">=" [expr] */ - /*slang_oper_lshift, */ - /*slang_oper_rshift, */ - slang_oper_add, /* [expr] "+" [expr] */ - slang_oper_subtract, /* [expr] "-" [expr] */ - slang_oper_multiply, /* [expr] "*" [expr] */ - slang_oper_divide, /* [expr] "/" [expr] */ - /*slang_oper_modulus, */ - slang_oper_preincrement, /* "++" [var] */ - slang_oper_predecrement, /* "--" [var] */ - slang_oper_plus, /* "-" [expr] */ - slang_oper_minus, /* "+" [expr] */ - /*slang_oper_complement, */ - slang_oper_not, /* "!" [expr] */ - slang_oper_subscript, /* [expr] "[" [expr] "]" */ - slang_oper_call, /* [func name] [param] [param] [...] */ - slang_oper_field, /* i.e.: ".next" or ".xzy" or ".xxx" etc */ - slang_oper_postincrement, /* [var] "++" */ - slang_oper_postdecrement /* [var] "--" */ + SLANG_OPER_NONE, + SLANG_OPER_BLOCK_NO_NEW_SCOPE, /* "{" sequence "}" */ + SLANG_OPER_BLOCK_NEW_SCOPE, /* "{" sequence "}" */ + SLANG_OPER_VARIABLE_DECL, /* [type] [var] or [var] = [expr] */ + SLANG_OPER_ASM, + SLANG_OPER_BREAK, /* "break" statement */ + SLANG_OPER_CONTINUE, /* "continue" statement */ + SLANG_OPER_DISCARD, /* "discard" (kill fragment) statement */ + SLANG_OPER_RETURN, /* "return" [expr] */ + SLANG_OPER_GOTO, /* jump to label */ + SLANG_OPER_LABEL, /* a jump target */ + SLANG_OPER_EXPRESSION, /* [expr] */ + SLANG_OPER_IF, /* "if" [0] then [1] else [2] */ + SLANG_OPER_WHILE, /* "while" [cond] [body] */ + SLANG_OPER_DO, /* "do" [body] "while" [cond] */ + SLANG_OPER_FOR, /* "for" [init] [while] [incr] [body] */ + SLANG_OPER_VOID, /* nop */ + SLANG_OPER_LITERAL_BOOL, /* "true" or "false" */ + SLANG_OPER_LITERAL_INT, /* integer literal */ + SLANG_OPER_LITERAL_FLOAT, /* float literal */ + SLANG_OPER_IDENTIFIER, /* var name, func name, etc */ + SLANG_OPER_SEQUENCE, /* [expr] "," [expr] "," etc */ + SLANG_OPER_ASSIGN, /* [var] "=" [expr] */ + SLANG_OPER_ADDASSIGN, /* [var] "+=" [expr] */ + SLANG_OPER_SUBASSIGN, /* [var] "-=" [expr] */ + SLANG_OPER_MULASSIGN, /* [var] "*=" [expr] */ + SLANG_OPER_DIVASSIGN, /* [var] "/=" [expr] */ + /*SLANG_OPER_MODASSIGN, */ + /*SLANG_OPER_LSHASSIGN, */ + /*SLANG_OPER_RSHASSIGN, */ + /*SLANG_OPER_ORASSIGN, */ + /*SLANG_OPER_XORASSIGN, */ + /*SLANG_OPER_ANDASSIGN, */ + SLANG_OPER_SELECT, /* [expr] "?" [expr] ":" [expr] */ + SLANG_OPER_LOGICALOR, /* [expr] "||" [expr] */ + SLANG_OPER_LOGICALXOR, /* [expr] "^^" [expr] */ + SLANG_OPER_LOGICALAND, /* [expr] "&&" [expr] */ + /*SLANG_OPER_BITOR, */ + /*SLANG_OPER_BITXOR, */ + /*SLANG_OPER_BITAND, */ + SLANG_OPER_EQUAL, /* [expr] "==" [expr] */ + SLANG_OPER_NOTEQUAL, /* [expr] "!=" [expr] */ + SLANG_OPER_LESS, /* [expr] "<" [expr] */ + SLANG_OPER_GREATER, /* [expr] ">" [expr] */ + SLANG_OPER_LESSequal, /* [expr] "<=" [expr] */ + SLANG_OPER_GREATERequal, /* [expr] ">=" [expr] */ + /*SLANG_OPER_LSHIFT, */ + /*SLANG_OPER_RSHIFT, */ + SLANG_OPER_ADD, /* [expr] "+" [expr] */ + SLANG_OPER_SUBTRACT, /* [expr] "-" [expr] */ + SLANG_OPER_MULTIPLY, /* [expr] "*" [expr] */ + SLANG_OPER_DIVIDE, /* [expr] "/" [expr] */ + /*SLANG_OPER_MODULUS, */ + SLANG_OPER_PREINCREMENT, /* "++" [var] */ + SLANG_OPER_PREDECREMENT, /* "--" [var] */ + SLANG_OPER_PLUS, /* "-" [expr] */ + SLANG_OPER_MINUS, /* "+" [expr] */ + /*SLANG_OPER_COMPLEMENT, */ + SLANG_OPER_NOT, /* "!" [expr] */ + SLANG_OPER_SUBSCRIPT, /* [expr] "[" [expr] "]" */ + SLANG_OPER_CALL, /* [func name] [param] [param] [...] */ + SLANG_OPER_FIELD, /* i.e.: ".next" or ".xzy" or ".xxx" etc */ + SLANG_OPER_POSTINCREMENT, /* [var] "++" */ + SLANG_OPER_POSTDECREMENT /* [var] "--" */ } slang_operation_type; @@ -120,7 +120,7 @@ typedef struct slang_operation_ GLuint literal_size; /**< 1, 2, 3, or 4 */ slang_atom a_id; /**< type: asm, identifier, call, field */ slang_variable_scope *locals; /**< local vars for scope */ - struct slang_function_ *fun; /**< If type == slang_oper_call */ + struct slang_function_ *fun; /**< If type == SLANG_OPER_CALL */ struct slang_variable_ *var; /**< If type == slang_oper_identier */ } slang_operation; diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c index 5033a6cb10..5d876b248a 100644 --- a/src/mesa/shader/slang/slang_compile_struct.c +++ b/src/mesa/shader/slang/slang_compile_struct.c @@ -160,7 +160,7 @@ int slang_struct_equal (const slang_struct *x, const slang_struct *y) return 0; if (!slang_type_specifier_equal (&varx->type.specifier, &vary->type.specifier)) return 0; - if (varx->type.specifier.type == slang_spec_array) + if (varx->type.specifier.type == SLANG_SPEC_ARRAY) if (varx->array_len != vary->array_len) return GL_FALSE; } diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 25fbc21f82..450ae16323 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -40,29 +40,29 @@ typedef struct } type_specifier_type_name; static const type_specifier_type_name type_specifier_type_names[] = { - {"void", slang_spec_void}, - {"bool", slang_spec_bool}, - {"bvec2", slang_spec_bvec2}, - {"bvec3", slang_spec_bvec3}, - {"bvec4", slang_spec_bvec4}, - {"int", slang_spec_int}, - {"ivec2", slang_spec_ivec2}, - {"ivec3", slang_spec_ivec3}, - {"ivec4", slang_spec_ivec4}, - {"float", slang_spec_float}, - {"vec2", slang_spec_vec2}, - {"vec3", slang_spec_vec3}, - {"vec4", slang_spec_vec4}, - {"mat2", slang_spec_mat2}, - {"mat3", slang_spec_mat3}, - {"mat4", slang_spec_mat4}, - {"sampler1D", slang_spec_sampler1D}, - {"sampler2D", slang_spec_sampler2D}, - {"sampler3D", slang_spec_sampler3D}, - {"samplerCube", slang_spec_samplerCube}, - {"sampler1DShadow", slang_spec_sampler1DShadow}, - {"sampler2DShadow", slang_spec_sampler2DShadow}, - {NULL, slang_spec_void} + {"void", SLANG_SPEC_VOID}, + {"bool", SLANG_SPEC_BOOL}, + {"bvec2", SLANG_SPEC_BVEC2}, + {"bvec3", SLANG_SPEC_BVEC3}, + {"bvec4", SLANG_SPEC_BVEC4}, + {"int", SLANG_SPEC_INT}, + {"ivec2", SLANG_SPEC_IVEC2}, + {"ivec3", SLANG_SPEC_IVEC3}, + {"ivec4", SLANG_SPEC_IVEC4}, + {"float", SLANG_SPEC_FLOAT}, + {"vec2", SLANG_SPEC_VEC2}, + {"vec3", SLANG_SPEC_VEC3}, + {"vec4", SLANG_SPEC_VEC4}, + {"mat2", SLANG_SPEC_MAT2}, + {"mat3", SLANG_SPEC_MAT3}, + {"mat4", SLANG_SPEC_MAT4}, + {"sampler1D", SLANG_SPEC_SAMPLER1D}, + {"sampler2D", SLANG_SPEC_SAMPLER2D}, + {"sampler3D", SLANG_SPEC_SAMPLER3D}, + {"samplerCube", SLANG_SPEC_SAMPLERCUBE}, + {"sampler1DShadow", SLANG_SPEC_SAMPLER1DSHADOW}, + {"sampler2DShadow", SLANG_SPEC_SAMPLER2DSHADOW}, + {NULL, SLANG_SPEC_VOID} }; slang_type_specifier_type @@ -94,7 +94,7 @@ slang_type_specifier_type_to_string(slang_type_specifier_type type) int slang_fully_specified_type_construct(slang_fully_specified_type * type) { - type->qualifier = slang_qual_none; + type->qualifier = SLANG_QUAL_NONE; slang_type_specifier_ctr(&type->specifier); return 1; } @@ -333,49 +333,49 @@ static GLenum gl_type_from_specifier(const slang_type_specifier * type) { switch (type->type) { - case slang_spec_bool: + case SLANG_SPEC_BOOL: return GL_BOOL_ARB; - case slang_spec_bvec2: + case SLANG_SPEC_BVEC2: return GL_BOOL_VEC2_ARB; - case slang_spec_bvec3: + case SLANG_SPEC_BVEC3: return GL_BOOL_VEC3_ARB; - case slang_spec_bvec4: + case SLANG_SPEC_BVEC4: return GL_BOOL_VEC4_ARB; - case slang_spec_int: + case SLANG_SPEC_INT: return GL_INT; - case slang_spec_ivec2: + case SLANG_SPEC_IVEC2: return GL_INT_VEC2_ARB; - case slang_spec_ivec3: + case SLANG_SPEC_IVEC3: return GL_INT_VEC3_ARB; - case slang_spec_ivec4: + case SLANG_SPEC_IVEC4: return GL_INT_VEC4_ARB; - case slang_spec_float: + case SLANG_SPEC_FLOAT: return GL_FLOAT; - case slang_spec_vec2: + case SLANG_SPEC_VEC2: return GL_FLOAT_VEC2_ARB; - case slang_spec_vec3: + case SLANG_SPEC_VEC3: return GL_FLOAT_VEC3_ARB; - case slang_spec_vec4: + case SLANG_SPEC_VEC4: return GL_FLOAT_VEC4_ARB; - case slang_spec_mat2: + case SLANG_SPEC_MAT2: return GL_FLOAT_MAT2_ARB; - case slang_spec_mat3: + case SLANG_SPEC_MAT3: return GL_FLOAT_MAT3_ARB; - case slang_spec_mat4: + case SLANG_SPEC_MAT4: return GL_FLOAT_MAT4_ARB; - case slang_spec_sampler1D: + case SLANG_SPEC_SAMPLER1D: return GL_SAMPLER_1D_ARB; - case slang_spec_sampler2D: + case SLANG_SPEC_SAMPLER2D: return GL_SAMPLER_2D_ARB; - case slang_spec_sampler3D: + case SLANG_SPEC_SAMPLER3D: return GL_SAMPLER_3D_ARB; - case slang_spec_samplerCube: + case SLANG_SPEC_SAMPLERCUBE: return GL_SAMPLER_CUBE_ARB; - case slang_spec_sampler1DShadow: + case SLANG_SPEC_SAMPLER1DShadow: return GL_SAMPLER_1D_SHADOW_ARB; - case slang_spec_sampler2DShadow: + case SLANG_SPEC_SAMPLER2DShadow: return GL_SAMPLER_2D_SHADOW_ARB; - case slang_spec_array: + case SLANG_SPEC_ARRAy: return gl_type_from_specifier(type->_array); default: return GL_FLOAT; diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 841f9840a6..d12cfd7a40 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -32,15 +32,15 @@ extern "C" { typedef enum slang_type_qualifier_ { - slang_qual_none, - slang_qual_const, - slang_qual_attribute, - slang_qual_varying, - slang_qual_uniform, - slang_qual_out, - slang_qual_inout, - slang_qual_fixedoutput, /* internal */ - slang_qual_fixedinput /* internal */ + SLANG_QUAL_NONE, + SLANG_QUAL_CONST, + SLANG_QUAL_ATTRIBUTE, + SLANG_QUAL_VARYING, + SLANG_QUAL_UNIFORM, + SLANG_QUAL_OUT, + SLANG_QUAL_INOUT, + SLANG_QUAL_FIXEDOUTPUT, /* internal */ + SLANG_QUAL_FIXEDINPUT /* internal */ } slang_type_qualifier; extern slang_type_specifier_type @@ -75,7 +75,7 @@ typedef struct slang_variable_ { slang_fully_specified_type type; /**< Variable's data type */ slang_atom a_name; /**< The variable's name (char *) */ - GLuint array_len; /**< only if type == slang_spec_array */ + GLuint array_len; /**< only if type == SLANG_SPEC_ARRAy */ struct slang_operation_ *initializer; /**< Optional initializer code */ GLuint address; /**< Storage location */ GLuint size; /**< Variable's size in bytes */ diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index 7cfd87fb62..e53378e461 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -21,31 +21,31 @@ static void print_type(const slang_fully_specified_type *t) { switch (t->qualifier) { - case slang_qual_none: + case SLANG_QUAL_NONE: /*printf("");*/ break; - case slang_qual_const: + case SLANG_QUAL_CONST: printf("const "); break; - case slang_qual_attribute: + case SLANG_QUAL_ATTRIBUTE: printf("attrib "); break; - case slang_qual_varying: + case SLANG_QUAL_VARYING: printf("varying "); break; - case slang_qual_uniform: + case SLANG_QUAL_UNIFORM: printf("uniform "); break; - case slang_qual_out: + case SLANG_QUAL_OUT: printf("output "); break; - case slang_qual_inout: + case SLANG_QUAL_INOUT: printf("inout "); break; - case slang_qual_fixedoutput: + case SLANG_QUAL_FIXEDOUTPUT: printf("fixedoutput"); break; - case slang_qual_fixedinput: + case SLANG_QUAL_FIXEDINPUT: printf("fixedinput"); break; default: @@ -53,76 +53,76 @@ print_type(const slang_fully_specified_type *t) } switch (t->specifier.type) { - case slang_spec_void: + case SLANG_SPEC_VOID: printf("void"); break; - case slang_spec_bool: + case SLANG_SPEC_BOOL: printf("bool"); break; - case slang_spec_bvec2: + case SLANG_SPEC_BVEC2: printf("bvec2"); break; - case slang_spec_bvec3: + case SLANG_SPEC_BVEC3: printf("bvec3"); break; - case slang_spec_bvec4: + case SLANG_SPEC_BVEC4: printf("bvec4"); break; - case slang_spec_int: + case SLANG_SPEC_INT: printf("int"); break; - case slang_spec_ivec2: + case SLANG_SPEC_IVEC2: printf("ivec2"); break; - case slang_spec_ivec3: + case SLANG_SPEC_IVEC3: printf("ivec3"); break; - case slang_spec_ivec4: + case SLANG_SPEC_IVEC4: printf("ivec4"); break; - case slang_spec_float: + case SLANG_SPEC_FLOAT: printf("float"); break; - case slang_spec_vec2: + case SLANG_SPEC_VEC2: printf("vec2"); break; - case slang_spec_vec3: + case SLANG_SPEC_VEC3: printf("vec3"); break; - case slang_spec_vec4: + case SLANG_SPEC_VEC4: printf("vec4"); break; - case slang_spec_mat2: + case SLANG_SPEC_MAT2: printf("mat2"); break; - case slang_spec_mat3: + case SLANG_SPEC_MAT3: printf("mat3"); break; - case slang_spec_mat4: + case SLANG_SPEC_MAT4: printf("mat4"); break; - case slang_spec_sampler1D: + case SLANG_SPEC_SAMPLER1D: printf("sampler1D"); break; - case slang_spec_sampler2D: + case SLANG_SPEC_SAMPLER2D: printf("sampler2D"); break; - case slang_spec_sampler3D: + case SLANG_SPEC_SAMPLER3D: printf("sampler3D"); break; - case slang_spec_samplerCube: + case SLANG_SPEC_SAMPLERCUBE: printf("samplerCube"); break; - case slang_spec_sampler1DShadow: + case SLANG_SPEC_SAMPLER1DSHADOW: printf("sampler1DShadow"); break; - case slang_spec_sampler2DShadow: + case SLANG_SPEC_SAMPLER2DSHADOW: printf("sampler2DShadow"); break; - case slang_spec_struct: + case SLANG_SPEC_STRUCT: printf("struct"); break; - case slang_spec_array: + case SLANG_SPEC_ARRAY: printf("array"); break; default: @@ -219,12 +219,12 @@ slang_print_tree(const slang_operation *op, int indent) switch (op->type) { - case slang_oper_none: + case SLANG_OPER_NONE: spaces(indent); - printf("slang_oper_none\n"); + printf("SLANG_OPER_NONE\n"); break; - case slang_oper_block_no_new_scope: + case SLANG_OPER_BLOCK_NO_NEW_SCOPE: spaces(indent); printf("{ locals %p outer %p\n", (void*)op->locals, (void*)op->locals->outer_scope); print_generic(op, NULL, indent+3); @@ -232,7 +232,7 @@ slang_print_tree(const slang_operation *op, int indent) printf("}\n"); break; - case slang_oper_block_new_scope: + case SLANG_OPER_BLOCK_NEW_SCOPE: spaces(indent); printf("{{ // new scope locals %p\n", (void*)op->locals); print_generic(op, NULL, indent+3); @@ -240,7 +240,7 @@ slang_print_tree(const slang_operation *op, int indent) printf("}}\n"); break; - case slang_oper_variable_decl: + case SLANG_OPER_VARIABLE_DECL: assert(op->num_children == 0 || op->num_children == 1); { slang_variable *v; @@ -282,52 +282,52 @@ slang_print_tree(const slang_operation *op, int indent) } break; - case slang_oper_asm: + case SLANG_OPER_ASM: spaces(indent); printf("ASM: %s\n", (char*) op->a_id); print_generic(op, NULL, indent+3); break; - case slang_oper_break: + case SLANG_OPER_BREAK: spaces(indent); printf("BREAK\n"); break; - case slang_oper_continue: + case SLANG_OPER_CONTINUE: spaces(indent); printf("CONTINUE\n"); break; - case slang_oper_discard: + case SLANG_OPER_DISCARD: spaces(indent); printf("DISCARD\n"); break; - case slang_oper_return: + case SLANG_OPER_RETURN: spaces(indent); printf("RETURN\n"); if (op->num_children > 0) slang_print_tree(&op->children[0], indent + 3); break; - case slang_oper_goto: + case SLANG_OPER_GOTO: spaces(indent); printf("GOTO %s\n", (char *) op->a_id); break; - case slang_oper_label: + case SLANG_OPER_LABEL: spaces(indent); printf("LABEL %s\n", (char *) op->a_id); break; - case slang_oper_expression: + case SLANG_OPER_EXPRESSION: spaces(indent); printf("EXPR: locals %p\n", (void*) op->locals); - /*print_generic(op, "slang_oper_expression", indent);*/ + /*print_generic(op, "SLANG_OPER_EXPRESSION", indent);*/ slang_print_tree(&op->children[0], indent + 3); break; - case slang_oper_if: + case SLANG_OPER_IF: spaces(indent); printf("IF\n"); slang_print_tree(&op->children[0], indent + 3); @@ -341,7 +341,7 @@ slang_print_tree(const slang_operation *op, int indent) printf("ENDIF\n"); break; - case slang_oper_while: + case SLANG_OPER_WHILE: assert(op->num_children == 2); spaces(indent); printf("WHILE cond:\n"); @@ -351,7 +351,7 @@ slang_print_tree(const slang_operation *op, int indent) slang_print_tree(&op->children[1], indent + 3); break; - case slang_oper_do: + case SLANG_OPER_DO: spaces(indent); printf("DO body:\n"); slang_print_tree(&op->children[0], indent + 3); @@ -360,7 +360,7 @@ slang_print_tree(const slang_operation *op, int indent) slang_print_tree(&op->children[1], indent + 3); break; - case slang_oper_for: + case SLANG_OPER_FOR: spaces(indent); printf("FOR init:\n"); slang_print_tree(&op->children[0], indent + 3); @@ -380,32 +380,32 @@ slang_print_tree(const slang_operation *op, int indent) */ break; - case slang_oper_void: + case SLANG_OPER_VOID: spaces(indent); printf("(oper-void)\n"); break; - case slang_oper_literal_bool: + case SLANG_OPER_LITERAL_BOOL: spaces(indent); - /*printf("slang_oper_literal_bool\n");*/ + /*printf("SLANG_OPER_LITERAL_BOOL\n");*/ printf("%s\n", op->literal[0] ? "TRUE" : "FALSE"); break; - case slang_oper_literal_int: + case SLANG_OPER_LITERAL_INT: spaces(indent); - /*printf("slang_oper_literal_int\n");*/ + /*printf("SLANG_OPER_LITERAL_INT\n");*/ printf("(%d %d %d %d)\n", (int) op->literal[0], (int) op->literal[1], (int) op->literal[2], (int) op->literal[3]); break; - case slang_oper_literal_float: + case SLANG_OPER_LITERAL_FLOAT: spaces(indent); - /*printf("slang_oper_literal_float\n");*/ + /*printf("SLANG_OPER_LITERAL_FLOAT\n");*/ printf("(%f %f %f %f)\n", op->literal[0], op->literal[1], op->literal[2], op->literal[3]); break; - case slang_oper_identifier: + case SLANG_OPER_IDENTIFIER: spaces(indent); if (op->var && op->var->a_name) printf("VAR %s (in scope %p)\n", (char *) op->var->a_name, @@ -415,49 +415,49 @@ slang_print_tree(const slang_operation *op, int indent) (void *) find_scope(op->locals, op->a_id)); break; - case slang_oper_sequence: + case SLANG_OPER_SEQUENCE: print_generic(op, "COMMA-SEQ", indent+3); break; - case slang_oper_assign: + case SLANG_OPER_ASSIGN: spaces(indent); printf("ASSIGNMENT locals %p\n", (void*)op->locals); print_binary(op, ":=", indent); break; - case slang_oper_addassign: + case SLANG_OPER_ADDASSIGN: spaces(indent); printf("ASSIGN\n"); print_binary(op, "+=", indent); break; - case slang_oper_subassign: + case SLANG_OPER_SUBASSIGN: spaces(indent); printf("ASSIGN\n"); print_binary(op, "-=", indent); break; - case slang_oper_mulassign: + case SLANG_OPER_MULASSIGN: spaces(indent); printf("ASSIGN\n"); print_binary(op, "*=", indent); break; - case slang_oper_divassign: + case SLANG_OPER_DIVASSIGN: spaces(indent); printf("ASSIGN\n"); print_binary(op, "/=", indent); break; - /*slang_oper_modassign,*/ - /*slang_oper_lshassign,*/ - /*slang_oper_rshassign,*/ - /*slang_oper_orassign,*/ - /*slang_oper_xorassign,*/ - /*slang_oper_andassign,*/ - case slang_oper_select: + /*SLANG_OPER_MODASSIGN,*/ + /*SLANG_OPER_LSHASSIGN,*/ + /*SLANG_OPER_RSHASSIGN,*/ + /*SLANG_OPER_ORASSIGN,*/ + /*SLANG_OPER_XORASSIGN,*/ + /*SLANG_OPER_ANDASSIGN,*/ + case SLANG_OPER_SELECT: spaces(indent); - printf("slang_oper_select n=%d\n", op->num_children); + printf("SLANG_OPER_SELECT n=%d\n", op->num_children); assert(op->num_children == 3); slang_print_tree(&op->children[0], indent+3); spaces(indent); @@ -468,100 +468,100 @@ slang_print_tree(const slang_operation *op, int indent) slang_print_tree(&op->children[2], indent+3); break; - case slang_oper_logicalor: + case SLANG_OPER_LOGICALOR: print_binary(op, "||", indent); break; - case slang_oper_logicalxor: + case SLANG_OPER_LOGICALXOR: print_binary(op, "^^", indent); break; - case slang_oper_logicaland: + case SLANG_OPER_LOGICALAND: print_binary(op, "&&", indent); break; - /*slang_oper_bitor*/ - /*slang_oper_bitxor*/ - /*slang_oper_bitand*/ - case slang_oper_equal: + /*SLANG_OPER_BITOR*/ + /*SLANG_OPER_BITXOR*/ + /*SLANG_OPER_BITAND*/ + case SLANG_OPER_EQUAL: print_binary(op, "==", indent); break; - case slang_oper_notequal: + case SLANG_OPER_NOTEQUAL: print_binary(op, "!=", indent); break; - case slang_oper_less: + case SLANG_OPER_LESS: print_binary(op, "<", indent); break; - case slang_oper_greater: + case SLANG_OPER_GREATER: print_binary(op, ">", indent); break; - case slang_oper_lessequal: + case SLANG_OPER_LESSequal: print_binary(op, "<=", indent); break; - case slang_oper_greaterequal: + case SLANG_OPER_GREATERequal: print_binary(op, ">=", indent); break; - /*slang_oper_lshift*/ - /*slang_oper_rshift*/ - case slang_oper_add: + /*SLANG_OPER_LSHIFT*/ + /*SLANG_OPER_RSHIFT*/ + case SLANG_OPER_ADD: print_binary(op, "+", indent); break; - case slang_oper_subtract: + case SLANG_OPER_SUBTRACT: print_binary(op, "-", indent); break; - case slang_oper_multiply: + case SLANG_OPER_MULTIPLY: print_binary(op, "*", indent); break; - case slang_oper_divide: + case SLANG_OPER_DIVIDE: print_binary(op, "/", indent); break; - /*slang_oper_modulus*/ - case slang_oper_preincrement: + /*SLANG_OPER_MODULUS*/ + case SLANG_OPER_PREINCREMENT: spaces(indent); printf("PRE++\n"); slang_print_tree(&op->children[0], indent+3); break; - case slang_oper_predecrement: + case SLANG_OPER_PREDECREMENT: spaces(indent); printf("PRE--\n"); slang_print_tree(&op->children[0], indent+3); break; - case slang_oper_plus: + case SLANG_OPER_PLUS: spaces(indent); - printf("slang_oper_plus\n"); + printf("SLANG_OPER_PLUS\n"); break; - case slang_oper_minus: + case SLANG_OPER_MINUS: spaces(indent); - printf("slang_oper_minus\n"); + printf("SLANG_OPER_MINUS\n"); break; - /*slang_oper_complement*/ - case slang_oper_not: + /*SLANG_OPER_COMPLEMENT*/ + case SLANG_OPER_NOT: spaces(indent); printf("NOT\n"); slang_print_tree(&op->children[0], indent+3); break; - case slang_oper_subscript: + case SLANG_OPER_SUBSCRIPT: spaces(indent); - printf("slang_oper_subscript\n"); + printf("SLANG_OPER_SUBSCRIPT\n"); print_generic(op, NULL, indent+3); break; - case slang_oper_call: + case SLANG_OPER_CALL: #if 0 slang_function *fun = _slang_locate_function(A->space.funcs, oper->a_id, @@ -581,19 +581,19 @@ slang_print_tree(const slang_operation *op, int indent) printf(")\n"); break; - case slang_oper_field: + case SLANG_OPER_FIELD: spaces(indent); printf("FIELD %s of\n", (char*) op->a_id); slang_print_tree(&op->children[0], indent+3); break; - case slang_oper_postincrement: + case SLANG_OPER_POSTINCREMENT: spaces(indent); printf("POST++\n"); slang_print_tree(&op->children[0], indent+3); break; - case slang_oper_postdecrement: + case SLANG_OPER_POSTDECREMENT: spaces(indent); printf("POST--\n"); slang_print_tree(&op->children[0], indent+3); @@ -637,23 +637,23 @@ const char * slang_type_qual_string(slang_type_qualifier q) { switch (q) { - case slang_qual_none: + case SLANG_QUAL_NONE: return "none"; - case slang_qual_const: + case SLANG_QUAL_CONST: return "const"; - case slang_qual_attribute: + case SLANG_QUAL_ATTRIBUTE: return "attribute"; - case slang_qual_varying: + case SLANG_QUAL_VARYING: return "varying"; - case slang_qual_uniform: + case SLANG_QUAL_UNIFORM: return "uniform"; - case slang_qual_out: + case SLANG_QUAL_OUT: return "out"; - case slang_qual_inout: + case SLANG_QUAL_INOUT: return "inout"; - case slang_qual_fixedoutput: + case SLANG_QUAL_FIXEDOUTPUT: return "fixedoutput"; - case slang_qual_fixedinput: + case SLANG_QUAL_FIXEDINPUT: return "fixedinputk"; default: return "qual?"; @@ -665,53 +665,53 @@ static const char * slang_type_string(slang_type_specifier_type t) { switch (t) { - case slang_spec_void: + case SLANG_SPEC_VOID: return "void"; - case slang_spec_bool: + case SLANG_SPEC_BOOL: return "bool"; - case slang_spec_bvec2: + case SLANG_SPEC_BVEC2: return "bvec2"; - case slang_spec_bvec3: + case SLANG_SPEC_BVEC3: return "bvec3"; - case slang_spec_bvec4: + case SLANG_SPEC_BVEC4: return "bvec4"; - case slang_spec_int: + case SLANG_SPEC_INT: return "int"; - case slang_spec_ivec2: + case SLANG_SPEC_IVEC2: return "ivec2"; - case slang_spec_ivec3: + case SLANG_SPEC_IVEC3: return "ivec3"; - case slang_spec_ivec4: + case SLANG_SPEC_IVEC4: return "ivec4"; - case slang_spec_float: + case SLANG_SPEC_FLOAT: return "float"; - case slang_spec_vec2: + case SLANG_SPEC_VEC2: return "vec2"; - case slang_spec_vec3: + case SLANG_SPEC_VEC3: return "vec3"; - case slang_spec_vec4: + case SLANG_SPEC_VEC4: return "vec4"; - case slang_spec_mat2: + case SLANG_SPEC_MAT2: return "mat2"; - case slang_spec_mat3: + case SLANG_SPEC_MAT3: return "mat3"; - case slang_spec_mat4: + case SLANG_SPEC_MAT4: return "mat4"; - case slang_spec_sampler1D: + case SLANG_SPEC_SAMPLER1D: return "sampler1D"; - case slang_spec_sampler2D: + case SLANG_SPEC_SAMPLER2D: return "sampler2D"; - case slang_spec_sampler3D: + case SLANG_SPEC_SAMPLER3D: return "sampler3D"; - case slang_spec_samplerCube: + case SLANG_SPEC_SAMPLERCUBE: return "samplerCube"; - case slang_spec_sampler1DShadow: + case SLANG_SPEC_SAMPLER1DSHADOW: return "sampler1DShadow"; - case slang_spec_sampler2DShadow: + case SLANG_SPEC_SAMPLER2DSHADOW: return "sampler2DShadow"; - case slang_spec_struct: + case SLANG_SPEC_STRUCT: return "struct"; - case slang_spec_array: + case SLANG_SPEC_ARRAY: return "array"; default: return "type?"; diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index 0e433281e8..07b4ae2760 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -97,7 +97,7 @@ _slang_simplify(slang_operation *oper, GLboolean isBool[4]; GLuint i, n; - if (oper->type == slang_oper_identifier) { + if (oper->type == SLANG_OPER_IDENTIFIER) { /* see if it's a named constant */ GLint value = _slang_lookup_constant((char *) oper->a_id); if (value >= 0) { @@ -105,7 +105,7 @@ _slang_simplify(slang_operation *oper, oper->literal[1] = oper->literal[2] = oper->literal[3] = value; - oper->type = slang_oper_literal_int; + oper->type = SLANG_OPER_LITERAL_INT; return; } } @@ -118,49 +118,49 @@ _slang_simplify(slang_operation *oper, /* examine children */ n = MIN2(oper->num_children, 4); for (i = 0; i < n; i++) { - isFloat[i] = (oper->children[i].type == slang_oper_literal_float || - oper->children[i].type == slang_oper_literal_int); - isBool[i] = (oper->children[i].type == slang_oper_literal_bool); + isFloat[i] = (oper->children[i].type == SLANG_OPER_LITERAL_FLOAT || + oper->children[i].type == SLANG_OPER_LITERAL_INT); + isBool[i] = (oper->children[i].type == SLANG_OPER_LITERAL_BOOL); } if (oper->num_children == 2 && isFloat[0] && isFloat[1]) { /* probably simple arithmetic */ switch (oper->type) { - case slang_oper_add: + case SLANG_OPER_ADD: for (i = 0; i < 4; i++) { oper->literal[i] = oper->children[0].literal[i] + oper->children[1].literal[i]; } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; - case slang_oper_subtract: + case SLANG_OPER_SUBTRACT: for (i = 0; i < 4; i++) { oper->literal[i] = oper->children[0].literal[i] - oper->children[1].literal[i]; } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; - case slang_oper_multiply: + case SLANG_OPER_MULTIPLY: for (i = 0; i < 4; i++) { oper->literal[i] = oper->children[0].literal[i] * oper->children[1].literal[i]; } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; - case slang_oper_divide: + case SLANG_OPER_DIVIDE: for (i = 0; i < 4; i++) { oper->literal[i] = oper->children[0].literal[i] / oper->children[1].literal[i]; } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; default: ; /* nothing */ @@ -169,19 +169,19 @@ _slang_simplify(slang_operation *oper, if (oper->num_children == 1 && isFloat[0]) { switch (oper->type) { - case slang_oper_minus: + case SLANG_OPER_MINUS: for (i = 0; i < 4; i++) { oper->literal[i] = -oper->children[0].literal[i]; } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; - case slang_oper_plus: + case SLANG_OPER_PLUS: COPY_4V(oper->literal, oper->children[0].literal); oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; default: ; /* nothing */ @@ -191,7 +191,7 @@ _slang_simplify(slang_operation *oper, if (oper->num_children == 2 && isBool[0] && isBool[1]) { /* simple boolean expression */ switch (oper->type) { - case slang_oper_logicaland: + case SLANG_OPER_LOGICALAND: for (i = 0; i < 4; i++) { const GLint a = oper->children[0].literal[i] ? 1 : 0; const GLint b = oper->children[1].literal[i] ? 1 : 0; @@ -199,9 +199,9 @@ _slang_simplify(slang_operation *oper, } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_bool; + oper->type = SLANG_OPER_LITERAL_BOOL; return; - case slang_oper_logicalor: + case SLANG_OPER_LOGICALOR: for (i = 0; i < 4; i++) { const GLint a = oper->children[0].literal[i] ? 1 : 0; const GLint b = oper->children[1].literal[i] ? 1 : 0; @@ -209,9 +209,9 @@ _slang_simplify(slang_operation *oper, } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_bool; + oper->type = SLANG_OPER_LITERAL_BOOL; return; - case slang_oper_logicalxor: + case SLANG_OPER_LOGICALXOR: for (i = 0; i < 4; i++) { const GLint a = oper->children[0].literal[i] ? 1 : 0; const GLint b = oper->children[1].literal[i] ? 1 : 0; @@ -219,7 +219,7 @@ _slang_simplify(slang_operation *oper, } oper->literal_size = oper->children[0].literal_size; slang_operation_destruct(oper); - oper->type = slang_oper_literal_bool; + oper->type = SLANG_OPER_LITERAL_BOOL; return; default: ; /* nothing */ @@ -229,7 +229,7 @@ _slang_simplify(slang_operation *oper, if (oper->num_children == 4 && isFloat[0] && isFloat[1] && isFloat[2] && isFloat[3]) { /* vec4(flt, flt, flt, flt) constructor */ - if (oper->type == slang_oper_call) { + if (oper->type == SLANG_OPER_CALL) { if (strcmp((char *) oper->a_id, "vec4") == 0) { oper->literal[0] = oper->children[0].literal[0]; oper->literal[1] = oper->children[1].literal[0]; @@ -237,7 +237,7 @@ _slang_simplify(slang_operation *oper, oper->literal[3] = oper->children[3].literal[0]; oper->literal_size = 4; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; } } @@ -245,7 +245,7 @@ _slang_simplify(slang_operation *oper, if (oper->num_children == 3 && isFloat[0] && isFloat[1] && isFloat[2]) { /* vec3(flt, flt, flt) constructor */ - if (oper->type == slang_oper_call) { + if (oper->type == SLANG_OPER_CALL) { if (strcmp((char *) oper->a_id, "vec3") == 0) { oper->literal[0] = oper->children[0].literal[0]; oper->literal[1] = oper->children[1].literal[0]; @@ -253,7 +253,7 @@ _slang_simplify(slang_operation *oper, oper->literal[3] = oper->literal[2]; oper->literal_size = 3; slang_operation_destruct(oper); - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; return; } } @@ -261,7 +261,7 @@ _slang_simplify(slang_operation *oper, if (oper->num_children == 2 && isFloat[0] && isFloat[1]) { /* vec2(flt, flt) constructor */ - if (oper->type == slang_oper_call) { + if (oper->type == SLANG_OPER_CALL) { if (strcmp((char *) oper->a_id, "vec2") == 0) { printf("SIMPLIFY vec2 constructor scope = %p\n", (void*) oper->locals); @@ -271,7 +271,7 @@ _slang_simplify(slang_operation *oper, oper->literal[3] = oper->literal[1]; oper->literal_size = 2; slang_operation_destruct(oper); /* XXX oper->locals goes NULL! */ - oper->type = slang_oper_literal_float; + oper->type = SLANG_OPER_LITERAL_FLOAT; assert(oper->num_children == 0); return; } @@ -305,7 +305,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, if (callOper->num_children != numParams) { /* number of arguments doesn't match number of parameters */ - if (fun->kind == slang_func_constructor) { + if (fun->kind == SLANG_FUNC_CONSTRUCTOR) { /* For constructor calls, we can try to unroll vector/matrix args * into individual floats/ints and try to match the function params. */ @@ -345,13 +345,13 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, /* replace arg[i+j] with subscript/index oper */ for (j = 0; j < argSz; j++) { - callOper->children[i + j].type = slang_oper_subscript; + callOper->children[i + j].type = SLANG_OPER_SUBSCRIPT; callOper->children[i + j].num_children = 2; callOper->children[i + j].children = slang_operation_new(2); slang_operation_copy(&callOper->children[i + j].children[0], &origArg); callOper->children[i + j].children[1].type - = slang_oper_literal_int; + = SLANG_OPER_LITERAL_INT; callOper->children[i + j].children[1].literal[0] = j; } @@ -408,7 +408,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, slang_operation_copy(child, &callOper->children[i]); child->locals->outer_scope = callOper->locals; - callOper->children[i].type = slang_oper_call; + callOper->children[i].type = SLANG_OPER_CALL; callOper->children[i].a_id = slang_atom_pool_atom(atoms, constructorName); callOper->children[i].num_children = 1; callOper->children[i].children = child; diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 9f824371c5..74aff01aad 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -36,7 +36,7 @@ GLboolean slang_storage_array_construct(slang_storage_array * arr) { - arr->type = slang_stor_aggregate; + arr->type = SLANG_STORE_AGGREGATE; arr->aggregate = NULL; arr->length = 0; return GL_TRUE; @@ -110,7 +110,7 @@ aggregate_matrix(slang_storage_aggregate * agg, slang_storage_type basic_type, slang_storage_array *arr = slang_storage_aggregate_push_new(agg); if (arr == NULL) return GL_FALSE; - arr->type = slang_stor_aggregate; + arr->type = SLANG_STORE_AGGREGATE; arr->length = dimension; arr->aggregate = (slang_storage_aggregate *) @@ -155,54 +155,54 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, slang_atom_pool * atoms) { switch (spec->type) { - case slang_spec_bool: - return aggregate_vector(agg, slang_stor_bool, 1); - case slang_spec_bvec2: - return aggregate_vector(agg, slang_stor_bool, 2); - case slang_spec_bvec3: - return aggregate_vector(agg, slang_stor_bool, 3); - case slang_spec_bvec4: - return aggregate_vector(agg, slang_stor_bool, 4); - case slang_spec_int: - return aggregate_vector(agg, slang_stor_int, 1); - case slang_spec_ivec2: - return aggregate_vector(agg, slang_stor_int, 2); - case slang_spec_ivec3: - return aggregate_vector(agg, slang_stor_int, 3); - case slang_spec_ivec4: - return aggregate_vector(agg, slang_stor_int, 4); - case slang_spec_float: - return aggregate_vector(agg, slang_stor_float, 1); - case slang_spec_vec2: - return aggregate_vector(agg, slang_stor_float, 2); - case slang_spec_vec3: - return aggregate_vector(agg, slang_stor_float, 3); - case slang_spec_vec4: - return aggregate_vector(agg, slang_stor_float, 4); - case slang_spec_mat2: - return aggregate_matrix(agg, slang_stor_float, 2); - case slang_spec_mat3: - return aggregate_matrix(agg, slang_stor_float, 3); - case slang_spec_mat4: - return aggregate_matrix(agg, slang_stor_float, 4); - case slang_spec_sampler1D: - case slang_spec_sampler2D: - case slang_spec_sampler3D: - case slang_spec_samplerCube: - case slang_spec_sampler1DShadow: - case slang_spec_sampler2DShadow: - return aggregate_vector(agg, slang_stor_int, 1); - case slang_spec_struct: + case SLANG_SPEC_BOOL: + return aggregate_vector(agg, SLANG_STORE_BOOL, 1); + case SLANG_SPEC_BVEC2: + return aggregate_vector(agg, SLANG_STORE_BOOL, 2); + case SLANG_SPEC_BVEC3: + return aggregate_vector(agg, SLANG_STORE_BOOL, 3); + case SLANG_SPEC_BVEC4: + return aggregate_vector(agg, SLANG_STORE_BOOL, 4); + case SLANG_SPEC_INT: + return aggregate_vector(agg, SLANG_STORE_INT, 1); + case SLANG_SPEC_IVEC2: + return aggregate_vector(agg, SLANG_STORE_INT, 2); + case SLANG_SPEC_IVEC3: + return aggregate_vector(agg, SLANG_STORE_INT, 3); + case SLANG_SPEC_IVEC4: + return aggregate_vector(agg, SLANG_STORE_INT, 4); + case SLANG_SPEC_FLOAT: + return aggregate_vector(agg, SLANG_STORE_FLOAT, 1); + case SLANG_SPEC_VEC2: + return aggregate_vector(agg, SLANG_STORE_FLOAT, 2); + case SLANG_SPEC_VEC3: + return aggregate_vector(agg, SLANG_STORE_FLOAT, 3); + case SLANG_SPEC_VEC4: + return aggregate_vector(agg, SLANG_STORE_FLOAT, 4); + case SLANG_SPEC_MAT2: + return aggregate_matrix(agg, SLANG_STORE_FLOAT, 2); + case SLANG_SPEC_MAT3: + return aggregate_matrix(agg, SLANG_STORE_FLOAT, 3); + case SLANG_SPEC_MAT4: + return aggregate_matrix(agg, SLANG_STORE_FLOAT, 4); + case SLANG_SPEC_SAMPLER1D: + case SLANG_SPEC_SAMPLER2D: + case SLANG_SPEC_SAMPLER3D: + case SLANG_SPEC_SAMPLERCUBE: + case SLANG_SPEC_SAMPLER1DSHADOW: + case SLANG_SPEC_SAMPLER2DSHADOW: + return aggregate_vector(agg, SLANG_STORE_INT, 1); + case SLANG_SPEC_STRUCT: return aggregate_variables(agg, spec->_struct->fields, funcs, structs, vars, atoms); - case slang_spec_array: + case SLANG_SPEC_ARRAY: { slang_storage_array *arr; arr = slang_storage_aggregate_push_new(agg); if (arr == NULL) return GL_FALSE; - arr->type = slang_stor_aggregate; + arr->type = SLANG_STORE_AGGREGATE; arr->aggregate = (slang_storage_aggregate *) slang_alloc_malloc(sizeof(slang_storage_aggregate)); @@ -229,9 +229,9 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, GLuint _slang_sizeof_type(slang_storage_type type) { - if (type == slang_stor_aggregate) + if (type == SLANG_STORE_AGGREGATE) return 0; - if (type == slang_stor_vec4) + if (type == SLANG_STORE_VEC4) return 4 * sizeof(GLfloat); return sizeof(GLfloat); } @@ -246,7 +246,7 @@ _slang_sizeof_aggregate(const slang_storage_aggregate * agg) slang_storage_array *arr = &agg->arrays[i]; GLuint element_size; - if (arr->type == slang_stor_aggregate) + if (arr->type == SLANG_STORE_AGGREGATE) element_size = _slang_sizeof_aggregate(arr->aggregate); else element_size = _slang_sizeof_type(arr->type); @@ -266,7 +266,7 @@ _slang_flatten_aggregate(slang_storage_aggregate * flat, GLuint j; for (j = 0; j < agg->arrays[i].length; j++) { - if (agg->arrays[i].type == slang_stor_aggregate) { + if (agg->arrays[i].type == SLANG_STORE_AGGREGATE) { if (!_slang_flatten_aggregate(flat, agg->arrays[i].aggregate)) return GL_FALSE; } @@ -274,9 +274,9 @@ _slang_flatten_aggregate(slang_storage_aggregate * flat, GLuint k, count; slang_storage_type type; - if (agg->arrays[i].type == slang_stor_vec4) { + if (agg->arrays[i].type == SLANG_STORE_VEC4) { count = 4; - type = slang_stor_float; + type = SLANG_STORE_FLOAT; } else { count = 1; diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index 5d756b5216..b02931fcc2 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -22,7 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_STORAGE_H +#ifndef SLANG_STORAGE_H #define SLANG_STORAGE_H #include "slang_compile.h" @@ -47,12 +47,12 @@ typedef enum slang_storage_type_ { /* core */ - slang_stor_aggregate, - slang_stor_bool, - slang_stor_int, - slang_stor_float, + SLANG_STORE_AGGREGATE, + SLANG_STORE_BOOL, + SLANG_STORE_INT, + SLANG_STORE_FLOAT, /* vec4 */ - slang_stor_vec4 + SLANG_STORE_VEC4 } slang_storage_type; @@ -110,7 +110,7 @@ _slang_aggregate_variable(slang_storage_aggregate *agg, /* * Returns the size (in machine units) of the given storage type. - * It is an error to pass-in slang_stor_aggregate. + * It is an error to pass-in SLANG_STORE_AGGREGATE. * Returns 0 on error. */ extern GLuint @@ -135,5 +135,4 @@ _slang_flatten_aggregate (slang_storage_aggregate *, const slang_storage_aggregate *); -#endif - +#endif /* SLANG_STORAGE_H */ diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index 824bcc713f..bbcc1c740c 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -170,7 +170,7 @@ _slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left, GLvoid slang_type_specifier_ctr(slang_type_specifier * self) { - self->type = slang_spec_void; + self->type = SLANG_SPEC_VOID; self->_struct = NULL; self->_array = NULL; } @@ -196,7 +196,7 @@ slang_type_specifier_copy(slang_type_specifier * x, slang_type_specifier_ctr(&z); z.type = y->type; - if (z.type == slang_spec_struct) { + if (z.type == SLANG_SPEC_STRUCT) { z._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); if (z._struct == NULL) { slang_type_specifier_dtr(&z); @@ -212,7 +212,7 @@ slang_type_specifier_copy(slang_type_specifier * x, return GL_FALSE; } } - else if (z.type == slang_spec_array) { + else if (z.type == SLANG_SPEC_ARRAY) { z._array = (slang_type_specifier *) slang_alloc_malloc(sizeof(slang_type_specifier)); @@ -241,9 +241,9 @@ slang_type_specifier_equal(const slang_type_specifier * x, { if (x->type != y->type) return GL_FALSE; - if (x->type == slang_spec_struct) + if (x->type == SLANG_SPEC_STRUCT) return slang_struct_equal(x->_struct, y->_struct); - if (x->type == slang_spec_array) + if (x->type == SLANG_SPEC_ARRAY) return slang_type_specifier_equal(x->_array, y->_array); return GL_TRUE; } @@ -257,16 +257,16 @@ slang_type_specifier_compatible(const slang_type_specifier * x, const slang_type_specifier * y) { /* special case: float == int */ - if (x->type == slang_spec_int && y->type == slang_spec_float) { + if (x->type == SLANG_SPEC_INT && y->type == SLANG_SPEC_FLOAT) { return GL_TRUE; } /* XXX may need to add bool/int compatibility, etc */ if (x->type != y->type) return GL_FALSE; - if (x->type == slang_spec_struct) + if (x->type == SLANG_SPEC_STRUCT) return slang_struct_equal(x->_struct, y->_struct); - if (x->type == slang_spec_array) + if (x->type == SLANG_SPEC_ARRAY) return slang_type_specifier_compatible(x->_array, y->_array); return GL_TRUE; } @@ -341,93 +341,93 @@ _slang_typeof_operation_(const slang_operation * op, ti->is_swizzled = GL_FALSE; switch (op->type) { - case slang_oper_block_no_new_scope: - case slang_oper_block_new_scope: - case slang_oper_variable_decl: - case slang_oper_asm: - case slang_oper_break: - case slang_oper_continue: - case slang_oper_discard: - case slang_oper_return: - case slang_oper_if: - case slang_oper_while: - case slang_oper_do: - case slang_oper_for: - case slang_oper_void: - ti->spec.type = slang_spec_void; + case SLANG_OPER_BLOCK_NO_NEW_SCOPE: + case SLANG_OPER_BLOCK_NEW_SCOPE: + case SLANG_OPER_VARIABLE_DECL: + case SLANG_OPER_ASM: + case SLANG_OPER_BREAK: + case SLANG_OPER_CONTINUE: + case SLANG_OPER_DISCARD: + case SLANG_OPER_RETURN: + case SLANG_OPER_IF: + case SLANG_OPER_WHILE: + case SLANG_OPER_DO: + case SLANG_OPER_FOR: + case SLANG_OPER_VOID: + ti->spec.type = SLANG_SPEC_VOID; break; - case slang_oper_expression: - case slang_oper_assign: - case slang_oper_addassign: - case slang_oper_subassign: - case slang_oper_mulassign: - case slang_oper_divassign: - case slang_oper_preincrement: - case slang_oper_predecrement: + case SLANG_OPER_EXPRESSION: + case SLANG_OPER_ASSIGN: + case SLANG_OPER_ADDASSIGN: + case SLANG_OPER_SUBASSIGN: + case SLANG_OPER_MULASSIGN: + case SLANG_OPER_DIVASSIGN: + case SLANG_OPER_PREINCREMENT: + case SLANG_OPER_PREDECREMENT: if (!_slang_typeof_operation_(op->children, space, ti, atoms)) return GL_FALSE; break; - case slang_oper_literal_bool: + case SLANG_OPER_LITERAL_BOOL: if (op->literal_size == 1) - ti->spec.type = slang_spec_bool; + ti->spec.type = SLANG_SPEC_BOOL; else if (op->literal_size == 2) - ti->spec.type = slang_spec_bvec2; + ti->spec.type = SLANG_SPEC_BVEC2; else if (op->literal_size == 3) - ti->spec.type = slang_spec_bvec3; + ti->spec.type = SLANG_SPEC_BVEC3; else if (op->literal_size == 4) - ti->spec.type = slang_spec_bvec4; + ti->spec.type = SLANG_SPEC_BVEC4; else { _mesa_problem(NULL, "Unexpected bool literal_size %d in _slang_typeof_operation()", op->literal_size); - ti->spec.type = slang_spec_bool; + ti->spec.type = SLANG_SPEC_BOOL; } break; - case slang_oper_logicalor: - case slang_oper_logicalxor: - case slang_oper_logicaland: - case slang_oper_equal: - case slang_oper_notequal: - case slang_oper_less: - case slang_oper_greater: - case slang_oper_lessequal: - case slang_oper_greaterequal: - case slang_oper_not: - ti->spec.type = slang_spec_bool; + case SLANG_OPER_LOGICALOR: + case SLANG_OPER_LOGICALXOR: + case SLANG_OPER_LOGICALAND: + case SLANG_OPER_EQUAL: + case SLANG_OPER_NOTEQUAL: + case SLANG_OPER_LESS: + case SLANG_OPER_GREATER: + case SLANG_OPER_LESSequal: + case SLANG_OPER_GREATERequal: + case SLANG_OPER_NOT: + ti->spec.type = SLANG_SPEC_BOOL; break; - case slang_oper_literal_int: + case SLANG_OPER_LITERAL_INT: if (op->literal_size == 1) - ti->spec.type = slang_spec_int; + ti->spec.type = SLANG_SPEC_INT; else if (op->literal_size == 2) - ti->spec.type = slang_spec_ivec2; + ti->spec.type = SLANG_SPEC_IVEC2; else if (op->literal_size == 3) - ti->spec.type = slang_spec_ivec3; + ti->spec.type = SLANG_SPEC_IVEC3; else if (op->literal_size == 4) - ti->spec.type = slang_spec_ivec4; + ti->spec.type = SLANG_SPEC_IVEC4; else { _mesa_problem(NULL, "Unexpected int literal_size %d in _slang_typeof_operation()", op->literal_size); - ti->spec.type = slang_spec_int; + ti->spec.type = SLANG_SPEC_INT; } break; - case slang_oper_literal_float: + case SLANG_OPER_LITERAL_FLOAT: if (op->literal_size == 1) - ti->spec.type = slang_spec_float; + ti->spec.type = SLANG_SPEC_FLOAT; else if (op->literal_size == 2) - ti->spec.type = slang_spec_vec2; + ti->spec.type = SLANG_SPEC_VEC2; else if (op->literal_size == 3) - ti->spec.type = slang_spec_vec3; + ti->spec.type = SLANG_SPEC_VEC3; else if (op->literal_size == 4) - ti->spec.type = slang_spec_vec4; + ti->spec.type = SLANG_SPEC_VEC4; else { _mesa_problem(NULL, "Unexpected float literal_size %d in _slang_typeof_operation()", op->literal_size); - ti->spec.type = slang_spec_float; + ti->spec.type = SLANG_SPEC_FLOAT; } break; - case slang_oper_identifier: + case SLANG_OPER_IDENTIFIER: { slang_variable *var; var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); @@ -439,65 +439,65 @@ _slang_typeof_operation_(const slang_operation * op, ti->array_len = var->array_len; } break; - case slang_oper_sequence: + case SLANG_OPER_SEQUENCE: /* TODO: check [0] and [1] if they match */ if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) RETURN_NIL(); ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; - /*case slang_oper_modassign: */ - /*case slang_oper_lshassign: */ - /*case slang_oper_rshassign: */ - /*case slang_oper_orassign: */ - /*case slang_oper_xorassign: */ - /*case slang_oper_andassign: */ - case slang_oper_select: + /*case SLANG_OPER_MODASSIGN: */ + /*case SLANG_OPER_LSHASSIGN: */ + /*case SLANG_OPER_RSHASSIGN: */ + /*case SLANG_OPER_ORASSIGN: */ + /*case SLANG_OPER_XORASSIGN: */ + /*case SLANG_OPER_ANDASSIGN: */ + case SLANG_OPER_SELECT: /* TODO: check [1] and [2] if they match */ if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) RETURN_NIL(); ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; - /*case slang_oper_bitor: */ - /*case slang_oper_bitxor: */ - /*case slang_oper_bitand: */ - /*case slang_oper_lshift: */ - /*case slang_oper_rshift: */ - case slang_oper_add: + /*case SLANG_OPER_BITOR: */ + /*case SLANG_OPER_BITXOR: */ + /*case SLANG_OPER_BITAND: */ + /*case SLANG_OPER_LSHIFT: */ + /*case SLANG_OPER_RSHIFT: */ + case SLANG_OPER_ADD: if (!typeof_existing_function("+", op->children, 2, space, &ti->spec, atoms)) RETURN_NIL(); break; - case slang_oper_subtract: + case SLANG_OPER_SUBTRACT: if (!typeof_existing_function("-", op->children, 2, space, &ti->spec, atoms)) RETURN_NIL(); break; - case slang_oper_multiply: + case SLANG_OPER_MULTIPLY: if (!typeof_existing_function("*", op->children, 2, space, &ti->spec, atoms)) RETURN_NIL(); break; - case slang_oper_divide: + case SLANG_OPER_DIVIDE: if (!typeof_existing_function("/", op->children, 2, space, &ti->spec, atoms)) RETURN_NIL(); break; - /*case slang_oper_modulus: */ - case slang_oper_plus: + /*case SLANG_OPER_MODULUS: */ + case SLANG_OPER_PLUS: if (!_slang_typeof_operation_(op->children, space, ti, atoms)) RETURN_NIL(); ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; - case slang_oper_minus: + case SLANG_OPER_MINUS: if (!typeof_existing_function("-", op->children, 1, space, &ti->spec, atoms)) RETURN_NIL(); break; - /*case slang_oper_complement: */ - case slang_oper_subscript: + /*case SLANG_OPER_COMPLEMENT: */ + case SLANG_OPER_SUBSCRIPT: { slang_typeinfo _ti; @@ -508,7 +508,7 @@ _slang_typeof_operation_(const slang_operation * op, RETURN_NIL(); } ti->can_be_referenced = _ti.can_be_referenced; - if (_ti.spec.type == slang_spec_array) { + if (_ti.spec.type == SLANG_SPEC_ARRAY) { if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { slang_typeinfo_destruct(&_ti); RETURN_NIL(); @@ -525,7 +525,7 @@ _slang_typeof_operation_(const slang_operation * op, slang_typeinfo_destruct(&_ti); } break; - case slang_oper_call: + case SLANG_OPER_CALL: { GLboolean exists; @@ -536,7 +536,7 @@ _slang_typeof_operation_(const slang_operation * op, slang_struct *s = slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); if (s != NULL) { - ti->spec.type = slang_spec_struct; + ti->spec.type = SLANG_SPEC_STRUCT; ti->spec._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); if (ti->spec._struct == NULL) @@ -555,14 +555,14 @@ _slang_typeof_operation_(const slang_operation * op, name = slang_atom_pool_id(atoms, op->a_id); type = slang_type_specifier_type_from_string(name); - if (type == slang_spec_void) + if (type == SLANG_SPEC_VOID) RETURN_ERROR2("function not found", name, 0); ti->spec.type = type; } } } break; - case slang_oper_field: + case SLANG_OPER_FIELD: { slang_typeinfo _ti; @@ -572,7 +572,7 @@ _slang_typeof_operation_(const slang_operation * op, slang_typeinfo_destruct(&_ti); RETURN_NIL(); } - if (_ti.spec.type == slang_spec_struct) { + if (_ti.spec.type == SLANG_SPEC_STRUCT) { slang_variable *field; field = _slang_locate_variable(_ti.spec._struct->fields, op->a_id, @@ -622,14 +622,14 @@ _slang_typeof_operation_(const slang_operation * op, break; case 2: switch (base) { - case slang_spec_float: - ti->spec.type = slang_spec_vec2; + case SLANG_SPEC_FLOAT: + ti->spec.type = SLANG_SPEC_VEC2; break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec2; + case SLANG_SPEC_INT: + ti->spec.type = SLANG_SPEC_IVEC2; break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec2; + case SLANG_SPEC_BOOL: + ti->spec.type = SLANG_SPEC_BVEC2; break; default: break; @@ -637,14 +637,14 @@ _slang_typeof_operation_(const slang_operation * op, break; case 3: switch (base) { - case slang_spec_float: - ti->spec.type = slang_spec_vec3; + case SLANG_SPEC_FLOAT: + ti->spec.type = SLANG_SPEC_VEC3; break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec3; + case SLANG_SPEC_INT: + ti->spec.type = SLANG_SPEC_IVEC3; break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec3; + case SLANG_SPEC_BOOL: + ti->spec.type = SLANG_SPEC_BVEC3; break; default: break; @@ -652,14 +652,14 @@ _slang_typeof_operation_(const slang_operation * op, break; case 4: switch (base) { - case slang_spec_float: - ti->spec.type = slang_spec_vec4; + case SLANG_SPEC_FLOAT: + ti->spec.type = SLANG_SPEC_VEC4; break; - case slang_spec_int: - ti->spec.type = slang_spec_ivec4; + case SLANG_SPEC_INT: + ti->spec.type = SLANG_SPEC_IVEC4; break; - case slang_spec_bool: - ti->spec.type = slang_spec_bvec4; + case SLANG_SPEC_BOOL: + ti->spec.type = SLANG_SPEC_BVEC4; break; default: break; @@ -672,8 +672,8 @@ _slang_typeof_operation_(const slang_operation * op, slang_typeinfo_destruct(&_ti); } break; - case slang_oper_postincrement: - case slang_oper_postdecrement: + case SLANG_OPER_POSTINCREMENT: + case SLANG_OPER_POSTDECREMENT: if (!_slang_typeof_operation_(op->children, space, ti, atoms)) RETURN_NIL(); ti->can_be_referenced = GL_FALSE; @@ -728,8 +728,8 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, * parameter to be l-value. */ if (!ti.can_be_referenced && - (f->parameters->variables[j]->type.qualifier == slang_qual_out || - f->parameters->variables[j]->type.qualifier == slang_qual_inout)) + (f->parameters->variables[j]->type.qualifier == SLANG_QUAL_OUT || + f->parameters->variables[j]->type.qualifier == SLANG_QUAL_INOUT)) break; } if (j == num_args) @@ -777,9 +777,9 @@ GLboolean _slang_type_is_matrix(slang_type_specifier_type ty) { switch (ty) { - case slang_spec_mat2: - case slang_spec_mat3: - case slang_spec_mat4: + case SLANG_SPEC_MAT2: + case SLANG_SPEC_MAT3: + case SLANG_SPEC_MAT4: return GL_TRUE; default: return GL_FALSE; @@ -795,15 +795,15 @@ GLboolean _slang_type_is_vector(slang_type_specifier_type ty) { switch (ty) { - case slang_spec_vec2: - case slang_spec_vec3: - case slang_spec_vec4: - case slang_spec_ivec2: - case slang_spec_ivec3: - case slang_spec_ivec4: - case slang_spec_bvec2: - case slang_spec_bvec3: - case slang_spec_bvec4: + case SLANG_SPEC_VEC2: + case SLANG_SPEC_VEC3: + case SLANG_SPEC_VEC4: + case SLANG_SPEC_IVEC2: + case SLANG_SPEC_IVEC3: + case SLANG_SPEC_IVEC4: + case SLANG_SPEC_BVEC2: + case SLANG_SPEC_BVEC3: + case SLANG_SPEC_BVEC4: return GL_TRUE; default: return GL_FALSE; @@ -818,29 +818,29 @@ slang_type_specifier_type _slang_type_base(slang_type_specifier_type ty) { switch (ty) { - case slang_spec_float: - case slang_spec_vec2: - case slang_spec_vec3: - case slang_spec_vec4: - return slang_spec_float; - case slang_spec_int: - case slang_spec_ivec2: - case slang_spec_ivec3: - case slang_spec_ivec4: - return slang_spec_int; - case slang_spec_bool: - case slang_spec_bvec2: - case slang_spec_bvec3: - case slang_spec_bvec4: - return slang_spec_bool; - case slang_spec_mat2: - return slang_spec_vec2; - case slang_spec_mat3: - return slang_spec_vec3; - case slang_spec_mat4: - return slang_spec_vec4; + case SLANG_SPEC_FLOAT: + case SLANG_SPEC_VEC2: + case SLANG_SPEC_VEC3: + case SLANG_SPEC_VEC4: + return SLANG_SPEC_FLOAT; + case SLANG_SPEC_INT: + case SLANG_SPEC_IVEC2: + case SLANG_SPEC_IVEC3: + case SLANG_SPEC_IVEC4: + return SLANG_SPEC_INT; + case SLANG_SPEC_BOOL: + case SLANG_SPEC_BVEC2: + case SLANG_SPEC_BVEC3: + case SLANG_SPEC_BVEC4: + return SLANG_SPEC_BOOL; + case SLANG_SPEC_MAT2: + return SLANG_SPEC_VEC2; + case SLANG_SPEC_MAT3: + return SLANG_SPEC_VEC3; + case SLANG_SPEC_MAT4: + return SLANG_SPEC_VEC4; default: - return slang_spec_void; + return SLANG_SPEC_VOID; } } @@ -852,24 +852,24 @@ GLuint _slang_type_dim(slang_type_specifier_type ty) { switch (ty) { - case slang_spec_float: - case slang_spec_int: - case slang_spec_bool: + case SLANG_SPEC_FLOAT: + case SLANG_SPEC_INT: + case SLANG_SPEC_BOOL: return 1; - case slang_spec_vec2: - case slang_spec_ivec2: - case slang_spec_bvec2: - case slang_spec_mat2: + case SLANG_SPEC_VEC2: + case SLANG_SPEC_IVEC2: + case SLANG_SPEC_BVEC2: + case SLANG_SPEC_MAT2: return 2; - case slang_spec_vec3: - case slang_spec_ivec3: - case slang_spec_bvec3: - case slang_spec_mat3: + case SLANG_SPEC_VEC3: + case SLANG_SPEC_IVEC3: + case SLANG_SPEC_BVEC3: + case SLANG_SPEC_MAT3: return 3; - case slang_spec_vec4: - case slang_spec_ivec4: - case slang_spec_bvec4: - case slang_spec_mat4: + case SLANG_SPEC_VEC4: + case SLANG_SPEC_IVEC4: + case SLANG_SPEC_BVEC4: + case SLANG_SPEC_MAT4: return 4; default: return 0; diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 0f72fad090..3115b71e08 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -89,30 +89,30 @@ _slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *, */ typedef enum slang_type_specifier_type_ { - slang_spec_void, - slang_spec_bool, - slang_spec_bvec2, - slang_spec_bvec3, - slang_spec_bvec4, - slang_spec_int, - slang_spec_ivec2, - slang_spec_ivec3, - slang_spec_ivec4, - slang_spec_float, - slang_spec_vec2, - slang_spec_vec3, - slang_spec_vec4, - slang_spec_mat2, - slang_spec_mat3, - slang_spec_mat4, - slang_spec_sampler1D, - slang_spec_sampler2D, - slang_spec_sampler3D, - slang_spec_samplerCube, - slang_spec_sampler1DShadow, - slang_spec_sampler2DShadow, - slang_spec_struct, - slang_spec_array + SLANG_SPEC_VOID, + SLANG_SPEC_BOOL, + SLANG_SPEC_BVEC2, + SLANG_SPEC_BVEC3, + SLANG_SPEC_BVEC4, + SLANG_SPEC_INT, + SLANG_SPEC_IVEC2, + SLANG_SPEC_IVEC3, + SLANG_SPEC_IVEC4, + SLANG_SPEC_FLOAT, + SLANG_SPEC_VEC2, + SLANG_SPEC_VEC3, + SLANG_SPEC_VEC4, + SLANG_SPEC_MAT2, + SLANG_SPEC_MAT3, + SLANG_SPEC_MAT4, + SLANG_SPEC_SAMPLER1D, + SLANG_SPEC_SAMPLER2D, + SLANG_SPEC_SAMPLER3D, + SLANG_SPEC_SAMPLERCUBE, + SLANG_SPEC_SAMPLER1DSHADOW, + SLANG_SPEC_SAMPLER2DSHADOW, + SLANG_SPEC_STRUCT, + SLANG_SPEC_ARRAY } slang_type_specifier_type; -- cgit v1.2.3 From c1771918042a26c8f5f27f9e28cf1890c04d891f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Feb 2007 09:56:19 -0700 Subject: s/_slang_link2/_slang_link/ --- src/mesa/shader/shader_api.c | 2 +- src/mesa/shader/slang/slang_link.c | 12 ++++++------ src/mesa/shader/slang/slang_link.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 842960099e..c439f71f41 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -832,7 +832,7 @@ _mesa_link_program(GLcontext *ctx, GLuint program) return; } - _slang_link2(ctx, program, shProg); + _slang_link(ctx, program, shProg); } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index b1d355ff80..1af8652d54 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5.3 * - * Copyright (C) 2006 Brian Paul All Rights Reserved. + * Copyright (C) 2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,7 +23,7 @@ */ /** - * \file slang_link2.c + * \file slang_link.c * GLSL linker * \author Brian Paul */ @@ -506,9 +506,9 @@ fragment_program(struct gl_program *prog) * varying storage locations. */ void -_slang_link2(GLcontext *ctx, - GLhandleARB programObj, - struct gl_shader_program *shProg) +_slang_link(GLcontext *ctx, + GLhandleARB programObj, + struct gl_shader_program *shProg) { const struct gl_vertex_program *vertProg; const struct gl_fragment_program *fragProg; @@ -530,7 +530,7 @@ _slang_link2(GLcontext *ctx, else if (shProg->Shaders[i]->Type == GL_FRAGMENT_SHADER) fragProg = fragment_program(shProg->Shaders[i]->Programs[0]); else - _mesa_problem(ctx, "unexpected shader target in slang_link2()"); + _mesa_problem(ctx, "unexpected shader target in slang_link()"); } #if 00 if (!vertProg || !fragProg) { diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index edd4a097d5..606b9e46b1 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -29,8 +29,8 @@ extern void -_slang_link2(GLcontext *ctx, GLhandleARB h, - struct gl_shader_program *shProg); +_slang_link(GLcontext *ctx, GLhandleARB h, + struct gl_shader_program *shProg); extern void _slang_resolve_samplers(struct gl_shader_program *shProg, -- cgit v1.2.3 From 00647c39deec87cfaff6e4a694020875340fdd09 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Feb 2007 09:59:27 -0700 Subject: remove dead code --- src/mesa/shader/slang/slang_link.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 1af8652d54..23977b7c2c 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -532,23 +532,6 @@ _slang_link(GLcontext *ctx, else _mesa_problem(ctx, "unexpected shader target in slang_link()"); } -#if 00 - if (!vertProg || !fragProg) { - /* XXX is it legal to have one but not the other?? */ - /* XXX record error */ - shProg->LinkStatus = GL_FALSE; - return; - } - - /* XXX is this test used? */ - if (!vertProg->Base.Varying || !fragProg->Base.Varying) { - /* temporary */ - _mesa_problem(ctx, "vertex/fragment program lacks varying list!"); - abort(); - shProg->LinkStatus = GL_FALSE; - return; - } -#endif /* * Make copies of the vertex/fragment programs now since we'll be @@ -638,10 +621,6 @@ _slang_link(GLcontext *ctx, #endif } -#if 0 - shProg->LinkStatus = (shProg->VertexProgram && shProg->FragmentProgram); -#else shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); -#endif } -- cgit v1.2.3 From 501ee87180047dd04afc69103c31e1eae5374bf1 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 17 Feb 2007 09:15:00 -0700 Subject: Lots of changes to prog_print.c code. Mainly, allow printing programs in either ARB, NV or "debug" formats. --- src/mesa/shader/prog_print.c | 352 ++++++++++++++++++++++++++++++++++++++----- src/mesa/shader/prog_print.h | 24 ++- src/mesa/swrast/s_fragprog.c | 3 +- src/mesa/tnl/t_vp_build.c | 2 +- 4 files changed, 336 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 0adb589daa..647ade9505 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -37,11 +37,12 @@ #include "prog_statevars.h" + /** * Return string name for given program/register file. */ static const char * -program_file_string(enum register_file f) +file_string(enum register_file f, gl_prog_print_mode mode) { switch (f) { case PROGRAM_TEMPORARY: @@ -76,6 +77,213 @@ program_file_string(enum register_file f) } +/** + * Return ARB_v/f_prog-style input attrib string. + */ +static const char * +arb_input_attrib_string(GLint index, GLenum progType) +{ + const char *vertAttribs[] = { + "vertex.position", + "vertex.weight", + "vertex.normal", + "vertex.color.primary", + "vertex.color.secondary", + "vertex.fogcoord", + "vertex.(six)", + "vertex.(seven)", + "vertex.texcoord[0]", + "vertex.texcoord[1]", + "vertex.texcoord[2]", + "vertex.texcoord[3]", + "vertex.texcoord[4]", + "vertex.texcoord[5]", + "vertex.texcoord[6]", + "vertex.texcoord[7]" + }; + const char *fragAttribs[] = { + "fragment.position", + "fragment.color.primary", + "fragment.color.secondary", + "fragment.fogcoord", + "fragment.texcoord[0]", + "fragment.texcoord[1]", + "fragment.texcoord[2]", + "fragment.texcoord[3]", + "fragment.texcoord[4]", + "fragment.texcoord[5]", + "fragment.texcoord[6]", + "fragment.texcoord[7]", + "fragment.varying[0]", + "fragment.varying[1]", + "fragment.varying[2]", + "fragment.varying[3]", + "fragment.varying[4]", + "fragment.varying[5]", + "fragment.varying[6]", + "fragment.varying[7]" + }; + + if (progType == GL_VERTEX_PROGRAM_ARB) { + assert(index < sizeof(vertAttribs) / sizeof(vertAttribs[0])); + return vertAttribs[index]; + } + else { + assert(index < sizeof(fragAttribs) / sizeof(fragAttribs[0])); + return fragAttribs[index]; + } +} + + +/** + * Return ARB_v/f_prog-style output attrib string. + */ +static const char * +arb_output_attrib_string(GLint index, GLenum progType) +{ + const char *vertResults[] = { + "result.position", + "result.color.primary", + "result.color.secondary", + "result.fogcoord", + "result.texcoord[0]", + "result.texcoord[1]", + "result.texcoord[2]", + "result.texcoord[3]", + "result.texcoord[4]", + "result.texcoord[5]", + "result.texcoord[6]", + "result.texcoord[7]", + "result.varying[0]", + "result.varying[1]", + "result.varying[2]", + "result.varying[3]", + "result.varying[4]", + "result.varying[5]", + "result.varying[6]", + "result.varying[7]" + }; + const char *fragResults[] = { + "result.color", + "result.depth" + }; + + if (progType == GL_VERTEX_PROGRAM_ARB) { + assert(index < sizeof(vertResults) / sizeof(vertResults[0])); + return vertResults[index]; + } + else { + assert(index < sizeof(fragResults) / sizeof(fragResults[0])); + return fragResults[index]; + } +} + + +/** + * Return string representation of the given register. + * Note that some types of registers (like PROGRAM_UNIFORM) aren't defined + * by the ARB/NV program languages so we've taken some liberties here. + * \param file the register file (PROGRAM_INPUT, PROGRAM_TEMPORARY, etc) + * \param index number of the register in the register file + * \param mode the output format/mode/style + * \param prog pointer to containing program + */ +static const char * +reg_string(enum register_file f, GLint index, gl_prog_print_mode mode, + const struct gl_program *prog) +{ + static char str[100]; + + str[0] = 0; + + switch (mode) { + case PROG_PRINT_DEBUG: + sprintf(str, "%s[%d]", file_string(f, mode), index); + break; + + case PROG_PRINT_ARB: + switch (f) { + case PROGRAM_INPUT: + sprintf(str, "%s", arb_input_attrib_string(index, prog->Target)); + break; + case PROGRAM_OUTPUT: + sprintf(str, "%s", arb_output_attrib_string(index, prog->Target)); + break; + case PROGRAM_TEMPORARY: + sprintf(str, "temp%d", index); + break; + case PROGRAM_ENV_PARAM: + sprintf(str, "program.env[%d]", index); + break; + case PROGRAM_LOCAL_PARAM: + sprintf(str, "program.local[%d]", index); + break; + case PROGRAM_VARYING: /* extension */ + sprintf(str, "varying[%d]", index); + break; + case PROGRAM_CONSTANT: /* extension */ + sprintf(str, "constant[%d]", index); + break; + case PROGRAM_UNIFORM: /* extension */ + sprintf(str, "uniform[%d]", index); + break; + case PROGRAM_STATE_VAR: + { + struct gl_program_parameter *param + = prog->Parameters->Parameters + index; + sprintf(str, _mesa_program_state_string(param->StateIndexes)); + } + break; + case PROGRAM_ADDRESS: + sprintf(str, "A%d", index); + break; + default: + _mesa_problem(NULL, "bad file in reg_string()"); + } + break; + + case PROG_PRINT_NV: + switch (f) { + case PROGRAM_INPUT: + if (prog->Target == GL_VERTEX_PROGRAM_ARB) + sprintf(str, "v[%d]", index); + else + sprintf(str, "f[%d]", index); + break; + case PROGRAM_OUTPUT: + sprintf(str, "o[%d]", index); + break; + case PROGRAM_TEMPORARY: + sprintf(str, "R%d", index); + break; + case PROGRAM_ENV_PARAM: + sprintf(str, "c[%d]", index); + break; + case PROGRAM_VARYING: /* extension */ + sprintf(str, "varying[%d]", index); + break; + case PROGRAM_UNIFORM: /* extension */ + sprintf(str, "uniform[%d]", index); + break; + case PROGRAM_CONSTANT: /* extension */ + sprintf(str, "constant[%d]", index); + break; + case PROGRAM_STATE_VAR: /* extension */ + sprintf(str, "state[%d]", index); + break; + default: + _mesa_problem(NULL, "bad file in reg_string()"); + } + break; + + default: + _mesa_problem(NULL, "bad mode in reg_string()"); + } + + return str; +} + + /** * Return a string representation of the given swizzle word. * If extended is true, use extended (comma-separated) format. @@ -172,22 +380,38 @@ condcode_string(GLuint condcode) static void -print_dst_reg(const struct prog_dst_register *dstReg) +print_dst_reg(const struct prog_dst_register *dstReg, gl_prog_print_mode mode, + const struct gl_program *prog) { - _mesa_printf(" %s[%d]%s", - program_file_string((enum register_file) dstReg->File), + _mesa_printf("%s%s", + reg_string((enum register_file) dstReg->File, + dstReg->Index, mode, prog), + writemask_string(dstReg->WriteMask)); + +#if 0 + _mesa_printf("%s[%d]%s", + file_string((enum register_file) dstReg->File, mode), dstReg->Index, writemask_string(dstReg->WriteMask)); +#endif } static void -print_src_reg(const struct prog_src_register *srcReg) +print_src_reg(const struct prog_src_register *srcReg, gl_prog_print_mode mode, + const struct gl_program *prog) { + _mesa_printf("%s%s", + reg_string((enum register_file) srcReg->File, + srcReg->Index, mode, prog), + swizzle_string(srcReg->Swizzle, + srcReg->NegateBase, GL_FALSE)); +#if 0 _mesa_printf("%s[%d]%s", - program_file_string((enum register_file) srcReg->File), + file_string((enum register_file) srcReg->File, mode), srcReg->Index, swizzle_string(srcReg->Swizzle, srcReg->NegateBase, GL_FALSE)); +#endif } static void @@ -200,10 +424,11 @@ print_comment(const struct prog_instruction *inst) } -void -_mesa_print_alu_instruction(const struct prog_instruction *inst, - const char *opcode_string, - GLuint numRegs) +static void +print_alu_instruction(const struct prog_instruction *inst, + const char *opcode_string, GLuint numRegs, + gl_prog_print_mode mode, + const struct gl_program *prog) { GLuint j; @@ -215,8 +440,9 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, if (inst->SaturateMode == SATURATE_ZERO_ONE) _mesa_printf("_SAT"); + _mesa_printf(" "); if (inst->DstReg.File != PROGRAM_UNDEFINED) { - print_dst_reg(&inst->DstReg); + print_dst_reg(&inst->DstReg, mode, prog); } else { _mesa_printf(" ???"); @@ -226,7 +452,7 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, _mesa_printf(", "); for (j = 0; j < numRegs; j++) { - print_src_reg(inst->SrcReg + j); + print_src_reg(inst->SrcReg + j, mode, prog); if (j + 1 < numRegs) _mesa_printf(", "); } @@ -235,11 +461,21 @@ _mesa_print_alu_instruction(const struct prog_instruction *inst, } +void +_mesa_print_instruction(const struct prog_instruction *inst) +{ + /* note: 4th param should be ignored for PROG_PRINT_DEBUG */ + _mesa_print_instruction_opt(inst, 0, PROG_PRINT_DEBUG, NULL); +} + + /** * Print a single vertex/fragment program instruction. */ GLint -_mesa_print_instruction(const struct prog_instruction *inst, GLint indent) +_mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, + gl_prog_print_mode mode, + const struct gl_program *prog) { GLuint i; @@ -260,7 +496,8 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { _mesa_printf(", "); _mesa_printf("%s[%d]%s", - program_file_string((enum register_file) inst->SrcReg[0].File), + file_string((enum register_file) inst->SrcReg[0].File, + mode), inst->SrcReg[0].Index, swizzle_string(inst->SrcReg[0].Swizzle, inst->SrcReg[0].NegateBase, GL_FALSE)); @@ -273,9 +510,11 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) _mesa_printf("SWZ"); if (inst->SaturateMode == SATURATE_ZERO_ONE) _mesa_printf("_SAT"); - print_dst_reg(&inst->DstReg); + _mesa_printf(" "); + print_dst_reg(&inst->DstReg, mode, prog); _mesa_printf("%s[%d], %s", - program_file_string((enum register_file) inst->SrcReg[0].File), + file_string((enum register_file) inst->SrcReg[0].File, + mode), inst->SrcReg[0].Index, swizzle_string(inst->SrcReg[0].Swizzle, inst->SrcReg[0].NegateBase, GL_TRUE)); @@ -287,9 +526,10 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) _mesa_printf("%s", _mesa_opcode_string(inst->Opcode)); if (inst->SaturateMode == SATURATE_ZERO_ONE) _mesa_printf("_SAT"); - print_dst_reg(&inst->DstReg); + _mesa_printf(" "); + print_dst_reg(&inst->DstReg, mode, prog); _mesa_printf(", "); - print_src_reg(&inst->SrcReg[0]); + print_src_reg(&inst->SrcReg[0], mode, prog); _mesa_printf(", texture[%d], ", inst->TexSrcUnit); switch (inst->TexSrcTarget) { case TEXTURE_1D_INDEX: _mesa_printf("1D"); break; @@ -304,7 +544,7 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) break; case OPCODE_ARL: _mesa_printf("ARL addr.x, "); - print_src_reg(&inst->SrcReg[0]); + print_src_reg(&inst->SrcReg[0], mode, prog); print_comment(inst); break; case OPCODE_BRA: @@ -319,49 +559,48 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) print_comment(inst); break; case OPCODE_IF: - _mesa_printf("IF (%s%s) (if false, goto %d)", + _mesa_printf("IF (%s%s); # (if false, goto %d)", condcode_string(inst->DstReg.CondMask), swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); print_comment(inst); return indent + 3; case OPCODE_ELSE: - _mesa_printf("ELSE (goto %d)\n", inst->BranchTarget); + _mesa_printf("ELSE; # (goto %d)\n", inst->BranchTarget); return indent + 3; case OPCODE_ENDIF: - _mesa_printf("ENDIF\n"); + _mesa_printf("ENDIF;\n"); break; case OPCODE_BGNLOOP: - _mesa_printf("BGNLOOP (end at %d)\n", inst->BranchTarget); + _mesa_printf("BGNLOOP; # (end at %d)\n", inst->BranchTarget); return indent + 3; case OPCODE_ENDLOOP: - _mesa_printf("ENDLOOP (goto %d)\n", inst->BranchTarget); + _mesa_printf("ENDLOOP; # (goto %d)\n", inst->BranchTarget); break; case OPCODE_BRK: - _mesa_printf("BRK (%s%s) (goto %d)", + _mesa_printf("BRK (%s%s); #(goto %d)", condcode_string(inst->DstReg.CondMask), swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); print_comment(inst); break; case OPCODE_CONT: - _mesa_printf("CONT (%s%s) (goto %d)", + _mesa_printf("CONT (%s%s); #(goto %d)", condcode_string(inst->DstReg.CondMask), swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); print_comment(inst); break; case OPCODE_BGNSUB: - _mesa_printf("SUB;\n"); + _mesa_printf("SUB"); print_comment(inst); return indent + 3; case OPCODE_ENDSUB: - _mesa_printf("ENDSUB;\n"); + _mesa_printf("ENDSUB"); print_comment(inst); break; case OPCODE_END: - _mesa_printf("END"); - print_comment(inst); + _mesa_printf("END\n"); break; case OPCODE_NOP: _mesa_printf("NOP"); @@ -370,9 +609,10 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) /* XXX may need other special-case instructions */ default: /* typical alu instruction */ - _mesa_print_alu_instruction(inst, - _mesa_opcode_string(inst->Opcode), - _mesa_num_inst_src_regs(inst->Opcode)); + print_alu_instruction(inst, + _mesa_opcode_string(inst->Opcode), + _mesa_num_inst_src_regs(inst->Opcode), + mode, prog); break; } return indent; @@ -380,16 +620,50 @@ _mesa_print_instruction(const struct prog_instruction *inst, GLint indent) /** - * Print a vertx/fragment program to stdout. - * XXX this function could be greatly improved. + * Print program to stdout, default options. */ void _mesa_print_program(const struct gl_program *prog) +{ + _mesa_print_program_opt(prog, PROG_PRINT_ARB, GL_TRUE); +} + + +/** + * Print program, with options. + */ +void +_mesa_print_program_opt(const struct gl_program *prog, + gl_prog_print_mode mode, + GLboolean lineNumbers) { GLuint i, indent = 0; + + switch (prog->Target) { + case GL_VERTEX_PROGRAM_ARB: + if (mode == PROG_PRINT_ARB) + _mesa_printf("!!ARBvp1.0\n"); + else if (mode == PROG_PRINT_NV) + _mesa_printf("!!VP1.0\n"); + else + _mesa_printf("# Vertex Program/Shader\n"); + break; + case GL_FRAGMENT_PROGRAM_ARB: + case GL_FRAGMENT_PROGRAM_NV: + if (mode == PROG_PRINT_ARB) + _mesa_printf("!!ARBfp1.0\n"); + else if (mode == PROG_PRINT_NV) + _mesa_printf("!!FP1.0\n"); + else + _mesa_printf("# Fragment Program/Shader\n"); + break; + } + for (i = 0; i < prog->NumInstructions; i++) { - _mesa_printf("%3d: ", i); - indent = _mesa_print_instruction(prog->Instructions + i, indent); + if (lineNumbers) + _mesa_printf("%3d: ", i); + indent = _mesa_print_instruction_opt(prog->Instructions + i, + indent, mode, prog); } } @@ -424,14 +698,16 @@ _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog) void _mesa_print_parameter_list(const struct gl_program_parameter_list *list) { + const gl_prog_print_mode mode = PROG_PRINT_DEBUG; GLuint i; + _mesa_printf("param list %p\n", (void *) list); for (i = 0; i < list->NumParameters; i++){ struct gl_program_parameter *param = list->Parameters + i; const GLfloat *v = list->ParameterValues[i]; _mesa_printf("param[%d] sz=%d %s %s = {%.3g, %.3g, %.3g, %.3g};\n", i, param->Size, - program_file_string(list->Parameters[i].Type), + file_string(list->Parameters[i].Type, mode), param->Name, v[0], v[1], v[2], v[3]); } } diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h index 19aaa53800..79c599f5a7 100644 --- a/src/mesa/shader/prog_print.h +++ b/src/mesa/shader/prog_print.h @@ -27,17 +27,31 @@ #define PROG_PRINT_H -extern GLint -_mesa_print_instruction(const struct prog_instruction *inst, GLint indent); +/** + * The output style to use when printing programs. + */ +typedef enum { + PROG_PRINT_ARB, + PROG_PRINT_NV, + PROG_PRINT_DEBUG +} gl_prog_print_mode; + extern void -_mesa_print_alu_instruction(const struct prog_instruction *inst, - const char *opcode_string, - GLuint numRegs); +_mesa_print_instruction(const struct prog_instruction *inst); + +extern GLint +_mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, + gl_prog_print_mode mode, + const struct gl_program *prog); extern void _mesa_print_program(const struct gl_program *prog); +extern void +_mesa_print_program_opt(const struct gl_program *prog, gl_prog_print_mode mode, + GLboolean lineNumbers); + extern void _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog); diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index fe41c0b5f4..89907f73c6 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -554,6 +554,7 @@ init_machine_deriv( GLcontext *ctx, _mesa_memcpy(dMachine, machine, sizeof(struct fp_machine)); if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { + /* XXX also need to do this when using valgrind */ /* Clear temporary registers (undefined for ARB_f_p) */ _mesa_bzero( (void*) machine->Temporaries, MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); @@ -665,7 +666,7 @@ execute_program( GLcontext *ctx, } if (DEBUG_FRAG) { - _mesa_print_instruction(inst, 0); + _mesa_print_instruction(inst); } switch (inst->Opcode) { diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 6fb14e7caa..47fed32904 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -497,7 +497,7 @@ static void debug_insn( struct prog_instruction *inst, const char *fn, } _mesa_printf("%d:\t", line); - _mesa_print_instruction(inst, 0); + _mesa_print_instruction(inst); } } -- cgit v1.2.3 From cc153541a2cd83ef7249a0173da4a381b099e0e4 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 17 Feb 2007 09:15:39 -0700 Subject: stand-alone GLSL compiler --- src/mesa/drivers/glslcompiler/Makefile | 44 ++++ src/mesa/drivers/glslcompiler/glslcompiler | Bin 0 -> 15243624 bytes src/mesa/drivers/glslcompiler/glslcompiler.c | 353 +++++++++++++++++++++++++++ 3 files changed, 397 insertions(+) create mode 100644 src/mesa/drivers/glslcompiler/Makefile create mode 100755 src/mesa/drivers/glslcompiler/glslcompiler create mode 100644 src/mesa/drivers/glslcompiler/glslcompiler.c (limited to 'src') diff --git a/src/mesa/drivers/glslcompiler/Makefile b/src/mesa/drivers/glslcompiler/Makefile new file mode 100644 index 0000000000..858457ddd4 --- /dev/null +++ b/src/mesa/drivers/glslcompiler/Makefile @@ -0,0 +1,44 @@ +# Makefile for stand-alone GL-SL compiler + +TOP = ../../../.. + +include $(TOP)/configs/current + + +PROGRAM = glslcompiler + +OBJECTS = \ + glslcompiler.o \ + ../../glapi/glapi.o \ + ../../glapi/glthread.o \ + ../../main/dispatch.o \ + ../common/driverfuncs.o \ + ../../libmesa.a + +INCLUDES = \ + -I$(TOP)/include \ + -I$(TOP)/include/GL/internal \ + -I$(TOP)/src/mesa \ + -I$(TOP)/src/mesa/main \ + -I$(TOP)/src/mesa/glapi \ + -I$(TOP)/src/mesa/math \ + -I$(TOP)/src/mesa/transform \ + -I$(TOP)/src/mesa/shader \ + -I$(TOP)/src/mesa/swrast \ + -I$(TOP)/src/mesa/swrast_setup \ + + +default: $(PROGRAM) + $(INSTALL) $(PROGRAM) $(TOP)/bin + + +glslcompiler: $(OBJECTS) + $(CC) $(OBJECTS) -lm -lpthread -o $@ + + +glslcompiler.o: glslcompiler.c + $(CC) -c $(CFLAGS) $(INCLUDES) glslcompiler.c -o $@ + + +clean: + rm -f *.o *~ $(PROGRAM) diff --git a/src/mesa/drivers/glslcompiler/glslcompiler b/src/mesa/drivers/glslcompiler/glslcompiler new file mode 100755 index 0000000000..a9d15e8721 Binary files /dev/null and b/src/mesa/drivers/glslcompiler/glslcompiler differ diff --git a/src/mesa/drivers/glslcompiler/glslcompiler.c b/src/mesa/drivers/glslcompiler/glslcompiler.c new file mode 100644 index 0000000000..a27f749df7 --- /dev/null +++ b/src/mesa/drivers/glslcompiler/glslcompiler.c @@ -0,0 +1,353 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2007 Brian Paul, Tungsten Graphics, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \mainpage + * + * Stand-alone Shading Language compiler. + * Basically, a command-line program which accepts GLSL shaders and emits + * vertex/fragment programs (GPU instructions). + * + * This file is basically just a Mesa device driver but instead of building + * a shared library we build an executable. + * + * We can emit programs in three different formats: + * 1. ARB-style (GL_ARB_vertex/fragment_program) + * 2. NV-style (GL_NV_vertex/fragment_program) + * 3. debug-style (a slightly more sophisticated, internal format) + * + * Note that the ARB and NV program languages can't express all the + * features that might be used by a fragment program (examples being + * uniform and varying vars). So, the ARB/NV programs that are + * emitted aren't always legal programs in those languages. + */ + + +#include "imports.h" +#include "context.h" +#include "extensions.h" +#include "framebuffer.h" +#include "shaders.h" +#include "shader/shader_api.h" +#include "shader/prog_print.h" +#include "drivers/common/driverfuncs.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" +#include "swrast/swrast.h" +#include "swrast/s_context.h" +#include "swrast/s_triangle.h" +#include "swrast_setup/swrast_setup.h" + + +static const char *Prog = "glslcompiler"; + + +struct options { + GLboolean LineNumbers; + gl_prog_print_mode Mode; + const char *VertFile; + const char *FragFile; + const char *OutputFile; +}; + +static struct options Options; + + +/** + * GLSL compiler driver context. (kind of an artificial thing for now) + */ +struct compiler_context +{ + GLcontext MesaContext; + int foo; +}; + +typedef struct compiler_context CompilerContext; + + + +static void +UpdateState(GLcontext *ctx, GLuint new_state) +{ + /* easy - just propogate */ + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); +} + + + +static GLboolean +CreateContext(void) +{ + struct dd_function_table ddFuncs; + GLvisual *vis; + GLframebuffer *buf; + GLcontext *ctx; + CompilerContext *cc; + + vis = _mesa_create_visual(GL_TRUE, GL_FALSE, GL_FALSE, /* RGB */ + 8, 8, 8, 8, /* color */ + 0, 0, 0, /* z, stencil */ + 0, 0, 0, 0, 1); /* accum */ + buf = _mesa_create_framebuffer(vis); + + cc = _mesa_calloc(sizeof(*cc)); + if (!vis || !buf || !cc) { + if (vis) + _mesa_destroy_visual(vis); + if (buf) + _mesa_destroy_framebuffer(buf); + return GL_FALSE; + } + + _mesa_init_driver_functions(&ddFuncs); + ddFuncs.GetString = NULL;/*get_string;*/ + ddFuncs.UpdateState = UpdateState; + ddFuncs.GetBufferSize = NULL; + + ctx = &cc->MesaContext; + _mesa_initialize_context(ctx, vis, NULL, &ddFuncs, cc); + _mesa_enable_sw_extensions(ctx); + + if (!_swrast_CreateContext( ctx ) || + !_ac_CreateContext( ctx ) || + !_tnl_CreateContext( ctx ) || + !_swsetup_CreateContext( ctx )) { + _mesa_destroy_visual(vis); + _mesa_free_context_data(ctx); + _mesa_free(cc); + return GL_FALSE; + } + TNL_CONTEXT(ctx)->Driver.RunPipeline = _tnl_run_pipeline; + _swsetup_Wakeup( ctx ); + + _mesa_make_current(ctx, buf, buf); + + return GL_TRUE; +} + + +static void +LoadAndCompileShader(GLuint shader, const char *text) +{ + GLint stat; + _mesa_ShaderSourceARB(shader, 1, (const GLchar **) &text, NULL); + _mesa_CompileShaderARB(shader); + _mesa_GetShaderiv(shader, GL_COMPILE_STATUS, &stat); + if (!stat) { + GLchar log[1000]; + GLsizei len; + _mesa_GetShaderInfoLog(shader, 1000, &len, log); + fprintf(stderr, "%s: problem compiling shader: %s\n", Prog, log); + exit(1); + } + else { + printf("Shader compiled OK\n"); + } +} + + +/** + * Read a shader from a file. + */ +static void +ReadShader(GLuint shader, const char *filename) +{ + const int max = 100*1000; + int n; + char *buffer = (char*) malloc(max); + FILE *f = fopen(filename, "r"); + if (!f) { + fprintf(stderr, "%s: Unable to open shader file %s\n", Prog, filename); + exit(1); + } + + n = fread(buffer, 1, max, f); + /* + printf("%s: read %d bytes from shader file %s\n", Prog, n, filename); + */ + if (n > 0) { + buffer[n] = 0; + LoadAndCompileShader(shader, buffer); + } + + fclose(f); + free(buffer); +} + + +#if 0 +static void +CheckLink(GLuint prog) +{ + GLint stat; + _mesa_GetProgramiv(prog, GL_LINK_STATUS, &stat); + if (!stat) { + GLchar log[1000]; + GLsizei len; + _mesa_GetProgramInfoLog(prog, 1000, &len, log); + fprintf(stderr, "%s: Linker error:\n%s\n", Prog, log); + } + else { + fprintf(stderr, "%s: Link success!\n", Prog); + } +} +#endif + + +static void +PrintShaderInstructions(GLuint shader, FILE *f) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_shader *sh = _mesa_lookup_shader(ctx, shader); + GLuint i; + + for (i = 0; i < sh->NumPrograms; i++) { + struct gl_program *prog = sh->Programs[i]; + _mesa_print_program_opt(prog, Options.Mode, Options.LineNumbers); + } +} + + +static GLuint +CompileShader(const char *filename, GLenum type) +{ + GLuint shader; + + assert(type == GL_FRAGMENT_SHADER || + type == GL_VERTEX_SHADER); + + shader = _mesa_CreateShader(type); + ReadShader(shader, filename); + + return shader; +} + + +static void +Usage(void) +{ + printf("Mesa GLSL stand-alone compiler\n"); + printf("Usage:\n"); + printf(" --vs FILE vertex shader input filename\n"); + printf(" --fs FILE fragment shader input filename\n"); + printf(" --arb emit ARB-style instructions (the default)\n"); + printf(" --nv emit NV-style instructions\n"); + printf(" --debug emit debug-style instructions\n"); + printf(" --number, -n emit line numbers\n"); + printf(" --output, -o FILE output filename\n"); + printf(" --help display this information\n"); +} + + +static void +ParseOptions(int argc, char *argv[]) +{ + int i; + + Options.LineNumbers = GL_FALSE; + Options.Mode = PROG_PRINT_ARB; + Options.VertFile = NULL; + Options.FragFile = NULL; + Options.OutputFile = NULL; + + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "--vs") == 0) { + Options.VertFile = argv[i + 1]; + i++; + } + else if (strcmp(argv[i], "--fs") == 0) { + Options.FragFile = argv[i + 1]; + i++; + } + else if (strcmp(argv[i], "--arb") == 0) { + Options.Mode = PROG_PRINT_ARB; + } + else if (strcmp(argv[i], "--nv") == 0) { + Options.Mode = PROG_PRINT_NV; + } + else if (strcmp(argv[i], "--debug") == 0) { + Options.Mode = PROG_PRINT_DEBUG; + } + else if (strcmp(argv[i], "--number") == 0 || + strcmp(argv[i], "-n") == 0) { + Options.LineNumbers = GL_TRUE; + } + else if (strcmp(argv[i], "--output") == 0 || + strcmp(argv[i], "-o") == 0) { + Options.OutputFile = argv[i + 1]; + i++; + } + else if (strcmp(argv[i], "--help") == 0) { + Usage(); + exit(0); + } + else { + printf("Unknown option: %s\n", argv[i]); + Usage(); + exit(1); + } + } +} + + +int +main(int argc, char *argv[]) +{ + GLuint shader = 0; + + if (!CreateContext()) { + fprintf(stderr, "%s: Failed to create compiler context\n", Prog); + exit(1); + } + + ParseOptions(argc, argv); + + if (Options.VertFile) { + shader = CompileShader(Options.VertFile, GL_VERTEX_SHADER); + } + else if (Options.FragFile) { + shader = CompileShader(Options.FragFile, GL_FRAGMENT_SHADER); + } + + if (shader) { + if (Options.OutputFile) { + fclose(stdout); + /*stdout =*/ freopen(Options.OutputFile, "w", stdout); + } + if (stdout) { + PrintShaderInstructions(shader, stdout); + } + if (Options.OutputFile) { + fclose(stdout); + } + } + + return 0; +} -- cgit v1.2.3 From 9449a4d8945de684609663468b96b7ed3aa884b9 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 17 Feb 2007 09:41:59 -0700 Subject: s/PROG_PRINT_ARB/PROG_PRINT_DEBUG/ --- src/mesa/shader/prog_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 647ade9505..9560ffad7d 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -625,7 +625,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, void _mesa_print_program(const struct gl_program *prog) { - _mesa_print_program_opt(prog, PROG_PRINT_ARB, GL_TRUE); + _mesa_print_program_opt(prog, PROG_PRINT_DEBUG, GL_TRUE); } -- cgit v1.2.3 From 174c5554145a54d925444ec47f06777420e04ea1 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 08:05:29 -0700 Subject: remove accidental check-in --- src/mesa/drivers/glslcompiler/glslcompiler | Bin 15243624 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 src/mesa/drivers/glslcompiler/glslcompiler (limited to 'src') diff --git a/src/mesa/drivers/glslcompiler/glslcompiler b/src/mesa/drivers/glslcompiler/glslcompiler deleted file mode 100755 index a9d15e8721..0000000000 Binary files a/src/mesa/drivers/glslcompiler/glslcompiler and /dev/null differ -- cgit v1.2.3 From bd894c4705e214d1ddc0165e2420bf96e321305f Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 10:40:08 -0700 Subject: added SWIZZLE_XXXX, SWIZZLE_YYYY, etc --- src/mesa/shader/prog_instruction.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index 05265ce0ab..14305f17d3 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -57,6 +57,11 @@ #define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7) #define GET_BIT(msk, idx) (((msk) >> (idx)) & 0x1) +#define SWIZZLE_XXXX MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X) +#define SWIZZLE_YYYY MAKE_SWIZZLE4(SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y) +#define SWIZZLE_ZZZZ MAKE_SWIZZLE4(SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z) +#define SWIZZLE_WWWW MAKE_SWIZZLE4(SWIZZLE_W, SWIZZLE_W, SWIZZLE_W, SWIZZLE_W) + /** * Writemask values, 1 bit per component. -- cgit v1.2.3 From 48d65aabbc1e679fbf56fb7c4f7d4d702d43501a Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 14:03:10 -0700 Subject: added slang_builtin.c --- src/mesa/sources | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index b35e56abad..55c282cad9 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -167,6 +167,7 @@ SHADER_SOURCES = \ shader/shader_api.c \ SLANG_SOURCES = \ + shader/slang/slang_builtin.c \ shader/slang/slang_codegen.c \ shader/slang/slang_compile.c \ shader/slang/slang_compile_function.c \ -- cgit v1.2.3 From 243c2dd7469fb3e6af7206b1a6e60bfe6134fb71 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 14:03:43 -0700 Subject: implement support for pre-defined uniform structs (state vars) --- src/mesa/shader/slang/slang_builtin.c | 232 ++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_builtin.h | 45 +++++++ src/mesa/shader/slang/slang_codegen.c | 80 +++--------- src/mesa/shader/slang/slang_emit.c | 34 +++++ 4 files changed, 327 insertions(+), 64 deletions(-) create mode 100644 src/mesa/shader/slang/slang_builtin.c create mode 100644 src/mesa/shader/slang/slang_builtin.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c new file mode 100644 index 0000000000..a92efa875b --- /dev/null +++ b/src/mesa/shader/slang/slang_builtin.c @@ -0,0 +1,232 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file slang_builtin.c + * Resolve built-in uniform vars. + * \author Brian Paul + */ + +#include "imports.h" +#include "macros.h" +#include "slang_builtin.h" +#include "slang_typeinfo.h" +#include "slang_codegen.h" +#include "slang_compile.h" +#include "slang_ir.h" +#include "mtypes.h" +#include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_statevars.h" +#include "slang_print.h" + + + +/** + * XXX we might consider moving much of this into the prog_statevars.c file + */ + + +/** + * Determine if 'name' is a state variable (pre-defined uniform). + * If so, create a new program parameter for it, and return the + * param's index. + * + * \param swizzleOut returns the swizzle needed to access 'float' values + * \return the state value's position in the parameter list, or -1 if error + */ +GLint +_slang_lookup_statevar(const char *name, GLint index, + struct gl_program_parameter_list *paramList, + GLuint *swizzleOut) +{ + struct state_info { + const char *Name; + const GLuint NumRows; /** for matrices */ + const GLuint Swizzle; + const GLint Indexes[STATE_LENGTH]; + }; + static const struct state_info state[] = { + { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, + { "gl_NormalMatrix", 3, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, + { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, 0 } }, + { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_MVP, 0, 0, 0, 0 } }, + { "gl_TextureMatrix", 4, SWIZZLE_NOOP, + { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, 0 } }, + { "gl_NormalScale", 1, SWIZZLE_NOOP, + { STATE_INTERNAL, STATE_NORMAL_SCALE, 0, 0, 0, 0} }, + + /* For aggregate/structs we need entries for both the base name + * and base.field. + */ + { "gl_DepthRange", 1, SWIZZLE_NOOP, + { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, + { "gl_DepthRange.near", 1, SWIZZLE_XXXX, + { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, + { "gl_DepthRange.far", 1, SWIZZLE_YYYY, + { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, + { "gl_DepthRange.diff", 1, SWIZZLE_ZZZZ, + { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, + + { "gl_Point", 1, SWIZZLE_NOOP, + { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, + { "gl_Point.size", 1, SWIZZLE_XXXX, + { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, + { "gl_Point.sizeMin", 1, SWIZZLE_YYYY, + { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, + { "gl_Point.sizeMax", 1, SWIZZLE_ZZZZ, + { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, + { "gl_Point.fadeThresholdSize", 1, SWIZZLE_WWWW, + { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, + { "gl_Point.distanceConstantAttenuation", 1, SWIZZLE_XXXX, + { STATE_POINT_ATTENUATION, 0, 0, 0, 0, 0 } }, + { "gl_Point.distanceLinearAttenuation", 1, SWIZZLE_YYYY, + { STATE_POINT_ATTENUATION, 0, 0, 0, 0, 0 } }, + { "gl_Point.distanceQuadraticAttenuation", 1, SWIZZLE_ZZZZ, + { STATE_POINT_ATTENUATION, 0, 0, 0, 0, 0 } }, + + { "gl_FrontMaterial", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 0, STATE_EMISSION, 0, 0, 0 } }, + { "gl_FrontMaterial.emission", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 0, STATE_EMISSION, 0, 0, 0 } }, + { "gl_FrontMaterial.ambient", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 0, STATE_AMBIENT, 0, 0, 0 } }, + { "gl_FrontMaterial.diffuse", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 0, STATE_DIFFUSE, 0, 0, 0 } }, + { "gl_FrontMaterial.specular", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 0, STATE_SPECULAR, 0, 0, 0 } }, + { "gl_FrontMaterial.shininess", 1, SWIZZLE_XXXX, + { STATE_MATERIAL, 0, STATE_SHININESS, 0, 0, 0 } }, + + { "gl_BackMaterial", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 1, STATE_EMISSION, 0, 0, 0 } }, + { "gl_BackMaterial.emission", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 1, STATE_EMISSION, 0, 0, 0 } }, + { "gl_BackMaterial.ambient", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 1, STATE_AMBIENT, 0, 0, 0 } }, + { "gl_BackMaterial.diffuse", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 1, STATE_DIFFUSE, 0, 0, 0 } }, + { "gl_BackMaterial.specular", 1, SWIZZLE_NOOP, + { STATE_MATERIAL, 1, STATE_SPECULAR, 0, 0, 0 } }, + { "gl_BackMaterial.shininess", 1, SWIZZLE_XXXX, + { STATE_MATERIAL, 1, STATE_SHININESS, 0, 0, 0 } }, + + { "gl_LightModel", 1, SWIZZLE_NOOP, + { STATE_LIGHTMODEL_AMBIENT, 0, 0, 0, 0, 0 } }, + { "gl_LightModel.ambient", 1, SWIZZLE_NOOP, + { STATE_LIGHTMODEL_AMBIENT, 0, 0, 0, 0, 0 } }, + + { "gl_FrontLightModelProduct", 1, SWIZZLE_NOOP, + { STATE_LIGHTMODEL_SCENECOLOR, 0, 0, 0, 0, 0 } }, + { "gl_FrontLightModelProduct.sceneColor", 1, SWIZZLE_NOOP, + { STATE_LIGHTMODEL_SCENECOLOR, 0, 0, 0, 0, 0 } }, + + { "gl_BackLightModelProduct", 1, SWIZZLE_NOOP, + { STATE_LIGHTMODEL_SCENECOLOR, 1, 0, 0, 0, 0 } }, + { "gl_BackLightModelProduct.sceneColor", 1, SWIZZLE_NOOP, + { STATE_LIGHTMODEL_SCENECOLOR, 1, 0, 0, 0, 0 } }, + + { "gl_Fog", 1, SWIZZLE_NOOP, + { STATE_FOG_COLOR, 0, 0, 0, 0, 0 } }, + { "gl_Fog.color", 1, SWIZZLE_NOOP, + { STATE_FOG_COLOR, 0, 0, 0, 0, 0 } }, + { "gl_Fog.density", 1, SWIZZLE_XXXX, + { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { "gl_Fog.start", 1, SWIZZLE_YYYY, + { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { "gl_Fog.end", 1, SWIZZLE_ZZZZ, + { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { "gl_Fog.scale", 1, SWIZZLE_WWWW, + { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + + + { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } + }; + GLuint i; + + for (i = 0; state[i].Name; i++) { + if (strcmp(state[i].Name, name) == 0) { + /* found */ + *swizzleOut = state[i].Swizzle; + if (paramList) { + if (state[i].NumRows > 1) { + /* a matrix */ + GLuint j; + GLint pos[4], indexesCopy[STATE_LENGTH]; + /* make copy of state tokens */ + for (j = 0; j < STATE_LENGTH; j++) + indexesCopy[j] = state[i].Indexes[j]; + /* load rows */ + for (j = 0; j < state[i].NumRows; j++) { + indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ + pos[j] = _mesa_add_state_reference(paramList, indexesCopy); + assert(pos[j] >= 0); + } + return pos[0]; + } + else { + /* non-matrix state */ + GLint pos + = _mesa_add_state_reference(paramList, state[i].Indexes); + assert(pos >= 0); + return pos; + } + } + } + } + return -1; +} + + +GLint +_slang_lookup_statevar_field(const char *base, const char *field, + struct gl_program_parameter_list *paramList, + GLuint *swizzleOut) +{ + GLint pos = -1; + const GLint len = _mesa_strlen(base) + + _mesa_strlen(field) + 2; + char *name = (char *) _mesa_malloc(len); + + if (!name) + return -1; + + _mesa_strcpy(name, base); + /*_mesa_*/strcat(name, "."); + /*_mesa_*/strcat(name, field); + printf("FULL NAME: %s\n", name); + + pos = _slang_lookup_statevar(name, 0, paramList, swizzleOut); + + _mesa_free(name); + + return pos; +} + + diff --git a/src/mesa/shader/slang/slang_builtin.h b/src/mesa/shader/slang/slang_builtin.h new file mode 100644 index 0000000000..a521e73eb9 --- /dev/null +++ b/src/mesa/shader/slang/slang_builtin.h @@ -0,0 +1,45 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef SLANG_BUILTIN_H +#define SLANG_BUILTIN_H + +#include "prog_parameter.h" +#include "slang_utility.h" + + +extern GLint +_slang_lookup_statevar(const char *name, GLint index, + struct gl_program_parameter_list *paramList, + GLuint *swizzleOut); + + +extern GLint +_slang_lookup_statevar_field(const char *base, const char *field, + struct gl_program_parameter_list *paramList, + GLuint *swizzleOut); + + +#endif /* SLANG_BUILTIN_H */ diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a36a2d7bc9..4088720fdb 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -31,6 +31,7 @@ #include "imports.h" #include "macros.h" #include "slang_typeinfo.h" +#include "slang_builtin.h" #include "slang_codegen.h" #include "slang_compile.h" #include "slang_storage.h" @@ -76,68 +77,6 @@ slang_lookup_constant(const char *name, } -/** - * Determine if 'name' is a state variable. If so, create a new program - * parameter for it, and return the param's index. Else, return -1. - */ -static GLint -slang_lookup_statevar(const char *name, GLint index, - struct gl_program_parameter_list *paramList) -{ - struct state_info { - const char *Name; - const GLuint NumRows; /** for matrices */ - const GLuint Swizzle; - const GLint Indexes[STATE_LENGTH]; - }; - static const struct state_info state[] = { - { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, - { "gl_NormalMatrix", 3, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, - { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, 0 } }, - { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MVP, 0, 0, 0, 0 } }, - { "gl_TextureMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, 0 } }, - { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } - }; - GLuint i; - - for (i = 0; state[i].Name; i++) { - if (strcmp(state[i].Name, name) == 0) { - /* found */ - if (paramList) { - if (state[i].NumRows > 1) { - /* a matrix */ - GLuint j; - GLint pos[4], indexesCopy[STATE_LENGTH]; - /* make copy of state tokens */ - for (j = 0; j < STATE_LENGTH; j++) - indexesCopy[j] = state[i].Indexes[j]; - /* load rows */ - for (j = 0; j < state[i].NumRows; j++) { - indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ - pos[j] = _mesa_add_state_reference(paramList, indexesCopy); - assert(pos[j] >= 0); - } - return pos[0]; - } - else { - /* non-matrix state */ - GLint pos - = _mesa_add_state_reference(paramList, state[i].Indexes); - assert(pos >= 0); - return pos; - } - } - } - } - return -1; -} - - static GLboolean is_sampler_type(const slang_fully_specified_type *t) { @@ -270,7 +209,8 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) * used to avoid wasting registers. */ if (n->Store->File == PROGRAM_STATE_VAR) { - GLint i = slang_lookup_statevar(varName, 0, prog->Parameters); + GLint i = _slang_lookup_statevar(varName, 0, prog->Parameters, + &n->Store->Swizzle); assert(i >= 0); n->Store->Index = i; } @@ -2241,8 +2181,20 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) /* the field is a structure member (base.field) */ /* oper->children[0] is the base */ /* oper->a_id is the field name */ + slang_ir_node *base, *n; + + base = _slang_gen_operation(A, &oper->children[0]); + + n = new_node1(IR_FIELD, base); + if (n) { + n->Target = (char *) oper->a_id; + } + return n; + +#if 0 _mesa_problem(NULL, "glsl structs/fields not supported yet"); return NULL; +#endif } } @@ -2644,7 +2596,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, GLboolean success = GL_TRUE; GLint texIndex; slang_ir_storage *store = NULL; - int dbg = 0; + int dbg = 1; texIndex = sampler_to_texture_index(var->type.specifier.type); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 955f428b95..67cf9c32d4 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -35,6 +35,7 @@ #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" +#include "slang_builtin.h" #include "slang_emit.h" #include "slang_error.h" @@ -1307,6 +1308,36 @@ emit_swizzle(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +/** + * Resolve storage for accessing a structure field. + */ +static struct prog_instruction * +emit_field(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +{ + /* field of a struct */ + if (n->Children[0]->Store->File == PROGRAM_STATE_VAR) { + /* state variable sub-field */ + GLint pos; + GLuint swizzle; + pos = _slang_lookup_statevar_field((char *) n->Children[0]->Var->a_name, + n->Target, + prog->Parameters, &swizzle); + if (pos < 0) { + RETURN_ERROR2("Undefined structure member", n->Target, 0); + } + + n->Store = _slang_new_ir_storage(PROGRAM_STATE_VAR, pos, 4);/*XXX size*/ + if (n->Store) + n->Store->Swizzle = swizzle; + } + + /* + _mesa_problem(NULL, "glsl structs/fields not supported yet"); + */ + return NULL; +} + + static struct prog_instruction * emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { @@ -1391,6 +1422,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } return NULL; /* no instruction */ + case IR_FIELD: + return emit_field(vt, n, prog); + case IR_SWIZZLE: return emit_swizzle(vt, n, prog); -- cgit v1.2.3 From 361b60678e7d2c005593c289baf3263a1a461bf5 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 15:20:46 -0700 Subject: forgot to return length in parse_array_len() --- src/mesa/shader/slang/slang_compile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index f7aa297bfa..86699b7cdb 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -360,6 +360,8 @@ parse_array_len(slang_parse_ctx * C, slang_output_ctx * O, GLuint * len) _slang_simplify(&array_size, &space, C->atoms); result = (array_size.type == SLANG_OPER_LITERAL_INT); + *len = (GLint) array_size.literal[0]; + slang_operation_destruct(&array_size); return result; } -- cgit v1.2.3 From 10f42ddb9ea75fcce05d5777e8c64cdf42152ff2 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 15:22:38 -0700 Subject: work on struct/array handling --- src/mesa/shader/slang/slang_codegen.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 4088720fdb..a23d4e16d0 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -94,20 +94,11 @@ is_sampler_type(const slang_fully_specified_type *t) } -static GLuint -_slang_sizeof_struct(const slang_struct *s) -{ - /* XXX TBD */ - return 0; -} - - GLuint _slang_sizeof_type_specifier(const slang_type_specifier *spec) { switch (spec->type) { case SLANG_SPEC_VOID: - abort(); return 0; case SLANG_SPEC_BOOL: return 1; @@ -147,11 +138,22 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) case SLANG_SPEC_SAMPLER2DSHADOW: return 1; /* special case */ case SLANG_SPEC_STRUCT: - return _slang_sizeof_struct(spec->_struct); + { + GLuint sum = 0, i; + for (i = 0; i < spec->_struct->fields->num_variables; i++) { + slang_variable *v = spec->_struct->fields->variables[i]; + GLuint sz = _slang_sizeof_type_specifier(&v->type.specifier); + /* XXX verify padding */ + if (sz < 4) + sz = 4; + sum += sz; + } + return sum; + } case SLANG_SPEC_ARRAY: - return 1; /* XXX */ + return _slang_sizeof_type_specifier(spec->_array); default: - abort(); + _mesa_problem(NULL, "Unexpected type in _slang_sizeof_type_specifier()"); return 0; } return 0; @@ -2612,7 +2614,8 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } else if (var->type.qualifier == SLANG_QUAL_UNIFORM) { /* Uniform variable */ - const GLint size = _slang_sizeof_type_specifier(&var->type.specifier); + const GLint size = _slang_sizeof_type_specifier(&var->type.specifier) + * MAX2(var->array_len, 1); if (prog) { /* user-defined uniform */ GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, size); @@ -2625,7 +2628,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, */ store = _slang_new_ir_storage(PROGRAM_STATE_VAR, -1, size); } - if (dbg) printf("UNIFORM "); + if (dbg) printf("UNIFORM (sz %d) ", size); } else if (var->type.qualifier == SLANG_QUAL_VARYING) { const GLint size = 4; /* XXX fix */ -- cgit v1.2.3 From 760c114b24fd679bb5c5d386c5935f53ef03e8e5 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 16:56:49 -0700 Subject: alloc IR_FIELD's Storage in codegen, like IR_ELEMENT --- src/mesa/shader/slang/slang_codegen.c | 4 ++++ src/mesa/shader/slang/slang_emit.c | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a23d4e16d0..789ab8a50b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2184,12 +2184,16 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) /* oper->children[0] is the base */ /* oper->a_id is the field name */ slang_ir_node *base, *n; + GLint size = 4; /* XXX fix? */ base = _slang_gen_operation(A, &oper->children[0]); n = new_node1(IR_FIELD, base); if (n) { n->Target = (char *) oper->a_id; + n->Store = _slang_new_ir_storage(base->Store->File, + base->Store->Index, + size); } return n; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 67cf9c32d4..c174f7b6b4 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1319,16 +1319,17 @@ emit_field(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* state variable sub-field */ GLint pos; GLuint swizzle; + assert(n->Children[0]->Opcode == IR_VAR); pos = _slang_lookup_statevar_field((char *) n->Children[0]->Var->a_name, n->Target, prog->Parameters, &swizzle); if (pos < 0) { RETURN_ERROR2("Undefined structure member", n->Target, 0); } - - n->Store = _slang_new_ir_storage(PROGRAM_STATE_VAR, pos, 4);/*XXX size*/ - if (n->Store) - n->Store->Swizzle = swizzle; + assert(n->Store); + assert(n->Store->File == PROGRAM_STATE_VAR); + n->Store->Index = pos; + n->Store->Swizzle = swizzle; } /* -- cgit v1.2.3 From aa7ddbd0ff97ad5233a766976bbbb31e7cb1cd51 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Feb 2007 17:00:16 -0700 Subject: clean-up, move IR_ELEMENT code --- src/mesa/shader/slang/slang_emit.c | 66 +++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c174f7b6b4..d993fbddc5 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1308,13 +1308,41 @@ emit_swizzle(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } +/** + * Dereference array element. Just resolve storage for the array + * element represented by this node. + */ +static struct prog_instruction * +emit_array_element(slang_var_table *vt, slang_ir_node *n, + struct gl_program *prog) +{ + assert(n->Store); + assert(n->Store->File != PROGRAM_UNDEFINED); + assert(n->Store->Size > 0); + if (n->Children[1]->Opcode == IR_FLOAT) { + /* Constant index */ + const GLint arrayAddr = n->Children[0]->Store->Index; + const GLint index = (GLint) n->Children[1]->Value[0]; + n->Store->Index = arrayAddr + index; + } + else { + /* Variable index - PROBLEM */ + const GLint arrayAddr = n->Children[0]->Store->Index; + const GLint index = 0; + _mesa_problem(NULL, "variable array indexes not supported yet!"); + n->Store->Index = arrayAddr + index; + } + return NULL; /* no instruction */ +} + + /** * Resolve storage for accessing a structure field. */ static struct prog_instruction * -emit_field(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_struct_field(slang_var_table *vt, slang_ir_node *n, + struct gl_program *prog) { - /* field of a struct */ if (n->Children[0]->Store->File == PROGRAM_STATE_VAR) { /* state variable sub-field */ GLint pos; @@ -1331,11 +1359,10 @@ emit_field(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) n->Store->Index = pos; n->Store->Swizzle = swizzle; } - - /* - _mesa_problem(NULL, "glsl structs/fields not supported yet"); - */ - return NULL; + else { + _mesa_problem(NULL, "structs/fields not supported yet"); + } + return NULL; /* no instruction */ } @@ -1402,30 +1429,9 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) break; case IR_ELEMENT: - /* Dereference array element. Just resolve storage for the array - * element represented by this node. - */ - assert(n->Store); - assert(n->Store->File != PROGRAM_UNDEFINED); - assert(n->Store->Size > 0); - if (n->Children[1]->Opcode == IR_FLOAT) { - /* OK, constant index */ - const GLint arrayAddr = n->Children[0]->Store->Index; - const GLint index = (GLint) n->Children[1]->Value[0]; - n->Store->Index = arrayAddr + index; - } - else { - /* Problem: variable index */ - const GLint arrayAddr = n->Children[0]->Store->Index; - const GLint index = 0; - _mesa_problem(NULL, "variable array indexes not supported yet!"); - n->Store->Index = arrayAddr + index; - } - return NULL; /* no instruction */ - + return emit_array_element(vt, n, prog); case IR_FIELD: - return emit_field(vt, n, prog); - + return emit_struct_field(vt, n, prog); case IR_SWIZZLE: return emit_swizzle(vt, n, prog); -- cgit v1.2.3 From c3301d038d404be7c8ecda9d1425617e650e6198 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 09:15:39 -0700 Subject: checkpoint overhaul of pre-defined uniform code --- src/mesa/shader/slang/slang_builtin.c | 192 ++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_builtin.h | 5 + src/mesa/shader/slang/slang_codegen.c | 14 +-- src/mesa/shader/slang/slang_emit.c | 18 ++++ 4 files changed, 217 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index a92efa875b..b4aecdb3ad 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -152,6 +152,10 @@ _slang_lookup_statevar(const char *name, GLint index, { "gl_BackLightModelProduct.sceneColor", 1, SWIZZLE_NOOP, { STATE_LIGHTMODEL_SCENECOLOR, 1, 0, 0, 0, 0 } }, + { "gl_FrontLightProduct", 1, SWIZZLE_NOOP, + { STATE_LIGHTPROD, 0, STATE_AMBIENT, 0, 0, 0 } }, + + { "gl_Fog", 1, SWIZZLE_NOOP, { STATE_FOG_COLOR, 0, 0, 0, 0, 0 } }, { "gl_Fog.color", 1, SWIZZLE_NOOP, @@ -165,6 +169,8 @@ _slang_lookup_statevar(const char *name, GLint index, { "gl_Fog.scale", 1, SWIZZLE_WWWW, { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { "gl_ClipPlane", 1, SWIZZLE_NOOP, + { STATE_CLIPPLANE, 0, 0, 0, 0, 0 } }, { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } }; @@ -230,3 +236,189 @@ _slang_lookup_statevar_field(const char *base, const char *field, } +struct field_info { + const char *Name; + gl_state_index Token; + GLint TokenPos; + GLuint Swizzle; +}; + +#define MT_FIELD { NULL, 0, -1, 0 } +#define MAX_FIELDS 5 +#define INDEX_POS 1000 + +struct state_uniform_info { + const char *Name; + gl_state_index StateTokens[2]; + struct field_info Fields[MAX_FIELDS]; +}; + + + +static const struct state_uniform_info Uniforms[] = { + { "gl_ModelViewMatrix", { STATE_MATRIX, STATE_MODELVIEW }, + { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} + }, + { "gl_ProjectionMatrix", { STATE_MATRIX, STATE_PROJECTION }, + { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} + }, + { "gl_ModelViewProjectionMatrix", { STATE_MATRIX, STATE_MVP }, + { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} + }, + { "gl_NormalMatrix", { STATE_MATRIX, STATE_MODELVIEW }, + { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} + }, + { "gl_TextureMatrix", { STATE_MATRIX, STATE_TEXTURE }, + { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} + }, + + { "gl_ClipPlane", { STATE_CLIPPLANE, INDEX_POS }, + { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} + }, + + { "gl_DepthRange", { STATE_DEPTH_RANGE, 0 }, + { + { "near", 0, -1, SWIZZLE_XXXX }, + { "far", 0, -1, SWIZZLE_YYYY }, + { "diff", 0, -1, SWIZZLE_ZZZZ }, + MT_FIELD, + MT_FIELD + } + }, + + { "gl_Fog", { 0, 0 }, + { + { "color", STATE_FOG_COLOR, 0, SWIZZLE_NOOP }, + { "density", STATE_FOG_PARAMS, 0, SWIZZLE_XXXX }, + { "start", STATE_FOG_PARAMS, 0, SWIZZLE_YYYY }, + { "end", STATE_FOG_PARAMS, 0, SWIZZLE_ZZZZ }, + { "scale", STATE_FOG_PARAMS, 0, SWIZZLE_WWWW } + } + }, + + { NULL, { 0, 0 }, + { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD } + } +}; + + +static GLint +lookup_statevar(const char *var, GLint index, const char *field, + GLuint *swizzleOut, + struct gl_program_parameter_list *paramList) +{ + gl_state_index tokens[STATE_LENGTH]; + GLuint i, j; + GLint pos; + + for (i = 0; i < STATE_LENGTH; i++) { + tokens[i] = 0; + } + + for (i = 0; Uniforms[i].Name; i++) { + if (strcmp(var, Uniforms[i].Name) == 0) { + /* found the uniform */ + + for (j = 0; j < 2; j++) { + tokens[j] = Uniforms[i].StateTokens[j]; + if (tokens[j] == INDEX_POS) { + /* replace INDEX_POS with actual array index */ + assert(index >= 0); + tokens[j] = index; + } + } + + if (field) { + /* extra work for var.field */ + for (j = 0; j < MAX_FIELDS; j++) { + if (!Uniforms[i].Fields[j].Name) { + /* field not found! */ + _mesa_problem(NULL, "field not found"); + return -1; + } + else if (strcmp(field, Uniforms[i].Fields[j].Name) == 0) { + /* found the field */ + GLint tokenPos = Uniforms[i].Fields[j].TokenPos; + if (tokenPos>= 0) { + tokens[tokenPos] = Uniforms[i].Fields[j].Token; + } + *swizzleOut = Uniforms[i].Fields[j].Swizzle; + break; + } + + } + } + + if (tokens[0] == STATE_MATRIX) { + /* a matrix */ + GLuint j; + GLint pos[4]; + gl_state_index indexesCopy[STATE_LENGTH]; + /* make copy of state tokens */ + for (j = 0; j < STATE_LENGTH; j++) + indexesCopy[j] = tokens[j]; + /* load rows */ + for (j = 0; j < 4/*state[i].NumRows*/; j++) { + indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ + pos[j] = _mesa_add_state_reference(paramList, (GLint*) indexesCopy); + assert(pos[j] >= 0); + } + return pos[0] + index; + } + + pos = _mesa_add_state_reference(paramList, (GLint *) tokens); + assert(pos >= 0); + return pos; + } + } + return -1; +} + + + +/** + * Allocate storage for a pre-defined uniform (a GL state variable). + * As a memory-saving optimization, we try to only allocate storage for + * state vars that are actually used. + * For example, the "gl_LightSource" uniform is huge. If we only use + * a handful of gl_LightSource fields, we don't want to allocate storage + * for all of gl_LightSource. + * + * Currently, all pre-defined uniforms are in one of these forms: + * var + * var[index] + * var.field + * var[index].field + */ +GLint +_slang_alloc_statevar(slang_ir_node *n, + struct gl_program_parameter_list *paramList) +{ + const char *field = NULL, *var; + GLint index = -1, pos; + GLuint swizzle; + + if (n->Opcode == IR_FIELD) { + field = n->Target; + n = n->Children[0]; + } + + if (n->Opcode == IR_ELEMENT) { + /* XXX can only handle constant indexes for now */ + assert(n->Children[1]->Opcode == IR_FLOAT); + index = (GLint) n->Children[1]->Value[0]; + n = n->Children[0]; + } + + assert(n->Opcode == IR_VAR); + var = (char *) n->Var->a_name; + + pos = lookup_statevar(var, index, field, &swizzle, paramList); + assert(pos >= 0); + if (pos >= 0) { + n->Store->Index = pos; + n->Store->Swizzle = swizzle; + } + return pos; +} + diff --git a/src/mesa/shader/slang/slang_builtin.h b/src/mesa/shader/slang/slang_builtin.h index a521e73eb9..368a16b234 100644 --- a/src/mesa/shader/slang/slang_builtin.h +++ b/src/mesa/shader/slang/slang_builtin.h @@ -28,6 +28,7 @@ #include "prog_parameter.h" #include "slang_utility.h" +#include "slang_ir.h" extern GLint @@ -41,5 +42,9 @@ _slang_lookup_statevar_field(const char *base, const char *field, struct gl_program_parameter_list *paramList, GLuint *swizzleOut); +extern GLint +_slang_alloc_statevar(slang_ir_node *n, + struct gl_program_parameter_list *paramList); + #endif /* SLANG_BUILTIN_H */ diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 789ab8a50b..d78f45a437 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -205,18 +205,7 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) struct gl_program *prog = A->program; assert(prog); - /* determine storage location for this var. - * This is probably a pre-defined uniform or constant. - * We don't allocate storage for these until they're actually - * used to avoid wasting registers. - */ - if (n->Store->File == PROGRAM_STATE_VAR) { - GLint i = _slang_lookup_statevar(varName, 0, prog->Parameters, - &n->Store->Swizzle); - assert(i >= 0); - n->Store->Index = i; - } - else if (n->Store->File == PROGRAM_CONSTANT) { + if (n->Store->File == PROGRAM_CONSTANT) { /* XXX compile-time constants should be converted to literals */ GLint i = slang_lookup_constant(varName, prog->Parameters, &n->Store->Swizzle); @@ -2262,6 +2251,7 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) elem->Store = _slang_new_ir_storage(array->Store->File, array->Store->Index, elemSize); + /* XXX try to do some array bounds checking here */ return elem; } else { diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index d993fbddc5..7584857493 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1319,6 +1319,13 @@ emit_array_element(slang_var_table *vt, slang_ir_node *n, assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Size > 0); + + if (n->Store->File == PROGRAM_STATE_VAR) { + n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); + return NULL; + } + + if (n->Children[1]->Opcode == IR_FLOAT) { /* Constant index */ const GLint arrayAddr = n->Children[0]->Store->Index; @@ -1343,6 +1350,11 @@ static struct prog_instruction * emit_struct_field(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) { + if (n->Store->File == PROGRAM_STATE_VAR) { + n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); + return NULL; + } + if (n->Children[0]->Store->File == PROGRAM_STATE_VAR) { /* state variable sub-field */ GLint pos; @@ -1421,6 +1433,12 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) */ assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); + + if (n->Store->File == PROGRAM_STATE_VAR && + n->Store->Index < 0) { + n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); + } + if (n->Store->Index < 0) { printf("#### VAR %s not allocated!\n", (char*)n->Var->a_name); } -- cgit v1.2.3 From 6531952b3c979be0dc95704beb3c3b9dad1dc37b Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 11:08:21 -0700 Subject: adjustments to STATE_ token layout/format so token[1] is always the array index --- src/mesa/shader/arbprogparse.c | 47 ++++++++----- src/mesa/shader/prog_statevars.c | 129 ++++++++++++++++++++-------------- src/mesa/shader/prog_statevars.h | 15 ++-- src/mesa/shader/programopt.c | 14 ++-- src/mesa/shader/slang/slang_builtin.c | 54 +++++++------- src/mesa/shader/slang/slang_emit.c | 3 +- src/mesa/tnl/t_vp_build.c | 30 ++++---- 7 files changed, 166 insertions(+), 126 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index e240d88aaa..4c200f74cc 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1010,7 +1010,7 @@ parse_matrix (GLcontext * ctx, const GLubyte ** inst, struct arb_program *Progra switch (mat) { case MATRIX_MODELVIEW: - *matrix = STATE_MODELVIEW; + *matrix = STATE_MODELVIEW_MATRIX; *matrix_idx = parse_integer (inst, Program); if (*matrix_idx > 0) { program_error(ctx, Program->Position, @@ -1020,15 +1020,15 @@ parse_matrix (GLcontext * ctx, const GLubyte ** inst, struct arb_program *Progra break; case MATRIX_PROJECTION: - *matrix = STATE_PROJECTION; + *matrix = STATE_PROJECTION_MATRIX; break; case MATRIX_MVP: - *matrix = STATE_MVP; + *matrix = STATE_MVP_MATRIX; break; case MATRIX_TEXTURE: - *matrix = STATE_TEXTURE; + *matrix = STATE_TEXTURE_MATRIX; *matrix_idx = parse_integer (inst, Program); if (*matrix_idx >= (GLint) ctx->Const.MaxTextureUnits) { program_error(ctx, Program->Position, "Invalid Texture Unit"); @@ -1046,7 +1046,7 @@ parse_matrix (GLcontext * ctx, const GLubyte ** inst, struct arb_program *Progra break; case MATRIX_PROGRAM: - *matrix = STATE_PROGRAM; + *matrix = STATE_PROGRAM_MATRIX; *matrix_idx = parse_integer (inst, Program); if (*matrix_idx >= (GLint) ctx->Const.MaxProgramMatrices) { program_error(ctx, Program->Position, "Invalid Program Matrix"); @@ -1187,10 +1187,12 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, case STATE_FOG: switch (*(*inst)++) { case FOG_COLOR: - state_tokens[0] = STATE_FOG_COLOR; + state_tokens[0] = STATE_FOG; + state_tokens[1] = STATE_FOG_COLOR; break; case FOG_PARAMS: - state_tokens[0] = STATE_FOG_PARAMS; + state_tokens[0] = STATE_FOG; + state_tokens[1] = STATE_FOG_PARAMS; break; } break; @@ -1285,17 +1287,16 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, /* XXX: I think this is the correct format for a matrix row */ case STATE_MATRIX_ROWS: - state_tokens[0] = STATE_MATRIX; if (parse_matrix - (ctx, inst, Program, &state_tokens[1], &state_tokens[2], - &state_tokens[5])) + (ctx, inst, Program, &state_tokens[0], &state_tokens[1], + &state_tokens[4])) return 1; - state_tokens[3] = parse_integer (inst, Program); /* The first row to grab */ + state_tokens[2] = parse_integer (inst, Program); /* The first row to grab */ if ((**inst) != 0) { /* Either the last row, 0 */ - state_tokens[4] = parse_integer (inst, Program); - if (state_tokens[4] < state_tokens[3]) { + state_tokens[3] = parse_integer (inst, Program); + if (state_tokens[3] < state_tokens[2]) { program_error(ctx, Program->Position, "Second matrix index less than the first"); /* state_tokens[4] vs. state_tokens[3] */ @@ -1303,7 +1304,7 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, } } else { - state_tokens[4] = state_tokens[3]; + state_tokens[3] = state_tokens[2]; (*inst)++; } break; @@ -1730,14 +1731,18 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst, /* If we adding STATE_MATRIX that has multiple rows, we need to * unroll it and call _mesa_add_state_reference() for each row */ - if ((state_tokens[0] == STATE_MATRIX) - && (state_tokens[3] != state_tokens[4])) { + if ((state_tokens[0] == STATE_MODELVIEW_MATRIX || + state_tokens[0] == STATE_PROJECTION_MATRIX || + state_tokens[0] == STATE_MVP_MATRIX || + state_tokens[0] == STATE_TEXTURE_MATRIX || + state_tokens[0] == STATE_PROGRAM_MATRIX) + && (state_tokens[2] != state_tokens[3])) { GLint row; - GLint first_row = state_tokens[3]; - GLint last_row = state_tokens[4]; + const GLint first_row = state_tokens[2]; + const GLint last_row = state_tokens[3]; for (row = first_row; row <= last_row; row++) { - state_tokens[3] = state_tokens[4] = row; + state_tokens[2] = state_tokens[3] = row; idx = _mesa_add_state_reference(Program->Base.Parameters, state_tokens); @@ -3357,6 +3362,10 @@ print_state_token (GLint token) fprintf (stderr, "STATE_TEXGEN "); break; + case STATE_FOG: + fprintf (stderr, "STATE_FOG "); + break; + case STATE_FOG_COLOR: fprintf (stderr, "STATE_FOG_COLOR "); break; diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 3a54ab8c58..d6c552a71f 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -243,14 +243,17 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], COPY_4V(value, ctx->Texture.Unit[unit].EnvColor); } return; - case STATE_FOG_COLOR: - COPY_4V(value, ctx->Fog.Color); - return; - case STATE_FOG_PARAMS: - value[0] = ctx->Fog.Density; - value[1] = ctx->Fog.Start; - value[2] = ctx->Fog.End; - value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start); + case STATE_FOG: + if (state[1] == STATE_FOG_COLOR) { + COPY_4V(value, ctx->Fog.Color); + } + else { + ASSERT(state[1] == STATE_FOG_PARAMS); + value[0] = ctx->Fog.Density; + value[1] = ctx->Fog.Start; + value[2] = ctx->Fog.End; + value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start); + } return; case STATE_CLIPPLANE: { @@ -270,7 +273,12 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], value[2] = ctx->Point.Params[2]; value[3] = 1.0F; return; - case STATE_MATRIX: + case STATE_MODELVIEW_MATRIX: + case STATE_PROJECTION_MATRIX: + case STATE_MVP_MATRIX: + case STATE_TEXTURE_MATRIX: + case STATE_PROGRAM_MATRIX: + /*case STATE_MATRIX:*/ { /* state[1] = modelview, projection, texture, etc. */ /* state[2] = which texture matrix or program matrix */ @@ -279,26 +287,38 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], /* state[5] = transpose, inverse or invtrans */ const GLmatrix *matrix; +#if 0 const gl_state_index mat = state[1]; const GLuint index = (GLuint) state[2]; const GLuint firstRow = (GLuint) state[3]; const GLuint lastRow = (GLuint) state[4]; const gl_state_index modifier = state[5]; +#else + const gl_state_index mat = state[0]; + const GLuint index = (GLuint) state[1]; + const GLuint firstRow = (GLuint) state[2]; + const GLuint lastRow = (GLuint) state[3]; + const gl_state_index modifier = state[4]; +#endif const GLfloat *m; GLuint row, i; - if (mat == STATE_MODELVIEW) { + ASSERT(firstRow >= 0); + ASSERT(firstRow < 4); + ASSERT(lastRow >= 0); + ASSERT(lastRow < 4); + if (mat == STATE_MODELVIEW_MATRIX) { matrix = ctx->ModelviewMatrixStack.Top; } - else if (mat == STATE_PROJECTION) { + else if (mat == STATE_PROJECTION_MATRIX) { matrix = ctx->ProjectionMatrixStack.Top; } - else if (mat == STATE_MVP) { + else if (mat == STATE_MVP_MATRIX) { matrix = &ctx->_ModelProjectMatrix; } - else if (mat == STATE_TEXTURE) { + else if (mat == STATE_TEXTURE_MATRIX) { matrix = ctx->TextureMatrixStack[index].Top; } - else if (mat == STATE_PROGRAM) { + else if (mat == STATE_PROGRAM_MATRIX) { matrix = ctx->ProgramMatrixStack[index].Top; } else { @@ -432,8 +452,11 @@ _mesa_program_state_flags(const GLint state[STATE_LENGTH]) case STATE_TEXENV_COLOR: return _NEW_TEXTURE; + case STATE_FOG: +#if 0 case STATE_FOG_COLOR: case STATE_FOG_PARAMS: +#endif return _NEW_FOG; case STATE_CLIPPLANE: @@ -443,23 +466,16 @@ _mesa_program_state_flags(const GLint state[STATE_LENGTH]) case STATE_POINT_ATTENUATION: return _NEW_POINT; - case STATE_MATRIX: - switch (state[1]) { - case STATE_MODELVIEW: - return _NEW_MODELVIEW; - case STATE_PROJECTION: - return _NEW_PROJECTION; - case STATE_MVP: - return _NEW_MODELVIEW | _NEW_PROJECTION; - case STATE_TEXTURE: - return _NEW_TEXTURE_MATRIX; - case STATE_PROGRAM: - return _NEW_TRACK_MATRIX; - default: - _mesa_problem(NULL, - "unexpected matrix in _mesa_program_state_flags()"); - return 0; - } + case STATE_MODELVIEW_MATRIX: + return _NEW_MODELVIEW; + case STATE_PROJECTION_MATRIX: + return _NEW_PROJECTION; + case STATE_MVP_MATRIX: + return _NEW_MODELVIEW | _NEW_PROJECTION; + case STATE_TEXTURE_MATRIX: + return _NEW_TEXTURE_MATRIX; + case STATE_PROGRAM_MATRIX: + return _NEW_TRACK_MATRIX; case STATE_DEPTH_RANGE: return _NEW_VIEWPORT; @@ -520,11 +536,14 @@ append_token(char *dst, gl_state_index k) case STATE_TEXGEN: append(dst, "texgen"); break; + case STATE_FOG: + append(dst, "fog"); + break; case STATE_FOG_COLOR: - append(dst, "fog.color"); + append(dst, ".color"); break; case STATE_FOG_PARAMS: - append(dst, "fog.params"); + append(dst, ".params"); break; case STATE_CLIPPLANE: append(dst, "clip"); @@ -535,22 +554,19 @@ append_token(char *dst, gl_state_index k) case STATE_POINT_ATTENUATION: append(dst, "point.attenuation"); break; - case STATE_MATRIX: - append(dst, "matrix."); - break; - case STATE_MODELVIEW: + case STATE_MODELVIEW_MATRIX: append(dst, "modelview"); break; - case STATE_PROJECTION: + case STATE_PROJECTION_MATRIX: append(dst, "projection"); break; - case STATE_MVP: + case STATE_MVP_MATRIX: append(dst, "mvp"); break; - case STATE_TEXTURE: + case STATE_TEXTURE_MATRIX: append(dst, "texture"); break; - case STATE_PROGRAM: + case STATE_PROGRAM_MATRIX: append(dst, "program"); break; case STATE_MATRIX_INVERSE: @@ -703,8 +719,9 @@ _mesa_program_state_string(const GLint state[STATE_LENGTH]) append_index(str, state[1]); /* tex unit [i] */ append(str, "color"); break; - case STATE_FOG_COLOR: - case STATE_FOG_PARAMS: + case STATE_FOG: + append(str, "fog"); + append_token(str, (gl_state_index) state[1]); /* color or params */ break; case STATE_CLIPPLANE: append_index(str, state[1]); /* plane [i] */ @@ -713,18 +730,22 @@ _mesa_program_state_string(const GLint state[STATE_LENGTH]) case STATE_POINT_SIZE: case STATE_POINT_ATTENUATION: break; - case STATE_MATRIX: + case STATE_MODELVIEW_MATRIX: + case STATE_PROJECTION_MATRIX: + case STATE_MVP_MATRIX: + case STATE_TEXTURE_MATRIX: + case STATE_PROGRAM_MATRIX: { - /* state[1] = modelview, projection, texture, etc. */ - /* state[2] = which texture matrix or program matrix */ - /* state[3] = first row to fetch */ - /* state[4] = last row to fetch */ - /* state[5] = transpose, inverse or invtrans */ - const gl_state_index mat = (gl_state_index) state[1]; - const GLuint index = (GLuint) state[2]; - const GLuint firstRow = (GLuint) state[3]; - const GLuint lastRow = (GLuint) state[4]; - const gl_state_index modifier = (gl_state_index) state[5]; + /* state[0] = modelview, projection, texture, etc. */ + /* state[1] = which texture matrix or program matrix */ + /* state[2] = first row to fetch */ + /* state[3] = last row to fetch */ + /* state[4] = transpose, inverse or invtrans */ + const gl_state_index mat = (gl_state_index) state[0]; + const GLuint index = (GLuint) state[1]; + const GLuint firstRow = (GLuint) state[2]; + const GLuint lastRow = (GLuint) state[3]; + const gl_state_index modifier = (gl_state_index) state[4]; append_token(str, mat); if (index) append_index(str, index); diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 95e38ca7b6..1b686d8078 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -40,6 +40,9 @@ * fragment programs. * A string such as "state.light[0].ambient" gets translated into a * sequence of tokens such as [ STATE_LIGHT, 0, STATE_AMBIENT ]. + * + * For state that's an array, like STATE_CLIPPLANE, the 2nd token [1] should + * always be the array index. */ typedef enum gl_state_index_ { STATE_MATERIAL = 100, /* start at 100 so small ints are seen as ints */ @@ -51,6 +54,7 @@ typedef enum gl_state_index_ { STATE_TEXGEN, + STATE_FOG, STATE_FOG_COLOR, STATE_FOG_PARAMS, @@ -59,12 +63,11 @@ typedef enum gl_state_index_ { STATE_POINT_SIZE, STATE_POINT_ATTENUATION, - STATE_MATRIX, - STATE_MODELVIEW, - STATE_PROJECTION, - STATE_MVP, - STATE_TEXTURE, - STATE_PROGRAM, + STATE_MODELVIEW_MATRIX, + STATE_PROJECTION_MATRIX, + STATE_MVP_MATRIX, + STATE_TEXTURE_MATRIX, + STATE_PROGRAM_MATRIX, STATE_MATRIX_INVERSE, STATE_MATRIX_TRANSPOSE, STATE_MATRIX_INVTRANS, diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index a33e6b49ac..ca11a4e547 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -57,10 +57,10 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) * XXX we should check if these state vars are already declared. */ static const GLint mvpState[4][5] = { - { STATE_MATRIX, STATE_MVP, 0, 0, 0 }, /* state.matrix.mvp.row[0] */ - { STATE_MATRIX, STATE_MVP, 0, 1, 1 }, /* state.matrix.mvp.row[1] */ - { STATE_MATRIX, STATE_MVP, 0, 2, 2 }, /* state.matrix.mvp.row[2] */ - { STATE_MATRIX, STATE_MVP, 0, 3, 3 }, /* state.matrix.mvp.row[3] */ + { STATE_MVP_MATRIX, 0, 0, 0, 0 }, /* state.matrix.mvp.row[0] */ + { STATE_MVP_MATRIX, 0, 1, 1, 0 }, /* state.matrix.mvp.row[1] */ + { STATE_MVP_MATRIX, 0, 2, 2, 0 }, /* state.matrix.mvp.row[2] */ + { STATE_MVP_MATRIX, 0, 3, 3, 0 }, /* state.matrix.mvp.row[3] */ }; GLint mvpRef[4]; @@ -125,8 +125,10 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) void _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) { - static const GLint fogParamsState[] = { STATE_FOG_PARAMS, 0, 0, 0, 0 }; - static const GLint fogColorState[] = { STATE_FOG_COLOR, 0, 0, 0, 0 }; + static const GLint fogParamsState[] + = { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0 }; + static const GLint fogColorState[] + = { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0 }; struct prog_instruction *newInst, *inst; const GLuint origLen = fprog->Base.NumInstructions; const GLuint newLen = origLen + 6; diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index b4aecdb3ad..71a102e45c 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -70,15 +70,15 @@ _slang_lookup_statevar(const char *name, GLint index, }; static const struct state_info state[] = { { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, + { STATE_MODELVIEW_MATRIX, 0, 0, 0, 0, 0 } }, { "gl_NormalMatrix", 3, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 } }, + { STATE_MODELVIEW_MATRIX, 0, 0, 0, 0, 0 } }, { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_PROJECTION, 0, 0, 0, 0 } }, + { STATE_PROJECTION_MATRIX, 0, 0, 0, 0, 0 } }, { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_MVP, 0, 0, 0, 0 } }, + { STATE_MVP_MATRIX, 0, 0, 0, 0, 0 } }, { "gl_TextureMatrix", 4, SWIZZLE_NOOP, - { STATE_MATRIX, STATE_TEXTURE, 0, 0, 0, 0 } }, + { STATE_TEXTURE_MATRIX, 0, 0, 0, 0, 0 } }, { "gl_NormalScale", 1, SWIZZLE_NOOP, { STATE_INTERNAL, STATE_NORMAL_SCALE, 0, 0, 0, 0} }, @@ -157,17 +157,17 @@ _slang_lookup_statevar(const char *name, GLint index, { "gl_Fog", 1, SWIZZLE_NOOP, - { STATE_FOG_COLOR, 0, 0, 0, 0, 0 } }, + { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0, 0 } }, { "gl_Fog.color", 1, SWIZZLE_NOOP, - { STATE_FOG_COLOR, 0, 0, 0, 0, 0 } }, + { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0, 0 } }, { "gl_Fog.density", 1, SWIZZLE_XXXX, - { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, { "gl_Fog.start", 1, SWIZZLE_YYYY, - { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, { "gl_Fog.end", 1, SWIZZLE_ZZZZ, - { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, { "gl_Fog.scale", 1, SWIZZLE_WWWW, - { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 } }, + { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, { "gl_ClipPlane", 1, SWIZZLE_NOOP, { STATE_CLIPPLANE, 0, 0, 0, 0, 0 } }, @@ -190,7 +190,7 @@ _slang_lookup_statevar(const char *name, GLint index, indexesCopy[j] = state[i].Indexes[j]; /* load rows */ for (j = 0; j < state[i].NumRows; j++) { - indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ + indexesCopy[2] = indexesCopy[3] = j; /* jth row of matrix */ pos[j] = _mesa_add_state_reference(paramList, indexesCopy); assert(pos[j] >= 0); } @@ -256,19 +256,19 @@ struct state_uniform_info { static const struct state_uniform_info Uniforms[] = { - { "gl_ModelViewMatrix", { STATE_MATRIX, STATE_MODELVIEW }, + { "gl_ModelViewMatrix", { STATE_MODELVIEW_MATRIX, INDEX_POS }, { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} }, - { "gl_ProjectionMatrix", { STATE_MATRIX, STATE_PROJECTION }, + { "gl_ProjectionMatrix", { STATE_PROJECTION_MATRIX, INDEX_POS }, { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} }, - { "gl_ModelViewProjectionMatrix", { STATE_MATRIX, STATE_MVP }, + { "gl_ModelViewProjectionMatrix", { STATE_MVP_MATRIX, INDEX_POS }, { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} }, - { "gl_NormalMatrix", { STATE_MATRIX, STATE_MODELVIEW }, + { "gl_NormalMatrix", { STATE_MODELVIEW_MATRIX, INDEX_POS }, { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} }, - { "gl_TextureMatrix", { STATE_MATRIX, STATE_TEXTURE }, + { "gl_TextureMatrix", { STATE_TEXTURE_MATRIX, INDEX_POS }, { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} }, @@ -286,13 +286,13 @@ static const struct state_uniform_info Uniforms[] = { } }, - { "gl_Fog", { 0, 0 }, + { "gl_Fog", { STATE_FOG, 0 }, { - { "color", STATE_FOG_COLOR, 0, SWIZZLE_NOOP }, - { "density", STATE_FOG_PARAMS, 0, SWIZZLE_XXXX }, - { "start", STATE_FOG_PARAMS, 0, SWIZZLE_YYYY }, - { "end", STATE_FOG_PARAMS, 0, SWIZZLE_ZZZZ }, - { "scale", STATE_FOG_PARAMS, 0, SWIZZLE_WWWW } + { "color", STATE_FOG_COLOR, 1, SWIZZLE_NOOP }, + { "density", STATE_FOG_PARAMS, 1, SWIZZLE_XXXX }, + { "start", STATE_FOG_PARAMS, 1, SWIZZLE_YYYY }, + { "end", STATE_FOG_PARAMS, 1, SWIZZLE_ZZZZ }, + { "scale", STATE_FOG_PARAMS, 1, SWIZZLE_WWWW } } }, @@ -349,7 +349,11 @@ lookup_statevar(const char *var, GLint index, const char *field, } } - if (tokens[0] == STATE_MATRIX) { + if (tokens[0] == STATE_MODELVIEW_MATRIX || + tokens[0] == STATE_PROJECTION_MATRIX || + tokens[0] == STATE_MVP_MATRIX || + tokens[0] == STATE_TEXTURE_MATRIX || + tokens[0] == STATE_PROGRAM_MATRIX) { /* a matrix */ GLuint j; GLint pos[4]; @@ -359,7 +363,7 @@ lookup_statevar(const char *var, GLint index, const char *field, indexesCopy[j] = tokens[j]; /* load rows */ for (j = 0; j < 4/*state[i].NumRows*/; j++) { - indexesCopy[3] = indexesCopy[4] = j; /* jth row of matrix */ + indexesCopy[2] = indexesCopy[3] = j; /* jth row of matrix */ pos[j] = _mesa_add_state_reference(paramList, (GLint*) indexesCopy); assert(pos[j] >= 0); } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 7584857493..cef6299d62 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1354,7 +1354,7 @@ emit_struct_field(slang_var_table *vt, slang_ir_node *n, n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); return NULL; } - +#if 0 if (n->Children[0]->Store->File == PROGRAM_STATE_VAR) { /* state variable sub-field */ GLint pos; @@ -1371,6 +1371,7 @@ emit_struct_field(slang_var_table *vt, slang_ir_node *n, n->Store->Index = pos; n->Store->Swizzle = swizzle; } +#endif else { _mesa_problem(NULL, "structs/fields not supported yet"); } diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 47fed32904..9065e3421f 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -636,14 +636,14 @@ static struct ureg get_eye_position( struct tnl_program *p ) p->eye_position = reserve_temp(p); if (PREFER_DP4) { - register_matrix_param6( p, STATE_MATRIX, STATE_MODELVIEW, 0, 0, 3, - STATE_MATRIX, modelview ); + register_matrix_param6( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, + 0, 0, modelview ); emit_matrix_transform_vec4(p, p->eye_position, modelview, pos); } else { - register_matrix_param6( p, STATE_MATRIX, STATE_MODELVIEW, 0, 0, 3, - STATE_MATRIX_TRANSPOSE, modelview ); + register_matrix_param6( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, + STATE_MATRIX_TRANSPOSE, 0, modelview ); emit_transpose_matrix_transform_vec4(p, p->eye_position, modelview, pos); } @@ -671,8 +671,8 @@ static struct ureg get_eye_normal( struct tnl_program *p ) struct ureg normal = register_input(p, VERT_ATTRIB_NORMAL ); struct ureg mvinv[3]; - register_matrix_param6( p, STATE_MATRIX, STATE_MODELVIEW, 0, 0, 2, - STATE_MATRIX_INVTRANS, mvinv ); + register_matrix_param6( p, STATE_MODELVIEW_MATRIX, 0, 0, 2, + STATE_MATRIX_INVTRANS, 0, mvinv ); p->eye_normal = reserve_temp(p); @@ -706,13 +706,13 @@ static void build_hpos( struct tnl_program *p ) struct ureg mvp[4]; if (PREFER_DP4) { - register_matrix_param6( p, STATE_MATRIX, STATE_MVP, 0, 0, 3, - STATE_MATRIX, mvp ); + register_matrix_param6( p, STATE_MVP_MATRIX, 0, 0, 3, + 0, 0, mvp ); emit_matrix_transform_vec4( p, hpos, mvp, pos ); } else { - register_matrix_param6( p, STATE_MATRIX, STATE_MVP, 0, 0, 3, - STATE_MATRIX_TRANSPOSE, mvp ); + register_matrix_param6( p, STATE_MVP_MATRIX, 0, 0, 3, + STATE_MATRIX_TRANSPOSE, 0, mvp ); emit_transpose_matrix_transform_vec4( p, hpos, mvp, pos ); } } @@ -1109,7 +1109,7 @@ static void build_fog( struct tnl_program *p ) } if (p->state->tnl_do_vertex_fog) { - struct ureg params = register_param1(p, STATE_FOG_PARAMS); + struct ureg params = register_param2(p, STATE_FOG, STATE_FOG_PARAMS); struct ureg tmp = get_temp(p); switch (p->state->fog_mode) { @@ -1303,13 +1303,13 @@ static void build_texture_transform( struct tnl_program *p ) out_texgen : register_input(p, VERT_ATTRIB_TEX0+i)); if (PREFER_DP4) { - register_matrix_param6( p, STATE_MATRIX, STATE_TEXTURE, i, - 0, 3, STATE_MATRIX, texmat ); + register_matrix_param6( p, STATE_TEXTURE_MATRIX, i, 0, 3, + 0, 0, texmat ); emit_matrix_transform_vec4( p, out, texmat, in ); } else { - register_matrix_param6( p, STATE_MATRIX, STATE_TEXTURE, i, - 0, 3, STATE_MATRIX_TRANSPOSE, texmat ); + register_matrix_param6( p, STATE_TEXTURE_MATRIX, i, 0, 3, + STATE_MATRIX_TRANSPOSE, 0, texmat ); emit_transpose_matrix_transform_vec4( p, out, texmat, in ); } } -- cgit v1.2.3 From f94189282989c0654599731ba0a61dfd34ccd80d Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 15:21:58 -0700 Subject: Reimplement the _slang_alloc_statevar() function. After several tries at making a table-based system for examining pre-defined uniforms to find statevar indexes, give up and do it the simple way (lots of strcmp() calls). Not terribly elegant, but perfectly functional. --- src/mesa/shader/slang/slang_builtin.c | 598 ++++++++++++++++------------------ src/mesa/shader/slang/slang_builtin.h | 11 - 2 files changed, 274 insertions(+), 335 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 71a102e45c..08a4a6a708 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -43,343 +43,285 @@ #include "slang_print.h" - /** - * XXX we might consider moving much of this into the prog_statevars.c file + * Lookup GL state given a variable name, 0, 1 or 2 indexes and a field. + * Allocate room for the state in the given param list and return position + * in the list. */ - - -/** - * Determine if 'name' is a state variable (pre-defined uniform). - * If so, create a new program parameter for it, and return the - * param's index. - * - * \param swizzleOut returns the swizzle needed to access 'float' values - * \return the state value's position in the parameter list, or -1 if error - */ -GLint -_slang_lookup_statevar(const char *name, GLint index, - struct gl_program_parameter_list *paramList, - GLuint *swizzleOut) -{ - struct state_info { - const char *Name; - const GLuint NumRows; /** for matrices */ - const GLuint Swizzle; - const GLint Indexes[STATE_LENGTH]; - }; - static const struct state_info state[] = { - { "gl_ModelViewMatrix", 4, SWIZZLE_NOOP, - { STATE_MODELVIEW_MATRIX, 0, 0, 0, 0, 0 } }, - { "gl_NormalMatrix", 3, SWIZZLE_NOOP, - { STATE_MODELVIEW_MATRIX, 0, 0, 0, 0, 0 } }, - { "gl_ProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_PROJECTION_MATRIX, 0, 0, 0, 0, 0 } }, - { "gl_ModelViewProjectionMatrix", 4, SWIZZLE_NOOP, - { STATE_MVP_MATRIX, 0, 0, 0, 0, 0 } }, - { "gl_TextureMatrix", 4, SWIZZLE_NOOP, - { STATE_TEXTURE_MATRIX, 0, 0, 0, 0, 0 } }, - { "gl_NormalScale", 1, SWIZZLE_NOOP, - { STATE_INTERNAL, STATE_NORMAL_SCALE, 0, 0, 0, 0} }, - - /* For aggregate/structs we need entries for both the base name - * and base.field. - */ - { "gl_DepthRange", 1, SWIZZLE_NOOP, - { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, - { "gl_DepthRange.near", 1, SWIZZLE_XXXX, - { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, - { "gl_DepthRange.far", 1, SWIZZLE_YYYY, - { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, - { "gl_DepthRange.diff", 1, SWIZZLE_ZZZZ, - { STATE_DEPTH_RANGE, 0, 0, 0, 0, 0 } }, - - { "gl_Point", 1, SWIZZLE_NOOP, - { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, - { "gl_Point.size", 1, SWIZZLE_XXXX, - { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, - { "gl_Point.sizeMin", 1, SWIZZLE_YYYY, - { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, - { "gl_Point.sizeMax", 1, SWIZZLE_ZZZZ, - { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, - { "gl_Point.fadeThresholdSize", 1, SWIZZLE_WWWW, - { STATE_POINT_SIZE, 0, 0, 0, 0, 0 } }, - { "gl_Point.distanceConstantAttenuation", 1, SWIZZLE_XXXX, - { STATE_POINT_ATTENUATION, 0, 0, 0, 0, 0 } }, - { "gl_Point.distanceLinearAttenuation", 1, SWIZZLE_YYYY, - { STATE_POINT_ATTENUATION, 0, 0, 0, 0, 0 } }, - { "gl_Point.distanceQuadraticAttenuation", 1, SWIZZLE_ZZZZ, - { STATE_POINT_ATTENUATION, 0, 0, 0, 0, 0 } }, - - { "gl_FrontMaterial", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 0, STATE_EMISSION, 0, 0, 0 } }, - { "gl_FrontMaterial.emission", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 0, STATE_EMISSION, 0, 0, 0 } }, - { "gl_FrontMaterial.ambient", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 0, STATE_AMBIENT, 0, 0, 0 } }, - { "gl_FrontMaterial.diffuse", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 0, STATE_DIFFUSE, 0, 0, 0 } }, - { "gl_FrontMaterial.specular", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 0, STATE_SPECULAR, 0, 0, 0 } }, - { "gl_FrontMaterial.shininess", 1, SWIZZLE_XXXX, - { STATE_MATERIAL, 0, STATE_SHININESS, 0, 0, 0 } }, - - { "gl_BackMaterial", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 1, STATE_EMISSION, 0, 0, 0 } }, - { "gl_BackMaterial.emission", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 1, STATE_EMISSION, 0, 0, 0 } }, - { "gl_BackMaterial.ambient", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 1, STATE_AMBIENT, 0, 0, 0 } }, - { "gl_BackMaterial.diffuse", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 1, STATE_DIFFUSE, 0, 0, 0 } }, - { "gl_BackMaterial.specular", 1, SWIZZLE_NOOP, - { STATE_MATERIAL, 1, STATE_SPECULAR, 0, 0, 0 } }, - { "gl_BackMaterial.shininess", 1, SWIZZLE_XXXX, - { STATE_MATERIAL, 1, STATE_SHININESS, 0, 0, 0 } }, - - { "gl_LightModel", 1, SWIZZLE_NOOP, - { STATE_LIGHTMODEL_AMBIENT, 0, 0, 0, 0, 0 } }, - { "gl_LightModel.ambient", 1, SWIZZLE_NOOP, - { STATE_LIGHTMODEL_AMBIENT, 0, 0, 0, 0, 0 } }, - - { "gl_FrontLightModelProduct", 1, SWIZZLE_NOOP, - { STATE_LIGHTMODEL_SCENECOLOR, 0, 0, 0, 0, 0 } }, - { "gl_FrontLightModelProduct.sceneColor", 1, SWIZZLE_NOOP, - { STATE_LIGHTMODEL_SCENECOLOR, 0, 0, 0, 0, 0 } }, - - { "gl_BackLightModelProduct", 1, SWIZZLE_NOOP, - { STATE_LIGHTMODEL_SCENECOLOR, 1, 0, 0, 0, 0 } }, - { "gl_BackLightModelProduct.sceneColor", 1, SWIZZLE_NOOP, - { STATE_LIGHTMODEL_SCENECOLOR, 1, 0, 0, 0, 0 } }, - - { "gl_FrontLightProduct", 1, SWIZZLE_NOOP, - { STATE_LIGHTPROD, 0, STATE_AMBIENT, 0, 0, 0 } }, - - - { "gl_Fog", 1, SWIZZLE_NOOP, - { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0, 0 } }, - { "gl_Fog.color", 1, SWIZZLE_NOOP, - { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0, 0 } }, - { "gl_Fog.density", 1, SWIZZLE_XXXX, - { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, - { "gl_Fog.start", 1, SWIZZLE_YYYY, - { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, - { "gl_Fog.end", 1, SWIZZLE_ZZZZ, - { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, - { "gl_Fog.scale", 1, SWIZZLE_WWWW, - { STATE_FOG, STATE_FOG_PARAMS, 0, 0, 0, 0 } }, - - { "gl_ClipPlane", 1, SWIZZLE_NOOP, - { STATE_CLIPPLANE, 0, 0, 0, 0, 0 } }, - - { NULL, 0, 0, {0, 0, 0, 0, 0, 0} } - }; - GLuint i; - - for (i = 0; state[i].Name; i++) { - if (strcmp(state[i].Name, name) == 0) { - /* found */ - *swizzleOut = state[i].Swizzle; - if (paramList) { - if (state[i].NumRows > 1) { - /* a matrix */ - GLuint j; - GLint pos[4], indexesCopy[STATE_LENGTH]; - /* make copy of state tokens */ - for (j = 0; j < STATE_LENGTH; j++) - indexesCopy[j] = state[i].Indexes[j]; - /* load rows */ - for (j = 0; j < state[i].NumRows; j++) { - indexesCopy[2] = indexesCopy[3] = j; /* jth row of matrix */ - pos[j] = _mesa_add_state_reference(paramList, indexesCopy); - assert(pos[j] >= 0); - } - return pos[0]; - } - else { - /* non-matrix state */ - GLint pos - = _mesa_add_state_reference(paramList, state[i].Indexes); - assert(pos >= 0); - return pos; - } - } - } - } - return -1; -} - - -GLint -_slang_lookup_statevar_field(const char *base, const char *field, - struct gl_program_parameter_list *paramList, - GLuint *swizzleOut) -{ - GLint pos = -1; - const GLint len = _mesa_strlen(base) - + _mesa_strlen(field) + 2; - char *name = (char *) _mesa_malloc(len); - - if (!name) - return -1; - - _mesa_strcpy(name, base); - /*_mesa_*/strcat(name, "."); - /*_mesa_*/strcat(name, field); - printf("FULL NAME: %s\n", name); - - pos = _slang_lookup_statevar(name, 0, paramList, swizzleOut); - - _mesa_free(name); - - return pos; -} - - -struct field_info { - const char *Name; - gl_state_index Token; - GLint TokenPos; - GLuint Swizzle; -}; - -#define MT_FIELD { NULL, 0, -1, 0 } -#define MAX_FIELDS 5 -#define INDEX_POS 1000 - -struct state_uniform_info { - const char *Name; - gl_state_index StateTokens[2]; - struct field_info Fields[MAX_FIELDS]; -}; - - - -static const struct state_uniform_info Uniforms[] = { - { "gl_ModelViewMatrix", { STATE_MODELVIEW_MATRIX, INDEX_POS }, - { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} - }, - { "gl_ProjectionMatrix", { STATE_PROJECTION_MATRIX, INDEX_POS }, - { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} - }, - { "gl_ModelViewProjectionMatrix", { STATE_MVP_MATRIX, INDEX_POS }, - { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} - }, - { "gl_NormalMatrix", { STATE_MODELVIEW_MATRIX, INDEX_POS }, - { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} - }, - { "gl_TextureMatrix", { STATE_TEXTURE_MATRIX, INDEX_POS }, - { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} - }, - - { "gl_ClipPlane", { STATE_CLIPPLANE, INDEX_POS }, - { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD} - }, - - { "gl_DepthRange", { STATE_DEPTH_RANGE, 0 }, - { - { "near", 0, -1, SWIZZLE_XXXX }, - { "far", 0, -1, SWIZZLE_YYYY }, - { "diff", 0, -1, SWIZZLE_ZZZZ }, - MT_FIELD, - MT_FIELD - } - }, - - { "gl_Fog", { STATE_FOG, 0 }, - { - { "color", STATE_FOG_COLOR, 1, SWIZZLE_NOOP }, - { "density", STATE_FOG_PARAMS, 1, SWIZZLE_XXXX }, - { "start", STATE_FOG_PARAMS, 1, SWIZZLE_YYYY }, - { "end", STATE_FOG_PARAMS, 1, SWIZZLE_ZZZZ }, - { "scale", STATE_FOG_PARAMS, 1, SWIZZLE_WWWW } - } - }, - - { NULL, { 0, 0 }, - { MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD, MT_FIELD } - } -}; - - static GLint -lookup_statevar(const char *var, GLint index, const char *field, +lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, GLuint *swizzleOut, struct gl_program_parameter_list *paramList) { gl_state_index tokens[STATE_LENGTH]; - GLuint i, j; - GLint pos; + GLuint i; + GLboolean isMatrix = GL_FALSE; for (i = 0; i < STATE_LENGTH; i++) { tokens[i] = 0; } + *swizzleOut = SWIZZLE_NOOP; - for (i = 0; Uniforms[i].Name; i++) { - if (strcmp(var, Uniforms[i].Name) == 0) { - /* found the uniform */ - - for (j = 0; j < 2; j++) { - tokens[j] = Uniforms[i].StateTokens[j]; - if (tokens[j] == INDEX_POS) { - /* replace INDEX_POS with actual array index */ - assert(index >= 0); - tokens[j] = index; - } - } - - if (field) { - /* extra work for var.field */ - for (j = 0; j < MAX_FIELDS; j++) { - if (!Uniforms[i].Fields[j].Name) { - /* field not found! */ - _mesa_problem(NULL, "field not found"); - return -1; - } - else if (strcmp(field, Uniforms[i].Fields[j].Name) == 0) { - /* found the field */ - GLint tokenPos = Uniforms[i].Fields[j].TokenPos; - if (tokenPos>= 0) { - tokens[tokenPos] = Uniforms[i].Fields[j].Token; - } - *swizzleOut = Uniforms[i].Fields[j].Swizzle; - break; - } - - } - } - - if (tokens[0] == STATE_MODELVIEW_MATRIX || - tokens[0] == STATE_PROJECTION_MATRIX || - tokens[0] == STATE_MVP_MATRIX || - tokens[0] == STATE_TEXTURE_MATRIX || - tokens[0] == STATE_PROGRAM_MATRIX) { - /* a matrix */ - GLuint j; - GLint pos[4]; - gl_state_index indexesCopy[STATE_LENGTH]; - /* make copy of state tokens */ - for (j = 0; j < STATE_LENGTH; j++) - indexesCopy[j] = tokens[j]; - /* load rows */ - for (j = 0; j < 4/*state[i].NumRows*/; j++) { - indexesCopy[2] = indexesCopy[3] = j; /* jth row of matrix */ - pos[j] = _mesa_add_state_reference(paramList, (GLint*) indexesCopy); - assert(pos[j] >= 0); - } - return pos[0] + index; - } + if (strcmp(var, "gl_ModelViewMatrix") == 0) { + tokens[0] = STATE_MODELVIEW_MATRIX; + isMatrix = GL_TRUE; + } + else if (strcmp(var, "gl_ModelProjectionMatrix") == 0) { + tokens[0] = STATE_PROJECTION_MATRIX; + isMatrix = GL_TRUE; + } + else if (strcmp(var, "gl_ModelViewProjectionMatrix") == 0) { + tokens[0] = STATE_MVP_MATRIX; + isMatrix = GL_TRUE; + } + else if (strcmp(var, "gl_NormalMatrix") == 0) { + tokens[0] = STATE_MODELVIEW_MATRIX; + isMatrix = GL_TRUE; + } + else if (strcmp(var, "gl_TextureMatrix") == 0) { + tokens[0] = STATE_TEXTURE_MATRIX; + if (index2 >= 0) + tokens[1] = index2; + isMatrix = GL_TRUE; + } + else if (strcmp(var, "gl_DepthRange") == 0) { + tokens[0] = STATE_DEPTH_RANGE; + if (strcmp(field, "near") == 0) { + *swizzleOut = SWIZZLE_XXXX; + } + else if (strcmp(field, "far") == 0) { + *swizzleOut = SWIZZLE_YYYY; + } + else if (strcmp(field, "diff") == 0) { + *swizzleOut = SWIZZLE_ZZZZ; + } + else { + return -1; + } + } + else if (strcmp(var, "gl_ClipPlane") == 0) { + tokens[0] = STATE_CLIPPLANE; + tokens[1] = index1; + } + else if (strcmp(var, "gl_FrontMaterial") == 0 || + strcmp(var, "gl_BackMaterial") == 0) { + tokens[0] = STATE_MATERIAL; + if (strcmp(var, "gl_FrontMaterial") == 0) + tokens[1] = 0; + else + tokens[1] = 1; + if (strcmp(field, "emission") == 0) { + tokens[2] = STATE_EMISSION; + } + else if (strcmp(field, "ambient") == 0) { + tokens[2] = STATE_AMBIENT; + } + else if (strcmp(field, "diffuse") == 0) { + tokens[2] = STATE_DIFFUSE; + } + else if (strcmp(field, "specular") == 0) { + tokens[2] = STATE_SPECULAR; + } + else if (strcmp(field, "shininess") == 0) { + tokens[2] = STATE_SHININESS; + *swizzleOut = SWIZZLE_XXXX; + } + else { + return -1; + } + } + else if (strcmp(var, "gl_LightSource") == 0) { + tokens[0] = STATE_LIGHT; + tokens[1] = index1; + if (strcmp(field, "ambient") == 0) { + tokens[2] = STATE_AMBIENT; + } + else if (strcmp(field, "diffuse") == 0) { + tokens[2] = STATE_DIFFUSE; + } + else if (strcmp(field, "specular") == 0) { + tokens[2] = STATE_SPECULAR; + } + else if (strcmp(field, "position") == 0) { + tokens[2] = STATE_POSITION; + } + else if (strcmp(field, "halfVector") == 0) { + tokens[2] = STATE_HALF_VECTOR; + } + else if (strcmp(field, "spotDirection") == 0) { + tokens[2] = STATE_SPOT_DIRECTION; + } + else if (strcmp(field, "spotCosCutoff") == 0) { + tokens[2] = STATE_SPOT_DIRECTION; + *swizzleOut = SWIZZLE_WWWW; + } + else if (strcmp(field, "spotCutoff") == 0) { + tokens[2] = STATE_SPOT_CUTOFF; + *swizzleOut = SWIZZLE_XXXX; + } + else if (strcmp(field, "spotExponent") == 0) { + tokens[2] = STATE_ATTENUATION; + *swizzleOut = SWIZZLE_WWWW; + } + else if (strcmp(field, "constantAttenuation") == 0) { + tokens[2] = STATE_ATTENUATION; + *swizzleOut = SWIZZLE_XXXX; + } + else if (strcmp(field, "linearAttenuation") == 0) { + tokens[2] = STATE_ATTENUATION; + *swizzleOut = SWIZZLE_YYYY; + } + else if (strcmp(field, "quadraticAttenuation") == 0) { + tokens[2] = STATE_ATTENUATION; + *swizzleOut = SWIZZLE_ZZZZ; + } + else { + return -1; + } + } + else if (strcmp(var, "gl_LightModel") == 0) { + if (strcmp(field, "ambient") == 0) { + tokens[0] = STATE_LIGHTMODEL_AMBIENT; + } + else { + return -1; + } + } + else if (strcmp(var, "gl_FrontLightModelProduct") == 0) { + if (strcmp(field, "ambient") == 0) { + tokens[0] = STATE_LIGHTMODEL_SCENECOLOR; + tokens[1] = 0; + } + else { + return -1; + } + } + else if (strcmp(var, "gl_BackLightModelProduct") == 0) { + if (strcmp(field, "ambient") == 0) { + tokens[0] = STATE_LIGHTMODEL_SCENECOLOR; + tokens[1] = 1; + } + else { + return -1; + } + } + else if (strcmp(var, "gl_FrontLightProduct") == 0 || + strcmp(var, "gl_BackLightProduct") == 0) { + tokens[0] = STATE_LIGHTPROD; + tokens[1] = index1; /* light number */ + if (strcmp(var, "gl_FrontLightProduct") == 0) { + tokens[2] = 0; /* front */ + } + else { + tokens[2] = 1; /* back */ + } + if (strcmp(field, "ambient") == 0) { + tokens[3] = STATE_AMBIENT; + } + else if (strcmp(field, "diffuset") == 0) { + tokens[3] = STATE_DIFFUSE; + } + else if (strcmp(field, "specular") == 0) { + tokens[3] = STATE_SPECULAR; + } + else { + return -1; + } + } + else if (strcmp(var, "gl_TextureEnvColor") == 0) { + tokens[0] = STATE_TEXENV_COLOR; + tokens[1] = index1; + } + else if (strcmp(var, "gl_EyePlaneS") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_EYE_S; + } + else if (strcmp(var, "gl_EyePlaneT") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_EYE_T; + } + else if (strcmp(var, "gl_EyePlaneR") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_EYE_R; + } + else if (strcmp(var, "gl_EyePlaneQ") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_EYE_Q; + } + else if (strcmp(var, "gl_ObjectPlaneS") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_OBJECT_S; + } + else if (strcmp(var, "gl_ObjectPlaneT") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_OBJECT_T; + } + else if (strcmp(var, "gl_ObjectPlaneT") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_OBJECT_T; + } + else if (strcmp(var, "gl_ObjectPlaneT") == 0) { + tokens[0] = STATE_TEXGEN; + tokens[1] = index1; /* tex unit */ + tokens[2] = STATE_TEXGEN_OBJECT_T; + } + else if (strcmp(var, "gl_Fog") == 0) { + tokens[0] = STATE_FOG; + if (strcmp(field, "color") == 0) { + tokens[1] = STATE_FOG_COLOR; + } + else if (strcmp(field, "density") == 0) { + tokens[1] = STATE_FOG_PARAMS; + *swizzleOut = SWIZZLE_XXXX; + } + else if (strcmp(field, "start") == 0) { + tokens[1] = STATE_FOG_PARAMS; + *swizzleOut = SWIZZLE_YYYY; + } + else if (strcmp(field, "end") == 0) { + tokens[1] = STATE_FOG_PARAMS; + *swizzleOut = SWIZZLE_ZZZZ; + } + else if (strcmp(field, "scale") == 0) { + tokens[1] = STATE_FOG_PARAMS; + *swizzleOut = SWIZZLE_WWWW; + } + else { + return -1; + } + } + else { + return -1; + } - pos = _mesa_add_state_reference(paramList, (GLint *) tokens); - assert(pos >= 0); - return pos; + if (isMatrix) { + /* load all four columns of matrix */ + GLint pos[4]; + GLuint j; + for (j = 0; j < 4; j++) { + tokens[2] = tokens[3] = j; /* jth row of matrix */ + pos[j] = _mesa_add_state_reference(paramList, (GLint *) tokens); + assert(pos[j] >= 0); + ASSERT(pos[j] >= 0); } + return pos[0] + index1; + } + else { + /* allocate a single register */ + GLint pos = _mesa_add_state_reference(paramList, (GLint *) tokens); + ASSERT(pos >= 0); + return pos; } - return -1; } - /** * Allocate storage for a pre-defined uniform (a GL state variable). * As a memory-saving optimization, we try to only allocate storage for @@ -390,16 +332,17 @@ lookup_statevar(const char *var, GLint index, const char *field, * * Currently, all pre-defined uniforms are in one of these forms: * var - * var[index] + * var[i] * var.field - * var[index].field + * var[i].field + * var[i][j] */ GLint _slang_alloc_statevar(slang_ir_node *n, struct gl_program_parameter_list *paramList) { const char *field = NULL, *var; - GLint index = -1, pos; + GLint index1 = -1, index2 = -1, pos; GLuint swizzle; if (n->Opcode == IR_FIELD) { @@ -410,14 +353,21 @@ _slang_alloc_statevar(slang_ir_node *n, if (n->Opcode == IR_ELEMENT) { /* XXX can only handle constant indexes for now */ assert(n->Children[1]->Opcode == IR_FLOAT); - index = (GLint) n->Children[1]->Value[0]; + index1 = (GLint) n->Children[1]->Value[0]; + n = n->Children[0]; + } + + if (n->Opcode == IR_ELEMENT) { + /* XXX can only handle constant indexes for now */ + assert(n->Children[1]->Opcode == IR_FLOAT); + index2 = (GLint) n->Children[1]->Value[0]; n = n->Children[0]; } assert(n->Opcode == IR_VAR); var = (char *) n->Var->a_name; - pos = lookup_statevar(var, index, field, &swizzle, paramList); + pos = lookup_statevar(var, index1, index2, field, &swizzle, paramList); assert(pos >= 0); if (pos >= 0) { n->Store->Index = pos; diff --git a/src/mesa/shader/slang/slang_builtin.h b/src/mesa/shader/slang/slang_builtin.h index 368a16b234..ae20c844d5 100644 --- a/src/mesa/shader/slang/slang_builtin.h +++ b/src/mesa/shader/slang/slang_builtin.h @@ -31,17 +31,6 @@ #include "slang_ir.h" -extern GLint -_slang_lookup_statevar(const char *name, GLint index, - struct gl_program_parameter_list *paramList, - GLuint *swizzleOut); - - -extern GLint -_slang_lookup_statevar_field(const char *base, const char *field, - struct gl_program_parameter_list *paramList, - GLuint *swizzleOut); - extern GLint _slang_alloc_statevar(slang_ir_node *n, struct gl_program_parameter_list *paramList); -- cgit v1.2.3 From 78399d23dc75611d839c2fe1165f9fe3ab37c472 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 15:22:17 -0700 Subject: remove dead code --- src/mesa/shader/slang/slang_emit.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index cef6299d62..8ea54412ed 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -513,6 +513,7 @@ new_instruction(struct gl_program *prog, gl_inst_opcode opcode) } +#if 0 /** * Return pointer to last instruction in program. */ @@ -524,6 +525,7 @@ prev_instruction(struct gl_program *prog) else return prog->Instructions + prog->NumInstructions - 1; } +#endif static struct prog_instruction * @@ -1354,24 +1356,6 @@ emit_struct_field(slang_var_table *vt, slang_ir_node *n, n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); return NULL; } -#if 0 - if (n->Children[0]->Store->File == PROGRAM_STATE_VAR) { - /* state variable sub-field */ - GLint pos; - GLuint swizzle; - assert(n->Children[0]->Opcode == IR_VAR); - pos = _slang_lookup_statevar_field((char *) n->Children[0]->Var->a_name, - n->Target, - prog->Parameters, &swizzle); - if (pos < 0) { - RETURN_ERROR2("Undefined structure member", n->Target, 0); - } - assert(n->Store); - assert(n->Store->File == PROGRAM_STATE_VAR); - n->Store->Index = pos; - n->Store->Swizzle = swizzle; - } -#endif else { _mesa_problem(NULL, "structs/fields not supported yet"); } -- cgit v1.2.3 From f958aabdf3e3dc82827628cab97b159bd5089651 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 15:23:11 -0700 Subject: more minor changes to STATE_ indexing --- src/mesa/shader/arbprogparse.c | 12 +++-- src/mesa/shader/prog_statevars.c | 99 +++++++++++++++++++++++----------------- src/mesa/shader/prog_statevars.h | 4 +- src/mesa/tnl/t_vp_build.c | 6 +-- 4 files changed, 72 insertions(+), 49 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 4c200f74cc..0ac35a5768 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1138,7 +1138,7 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, state_tokens[2] = STATE_ATTENUATION; break; case LIGHT_HALF: - state_tokens[2] = STATE_HALF; + state_tokens[2] = STATE_HALF_VECTOR; break; case LIGHT_SPOT_DIRECTION: state_tokens[2] = STATE_SPOT_DIRECTION; @@ -1276,11 +1276,13 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, case STATE_POINT: switch (*(*inst++)) { case POINT_SIZE: - state_tokens[0] = STATE_POINT_SIZE; + state_tokens[0] = STATE_POINT; + state_tokens[1] = STATE_POINT_SIZE; break; case POINT_ATTENUATION: - state_tokens[0] = STATE_POINT_ATTENUATION; + state_tokens[0] = STATE_POINT; + state_tokens[1] = STATE_POINT_ATTENUATION; break; } break; @@ -3378,6 +3380,10 @@ print_state_token (GLint token) fprintf (stderr, "STATE_CLIPPLANE "); break; + case STATE_POINT: + fprintf (stderr, "STATE_POINT "); + break; + case STATE_POINT_SIZE: fprintf (stderr, "STATE_POINT_SIZE "); break; diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index d6c552a71f..53778183c5 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -116,7 +116,10 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], COPY_3V(value, ctx->Light.Light[ln].EyeDirection); value[3] = ctx->Light.Light[ln]._CosCutoff; return; - case STATE_HALF: + case STATE_SPOT_CUTOFF: + value[0] = ctx->Light.Light[ln].SpotCutoff; + return; + case STATE_HALF_VECTOR: { GLfloat eye_z[] = {0, 0, 1}; @@ -261,17 +264,20 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], COPY_4V(value, ctx->Transform.EyeUserPlane[plane]); } return; - case STATE_POINT_SIZE: - value[0] = ctx->Point.Size; - value[1] = ctx->Point.MinSize; - value[2] = ctx->Point.MaxSize; - value[3] = ctx->Point.Threshold; - return; - case STATE_POINT_ATTENUATION: - value[0] = ctx->Point.Params[0]; - value[1] = ctx->Point.Params[1]; - value[2] = ctx->Point.Params[2]; - value[3] = 1.0F; + case STATE_POINT: + if (state[1] == STATE_POINT_SIZE) { + value[0] = ctx->Point.Size; + value[1] = ctx->Point.MinSize; + value[2] = ctx->Point.MaxSize; + value[3] = ctx->Point.Threshold; + } + else { + ASSERT(state[1] == STATE_POINT_ATTENUATION); + value[0] = ctx->Point.Params[0]; + value[1] = ctx->Point.Params[1]; + value[2] = ctx->Point.Params[2]; + value[3] = 1.0F; + } return; case STATE_MODELVIEW_MATRIX: case STATE_PROJECTION_MATRIX: @@ -399,12 +405,13 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], } return; + case STATE_NORMAL_SCALE: + ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1); + return; + case STATE_INTERNAL: { switch (state[1]) { - case STATE_NORMAL_SCALE: - ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1); - break; case STATE_TEXRECT_SCALE: { const int unit = (int) state[2]; const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; @@ -462,8 +469,7 @@ _mesa_program_state_flags(const GLint state[STATE_LENGTH]) case STATE_CLIPPLANE: return _NEW_TRANSFORM; - case STATE_POINT_SIZE: - case STATE_POINT_ATTENUATION: + case STATE_POINT: return _NEW_POINT; case STATE_MODELVIEW_MATRIX: @@ -484,10 +490,11 @@ _mesa_program_state_flags(const GLint state[STATE_LENGTH]) case STATE_VERTEX_PROGRAM: return _NEW_PROGRAM; + case STATE_NORMAL_SCALE: + return _NEW_MODELVIEW; + case STATE_INTERNAL: switch (state[1]) { - case STATE_NORMAL_SCALE: - return _NEW_MODELVIEW; case STATE_TEXRECT_SCALE: return _NEW_TEXTURE; default: @@ -520,7 +527,7 @@ append_token(char *dst, gl_state_index k) { switch (k) { case STATE_MATERIAL: - append(dst, "material."); + append(dst, "material"); break; case STATE_LIGHT: append(dst, "light"); @@ -548,26 +555,29 @@ append_token(char *dst, gl_state_index k) case STATE_CLIPPLANE: append(dst, "clip"); break; + case STATE_POINT: + append(dst, "point"); + break; case STATE_POINT_SIZE: - append(dst, "point.size"); + append(dst, "size"); break; case STATE_POINT_ATTENUATION: - append(dst, "point.attenuation"); + append(dst, "attenuation"); break; case STATE_MODELVIEW_MATRIX: - append(dst, "modelview"); + append(dst, "matrix.modelview"); break; case STATE_PROJECTION_MATRIX: - append(dst, "projection"); + append(dst, "matrix.projection"); break; case STATE_MVP_MATRIX: - append(dst, "mvp"); + append(dst, "matrix.mvp"); break; case STATE_TEXTURE_MATRIX: - append(dst, "texture"); + append(dst, "matrix.texture"); break; case STATE_PROGRAM_MATRIX: - append(dst, "program"); + append(dst, "matrix.program"); break; case STATE_MATRIX_INVERSE: append(dst, ".inverse"); @@ -579,22 +589,22 @@ append_token(char *dst, gl_state_index k) append(dst, ".invtrans"); break; case STATE_AMBIENT: - append(dst, "ambient"); + append(dst, ".ambient"); break; case STATE_DIFFUSE: - append(dst, "diffuse"); + append(dst, ".diffuse"); break; case STATE_SPECULAR: - append(dst, "specular"); + append(dst, ".specular"); break; case STATE_EMISSION: - append(dst, "emission"); + append(dst, ".emission"); break; case STATE_SHININESS: - append(dst, "shininess"); + append(dst, "lshininess"); break; - case STATE_HALF: - append(dst, "half"); + case STATE_HALF_VECTOR: + append(dst, ".half"); break; case STATE_POSITION: append(dst, ".position"); @@ -605,6 +615,9 @@ append_token(char *dst, gl_state_index k) case STATE_SPOT_DIRECTION: append(dst, ".spot.direction"); break; + case STATE_SPOT_CUTOFF: + append(dst, ".spot.cutoff"); + break; case STATE_TEXGEN_EYE_S: append(dst, "eye.s"); break; @@ -644,8 +657,10 @@ append_token(char *dst, gl_state_index k) case STATE_LOCAL: append(dst, "local"); break; - case STATE_INTERNAL: case STATE_NORMAL_SCALE: + append(dst, "normalScale"); + break; + case STATE_INTERNAL: case STATE_POSITION_NORMALIZED: append(dst, "(internal)"); break; @@ -667,7 +682,7 @@ static void append_index(char *dst, GLint index) { char s[20]; - _mesa_sprintf(s, "[%d].", index); + _mesa_sprintf(s, "[%d]", index); append(dst, s); } @@ -691,7 +706,6 @@ _mesa_program_state_string(const GLint state[STATE_LENGTH]) append_token(str, (gl_state_index) state[2]); break; case STATE_LIGHT: - append(str, "light"); append_index(str, state[1]); /* light number [i]. */ append_token(str, (gl_state_index) state[2]); /* coefficients */ break; @@ -725,10 +739,10 @@ _mesa_program_state_string(const GLint state[STATE_LENGTH]) break; case STATE_CLIPPLANE: append_index(str, state[1]); /* plane [i] */ - append(str, "plane"); + append(str, ".plane"); break; - case STATE_POINT_SIZE: - case STATE_POINT_ATTENUATION: + case STATE_POINT: + append_token(str, state[1]); break; case STATE_MODELVIEW_MATRIX: case STATE_PROJECTION_MATRIX: @@ -746,8 +760,9 @@ _mesa_program_state_string(const GLint state[STATE_LENGTH]) const GLuint firstRow = (GLuint) state[2]; const GLuint lastRow = (GLuint) state[3]; const gl_state_index modifier = (gl_state_index) state[4]; - append_token(str, mat); - if (index) + if (index || + mat == STATE_TEXTURE_MATRIX || + mat == STATE_PROGRAM_MATRIX) append_index(str, index); if (modifier) append_token(str, modifier); diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 1b686d8078..a1170d6684 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -60,6 +60,7 @@ typedef enum gl_state_index_ { STATE_CLIPPLANE, + STATE_POINT, STATE_POINT_SIZE, STATE_POINT_ATTENUATION, @@ -77,11 +78,12 @@ typedef enum gl_state_index_ { STATE_SPECULAR, STATE_EMISSION, STATE_SHININESS, - STATE_HALF, + STATE_HALF_VECTOR, STATE_POSITION, STATE_ATTENUATION, STATE_SPOT_DIRECTION, + STATE_SPOT_CUTOFF, STATE_TEXGEN_EYE_S, STATE_TEXGEN_EYE_T, diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 9065e3421f..8b75dff96a 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -946,7 +946,7 @@ static void build_lighting( struct tnl_program *p ) */ VPpli = register_param3(p, STATE_LIGHT, i, STATE_POSITION_NORMALIZED); - half = register_param3(p, STATE_LIGHT, i, STATE_HALF); + half = register_param3(p, STATE_LIGHT, i, STATE_HALF_VECTOR); } else { struct ureg Ppli = register_param3(p, STATE_LIGHT, i, @@ -1328,8 +1328,8 @@ static void build_texture_transform( struct tnl_program *p ) static void build_pointsize( struct tnl_program *p ) { struct ureg eye = get_eye_position(p); - struct ureg state_size = register_param1(p, STATE_POINT_SIZE); - struct ureg state_attenuation = register_param1(p, STATE_POINT_ATTENUATION); + struct ureg state_size = register_param2(p, STATE_POINT, STATE_POINT_SIZE); + struct ureg state_attenuation = register_param2(p, STATE_POINT, STATE_POINT_ATTENUATION); struct ureg out = register_output(p, VERT_RESULT_PSIZ); struct ureg ut = get_temp(p); -- cgit v1.2.3 From 502c132738bfe4259ecc478c72969b435271a28d Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 15:42:10 -0700 Subject: fix copy&paste errors --- src/mesa/shader/slang/slang_builtin.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 08a4a6a708..688ef9c88a 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -47,6 +47,7 @@ * Lookup GL state given a variable name, 0, 1 or 2 indexes and a field. * Allocate room for the state in the given param list and return position * in the list. + * Yes, this is kind of ugly, but it works. */ static GLint lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, @@ -262,15 +263,15 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[1] = index1; /* tex unit */ tokens[2] = STATE_TEXGEN_OBJECT_T; } - else if (strcmp(var, "gl_ObjectPlaneT") == 0) { + else if (strcmp(var, "gl_ObjectPlaneR") == 0) { tokens[0] = STATE_TEXGEN; tokens[1] = index1; /* tex unit */ - tokens[2] = STATE_TEXGEN_OBJECT_T; + tokens[2] = STATE_TEXGEN_OBJECT_R; } - else if (strcmp(var, "gl_ObjectPlaneT") == 0) { + else if (strcmp(var, "gl_ObjectPlaneQ") == 0) { tokens[0] = STATE_TEXGEN; tokens[1] = index1; /* tex unit */ - tokens[2] = STATE_TEXGEN_OBJECT_T; + tokens[2] = STATE_TEXGEN_OBJECT_Q; } else if (strcmp(var, "gl_Fog") == 0) { tokens[0] = STATE_FOG; -- cgit v1.2.3 From 5d89b027ee6d36aa5fffc45a5d321cfb3b24cad3 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 15:42:50 -0700 Subject: remove unneeded #includes --- src/mesa/shader/slang/slang_builtin.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 688ef9c88a..47e6bcbcc4 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -29,18 +29,13 @@ */ #include "imports.h" -#include "macros.h" #include "slang_builtin.h" -#include "slang_typeinfo.h" -#include "slang_codegen.h" -#include "slang_compile.h" #include "slang_ir.h" #include "mtypes.h" #include "program.h" #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_statevars.h" -#include "slang_print.h" /** -- cgit v1.2.3 From 5a2c1ad6258bf5b91dbebcc412d4f9221b93ef3f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Feb 2007 16:05:56 -0700 Subject: disable debug --- src/mesa/shader/slang/slang_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d78f45a437..405b418099 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2592,7 +2592,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, GLboolean success = GL_TRUE; GLint texIndex; slang_ir_storage *store = NULL; - int dbg = 1; + int dbg = 0; texIndex = sampler_to_texture_index(var->type.specifier.type); -- cgit v1.2.3 From 7b30053b264726156a018c822657270e745320ce Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 09:08:36 -0700 Subject: fix negative indentation problem --- src/mesa/shader/prog_print.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 9560ffad7d..95b62fcfb5 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -477,7 +477,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, gl_prog_print_mode mode, const struct gl_program *prog) { - GLuint i; + GLint i; if (inst->Opcode == OPCODE_ELSE || inst->Opcode == OPCODE_ENDIF || @@ -485,7 +485,6 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, inst->Opcode == OPCODE_ENDSUB) { indent -= 3; } - assert(indent >= 0); for (i = 0; i < indent; i++) { _mesa_printf(" "); } -- cgit v1.2.3 From 96abc6bf72fe0ca6f2aceb87aa9324afe72d67ac Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 09:08:53 -0700 Subject: merge fix: add STATE_FOG_PARAMS_OPTIMIZED, STATE_SPOT_DIR_NORMALIZED --- src/mesa/shader/prog_statevars.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index a1170d6684..91713f3d1d 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -108,6 +108,8 @@ typedef enum gl_state_index_ { STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_POSITION_NORMALIZED, /* normalized light position */ + STATE_FOG_PARAMS_OPTIMIZED, /* for faster fog calc */ + STATE_SPOT_DIR_NORMALIZED, /* pre-normalized spot dir */ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ } gl_state_index; -- cgit v1.2.3 From 6ec7484ae8190fb8e61eae9a016b67db65011731 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 09:10:24 -0700 Subject: use ctx->VertexProgram._Current instead of ctx->VertexProgram._Enabled --- src/mesa/vbo/vbo_context.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h index 0dc1019b39..013f81bdd5 100644 --- a/src/mesa/vbo/vbo_context.h +++ b/src/mesa/vbo/vbo_context.h @@ -96,9 +96,9 @@ enum { static INLINE GLuint get_program_mode( GLcontext *ctx ) { - if (!ctx->VertexProgram._Enabled) + if (!ctx->VertexProgram._Current) return VP_NONE; - else if (ctx->VertexProgram.Current->IsNVProgram) + else if (ctx->VertexProgram._Current->IsNVProgram) return VP_NV; else return VP_ARB; -- cgit v1.2.3 From 3f4826a358cab8b6d638fc8eb46aef668a7bcf46 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 09:10:38 -0700 Subject: XXX comments about shaders --- src/mesa/vbo/vbo_exec_api.c | 1 + src/mesa/vbo/vbo_save_draw.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 71fee8ca16..c30fd18e2d 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -486,6 +486,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode ) if (ctx->NewState) { _mesa_update_state( ctx ); + /* XXX also need to check if shader enabled, but invalid */ if ((ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) || (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled)) { _mesa_error(ctx, GL_INVALID_OPERATION, diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index a50d1cd904..8be258d5aa 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -203,6 +203,7 @@ void vbo_save_playback_vertex_list( GLcontext *ctx, void *data ) if (ctx->NewState) _mesa_update_state( ctx ); + /* XXX also need to check if shader enabled, but invalid */ if ((ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) || (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled)) { _mesa_error(ctx, GL_INVALID_OPERATION, -- cgit v1.2.3 From 776bc9cf55b116e17dddde4d097985b51879c83f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 09:29:46 -0700 Subject: Undo some STATE_POINT/FOG changes. Max length of state token array is now 5. --- src/mesa/shader/arbprogparse.c | 6 +-- src/mesa/shader/prog_parameter.c | 2 +- src/mesa/shader/prog_statevars.c | 71 ++++++++++++----------------------- src/mesa/shader/prog_statevars.h | 4 +- src/mesa/shader/programopt.c | 9 +++-- src/mesa/shader/slang/slang_builtin.c | 18 ++++++--- src/mesa/tnl/t_vp_build.c | 4 +- 7 files changed, 48 insertions(+), 66 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 480fdf512c..9dbcb60a17 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1276,13 +1276,11 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, case STATE_POINT: switch (*(*inst++)) { case POINT_SIZE: - state_tokens[0] = STATE_POINT; - state_tokens[1] = STATE_POINT_SIZE; + state_tokens[0] = STATE_POINT_SIZE; break; case POINT_ATTENUATION: - state_tokens[0] = STATE_POINT; - state_tokens[1] = STATE_POINT_ATTENUATION; + state_tokens[0] = STATE_POINT_ATTENUATION; break; } break; diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 3ebd559119..505c5016ac 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -379,7 +379,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, /* Check if the state reference is already in the list */ for (index = 0; index < (GLint) paramList->NumParameters; index++) { GLuint i, match = 0; - for (i = 0; i < 6; i++) { + for (i = 0; i < STATE_LENGTH; i++) { if (paramList->Parameters[index].StateIndexes[i] == stateTokens[i]) { match++; } diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 53778183c5..0d70af3b27 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -246,17 +246,14 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], COPY_4V(value, ctx->Texture.Unit[unit].EnvColor); } return; - case STATE_FOG: - if (state[1] == STATE_FOG_COLOR) { - COPY_4V(value, ctx->Fog.Color); - } - else { - ASSERT(state[1] == STATE_FOG_PARAMS); - value[0] = ctx->Fog.Density; - value[1] = ctx->Fog.Start; - value[2] = ctx->Fog.End; - value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start); - } + case STATE_FOG_COLOR: + COPY_4V(value, ctx->Fog.Color); + return; + case STATE_FOG_PARAMS: + value[0] = ctx->Fog.Density; + value[1] = ctx->Fog.Start; + value[2] = ctx->Fog.End; + value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start); return; case STATE_CLIPPLANE: { @@ -264,20 +261,17 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], COPY_4V(value, ctx->Transform.EyeUserPlane[plane]); } return; - case STATE_POINT: - if (state[1] == STATE_POINT_SIZE) { - value[0] = ctx->Point.Size; - value[1] = ctx->Point.MinSize; - value[2] = ctx->Point.MaxSize; - value[3] = ctx->Point.Threshold; - } - else { - ASSERT(state[1] == STATE_POINT_ATTENUATION); - value[0] = ctx->Point.Params[0]; - value[1] = ctx->Point.Params[1]; - value[2] = ctx->Point.Params[2]; - value[3] = 1.0F; - } + case STATE_POINT_SIZE: + value[0] = ctx->Point.Size; + value[1] = ctx->Point.MinSize; + value[2] = ctx->Point.MaxSize; + value[3] = ctx->Point.Threshold; + return; + case STATE_POINT_ATTENUATION: + value[0] = ctx->Point.Params[0]; + value[1] = ctx->Point.Params[1]; + value[2] = ctx->Point.Params[2]; + value[3] = 1.0F; return; case STATE_MODELVIEW_MATRIX: case STATE_PROJECTION_MATRIX: @@ -459,17 +453,15 @@ _mesa_program_state_flags(const GLint state[STATE_LENGTH]) case STATE_TEXENV_COLOR: return _NEW_TEXTURE; - case STATE_FOG: -#if 0 case STATE_FOG_COLOR: case STATE_FOG_PARAMS: -#endif return _NEW_FOG; case STATE_CLIPPLANE: return _NEW_TRANSFORM; - case STATE_POINT: + case STATE_POINT_SIZE: + case STATE_POINT_ATTENUATION: return _NEW_POINT; case STATE_MODELVIEW_MATRIX: @@ -543,26 +535,20 @@ append_token(char *dst, gl_state_index k) case STATE_TEXGEN: append(dst, "texgen"); break; - case STATE_FOG: - append(dst, "fog"); - break; case STATE_FOG_COLOR: - append(dst, ".color"); + append(dst, "fog.color"); break; case STATE_FOG_PARAMS: - append(dst, ".params"); + append(dst, "fog.params"); break; case STATE_CLIPPLANE: append(dst, "clip"); break; - case STATE_POINT: - append(dst, "point"); - break; case STATE_POINT_SIZE: - append(dst, "size"); + append(dst, "point.size"); break; case STATE_POINT_ATTENUATION: - append(dst, "attenuation"); + append(dst, "point.attenuation"); break; case STATE_MODELVIEW_MATRIX: append(dst, "matrix.modelview"); @@ -733,17 +719,10 @@ _mesa_program_state_string(const GLint state[STATE_LENGTH]) append_index(str, state[1]); /* tex unit [i] */ append(str, "color"); break; - case STATE_FOG: - append(str, "fog"); - append_token(str, (gl_state_index) state[1]); /* color or params */ - break; case STATE_CLIPPLANE: append_index(str, state[1]); /* plane [i] */ append(str, ".plane"); break; - case STATE_POINT: - append_token(str, state[1]); - break; case STATE_MODELVIEW_MATRIX: case STATE_PROJECTION_MATRIX: case STATE_MVP_MATRIX: diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 91713f3d1d..82169342cd 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -32,7 +32,7 @@ * Number of STATE_* values we need to address any GL state. * Used to dimension arrays. */ -#define STATE_LENGTH 6 +#define STATE_LENGTH 5 /** @@ -54,13 +54,11 @@ typedef enum gl_state_index_ { STATE_TEXGEN, - STATE_FOG, STATE_FOG_COLOR, STATE_FOG_PARAMS, STATE_CLIPPLANE, - STATE_POINT, STATE_POINT_SIZE, STATE_POINT_ATTENUATION, diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index 05a05cd369..18da39c2d3 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -56,7 +56,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) * Setup state references for the modelview/projection matrix. * XXX we should check if these state vars are already declared. */ - static const GLint mvpState[4][5] = { + static const GLint mvpState[4][STATE_LENGTH] = { { STATE_MVP_MATRIX, 0, 0, 0, 0 }, /* state.matrix.mvp.row[0] */ { STATE_MVP_MATRIX, 0, 1, 1, 0 }, /* state.matrix.mvp.row[1] */ { STATE_MVP_MATRIX, 0, 2, 2, 0 }, /* state.matrix.mvp.row[2] */ @@ -125,9 +125,10 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) void _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) { - static const GLint fogPStateOpt[] = { STATE_INTERNAL, - STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 }; - static const GLint fogColorState[] = { STATE_FOG, STATE_FOG_COLOR, 0, 0, 0}; + static const GLint fogPStateOpt[STATE_LENGTH] + = { STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 }; + static const GLint fogColorState[STATE_LENGTH] + = { STATE_FOG_COLOR, 0, 0, 0, 0}; struct prog_instruction *newInst, *inst; const GLuint origLen = fprog->Base.NumInstructions; const GLuint newLen = origLen + 5; diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 47e6bcbcc4..7f4290b91f 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -99,6 +99,13 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[0] = STATE_CLIPPLANE; tokens[1] = index1; } + else if (strcmp(var, "gl_Point") == 0) { + if (strcmp(field, "size") == 0) { + tokens[0] = STATE_POINT_SIZE; + *swizzleOut = SWIZZLE_XXXX; + } + /* XXX finish */ + } else if (strcmp(var, "gl_FrontMaterial") == 0 || strcmp(var, "gl_BackMaterial") == 0) { tokens[0] = STATE_MATERIAL; @@ -269,24 +276,23 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[2] = STATE_TEXGEN_OBJECT_Q; } else if (strcmp(var, "gl_Fog") == 0) { - tokens[0] = STATE_FOG; if (strcmp(field, "color") == 0) { - tokens[1] = STATE_FOG_COLOR; + tokens[0] = STATE_FOG_COLOR; } else if (strcmp(field, "density") == 0) { - tokens[1] = STATE_FOG_PARAMS; + tokens[0] = STATE_FOG_PARAMS; *swizzleOut = SWIZZLE_XXXX; } else if (strcmp(field, "start") == 0) { - tokens[1] = STATE_FOG_PARAMS; + tokens[0] = STATE_FOG_PARAMS; *swizzleOut = SWIZZLE_YYYY; } else if (strcmp(field, "end") == 0) { - tokens[1] = STATE_FOG_PARAMS; + tokens[0] = STATE_FOG_PARAMS; *swizzleOut = SWIZZLE_ZZZZ; } else if (strcmp(field, "scale") == 0) { - tokens[1] = STATE_FOG_PARAMS; + tokens[0] = STATE_FOG_PARAMS; *swizzleOut = SWIZZLE_WWWW; } else { diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 283782588a..17f115f4a2 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1323,8 +1323,8 @@ static void build_texture_transform( struct tnl_program *p ) static void build_pointsize( struct tnl_program *p ) { struct ureg eye = get_eye_position(p); - struct ureg state_size = register_param2(p, STATE_POINT, STATE_POINT_SIZE); - struct ureg state_attenuation = register_param2(p, STATE_POINT, STATE_POINT_ATTENUATION); + struct ureg state_size = register_param1(p, STATE_POINT_SIZE); + struct ureg state_attenuation = register_param1(p, STATE_POINT_ATTENUATION); struct ureg out = register_output(p, VERT_RESULT_PSIZ); struct ureg ut = get_temp(p); -- cgit v1.2.3 From b618ac8c0b6d8ebd8af6c6d44d368f6b033acae8 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 09:39:25 -0700 Subject: updated debug code --- src/mesa/shader/arbprogparse.c | 228 ++++------------------------------------- 1 file changed, 18 insertions(+), 210 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 9dbcb60a17..43e2c7e1be 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -3335,194 +3335,6 @@ parse_vp_instruction (GLcontext * ctx, const GLubyte ** inst, #if DEBUG_PARSING -static GLvoid -print_state_token (GLint token) -{ - switch (token) { - case STATE_MATERIAL: - fprintf (stderr, "STATE_MATERIAL "); - break; - case STATE_LIGHT: - fprintf (stderr, "STATE_LIGHT "); - break; - - case STATE_LIGHTMODEL_AMBIENT: - fprintf (stderr, "STATE_AMBIENT "); - break; - - case STATE_LIGHTMODEL_SCENECOLOR: - fprintf (stderr, "STATE_SCENECOLOR "); - break; - - case STATE_LIGHTPROD: - fprintf (stderr, "STATE_LIGHTPROD "); - break; - - case STATE_TEXGEN: - fprintf (stderr, "STATE_TEXGEN "); - break; - - case STATE_FOG: - fprintf (stderr, "STATE_FOG "); - break; - - case STATE_FOG_COLOR: - fprintf (stderr, "STATE_FOG_COLOR "); - break; - - case STATE_FOG_PARAMS: - fprintf (stderr, "STATE_FOG_PARAMS "); - break; - - case STATE_CLIPPLANE: - fprintf (stderr, "STATE_CLIPPLANE "); - break; - - case STATE_POINT: - fprintf (stderr, "STATE_POINT "); - break; - - case STATE_POINT_SIZE: - fprintf (stderr, "STATE_POINT_SIZE "); - break; - - case STATE_POINT_ATTENUATION: - fprintf (stderr, "STATE_ATTENUATION "); - break; - - case STATE_MATRIX: - fprintf (stderr, "STATE_MATRIX "); - break; - - case STATE_MODELVIEW: - fprintf (stderr, "STATE_MODELVIEW "); - break; - - case STATE_PROJECTION: - fprintf (stderr, "STATE_PROJECTION "); - break; - - case STATE_MVP: - fprintf (stderr, "STATE_MVP "); - break; - - case STATE_TEXTURE: - fprintf (stderr, "STATE_TEXTURE "); - break; - - case STATE_PROGRAM: - fprintf (stderr, "STATE_PROGRAM "); - break; - - case STATE_MATRIX_INVERSE: - fprintf (stderr, "STATE_INVERSE "); - break; - - case STATE_MATRIX_TRANSPOSE: - fprintf (stderr, "STATE_TRANSPOSE "); - break; - - case STATE_MATRIX_INVTRANS: - fprintf (stderr, "STATE_INVTRANS "); - break; - - case STATE_AMBIENT: - fprintf (stderr, "STATE_AMBIENT "); - break; - - case STATE_DIFFUSE: - fprintf (stderr, "STATE_DIFFUSE "); - break; - - case STATE_SPECULAR: - fprintf (stderr, "STATE_SPECULAR "); - break; - - case STATE_EMISSION: - fprintf (stderr, "STATE_EMISSION "); - break; - - case STATE_SHININESS: - fprintf (stderr, "STATE_SHININESS "); - break; - - case STATE_HALF: - fprintf (stderr, "STATE_HALF "); - break; - - case STATE_POSITION: - fprintf (stderr, "STATE_POSITION "); - break; - - case STATE_ATTENUATION: - fprintf (stderr, "STATE_ATTENUATION "); - break; - - case STATE_SPOT_DIRECTION: - fprintf (stderr, "STATE_DIRECTION "); - break; - - case STATE_TEXGEN_EYE_S: - fprintf (stderr, "STATE_TEXGEN_EYE_S "); - break; - - case STATE_TEXGEN_EYE_T: - fprintf (stderr, "STATE_TEXGEN_EYE_T "); - break; - - case STATE_TEXGEN_EYE_R: - fprintf (stderr, "STATE_TEXGEN_EYE_R "); - break; - - case STATE_TEXGEN_EYE_Q: - fprintf (stderr, "STATE_TEXGEN_EYE_Q "); - break; - - case STATE_TEXGEN_OBJECT_S: - fprintf (stderr, "STATE_TEXGEN_EYE_S "); - break; - - case STATE_TEXGEN_OBJECT_T: - fprintf (stderr, "STATE_TEXGEN_OBJECT_T "); - break; - - case STATE_TEXGEN_OBJECT_R: - fprintf (stderr, "STATE_TEXGEN_OBJECT_R "); - break; - - case STATE_TEXGEN_OBJECT_Q: - fprintf (stderr, "STATE_TEXGEN_OBJECT_Q "); - break; - - case STATE_TEXENV_COLOR: - fprintf (stderr, "STATE_TEXENV_COLOR "); - break; - - case STATE_DEPTH_RANGE: - fprintf (stderr, "STATE_DEPTH_RANGE "); - break; - - case STATE_VERTEX_PROGRAM: - fprintf (stderr, "STATE_VERTEX_PROGRAM "); - break; - - case STATE_FRAGMENT_PROGRAM: - fprintf (stderr, "STATE_FRAGMENT_PROGRAM "); - break; - - case STATE_ENV: - fprintf (stderr, "STATE_ENV "); - break; - - case STATE_LOCAL: - fprintf (stderr, "STATE_LOCAL "); - break; - - } - fprintf (stderr, "[%d] ", token); -} - - static GLvoid debug_variables (GLcontext * ctx, struct var_cache *vc_head, struct arb_program *Program) @@ -3530,12 +3342,12 @@ debug_variables (GLcontext * ctx, struct var_cache *vc_head, struct var_cache *vc; GLint a, b; - fprintf (stderr, "debug_variables, vc_head: %x\n", vc_head); + fprintf (stderr, "debug_variables, vc_head: %p\n", (void*) vc_head); /* First of all, print out the contents of the var_cache */ vc = vc_head; while (vc) { - fprintf (stderr, "[%x]\n", vc); + fprintf (stderr, "[%p]\n", (void*) vc); switch (vc->type) { case vt_none: fprintf (stderr, "UNDEFINED %s\n", vc->name); @@ -3550,27 +3362,20 @@ debug_variables (GLcontext * ctx, struct var_cache *vc_head, b = vc->param_binding_begin; for (a = 0; a < vc->param_binding_length; a++) { fprintf (stderr, "%s\n", - Program->Parameters->Parameters[a + b].Name); - if (Program->Parameters->Parameters[a + b].Type == STATE) { - print_state_token (Program->Parameters->Parameters[a + b]. - StateIndexes[0]); - print_state_token (Program->Parameters->Parameters[a + b]. - StateIndexes[1]); - print_state_token (Program->Parameters->Parameters[a + b]. - StateIndexes[2]); - print_state_token (Program->Parameters->Parameters[a + b]. - StateIndexes[3]); - print_state_token (Program->Parameters->Parameters[a + b]. - StateIndexes[4]); - print_state_token (Program->Parameters->Parameters[a + b]. - StateIndexes[5]); + Program->Base.Parameters->Parameters[a + b].Name); + if (Program->Base.Parameters->Parameters[a + b].Type == PROGRAM_STATE_VAR) { + const char *s; + s = _mesa_program_state_string(Program->Base.Parameters->Parameters + [a + b].StateIndexes); + fprintf(stderr, "%s\n", s); + _mesa_free((char *) s); } else fprintf (stderr, "%f %f %f %f\n", - Program->Parameters->Parameters[a + b].Values[0], - Program->Parameters->Parameters[a + b].Values[1], - Program->Parameters->Parameters[a + b].Values[2], - Program->Parameters->Parameters[a + b].Values[3]); + Program->Base.Parameters->ParameterValues[a + b][0], + Program->Base.Parameters->ParameterValues[a + b][1], + Program->Base.Parameters->ParameterValues[a + b][2], + Program->Base.Parameters->ParameterValues[a + b][3]); } break; case vt_temp: @@ -3583,9 +3388,12 @@ debug_variables (GLcontext * ctx, struct var_cache *vc_head, break; case vt_alias: fprintf (stderr, "ALIAS %s\n", vc->name); - fprintf (stderr, " binding: 0x%x (%s)\n", - vc->alias_binding, vc->alias_binding->name); + fprintf (stderr, " binding: 0x%p (%s)\n", + (void*) vc->alias_binding, vc->alias_binding->name); break; + default: + /* nothing */ + ; } vc = vc->next; } -- cgit v1.2.3 From 50040573d7b4a34eb919016c5fe85aeaca9e9065 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 10:56:41 -0700 Subject: Replace slang_allocate_storage() with simpler _slang_attach_storage() --- src/mesa/shader/slang/slang_codegen.c | 104 ++++++++++------------------------ 1 file changed, 31 insertions(+), 73 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 405b418099..20491a6415 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -52,31 +52,6 @@ static slang_ir_node * _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper); - - -/** - * Lookup a named constant and allocate storage for the parameter in - * the given parameter list. - * \param swizzleOut returns swizzle mask for accessing the constant - * \return position of the constant in the paramList. - */ -static GLint -slang_lookup_constant(const char *name, - struct gl_program_parameter_list *paramList, - GLuint *swizzleOut) -{ - GLint value = _slang_lookup_constant(name); - if (value >= 0) { - /* XXX named constant! */ - GLfloat fvalue = (GLfloat) value; - GLint pos; - pos = _mesa_add_unnamed_constant(paramList, &fvalue, 1, swizzleOut); - return pos; - } - return -1; -} - - static GLboolean is_sampler_type(const slang_fully_specified_type *t) { @@ -161,19 +136,24 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) /** - * Allocate storage info for an IR node (n->Store). - * If n is an IR_VAR_DECL, allocate a temporary for the variable. - * Otherwise, if n is an IR_VAR, check if it's a uniform or constant - * that needs to have storage allocated. + * Establish the binding between a slang_ir_node and a slang_variable. + * Then, allocate/attach a slang_ir_storage object to the IR node if needed. + * The IR node must be a IR_VAR or IR_VAR_DECL node. + * \param n the IR node + * \param var the variable to associate with the IR node */ static void -slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) +slang_attach_storage(slang_ir_node *n, slang_variable *var) { - assert(A->vartable); assert(n); + assert(var); + assert(n->Opcode == IR_VAR || n->Opcode == IR_VAR_DECL); + assert(!n->Var || n->Var == var); + + n->Var = var; if (!n->Store) { - /* allocate storage info for this node */ + /* need to setup storage */ if (n->Var && n->Var->aux) { /* node storage info = var storage info */ n->Store = (slang_ir_storage *) n->Var->aux; @@ -186,35 +166,6 @@ slang_allocate_storage(slang_assemble_ctx *A, slang_ir_node *n) assert(n->Var->aux); } } - - if (n->Opcode == IR_VAR_DECL) { - /* variable declaration */ - assert(n->Var); - assert(!is_sampler_type(&n->Var->type)); - n->Store->File = PROGRAM_TEMPORARY; - n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); - assert(n->Store->Size > 0); - return; - } - else { - assert(n->Opcode == IR_VAR); - assert(n->Var); - - if (n->Store->Index < 0) { - const char *varName = (char *) n->Var->a_name; - struct gl_program *prog = A->program; - assert(prog); - - if (n->Store->File == PROGRAM_CONSTANT) { - /* XXX compile-time constants should be converted to literals */ - GLint i = slang_lookup_constant(varName, prog->Parameters, - &n->Store->Swizzle); - assert(i >= 0); - assert(n->Store->Size == 1); - n->Store->Index = i; - } - } - } } @@ -619,15 +570,18 @@ new_if(slang_ir_node *cond, slang_ir_node *ifPart, slang_ir_node *elsePart) static slang_ir_node * new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) { - slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE); - slang_ir_node *n = new_node0(IR_VAR); - if (!v) + slang_ir_node *n; + slang_variable *var = _slang_locate_variable(oper->locals, name, GL_TRUE); + if (!var) return NULL; - assert(!oper->var || oper->var == v); - v->used = GL_TRUE; - n->Var = v; - slang_allocate_storage(A, n); + assert(!oper->var || oper->var == var); + + n = new_node0(IR_VAR); + if (n) { + var->used = GL_TRUE; + slang_attach_storage(n, var); + } return n; } @@ -1643,15 +1597,19 @@ static slang_ir_node * _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) { slang_ir_node *n; + assert(!is_sampler_type(&var->type)); n = new_node0(IR_VAR_DECL); if (n) { - n->Var = var; - slang_allocate_storage(A, n); + slang_attach_storage(n, var); + + assert(var->aux); + assert(n->Store == var->aux); assert(n->Store); assert(n->Store->Index < 0); + + n->Store->File = PROGRAM_TEMPORARY; + n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); assert(n->Store->Size > 0); - assert(var->aux); - assert(n->Store == var->aux); } return n; } @@ -2564,7 +2522,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) abort(); return new_node0(IR_NOP); } - abort(); + return NULL; } -- cgit v1.2.3 From 2eeaae6cbcc6d5b1d85ab7e9b681b59568fb8600 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 11:00:10 -0700 Subject: get rid of some unused slang_variable fields --- src/mesa/shader/slang/slang_codegen.c | 9 +++------ src/mesa/shader/slang/slang_compile.c | 1 - src/mesa/shader/slang/slang_compile_variable.c | 3 --- src/mesa/shader/slang/slang_compile_variable.h | 2 -- 4 files changed, 3 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 20491a6415..31e08df447 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -143,7 +143,7 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) * \param var the variable to associate with the IR node */ static void -slang_attach_storage(slang_ir_node *n, slang_variable *var) +_slang_attach_storage(slang_ir_node *n, slang_variable *var) { assert(n); assert(var); @@ -579,8 +579,7 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name) n = new_node0(IR_VAR); if (n) { - var->used = GL_TRUE; - slang_attach_storage(n, var); + _slang_attach_storage(n, var); } return n; } @@ -646,8 +645,6 @@ slang_resolve_variable(slang_operation *oper) oper->var = _slang_locate_variable(oper->locals, (const slang_atom) oper->a_id, GL_TRUE); - if (oper->var) - oper->var->used = GL_TRUE; } } @@ -1600,7 +1597,7 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) assert(!is_sampler_type(&var->type)); n = new_node0(IR_VAR_DECL); if (n) { - slang_attach_storage(n, var); + _slang_attach_storage(n, var); assert(var->aux); assert(n->Store == var->aux); diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 86699b7cdb..a1cae5d338 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1629,7 +1629,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, } /* copy the declarator qualifier type, parse the identifier */ - var->global = C->global_scope; var->type.qualifier = type->qualifier; var->a_name = parse_identifier(C); if (var->a_name == SLANG_ATOM_NULL) diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 450ae16323..09ca736c20 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -256,9 +256,7 @@ slang_variable_construct(slang_variable * var) var->initializer = NULL; var->address = ~0; var->size = 0; - var->global = GL_FALSE; var->isTemp = GL_FALSE; - var->used = GL_FALSE; var->aux = NULL; return 1; } @@ -307,7 +305,6 @@ slang_variable_copy(slang_variable * x, const slang_variable * y) } z.address = y->address; z.size = y->size; - z.global = y->global; slang_variable_destruct(x); *x = z; return 1; diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index d12cfd7a40..d3691f0f51 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -79,8 +79,6 @@ typedef struct slang_variable_ struct slang_operation_ *initializer; /**< Optional initializer code */ GLuint address; /**< Storage location */ GLuint size; /**< Variable's size in bytes */ - GLboolean global; /**< A global var? */ - GLboolean used; /**< Ever referenced by code? */ GLboolean isTemp; /**< a named temporary (__resultTmp) */ void *aux; /**< Used during code gen */ } slang_variable; -- cgit v1.2.3 From 11b9ef9454db419865a5fc82fc333c061497ef81 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 14:43:41 -0700 Subject: start implementing conditions, branching --- src/mesa/shader/nvvertexec.c | 124 ++++++++++++++++++++++++++++++++++++++++++- src/mesa/shader/nvvertexec.h | 1 + 2 files changed, 123 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index f8cdfbf17a..d870f3c186 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -39,6 +39,8 @@ #include "math/m_matrix.h" +static const GLboolean DEBUG_VERT = GL_FALSE; + static const GLfloat ZeroVec[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; @@ -67,6 +69,12 @@ _mesa_init_vp_per_vertex_registers(GLcontext *ctx, struct vp_machine *machine) ASSIGN_4V(machine->AddressReg[i], 0, 0, 0, 0); } } + + /* init condition codes */ + machine->CondCodes[0] = COND_EQ; + machine->CondCodes[1] = COND_EQ; + machine->CondCodes[2] = COND_EQ; + machine->CondCodes[3] = COND_EQ; } @@ -333,6 +341,65 @@ fetch_vector1( GLcontext *ctx, } +/** + * Test value against zero and return GT, LT, EQ or UN if NaN. + */ +static INLINE GLuint +generate_cc( float value ) +{ + if (value != value) + return COND_UN; /* NaN */ + if (value > 0.0F) + return COND_GT; + if (value < 0.0F) + return COND_LT; + return COND_EQ; +} + + +/** + * Test if the ccMaskRule is satisfied by the given condition code. + * Used to mask destination writes according to the current condition code. + */ +static INLINE GLboolean +test_cc(GLuint condCode, GLuint ccMaskRule) +{ + switch (ccMaskRule) { + case COND_EQ: return (condCode == COND_EQ); + case COND_NE: return (condCode != COND_EQ); + case COND_LT: return (condCode == COND_LT); + case COND_GE: return (condCode == COND_GT || condCode == COND_EQ); + case COND_LE: return (condCode == COND_LT || condCode == COND_EQ); + case COND_GT: return (condCode == COND_GT); + case COND_TR: return GL_TRUE; + case COND_FL: return GL_FALSE; + default: return GL_TRUE; + } +} + + +/** + * Evaluate the 4 condition codes against a predicate and return GL_TRUE + * or GL_FALSE to indicate result. + */ +static INLINE GLboolean +eval_condition(const struct vp_machine *machine, + const struct prog_instruction *inst) +{ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + return GL_TRUE; + } + else { + return GL_FALSE; + } +} + + /** * Store 4 floats into a register. */ @@ -342,12 +409,16 @@ store_vector4( const struct prog_instruction *inst, const GLfloat value[4] ) { const struct prog_dst_register *dest = &(inst->DstReg); + GLuint writeMask = dest->WriteMask; GLfloat *dst; + switch (dest->File) { case PROGRAM_OUTPUT: + ASSERT(dest->Index < VERT_RESULT_MAX); dst = machine->Outputs[dest->Index]; break; case PROGRAM_TEMPORARY: + ASSERT(dest->Index < MAX_PROGRAM_TEMPS); dst = machine->Temporaries[dest->Index]; break; case PROGRAM_ENV_PARAM: @@ -355,6 +426,7 @@ store_vector4( const struct prog_instruction *inst, { /* a slight hack */ GET_CURRENT_CONTEXT(ctx); + ASSERT(dest->Index < MAX_PROGRAM_ENV_PARAMS); dst = ctx->VertexProgram.Parameters[dest->Index]; } break; @@ -372,6 +444,17 @@ store_vector4( const struct prog_instruction *inst, dst[2] = value[2]; if (dest->WriteMask & WRITEMASK_W) dst[3] = value[3]; + + if (inst->CondUpdate) { + if (writeMask & WRITEMASK_X) + machine->CondCodes[0] = generate_cc(value[0]); + if (writeMask & WRITEMASK_Y) + machine->CondCodes[1] = generate_cc(value[1]); + if (writeMask & WRITEMASK_Z) + machine->CondCodes[2] = generate_cc(value[2]); + if (writeMask & WRITEMASK_W) + machine->CondCodes[3] = generate_cc(value[3]); + } } @@ -400,7 +483,8 @@ _mesa_exec_vertex_program(GLcontext *ctx, struct vp_machine *machine, const struct gl_vertex_program *program) { - const struct prog_instruction *inst; + const GLuint maxInst = program->Base.NumInstructions; + GLuint pc; ctx->_CurrentProgram = GL_VERTEX_PROGRAM_ARB; /* or NV, doesn't matter */ @@ -416,7 +500,8 @@ _mesa_exec_vertex_program(GLcontext *ctx, ctx->VertexProgram.Current->Base.OutputsWritten |= VERT_BIT_POS; } - for (inst = program->Base.Instructions; ; inst++) { + for (pc = 0; pc < maxInst; pc++) { + const struct prog_instruction *inst = program->Base.Instructions + pc; if (ctx->VertexProgram.CallbackEnabled && ctx->VertexProgram.Callback) { @@ -637,6 +722,22 @@ _mesa_exec_vertex_program(GLcontext *ctx, store_vector4( inst, machine, sge ); } break; + case OPCODE_SGT: /* set on greater */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + if (DEBUG_VERT) { + printf("SGT %g %g %g %g\n", + result[0], result[1], result[2], result[3]); + } + } + break; case OPCODE_MAD: { GLfloat t[4], u[4], v[4], sum[4]; @@ -740,6 +841,25 @@ _mesa_exec_vertex_program(GLcontext *ctx, store_vector4( inst, machine, t ); } break; + case OPCODE_IF: + if (eval_condition(machine, inst)) { + /* do if-clause (just continue execution) */ + } + else { + /* go to the instruction after ELSE or ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + } + break; + case OPCODE_ELSE: + /* goto ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + break; + case OPCODE_ENDIF: + /* nothing */ + break; + case OPCODE_EX2: /* GL_ARB_vertex_program */ { GLfloat t[4]; diff --git a/src/mesa/shader/nvvertexec.h b/src/mesa/shader/nvvertexec.h index 5516c6b0ea..d779287973 100644 --- a/src/mesa/shader/nvvertexec.h +++ b/src/mesa/shader/nvvertexec.h @@ -39,6 +39,7 @@ struct vp_machine GLfloat Inputs[VERT_ATTRIB_MAX][4]; GLuint InputsSize[VERT_ATTRIB_MAX]; GLfloat Outputs[VERT_RESULT_MAX][4]; + GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; }; -- cgit v1.2.3 From e47c60443f3a0261f975e36614de569322f1b71d Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 14:55:35 -0700 Subject: reorg/clean-up/indent --- src/mesa/shader/nvvertexec.c | 884 +++++++++++++++++++++++-------------------- 1 file changed, 471 insertions(+), 413 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index d870f3c186..cf7b3d448d 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -511,442 +511,500 @@ _mesa_exec_vertex_program(GLcontext *ctx, } switch (inst->Opcode) { - case OPCODE_MOV: - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_LIT: - { - const GLfloat epsilon = 1.0F / 256.0F; /* per NV spec */ - GLfloat t[4], lit[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = MAX2(t[0], 0.0F); - t[1] = MAX2(t[1], 0.0F); - t[3] = CLAMP(t[3], -(128.0F - epsilon), (128.0F - epsilon)); - lit[0] = 1.0; - lit[1] = t[0]; - lit[2] = (t[0] > 0.0) ? (GLfloat) _mesa_pow(t[1], t[3]) : 0.0F; - lit[3] = 1.0; - store_vector4( inst, machine, lit ); + case OPCODE_ABS: /* GL_NV_vertex_program1_1 */ + { + GLfloat t[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + if (t[0] < 0.0) t[0] = -t[0]; + if (t[1] < 0.0) t[1] = -t[1]; + if (t[2] < 0.0) t[2] = -t[2]; + if (t[3] < 0.0) t[3] = -t[3]; + store_vector4( inst, machine, t ); + } + break; + case OPCODE_ADD: + { + GLfloat t[4], u[4], sum[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + sum[0] = t[0] + u[0]; + sum[1] = t[1] + u[1]; + sum[2] = t[2] + u[2]; + sum[3] = t[3] + u[3]; + store_vector4( inst, machine, sum ); + } + break; + case OPCODE_ARA: + break; + case OPCODE_ARL: + { + GLfloat t[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + machine->AddressReg[0][0] = (GLint) FLOORF(t[0]); + } + break; + case OPCODE_ARL_NV: + break; + case OPCODE_ARR: + break; + case OPCODE_BGNLOOP: + /* no-op */ + break; + case OPCODE_ENDLOOP: + /* subtract 1 here since pc is incremented by for(pc) loop */ + pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ + break; + case OPCODE_BRA: /* branch (conditional) */ + /* fall-through */ + case OPCODE_BRK: /* break out of loop (conditional) */ + /* fall-through */ + case OPCODE_CONT: /* continue loop (conditional) */ + if (eval_condition(machine, inst)) { + /* take branch */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; + } + break; + case OPCODE_CAL: /* Call subroutine (conditional) */ + if (eval_condition(machine, inst)) { + /* call the subroutine */ + if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { + return; /* abort execution */ } - break; - case OPCODE_RCP: - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - if (t[0] != 1.0F) - t[0] = 1.0F / t[0]; /* div by zero is infinity! */ - t[1] = t[2] = t[3] = t[0]; - store_vector4( inst, machine, t ); + machine->CallStack[machine->StackDepth++] = pc + 1; + pc = inst->BranchTarget; /* XXX - 1 ??? */ + } + break; + case OPCODE_CMP: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] < 0.0F ? b[0] : c[0]; + result[1] = a[1] < 0.0F ? b[1] : c[1]; + result[2] = a[2] < 0.0F ? b[2] : c[2]; + result[3] = a[3] < 0.0F ? b[3] : c[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_COS: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_cos(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_DDX: + /* fallthrough */ + case OPCODE_DDY: + _mesa_problem(ctx, "DDX/DDY not allowed in vertex programs"); + break; + + case OPCODE_DP3: + { + GLfloat t[4], u[4], dot[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2]; + dot[1] = dot[2] = dot[3] = dot[0]; + store_vector4( inst, machine, dot ); + } + break; + case OPCODE_DP4: + { + GLfloat t[4], u[4], dot[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + t[3] * u[3]; + dot[1] = dot[2] = dot[3] = dot[0]; + store_vector4( inst, machine, dot ); + } + break; + case OPCODE_DPH: + { + GLfloat t[4], u[4], dot[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + u[3]; + dot[1] = dot[2] = dot[3] = dot[0]; + store_vector4( inst, machine, dot ); + } + break; + case OPCODE_DST: + { + GLfloat t[4], u[4], dst[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + dst[0] = 1.0F; + dst[1] = t[1] * u[1]; + dst[2] = t[2]; + dst[3] = u[3]; + store_vector4( inst, machine, dst ); + } + break; + case OPCODE_EXP: + { + GLfloat t[4], q[4], floor_t0; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + floor_t0 = FLOORF(t[0]); + if (floor_t0 > FLT_MAX_EXP) { + SET_POS_INFINITY(q[0]); + SET_POS_INFINITY(q[2]); } - break; - case OPCODE_RSQ: - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = INV_SQRTF(FABSF(t[0])); - t[1] = t[2] = t[3] = t[0]; - store_vector4( inst, machine, t ); + else if (floor_t0 < FLT_MIN_EXP) { + q[0] = 0.0F; + q[2] = 0.0F; } - break; - case OPCODE_EXP: - { - GLfloat t[4], q[4], floor_t0; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - floor_t0 = FLOORF(t[0]); - if (floor_t0 > FLT_MAX_EXP) { - SET_POS_INFINITY(q[0]); - SET_POS_INFINITY(q[2]); - } - else if (floor_t0 < FLT_MIN_EXP) { - q[0] = 0.0F; - q[2] = 0.0F; - } - else { + else { #ifdef USE_IEEE - GLint ii = (GLint) floor_t0; - ii = (ii < 23) + 0x3f800000; - SET_FLOAT_BITS(q[0], ii); - q[0] = *((GLfloat *) (void *)&ii); + GLint ii = (GLint) floor_t0; + ii = (ii < 23) + 0x3f800000; + SET_FLOAT_BITS(q[0], ii); + q[0] = *((GLfloat *) (void *)&ii); #else - q[0] = (GLfloat) pow(2.0, floor_t0); + q[0] = (GLfloat) pow(2.0, floor_t0); #endif - q[2] = (GLfloat) (q[0] * LOG2(q[1])); - } - q[1] = t[0] - floor_t0; - q[3] = 1.0F; - store_vector4( inst, machine, q ); + q[2] = (GLfloat) (q[0] * LOG2(q[1])); } - break; - case OPCODE_LOG: - { - GLfloat t[4], q[4], abs_t0; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - abs_t0 = FABSF(t[0]); - if (abs_t0 != 0.0F) { - /* Since we really can't handle infinite values on VMS - * like other OSes we'll use __MAXFLOAT to represent - * infinity. This may need some tweaking. - */ + q[1] = t[0] - floor_t0; + q[3] = 1.0F; + store_vector4( inst, machine, q ); + } + break; + case OPCODE_EX2: /* GL_ARB_vertex_program */ + { + GLfloat t[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + t[0] = t[1] = t[2] = t[3] = (GLfloat)_mesa_pow(2.0, t[0]); + store_vector4( inst, machine, t ); + } + break; + case OPCODE_FLR: /* GL_ARB_vertex_program */ + { + GLfloat t[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + t[0] = FLOORF(t[0]); + t[1] = FLOORF(t[1]); + t[2] = FLOORF(t[2]); + t[3] = FLOORF(t[3]); + store_vector4( inst, machine, t ); + } + break; + case OPCODE_FRC: /* GL_ARB_vertex_program */ + { + GLfloat t[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + t[0] = t[0] - FLOORF(t[0]); + t[1] = t[1] - FLOORF(t[1]); + t[2] = t[2] - FLOORF(t[2]); + t[3] = t[3] - FLOORF(t[3]); + store_vector4( inst, machine, t ); + } + break; + case OPCODE_IF: + if (eval_condition(machine, inst)) { + /* do if-clause (just continue execution) */ + } + else { + /* go to the instruction after ELSE or ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + } + break; + case OPCODE_ELSE: + /* goto ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + break; + case OPCODE_ENDIF: + /* nothing */ + break; + case OPCODE_MOV: + { + GLfloat t[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + store_vector4( inst, machine, t ); + } + break; + case OPCODE_LIT: + { + const GLfloat epsilon = 1.0F / 256.0F; /* per NV spec */ + GLfloat t[4], lit[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + t[0] = MAX2(t[0], 0.0F); + t[1] = MAX2(t[1], 0.0F); + t[3] = CLAMP(t[3], -(128.0F - epsilon), (128.0F - epsilon)); + lit[0] = 1.0; + lit[1] = t[0]; + lit[2] = (t[0] > 0.0) ? (GLfloat) _mesa_pow(t[1], t[3]) : 0.0F; + lit[3] = 1.0; + store_vector4( inst, machine, lit ); + } + break; + case OPCODE_LOG: + { + GLfloat t[4], q[4], abs_t0; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + abs_t0 = FABSF(t[0]); + if (abs_t0 != 0.0F) { + /* Since we really can't handle infinite values on VMS + * like other OSes we'll use __MAXFLOAT to represent + * infinity. This may need some tweaking. + */ #ifdef VMS - if (abs_t0 == __MAXFLOAT) + if (abs_t0 == __MAXFLOAT) #else - if (IS_INF_OR_NAN(abs_t0)) + if (IS_INF_OR_NAN(abs_t0)) #endif - { - SET_POS_INFINITY(q[0]); - q[1] = 1.0F; - SET_POS_INFINITY(q[2]); - } - else { - int exponent; - GLfloat mantissa = FREXPF(t[0], &exponent); - q[0] = (GLfloat) (exponent - 1); - q[1] = (GLfloat) (2.0 * mantissa); /* map [.5, 1) -> [1, 2) */ - q[2] = (GLfloat) (q[0] + LOG2(q[1])); - } - } - else { - SET_NEG_INFINITY(q[0]); + { + SET_POS_INFINITY(q[0]); q[1] = 1.0F; - SET_NEG_INFINITY(q[2]); + SET_POS_INFINITY(q[2]); } - q[3] = 1.0; - store_vector4( inst, machine, q ); - } - break; - case OPCODE_MUL: - { - GLfloat t[4], u[4], prod[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - prod[0] = t[0] * u[0]; - prod[1] = t[1] * u[1]; - prod[2] = t[2] * u[2]; - prod[3] = t[3] * u[3]; - store_vector4( inst, machine, prod ); - } - break; - case OPCODE_ADD: - { - GLfloat t[4], u[4], sum[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - sum[0] = t[0] + u[0]; - sum[1] = t[1] + u[1]; - sum[2] = t[2] + u[2]; - sum[3] = t[3] + u[3]; - store_vector4( inst, machine, sum ); - } - break; - case OPCODE_DP3: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( inst, machine, dot ); - } - break; - case OPCODE_DP4: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + t[3] * u[3]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( inst, machine, dot ); - } - break; - case OPCODE_DST: - { - GLfloat t[4], u[4], dst[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dst[0] = 1.0F; - dst[1] = t[1] * u[1]; - dst[2] = t[2]; - dst[3] = u[3]; - store_vector4( inst, machine, dst ); - } - break; - case OPCODE_MIN: - { - GLfloat t[4], u[4], min[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - min[0] = (t[0] < u[0]) ? t[0] : u[0]; - min[1] = (t[1] < u[1]) ? t[1] : u[1]; - min[2] = (t[2] < u[2]) ? t[2] : u[2]; - min[3] = (t[3] < u[3]) ? t[3] : u[3]; - store_vector4( inst, machine, min ); - } - break; - case OPCODE_MAX: - { - GLfloat t[4], u[4], max[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - max[0] = (t[0] > u[0]) ? t[0] : u[0]; - max[1] = (t[1] > u[1]) ? t[1] : u[1]; - max[2] = (t[2] > u[2]) ? t[2] : u[2]; - max[3] = (t[3] > u[3]) ? t[3] : u[3]; - store_vector4( inst, machine, max ); - } - break; - case OPCODE_SLT: - { - GLfloat t[4], u[4], slt[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - slt[0] = (t[0] < u[0]) ? 1.0F : 0.0F; - slt[1] = (t[1] < u[1]) ? 1.0F : 0.0F; - slt[2] = (t[2] < u[2]) ? 1.0F : 0.0F; - slt[3] = (t[3] < u[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, slt ); - } - break; - case OPCODE_SGE: - { - GLfloat t[4], u[4], sge[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - sge[0] = (t[0] >= u[0]) ? 1.0F : 0.0F; - sge[1] = (t[1] >= u[1]) ? 1.0F : 0.0F; - sge[2] = (t[2] >= u[2]) ? 1.0F : 0.0F; - sge[3] = (t[3] >= u[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, sge ); - } - break; - case OPCODE_SGT: /* set on greater */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - if (DEBUG_VERT) { - printf("SGT %g %g %g %g\n", - result[0], result[1], result[2], result[3]); + else { + int exponent; + GLfloat mantissa = FREXPF(t[0], &exponent); + q[0] = (GLfloat) (exponent - 1); + q[1] = (GLfloat) (2.0 * mantissa); /* map [.5, 1) -> [1, 2) */ + q[2] = (GLfloat) (q[0] + LOG2(q[1])); } } - break; - case OPCODE_MAD: - { - GLfloat t[4], u[4], v[4], sum[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, v ); - sum[0] = t[0] * u[0] + v[0]; - sum[1] = t[1] * u[1] + v[1]; - sum[2] = t[2] * u[2] + v[2]; - sum[3] = t[3] * u[3] + v[3]; - store_vector4( inst, machine, sum ); - } - break; - case OPCODE_ARL: - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - machine->AddressReg[0][0] = (GLint) FLOORF(t[0]); + else { + SET_NEG_INFINITY(q[0]); + q[1] = 1.0F; + SET_NEG_INFINITY(q[2]); } - break; - case OPCODE_DPH: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + u[3]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( inst, machine, dot ); + q[3] = 1.0; + store_vector4( inst, machine, q ); + } + break; + case OPCODE_MAD: + { + GLfloat t[4], u[4], v[4], sum[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, v ); + sum[0] = t[0] * u[0] + v[0]; + sum[1] = t[1] * u[1] + v[1]; + sum[2] = t[2] * u[2] + v[2]; + sum[3] = t[3] * u[3] + v[3]; + store_vector4( inst, machine, sum ); + } + break; + case OPCODE_MAX: + { + GLfloat t[4], u[4], max[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + max[0] = (t[0] > u[0]) ? t[0] : u[0]; + max[1] = (t[1] > u[1]) ? t[1] : u[1]; + max[2] = (t[2] > u[2]) ? t[2] : u[2]; + max[3] = (t[3] > u[3]) ? t[3] : u[3]; + store_vector4( inst, machine, max ); + } + break; + case OPCODE_MIN: + { + GLfloat t[4], u[4], min[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + min[0] = (t[0] < u[0]) ? t[0] : u[0]; + min[1] = (t[1] < u[1]) ? t[1] : u[1]; + min[2] = (t[2] < u[2]) ? t[2] : u[2]; + min[3] = (t[3] < u[3]) ? t[3] : u[3]; + store_vector4( inst, machine, min ); + } + break; + case OPCODE_MUL: + { + GLfloat t[4], u[4], prod[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + prod[0] = t[0] * u[0]; + prod[1] = t[1] * u[1]; + prod[2] = t[2] * u[2]; + prod[3] = t[3] * u[3]; + store_vector4( inst, machine, prod ); + } + break; + case OPCODE_RCP: + { + GLfloat t[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + if (t[0] != 1.0F) + t[0] = 1.0F / t[0]; /* div by zero is infinity! */ + t[1] = t[2] = t[3] = t[0]; + store_vector4( inst, machine, t ); + } + break; + case OPCODE_RSQ: + { + GLfloat t[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + t[0] = INV_SQRTF(FABSF(t[0])); + t[1] = t[2] = t[3] = t[0]; + store_vector4( inst, machine, t ); + } + break; + case OPCODE_SLT: + { + GLfloat t[4], u[4], slt[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + slt[0] = (t[0] < u[0]) ? 1.0F : 0.0F; + slt[1] = (t[1] < u[1]) ? 1.0F : 0.0F; + slt[2] = (t[2] < u[2]) ? 1.0F : 0.0F; + slt[3] = (t[3] < u[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, slt ); + } + break; + case OPCODE_SGE: + { + GLfloat t[4], u[4], sge[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + sge[0] = (t[0] >= u[0]) ? 1.0F : 0.0F; + sge[1] = (t[1] >= u[1]) ? 1.0F : 0.0F; + sge[2] = (t[2] >= u[2]) ? 1.0F : 0.0F; + sge[3] = (t[3] >= u[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, sge ); + } + break; + case OPCODE_SGT: /* set on greater */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + if (DEBUG_VERT) { + printf("SGT %g %g %g %g\n", + result[0], result[1], result[2], result[3]); } - break; - case OPCODE_RCC: - { - GLfloat t[4], u; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - if (t[0] == 1.0F) - u = 1.0F; - else - u = 1.0F / t[0]; - if (u > 0.0F) { - if (u > 1.884467e+019F) { - u = 1.884467e+019F; /* IEEE 32-bit binary value 0x5F800000 */ - } - else if (u < 5.42101e-020F) { - u = 5.42101e-020F; /* IEEE 32-bit binary value 0x1F800000 */ - } + } + break; + case OPCODE_RCC: + { + GLfloat t[4], u; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + if (t[0] == 1.0F) + u = 1.0F; + else + u = 1.0F / t[0]; + if (u > 0.0F) { + if (u > 1.884467e+019F) { + u = 1.884467e+019F; /* IEEE 32-bit binary value 0x5F800000 */ } - else { - if (u < -1.884467e+019F) { - u = -1.884467e+019F; /* IEEE 32-bit binary value 0xDF800000 */ - } - else if (u > -5.42101e-020F) { - u = -5.42101e-020F; /* IEEE 32-bit binary value 0x9F800000 */ - } + else if (u < 5.42101e-020F) { + u = 5.42101e-020F; /* IEEE 32-bit binary value 0x1F800000 */ } - t[0] = t[1] = t[2] = t[3] = u; - store_vector4( inst, machine, t ); - } - break; - case OPCODE_SUB: /* GL_NV_vertex_program1_1 */ - { - GLfloat t[4], u[4], sum[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - sum[0] = t[0] - u[0]; - sum[1] = t[1] - u[1]; - sum[2] = t[2] - u[2]; - sum[3] = t[3] - u[3]; - store_vector4( inst, machine, sum ); - } - break; - case OPCODE_ABS: /* GL_NV_vertex_program1_1 */ - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - if (t[0] < 0.0) t[0] = -t[0]; - if (t[1] < 0.0) t[1] = -t[1]; - if (t[2] < 0.0) t[2] = -t[2]; - if (t[3] < 0.0) t[3] = -t[3]; - store_vector4( inst, machine, t ); - } - break; - case OPCODE_FLR: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = FLOORF(t[0]); - t[1] = FLOORF(t[1]); - t[2] = FLOORF(t[2]); - t[3] = FLOORF(t[3]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_FRC: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = t[0] - FLOORF(t[0]); - t[1] = t[1] - FLOORF(t[1]); - t[2] = t[2] - FLOORF(t[2]); - t[3] = t[3] - FLOORF(t[3]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_IF: - if (eval_condition(machine, inst)) { - /* do if-clause (just continue execution) */ } else { - /* go to the instruction after ELSE or ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; - } - break; - case OPCODE_ELSE: - /* goto ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; - break; - case OPCODE_ENDIF: - /* nothing */ - break; - - case OPCODE_EX2: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = t[1] = t[2] = t[3] = (GLfloat)_mesa_pow(2.0, t[0]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_LG2: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = t[1] = t[2] = t[3] = LOG2(t[0]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_POW: /* GL_ARB_vertex_program */ - { - GLfloat t[4], u[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector1( ctx, &inst->SrcReg[1], machine, program, u ); - t[0] = t[1] = t[2] = t[3] = (GLfloat)_mesa_pow(t[0], u[0]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_XPD: /* GL_ARB_vertex_program */ - { - GLfloat t[4], u[4], cross[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - cross[0] = t[1] * u[2] - t[2] * u[1]; - cross[1] = t[2] * u[0] - t[0] * u[2]; - cross[2] = t[0] * u[1] - t[1] * u[0]; - cross[3] = 0.0; - store_vector4( inst, machine, cross ); - } - break; - case OPCODE_SWZ: /* GL_ARB_vertex_program */ - { - const struct prog_src_register *source = &inst->SrcReg[0]; - const GLfloat *src = get_register_pointer(ctx, source, - machine, program); - GLfloat result[4]; - GLuint i; - - /* do extended swizzling here */ - for (i = 0; i < 4; i++) { - const GLuint swz = GET_SWZ(source->Swizzle, i); - if (swz == SWIZZLE_ZERO) - result[i] = 0.0; - else if (swz == SWIZZLE_ONE) - result[i] = 1.0; - else { - ASSERT(swz >= 0); - ASSERT(swz <= 3); - result[i] = src[swz]; - } - if (source->NegateBase & (1 << i)) - result[i] = -result[i]; + if (u < -1.884467e+019F) { + u = -1.884467e+019F; /* IEEE 32-bit binary value 0xDF800000 */ + } + else if (u > -5.42101e-020F) { + u = -5.42101e-020F; /* IEEE 32-bit binary value 0x9F800000 */ } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PRINT: - if (inst->SrcReg[0].File) { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - _mesa_printf("%s%g, %g, %g, %g\n", - (char *) inst->Data, t[0], t[1], t[2], t[3]); } - else { - _mesa_printf("%s\n", (char *) inst->Data); + t[0] = t[1] = t[2] = t[3] = u; + store_vector4( inst, machine, t ); + } + break; + case OPCODE_SUB: /* GL_NV_vertex_program1_1 */ + { + GLfloat t[4], u[4], sum[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + sum[0] = t[0] - u[0]; + sum[1] = t[1] - u[1]; + sum[2] = t[2] - u[2]; + sum[3] = t[3] - u[3]; + store_vector4( inst, machine, sum ); + } + break; + case OPCODE_LG2: /* GL_ARB_vertex_program */ + { + GLfloat t[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + t[0] = t[1] = t[2] = t[3] = LOG2(t[0]); + store_vector4( inst, machine, t ); + } + break; + case OPCODE_POW: /* GL_ARB_vertex_program */ + { + GLfloat t[4], u[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector1( ctx, &inst->SrcReg[1], machine, program, u ); + t[0] = t[1] = t[2] = t[3] = (GLfloat)_mesa_pow(t[0], u[0]); + store_vector4( inst, machine, t ); + } + break; + case OPCODE_XPD: /* GL_ARB_vertex_program */ + { + GLfloat t[4], u[4], cross[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); + cross[0] = t[1] * u[2] - t[2] * u[1]; + cross[1] = t[2] * u[0] - t[0] * u[2]; + cross[2] = t[0] * u[1] - t[1] * u[0]; + cross[3] = 0.0; + store_vector4( inst, machine, cross ); + } + break; + case OPCODE_SWZ: /* GL_ARB_vertex_program */ + { + const struct prog_src_register *source = &inst->SrcReg[0]; + const GLfloat *src = get_register_pointer(ctx, source, + machine, program); + GLfloat result[4]; + GLuint i; + + /* do extended swizzling here */ + for (i = 0; i < 4; i++) { + const GLuint swz = GET_SWZ(source->Swizzle, i); + if (swz == SWIZZLE_ZERO) + result[i] = 0.0; + else if (swz == SWIZZLE_ONE) + result[i] = 1.0; + else { + ASSERT(swz >= 0); + ASSERT(swz <= 3); + result[i] = src[swz]; + } + if (source->NegateBase & (1 << i)) + result[i] = -result[i]; } - break; - case OPCODE_END: - ctx->_CurrentProgram = 0; - return; - case OPCODE_BRA: - /* XXX implement */ - /* FALLTHROUGH */ - case OPCODE_NOP: - break; - default: - /* bad instruction opcode */ - _mesa_problem(ctx, "Bad VP Opcode in _mesa_exec_vertex_program"); - ctx->_CurrentProgram = 0; - return; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PRINT: + if (inst->SrcReg[0].File) { + GLfloat t[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); + _mesa_printf("%s%g, %g, %g, %g\n", + (char *) inst->Data, t[0], t[1], t[2], t[3]); + } + else { + _mesa_printf("%s\n", (char *) inst->Data); + } + break; + case OPCODE_END: + ctx->_CurrentProgram = 0; + return; + case OPCODE_NOP: + break; + default: + /* bad instruction opcode */ + _mesa_problem(ctx, "Bad VP Opcode in _mesa_exec_vertex_program"); + ctx->_CurrentProgram = 0; + return; } /* switch */ } /* for */ -- cgit v1.2.3 From 29925c6dcd2ee707bce3a278f9c9ce3db5d00630 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 14:56:22 -0700 Subject: remove unneeded #includes, misc clean-up --- src/mesa/shader/slang/slang_codegen.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 31e08df447..d3360b7945 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -24,27 +24,25 @@ /** * \file slang_codegen.c - * Mesa GLSL code generator. Convert AST to IR tree. + * Generate IR tree from AST. * \author Brian Paul */ #include "imports.h" #include "macros.h" +#include "mtypes.h" +#include "program.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_statevars.h" #include "slang_typeinfo.h" -#include "slang_builtin.h" #include "slang_codegen.h" #include "slang_compile.h" -#include "slang_storage.h" #include "slang_error.h" #include "slang_simplify.h" #include "slang_emit.h" #include "slang_vartable.h" #include "slang_ir.h" -#include "mtypes.h" -#include "program.h" -#include "prog_instruction.h" -#include "prog_parameter.h" -#include "prog_statevars.h" #include "slang_print.h" @@ -639,12 +637,8 @@ slang_inline_asm_function(slang_assemble_ctx *A, static void slang_resolve_variable(slang_operation *oper) { - if (oper->type != SLANG_OPER_IDENTIFIER) - return; - if (!oper->var) { - oper->var = _slang_locate_variable(oper->locals, - (const slang_atom) oper->a_id, - GL_TRUE); + if (oper->type == SLANG_OPER_IDENTIFIER && !oper->var) { + oper->var = _slang_locate_variable(oper->locals, oper->a_id, GL_TRUE); } } @@ -671,7 +665,8 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, } if (oper->num_children == 1) { /* the initializer */ - slang_substitute(A, &oper->children[0], substCount, substOld, substNew, GL_FALSE); + slang_substitute(A, &oper->children[0], substCount, + substOld, substNew, GL_FALSE); } } break; @@ -1102,7 +1097,7 @@ slang_find_asm_info(const char *name) static GLuint -make_writemask(char *field) +make_writemask(const char *field) { GLuint mask = 0x0; while (*field) { @@ -1183,9 +1178,9 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, slang_ir_node *n0; dest_oper = &oper->children[0]; - while /*if*/ (dest_oper->type == SLANG_OPER_FIELD) { + while (dest_oper->type == SLANG_OPER_FIELD) { /* writemask */ - writemask &= /*=*/make_writemask((char*) dest_oper->a_id); + writemask &= make_writemask((char*) dest_oper->a_id); dest_oper = &dest_oper->children[0]; } @@ -1612,8 +1607,6 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) } - - /** * Generate code for a selection expression: b ? x : y * XXX in some cases we could implement a selection expression @@ -1748,7 +1741,6 @@ _slang_gen_logical_or(slang_assemble_ctx *A, slang_operation *oper) } - /** * Generate IR tree for a return statement. */ -- cgit v1.2.3 From 79fb4527cad556792f514d9e94e8f623837752ad Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 14:56:43 -0700 Subject: added CallStack, StackDepth --- src/mesa/shader/nvvertexec.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/nvvertexec.h b/src/mesa/shader/nvvertexec.h index d779287973..9e66c6ebb2 100644 --- a/src/mesa/shader/nvvertexec.h +++ b/src/mesa/shader/nvvertexec.h @@ -41,6 +41,9 @@ struct vp_machine GLfloat Outputs[VERT_RESULT_MAX][4]; GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; + + GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ + GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ }; -- cgit v1.2.3 From b7aeac0de1c9c533f78c5d6acf358bdc206161ab Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 14:57:19 -0700 Subject: added MAX_PROGRAM_ENV_PARAMS --- src/mesa/main/config.h | 1 + src/mesa/main/mtypes.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index d779860f11..82ea72a59d 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -196,6 +196,7 @@ /** For any program target/extension */ /*@{*/ #define MAX_PROGRAM_LOCAL_PARAMS 128 /* KW: power of two */ +#define MAX_PROGRAM_ENV_PARAMS 128 #define MAX_PROGRAM_MATRICES 8 #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 #define MAX_PROGRAM_CALL_DEPTH 8 diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index ce58154a0a..b83beb8f91 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1934,11 +1934,11 @@ struct gl_vertex_program_state /** Currently enabled and valid program (including internal programs) */ struct gl_vertex_program *_Current; - GLfloat Parameters[MAX_NV_VERTEX_PROGRAM_PARAMS][4]; /**< Env params */ + GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ /* For GL_NV_vertex_program only: */ - GLenum TrackMatrix[MAX_NV_VERTEX_PROGRAM_PARAMS / 4]; - GLenum TrackMatrixTransform[MAX_NV_VERTEX_PROGRAM_PARAMS / 4]; + GLenum TrackMatrix[MAX_PROGRAM_ENV_PARAMS / 4]; + GLenum TrackMatrixTransform[MAX_PROGRAM_ENV_PARAMS / 4]; /** Should fixed-function T&L be implemented with a vertex prog? */ GLboolean _MaintainTnlProgram; @@ -1967,7 +1967,7 @@ struct gl_fragment_program_state /** Currently enabled and valid program (including internal programs) */ struct gl_fragment_program *_Current; - GLfloat Parameters[MAX_NV_FRAGMENT_PROGRAM_PARAMS][4]; /**< Env params */ + GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ /** Should fixed-function texturing be implemented with a fragment prog? */ GLboolean _MaintainTexEnvProgram; -- cgit v1.2.3 From 3ed1acd13c7876288a5d1ab6d288b1654f0c2e6d Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 14:57:40 -0700 Subject: use MAX_PROGRAM_ENV_PARAMS --- src/mesa/swrast/s_fragprog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 89907f73c6..a41b3ce125 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -172,7 +172,7 @@ get_register_pointer( GLcontext *ctx, ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); return program->Base.LocalParams[source->Index]; case PROGRAM_ENV_PARAM: - ASSERT(source->Index < MAX_NV_FRAGMENT_PROGRAM_PARAMS); + ASSERT(source->Index < MAX_PROGRAM_ENV_PARAMS); return ctx->FragmentProgram.Parameters[source->Index]; case PROGRAM_STATE_VAR: /* Fallthrough */ @@ -557,7 +557,7 @@ init_machine_deriv( GLcontext *ctx, /* XXX also need to do this when using valgrind */ /* Clear temporary registers (undefined for ARB_f_p) */ _mesa_bzero( (void*) machine->Temporaries, - MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); } /* Add derivatives */ @@ -1611,7 +1611,7 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { /* Clear temporary registers (undefined for ARB_f_p) */ _mesa_bzero(machine->Temporaries, - MAX_NV_FRAGMENT_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); } /* Setup pointer to input attributes */ -- cgit v1.2.3 From ef64cda9786858c8247166ae2692fc043121b6f4 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:00:31 -0700 Subject: remove nvvertexec.c, add prog_execute.c --- src/mesa/sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index a15c5c479f..49d8dc997c 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -159,10 +159,10 @@ SHADER_SOURCES = \ shader/grammar/grammar_mesa.c \ shader/nvfragparse.c \ shader/nvprogram.c \ - shader/nvvertexec.c \ shader/nvvertparse.c \ shader/program.c \ shader/prog_debug.c \ + shader/prog_execute.c \ shader/prog_instruction.c \ shader/prog_parameter.c \ shader/prog_print.c \ -- cgit v1.2.3 From 740a8b0b66f0e00807f064e3105fd6b045e5a2d0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:00:54 -0700 Subject: _mesa_ExecuteProgramNV is now a no-op --- src/mesa/shader/nvprogram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index 531a41083c..337784bfe2 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -45,7 +45,6 @@ #include "prog_parameter.h" #include "prog_instruction.h" #include "nvfragparse.h" -#include "nvvertexec.h" #include "nvvertparse.h" #include "nvprogram.h" #include "program.h" @@ -77,7 +76,7 @@ _mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params) return; } - _mesa_exec_vertex_state_program(ctx, vprog, params); + _mesa_problem(ctx, "glExecuteProgramNV() not supported"); } -- cgit v1.2.3 From 7c86e10193491a36433104a5f1f0f4cf37a6333f Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:02:08 -0700 Subject: emit high-level IF/ELSE/ENDIF for vertex progs now --- src/mesa/shader/slang/slang_codegen.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d3360b7945..51c8f27c80 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1439,6 +1439,7 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) } +#if 0 /** * Generate IR tree for an if/then/else conditional using BRAnch instructions. */ @@ -1487,6 +1488,7 @@ _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) return tree; } +#endif /** @@ -2443,13 +2445,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case SLANG_OPER_IDENTIFIER: return _slang_gen_variable(A, oper); case SLANG_OPER_IF: - if (A->program->Target == GL_FRAGMENT_PROGRAM_ARB) { - return _slang_gen_hl_if(A, oper); - } - else { - /* XXX update tnl executor */ - return _slang_gen_if(A, oper); - } + return _slang_gen_hl_if(A, oper); case SLANG_OPER_FIELD: return _slang_gen_field(A, oper); case SLANG_OPER_SUBSCRIPT: -- cgit v1.2.3 From fd89396012bf4e2f36315e79ee180f0ca4eaf32e Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:02:18 -0700 Subject: fix assertion --- src/mesa/shader/nvvertexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index cf7b3d448d..7dc0edbd9e 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -268,7 +268,7 @@ get_register_pointer( GLcontext *ctx, return machine->Inputs[source->Index]; case PROGRAM_OUTPUT: /* This is only needed for the PRINT instruction */ - ASSERT(source->Index < MAX_NV_VERTEX_PROGRAM_OUTPUTS); + ASSERT(source->Index < VERT_RESULT_MAX); return machine->Outputs[source->Index]; case PROGRAM_LOCAL_PARAM: ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); -- cgit v1.2.3 From 6cfe2114f19cdcaa372df1c30a7dc7be3b94a330 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:06:54 -0700 Subject: FORCE_PROG_EXECUTE_C cpp flag, misc changes --- src/mesa/tnl/t_vb_arbprogram.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 97ff4c7f10..1d9a6ac460 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -726,8 +726,9 @@ _tnl_disassem_vba_insn( union instruction op ) } } +typedef void (*gpu_function)(struct arb_vp_machine *m, union instruction op); -static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union instruction) = +static gpu_function opcode_func[MAX_OPCODE+3] = { do_NOP, do_ABS, @@ -958,7 +959,10 @@ static GLuint cvp_choose_result( struct compilation *cp, idx = REG_OUT0 + dst->Index; break; default: +#if 0 + /* IF/ELSE/ENDIF instructions will hit this */ assert(0); +#endif return REG_RES; /* can't happen */ } @@ -1279,8 +1283,13 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) GLuint i, j; GLbitfield outputs; +#define FORCE_PROG_EXECUTE_C 0 +#if FORCE_PROG_EXECUTE_C + return GL_TRUE; +#else if (!program) return GL_TRUE; +#endif if (program->Base.Parameters) { _mesa_load_state_parameters(ctx, program->Base.Parameters); @@ -1338,9 +1347,9 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) call_func( p, m ); } else { - GLint j; - for (j = 0; j < p->nr_instructions; j++) { - union instruction inst = p->instructions[j]; + GLint pc; + for (pc = 0; pc < p->nr_instructions; pc++) { + union instruction inst = p->instructions[pc]; opcode_func[inst.alu.opcode]( m, inst ); } } @@ -1468,7 +1477,11 @@ validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct arb_vp_machine *m = ARB_VP_MACHINE(stage); struct gl_vertex_program *program = ctx->VertexProgram._Current; +#if FORCE_OLD + if (0 &&program) { +#else if (program) { +#endif if (!program->TnlData) compile_vertex_program( program, m->try_codegen ); -- cgit v1.2.3 From e382efc85d02ee5a0c582e1a9d9bc35ad262e70b Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:07:17 -0700 Subject: use new _mesa_execute_program() function --- src/mesa/tnl/t_vb_program.c | 179 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 153 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 9df649c5e6..422aae69e2 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,21 +31,12 @@ #include "glheader.h" -#include "api_noop.h" -#include "colormac.h" #include "context.h" -#include "dlist.h" -#include "hash.h" -#include "light.h" #include "macros.h" #include "imports.h" -#include "program.h" -#include "simple_list.h" -#include "mtypes.h" #include "prog_instruction.h" #include "prog_statevars.h" -#include "nvvertexec.h" -#include "nvprogram.h" +#include "prog_execute.h" #include "t_context.h" #include "t_pipeline.h" @@ -68,6 +59,130 @@ struct vp_stage_data { #define VP_STAGE_DATA(stage) ((struct vp_stage_data *)(stage->privatePtr)) +/** + * Initialize virtual machine state prior to executing vertex program. + */ +static void +init_machine(GLcontext *ctx, struct gl_program_machine *machine) +{ + /* Input registers get initialized from the current vertex attribs */ + MEMCPY(machine->VertAttribs, ctx->Current.Attrib, + MAX_VERTEX_PROGRAM_ATTRIBS * 4 * sizeof(GLfloat)); + + if (ctx->VertexProgram.Current->IsNVProgram) { + GLuint i; + /* Output/result regs are initialized to [0,0,0,1] */ + for (i = 0; i < MAX_NV_VERTEX_PROGRAM_OUTPUTS; i++) { + ASSIGN_4V(machine->Outputs[i], 0.0F, 0.0F, 0.0F, 1.0F); + } + /* Temp regs are initialized to [0,0,0,0] */ + for (i = 0; i < MAX_NV_VERTEX_PROGRAM_TEMPS; i++) { + ASSIGN_4V(machine->Temporaries[i], 0.0F, 0.0F, 0.0F, 0.0F); + } + for (i = 0; i < MAX_VERTEX_PROGRAM_ADDRESS_REGS; i++) { + ASSIGN_4V(machine->AddressReg[i], 0, 0, 0, 0); + } + } + + /* init condition codes */ + machine->CondCodes[0] = COND_EQ; + machine->CondCodes[1] = COND_EQ; + machine->CondCodes[2] = COND_EQ; + machine->CondCodes[3] = COND_EQ; +} + + +/** + * Copy the 16 elements of a matrix into four consecutive program + * registers starting at 'pos'. + */ +static void +load_matrix(GLfloat registers[][4], GLuint pos, const GLfloat mat[16]) +{ + GLuint i; + for (i = 0; i < 4; i++) { + registers[pos + i][0] = mat[0 + i]; + registers[pos + i][1] = mat[4 + i]; + registers[pos + i][2] = mat[8 + i]; + registers[pos + i][3] = mat[12 + i]; + } +} + + +/** + * As above, but transpose the matrix. + */ +static void +load_transpose_matrix(GLfloat registers[][4], GLuint pos, + const GLfloat mat[16]) +{ + MEMCPY(registers[pos], mat, 16 * sizeof(GLfloat)); +} + + +/** + * Load program parameter registers with tracked matrices (if NV program). + * This only needs to be done per glBegin/glEnd, not per-vertex. + */ +static void +load_program_parameters(GLcontext *ctx) +{ + GLuint i; + + for (i = 0; i < MAX_NV_VERTEX_PROGRAM_PARAMS / 4; i++) { + /* point 'mat' at source matrix */ + GLmatrix *mat; + if (ctx->VertexProgram.TrackMatrix[i] == GL_MODELVIEW) { + mat = ctx->ModelviewMatrixStack.Top; + } + else if (ctx->VertexProgram.TrackMatrix[i] == GL_PROJECTION) { + mat = ctx->ProjectionMatrixStack.Top; + } + else if (ctx->VertexProgram.TrackMatrix[i] == GL_TEXTURE) { + mat = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top; + } + else if (ctx->VertexProgram.TrackMatrix[i] == GL_COLOR) { + mat = ctx->ColorMatrixStack.Top; + } + else if (ctx->VertexProgram.TrackMatrix[i]==GL_MODELVIEW_PROJECTION_NV) { + /* XXX verify the combined matrix is up to date */ + mat = &ctx->_ModelProjectMatrix; + } + else if (ctx->VertexProgram.TrackMatrix[i] >= GL_MATRIX0_NV && + ctx->VertexProgram.TrackMatrix[i] <= GL_MATRIX7_NV) { + GLuint n = ctx->VertexProgram.TrackMatrix[i] - GL_MATRIX0_NV; + ASSERT(n < MAX_PROGRAM_MATRICES); + mat = ctx->ProgramMatrixStack[n].Top; + } + else { + /* no matrix is tracked, but we leave the register values as-is */ + assert(ctx->VertexProgram.TrackMatrix[i] == GL_NONE); + continue; + } + + /* load the matrix values into sequential registers */ + if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_IDENTITY_NV) { + load_matrix(ctx->VertexProgram.Parameters, i*4, mat->m); + } + else if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_INVERSE_NV) { + _math_matrix_analyse(mat); /* update the inverse */ + ASSERT(!_math_matrix_is_dirty(mat)); + load_matrix(ctx->VertexProgram.Parameters, i*4, mat->inv); + } + else if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_TRANSPOSE_NV) { + load_transpose_matrix(ctx->VertexProgram.Parameters, i*4, mat->m); + } + else { + assert(ctx->VertexProgram.TrackMatrixTransform[i] + == GL_INVERSE_TRANSPOSE_NV); + _math_matrix_analyse(mat); /* update the inverse */ + ASSERT(!_math_matrix_is_dirty(mat)); + load_transpose_matrix(ctx->VertexProgram.Parameters, i*4, mat->inv); + } + } +} + + /** * This function executes vertex programs */ @@ -78,21 +193,29 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct vp_stage_data *store = VP_STAGE_DATA(stage); struct vertex_buffer *VB = &tnl->vb; struct gl_vertex_program *program = ctx->VertexProgram._Current; - struct vp_machine machine; + struct gl_program_machine machine; GLuint i; +#define FORCE_PROG_EXECUTE_C 0 +#if FORCE_PROG_EXECUTE_C + if (!program) + return GL_TRUE; +#else if (!program || !program->IsNVProgram) return GL_TRUE; +#endif - _mesa_load_state_parameters(ctx, program->Base.Parameters); - - /* load program parameter registers (they're read-only) */ - _mesa_init_vp_per_primitive_registers(ctx); + if (ctx->VertexProgram.Current->IsNVProgram) { + load_program_parameters(ctx); + } + else { + _mesa_load_state_parameters(ctx, program->Base.Parameters); + } for (i = 0; i < VB->Count; i++) { GLuint attr; - _mesa_init_vp_per_vertex_registers(ctx, &machine); + init_machine(ctx, &machine); #if 0 printf("Input %d: %f, %f, %f, %f\n", i, @@ -119,13 +242,13 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) const GLuint size = VB->AttribPtr[attr]->size; const GLuint stride = VB->AttribPtr[attr]->stride; const GLfloat *data = (GLfloat *) (ptr + stride * i); - COPY_CLEAN_4V(machine.Inputs[attr], size, data); + COPY_CLEAN_4V(machine.VertAttribs/*Inputs*/[attr], size, data); } } /* execute the program */ - ASSERT(program); - _mesa_exec_vertex_program(ctx, &machine, program); + _mesa_execute_program(ctx, &program->Base, program->Base.NumInstructions, + &machine, 0); /* Fixup fog an point size results if needed */ if (ctx->Fog.Enabled && @@ -175,6 +298,14 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) = &store->attribs[VERT_RESULT_TEX0 + i]; } + for (i = 0; i < ctx->Const.MaxVarying; i++) { + if (program->Base.OutputsWritten & (1 << (VERT_RESULT_VAR0 + i))) { + /* Note: varying results get put into the generic attributes */ + VB->AttribPtr[VERT_ATTRIB_GENERIC0+i] + = &store->attribs[VERT_RESULT_VAR0 + i]; + } + } + /* Cliptest and perspective divide. Clip functions must clear * the clipmask. */ @@ -213,8 +344,6 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) } - - /** * Called the first time stage->run is called. In effect, don't * allocate data until the first time the stage is run. @@ -247,9 +376,6 @@ static GLboolean init_vp( GLcontext *ctx, } - - - /** * Destructor for this pipeline stage. */ @@ -273,6 +399,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) } } + /** * Public description of this pipeline stage. */ -- cgit v1.2.3 From f6803de7396edda2223adf7ff7445579dbe475c9 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:08:01 -0700 Subject: Use the new unified vertex/fragment program interpreter from prog_execute.c. Currently, DDX, DDY don't work. --- src/mesa/swrast/s_fragprog.c | 1523 +----------------------------------------- 1 file changed, 12 insertions(+), 1511 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index a41b3ce125..4482006ba6 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -25,6 +25,7 @@ #include "glheader.h" #include "colormac.h" #include "context.h" +#include "prog_execute.h" #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" @@ -35,63 +36,6 @@ #include "slang_library_noise.h" -/* See comments below for info about this */ -#define LAMBDA_ZERO 1 - -/* debug predicate */ -#define DEBUG_FRAG 0 - - -/** - * Virtual machine state used during execution of a fragment programs. - */ -struct fp_machine -{ - /** Fragment Input attributes */ - GLfloat (*Attribs)[MAX_WIDTH][4]; - GLuint CurFrag; /**< Index into Attribs arrays */ - - GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; - GLfloat Outputs[FRAG_RESULT_MAX][4]; - GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ - - GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ - GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ -}; - - -#if FEATURE_MESA_program_debug -static struct fp_machine *CurrentMachine = NULL; - -/** - * For GL_MESA_program_debug. - * Return current value (4*GLfloat) of a fragment program register. - * Called via ctx->Driver.GetFragmentProgramRegister(). - */ -void -_swrast_get_program_register(GLcontext *ctx, enum register_file file, - GLuint index, GLfloat val[4]) -{ - if (CurrentMachine) { - switch (file) { - case PROGRAM_INPUT: - COPY_4V(val, CurrentMachine->Attribs[index][CurrentMachine->CurFrag]); - break; - case PROGRAM_OUTPUT: - COPY_4V(val, CurrentMachine->Outputs[index]); - break; - case PROGRAM_TEMPORARY: - COPY_4V(val, CurrentMachine->Temporaries[index]); - break; - default: - _mesa_problem(NULL, - "bad register file in _swrast_get_program_register"); - } - } -} -#endif /* FEATURE_MESA_program_debug */ - - /** * Fetch a texel. */ @@ -146,1449 +90,6 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], } -/** - * Return a pointer to the 4-element float vector specified by the given - * source register. - */ -static INLINE const GLfloat * -get_register_pointer( GLcontext *ctx, - const struct prog_src_register *source, - const struct fp_machine *machine, - const struct gl_fragment_program *program ) -{ - /* XXX relative addressing... */ - switch (source->File) { - case PROGRAM_TEMPORARY: - ASSERT(source->Index < MAX_PROGRAM_TEMPS); - return machine->Temporaries[source->Index]; - case PROGRAM_INPUT: - ASSERT(source->Index < FRAG_ATTRIB_MAX); - return machine->Attribs[source->Index][machine->CurFrag]; - case PROGRAM_OUTPUT: - /* This is only for PRINT */ - ASSERT(source->Index < FRAG_RESULT_MAX); - return machine->Outputs[source->Index]; - case PROGRAM_LOCAL_PARAM: - ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); - return program->Base.LocalParams[source->Index]; - case PROGRAM_ENV_PARAM: - ASSERT(source->Index < MAX_PROGRAM_ENV_PARAMS); - return ctx->FragmentProgram.Parameters[source->Index]; - case PROGRAM_STATE_VAR: - /* Fallthrough */ - case PROGRAM_CONSTANT: - /* Fallthrough */ - case PROGRAM_UNIFORM: - /* Fallthrough */ - case PROGRAM_NAMED_PARAM: - ASSERT(source->Index < (GLint) program->Base.Parameters->NumParameters); - return program->Base.Parameters->ParameterValues[source->Index]; - default: - _mesa_problem(ctx, "Invalid input register file %d in fp " - "get_register_pointer", source->File); - return NULL; - } -} - - -/** - * Fetch a 4-element float vector from the given source register. - * Apply swizzling and negating as needed. - */ -static void -fetch_vector4( GLcontext *ctx, - const struct prog_src_register *source, - const struct fp_machine *machine, - const struct gl_fragment_program *program, - GLfloat result[4] ) -{ - const GLfloat *src = get_register_pointer(ctx, source, machine, program); - ASSERT(src); - - if (source->Swizzle == SWIZZLE_NOOP) { - /* no swizzling */ - COPY_4V(result, src); - } - else { - ASSERT(GET_SWZ(source->Swizzle, 0) <= 3); - ASSERT(GET_SWZ(source->Swizzle, 1) <= 3); - ASSERT(GET_SWZ(source->Swizzle, 2) <= 3); - ASSERT(GET_SWZ(source->Swizzle, 3) <= 3); - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - result[1] = src[GET_SWZ(source->Swizzle, 1)]; - result[2] = src[GET_SWZ(source->Swizzle, 2)]; - result[3] = src[GET_SWZ(source->Swizzle, 3)]; - } - - if (source->NegateBase) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } - if (source->Abs) { - result[0] = FABSF(result[0]); - result[1] = FABSF(result[1]); - result[2] = FABSF(result[2]); - result[3] = FABSF(result[3]); - } - if (source->NegateAbs) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } -} - - -/** - * Fetch the derivative with respect to X for the given register. - * \return GL_TRUE if it was easily computed or GL_FALSE if we - * need to execute another instance of the program (ugh)! - */ -static GLboolean -fetch_vector4_deriv( GLcontext *ctx, - const struct prog_src_register *source, - const SWspan *span, - char xOrY, GLint column, GLfloat result[4] ) -{ - GLfloat src[4]; - - ASSERT(xOrY == 'X' || xOrY == 'Y'); - - switch (source->Index) { - case FRAG_ATTRIB_WPOS: - if (xOrY == 'X') { - src[0] = 1.0; - src[1] = 0.0; - src[2] = span->attrStepX[FRAG_ATTRIB_WPOS][2] - / ctx->DrawBuffer->_DepthMaxF; - src[3] = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - } - else { - src[0] = 0.0; - src[1] = 1.0; - src[2] = span->attrStepY[FRAG_ATTRIB_WPOS][2] - / ctx->DrawBuffer->_DepthMaxF; - src[3] = span->attrStepY[FRAG_ATTRIB_WPOS][3]; - } - break; - case FRAG_ATTRIB_COL0: - case FRAG_ATTRIB_COL1: - if (xOrY == 'X') { - src[0] = span->attrStepX[source->Index][0] * (1.0F / CHAN_MAXF); - src[1] = span->attrStepX[source->Index][1] * (1.0F / CHAN_MAXF); - src[2] = span->attrStepX[source->Index][2] * (1.0F / CHAN_MAXF); - src[3] = span->attrStepX[source->Index][3] * (1.0F / CHAN_MAXF); - } - else { - src[0] = span->attrStepY[source->Index][0] * (1.0F / CHAN_MAXF); - src[1] = span->attrStepY[source->Index][1] * (1.0F / CHAN_MAXF); - src[2] = span->attrStepY[source->Index][2] * (1.0F / CHAN_MAXF); - src[3] = span->attrStepY[source->Index][3] * (1.0F / CHAN_MAXF); - } - break; - case FRAG_ATTRIB_FOGC: - if (xOrY == 'X') { - src[0] = span->attrStepX[FRAG_ATTRIB_FOGC][0] * (1.0F / CHAN_MAXF); - src[1] = 0.0; - src[2] = 0.0; - src[3] = 0.0; - } - else { - src[0] = span->attrStepY[FRAG_ATTRIB_FOGC][0] * (1.0F / CHAN_MAXF); - src[1] = 0.0; - src[2] = 0.0; - src[3] = 0.0; - } - break; - default: - assert(source->Index < FRAG_ATTRIB_MAX); - /* texcoord or varying */ - if (xOrY == 'X') { - /* this is a little tricky - I think I've got it right */ - const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] - + span->attrStepX[source->Index][3] * column); - src[0] = span->attrStepX[source->Index][0] * invQ; - src[1] = span->attrStepX[source->Index][1] * invQ; - src[2] = span->attrStepX[source->Index][2] * invQ; - src[3] = span->attrStepX[source->Index][3] * invQ; - } - else { - /* Tricky, as above, but in Y direction */ - const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] - + span->attrStepY[source->Index][3]); - src[0] = span->attrStepY[source->Index][0] * invQ; - src[1] = span->attrStepY[source->Index][1] * invQ; - src[2] = span->attrStepY[source->Index][2] * invQ; - src[3] = span->attrStepY[source->Index][3] * invQ; - } - break; - } - - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - result[1] = src[GET_SWZ(source->Swizzle, 1)]; - result[2] = src[GET_SWZ(source->Swizzle, 2)]; - result[3] = src[GET_SWZ(source->Swizzle, 3)]; - - if (source->NegateBase) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } - if (source->Abs) { - result[0] = FABSF(result[0]); - result[1] = FABSF(result[1]); - result[2] = FABSF(result[2]); - result[3] = FABSF(result[3]); - } - if (source->NegateAbs) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } - return GL_TRUE; -} - - -/** - * As above, but only return result[0] element. - */ -static void -fetch_vector1( GLcontext *ctx, - const struct prog_src_register *source, - const struct fp_machine *machine, - const struct gl_fragment_program *program, - GLfloat result[4] ) -{ - const GLfloat *src = get_register_pointer(ctx, source, machine, program); - ASSERT(src); - - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - - if (source->NegateBase) { - result[0] = -result[0]; - } - if (source->Abs) { - result[0] = FABSF(result[0]); - } - if (source->NegateAbs) { - result[0] = -result[0]; - } -} - - -/** - * Test value against zero and return GT, LT, EQ or UN if NaN. - */ -static INLINE GLuint -generate_cc( float value ) -{ - if (value != value) - return COND_UN; /* NaN */ - if (value > 0.0F) - return COND_GT; - if (value < 0.0F) - return COND_LT; - return COND_EQ; -} - - -/** - * Test if the ccMaskRule is satisfied by the given condition code. - * Used to mask destination writes according to the current condition code. - */ -static INLINE GLboolean -test_cc(GLuint condCode, GLuint ccMaskRule) -{ - switch (ccMaskRule) { - case COND_EQ: return (condCode == COND_EQ); - case COND_NE: return (condCode != COND_EQ); - case COND_LT: return (condCode == COND_LT); - case COND_GE: return (condCode == COND_GT || condCode == COND_EQ); - case COND_LE: return (condCode == COND_LT || condCode == COND_EQ); - case COND_GT: return (condCode == COND_GT); - case COND_TR: return GL_TRUE; - case COND_FL: return GL_FALSE; - default: return GL_TRUE; - } -} - - -/** - * Evaluate the 4 condition codes against a predicate and return GL_TRUE - * or GL_FALSE to indicate result. - */ -static INLINE GLboolean -eval_condition(const struct fp_machine *machine, - const struct prog_instruction *inst) -{ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - - - -/** - * Store 4 floats into a register. Observe the instructions saturate and - * set-condition-code flags. - */ -static void -store_vector4( const struct prog_instruction *inst, - struct fp_machine *machine, - const GLfloat value[4] ) -{ - const struct prog_dst_register *dest = &(inst->DstReg); - const GLboolean clamp = inst->SaturateMode == SATURATE_ZERO_ONE; - GLfloat *dstReg; - GLfloat dummyReg[4]; - GLfloat clampedValue[4]; - GLuint writeMask = dest->WriteMask; - - switch (dest->File) { - case PROGRAM_OUTPUT: - dstReg = machine->Outputs[dest->Index]; - break; - case PROGRAM_TEMPORARY: - dstReg = machine->Temporaries[dest->Index]; - break; - case PROGRAM_WRITE_ONLY: - dstReg = dummyReg; - return; - default: - _mesa_problem(NULL, "bad register file in store_vector4(fp)"); - return; - } - -#if 0 - if (value[0] > 1.0e10 || - IS_INF_OR_NAN(value[0]) || - IS_INF_OR_NAN(value[1]) || - IS_INF_OR_NAN(value[2]) || - IS_INF_OR_NAN(value[3]) ) - printf("store %g %g %g %g\n", value[0], value[1], value[2], value[3]); -#endif - - if (clamp) { - clampedValue[0] = CLAMP(value[0], 0.0F, 1.0F); - clampedValue[1] = CLAMP(value[1], 0.0F, 1.0F); - clampedValue[2] = CLAMP(value[2], 0.0F, 1.0F); - clampedValue[3] = CLAMP(value[3], 0.0F, 1.0F); - value = clampedValue; - } - - if (dest->CondMask != COND_TR) { - /* condition codes may turn off some writes */ - if (writeMask & WRITEMASK_X) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 0)], - dest->CondMask)) - writeMask &= ~WRITEMASK_X; - } - if (writeMask & WRITEMASK_Y) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 1)], - dest->CondMask)) - writeMask &= ~WRITEMASK_Y; - } - if (writeMask & WRITEMASK_Z) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 2)], - dest->CondMask)) - writeMask &= ~WRITEMASK_Z; - } - if (writeMask & WRITEMASK_W) { - if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 3)], - dest->CondMask)) - writeMask &= ~WRITEMASK_W; - } - } - - if (writeMask & WRITEMASK_X) - dstReg[0] = value[0]; - if (writeMask & WRITEMASK_Y) - dstReg[1] = value[1]; - if (writeMask & WRITEMASK_Z) - dstReg[2] = value[2]; - if (writeMask & WRITEMASK_W) - dstReg[3] = value[3]; - - if (inst->CondUpdate) { - if (writeMask & WRITEMASK_X) - machine->CondCodes[0] = generate_cc(value[0]); - if (writeMask & WRITEMASK_Y) - machine->CondCodes[1] = generate_cc(value[1]); - if (writeMask & WRITEMASK_Z) - machine->CondCodes[2] = generate_cc(value[2]); - if (writeMask & WRITEMASK_W) - machine->CondCodes[3] = generate_cc(value[3]); - } -} - - -/** - * Initialize a new machine state instance from an existing one, adding - * the partial derivatives onto the input registers. - * Used to implement DDX and DDY instructions in non-trivial cases. - */ -static void -init_machine_deriv( GLcontext *ctx, - const struct fp_machine *machine, - const struct gl_fragment_program *program, - const SWspan *span, char xOrY, - struct fp_machine *dMachine ) -{ - GLuint attr; - - ASSERT(xOrY == 'X' || xOrY == 'Y'); - - /* copy existing machine */ - _mesa_memcpy(dMachine, machine, sizeof(struct fp_machine)); - - if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { - /* XXX also need to do this when using valgrind */ - /* Clear temporary registers (undefined for ARB_f_p) */ - _mesa_bzero( (void*) machine->Temporaries, - MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); - } - - /* Add derivatives */ - if (program->Base.InputsRead & FRAG_BIT_WPOS) { - GLfloat *wpos = machine->Attribs[FRAG_ATTRIB_WPOS][machine->CurFrag]; - if (xOrY == 'X') { - wpos[0] += 1.0F; - wpos[1] += 0.0F; - wpos[2] += span->attrStepX[FRAG_ATTRIB_WPOS][2]; - wpos[3] += span->attrStepX[FRAG_ATTRIB_WPOS][3]; - } - else { - wpos[0] += 0.0F; - wpos[1] += 1.0F; - wpos[2] += span->attrStepY[FRAG_ATTRIB_WPOS][2]; - wpos[3] += span->attrStepY[FRAG_ATTRIB_WPOS][3]; - } - } - - /* primary, secondary colors */ - for (attr = FRAG_ATTRIB_COL0; attr <= FRAG_ATTRIB_COL1; attr++) { - if (program->Base.InputsRead & (1 << attr)) { - GLfloat *col = machine->Attribs[attr][machine->CurFrag]; - if (xOrY == 'X') { - col[0] += span->attrStepX[attr][0] * (1.0F / CHAN_MAXF); - col[1] += span->attrStepX[attr][1] * (1.0F / CHAN_MAXF); - col[2] += span->attrStepX[attr][2] * (1.0F / CHAN_MAXF); - col[3] += span->attrStepX[attr][3] * (1.0F / CHAN_MAXF); - } - else { - col[0] += span->attrStepY[attr][0] * (1.0F / CHAN_MAXF); - col[1] += span->attrStepY[attr][1] * (1.0F / CHAN_MAXF); - col[2] += span->attrStepY[attr][2] * (1.0F / CHAN_MAXF); - col[3] += span->attrStepY[attr][3] * (1.0F / CHAN_MAXF); - } - } - } - if (program->Base.InputsRead & FRAG_BIT_FOGC) { - GLfloat *fogc = machine->Attribs[FRAG_ATTRIB_FOGC][machine->CurFrag]; - if (xOrY == 'X') { - fogc[0] += span->attrStepX[FRAG_ATTRIB_FOGC][0]; - } - else { - fogc[0] += span->attrStepY[FRAG_ATTRIB_FOGC][0]; - } - } - /* texcoord and varying vars */ - for (attr = FRAG_ATTRIB_TEX0; attr < FRAG_ATTRIB_MAX; attr++) { - if (program->Base.InputsRead & (1 << attr)) { - GLfloat *val = machine->Attribs[attr][machine->CurFrag]; - /* XXX perspective-correct interpolation */ - if (xOrY == 'X') { - val[0] += span->attrStepX[attr][0]; - val[1] += span->attrStepX[attr][1]; - val[2] += span->attrStepX[attr][2]; - val[3] += span->attrStepX[attr][3]; - } - else { - val[0] += span->attrStepY[attr][0]; - val[1] += span->attrStepY[attr][1]; - val[2] += span->attrStepY[attr][2]; - val[3] += span->attrStepY[attr][3]; - } - } - } - - /* init condition codes */ - dMachine->CondCodes[0] = COND_EQ; - dMachine->CondCodes[1] = COND_EQ; - dMachine->CondCodes[2] = COND_EQ; - dMachine->CondCodes[3] = COND_EQ; -} - - -/** - * Execute the given vertex program. - * NOTE: we do everything in single-precision floating point; we don't - * currently observe the single/half/fixed-precision qualifiers. - * \param ctx - rendering context - * \param program - the fragment program to execute - * \param machine - machine state (register file) - * \param maxInst - max number of instructions to execute - * \return GL_TRUE if program completed or GL_FALSE if program executed KIL. - */ -static GLboolean -execute_program( GLcontext *ctx, - const struct gl_fragment_program *program, GLuint maxInst, - struct fp_machine *machine, const SWspan *span, - GLuint column ) -{ - const GLuint MAX_EXEC = 10000; - GLint pc, total = 0; - - if (DEBUG_FRAG) { - printf("execute fragment program --------------------\n"); - } - - for (pc = 0; pc < maxInst; pc++) { - const struct prog_instruction *inst = program->Base.Instructions + pc; - - if (ctx->FragmentProgram.CallbackEnabled && - ctx->FragmentProgram.Callback) { - ctx->FragmentProgram.CurrentPosition = inst->StringPos; - ctx->FragmentProgram.Callback(program->Base.Target, - ctx->FragmentProgram.CallbackData); - } - - if (DEBUG_FRAG) { - _mesa_print_instruction(inst); - } - - switch (inst->Opcode) { - case OPCODE_ABS: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = FABSF(a[0]); - result[1] = FABSF(a[1]); - result[2] = FABSF(a[2]); - result[3] = FABSF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_ADD: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[0] + b[0]; - result[1] = a[1] + b[1]; - result[2] = a[2] + b[2]; - result[3] = a[3] + b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("ADD (%g %g %g %g) = (%g %g %g %g) + (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_BGNLOOP: - /* no-op */ - break; - case OPCODE_ENDLOOP: - /* subtract 1 here since pc is incremented by for(pc) loop */ - pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ - break; - case OPCODE_BGNSUB: /* begin subroutine */ - break; - case OPCODE_ENDSUB: /* end subroutine */ - break; - case OPCODE_BRA: /* branch (conditional) */ - /* fall-through */ - case OPCODE_BRK: /* break out of loop (conditional) */ - /* fall-through */ - case OPCODE_CONT: /* continue loop (conditional) */ - if (eval_condition(machine, inst)) { - /* take branch */ - /* Subtract 1 here since we'll do pc++ at end of for-loop */ - pc = inst->BranchTarget - 1; - } - break; - case OPCODE_CAL: /* Call subroutine (conditional) */ - if (eval_condition(machine, inst)) { - /* call the subroutine */ - if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - machine->CallStack[machine->StackDepth++] = pc + 1; - pc = inst->BranchTarget; /* XXX - 1 ??? */ - } - break; - case OPCODE_CMP: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] < 0.0F ? b[0] : c[0]; - result[1] = a[1] < 0.0F ? b[1] : c[1]; - result[2] = a[2] < 0.0F ? b[2] : c[2]; - result[3] = a[3] < 0.0F ? b[3] : c[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_COS: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat) _mesa_cos(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DDX: /* Partial derivative with respect to X */ - { - GLfloat a[4], aNext[4], result[4]; - struct fp_machine dMachine; - if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'X', - column, result)) { - /* This is tricky. Make a copy of the current machine state, - * increment the input registers by the dx or dy partial - * derivatives, then re-execute the program up to the - * preceeding instruction, then fetch the source register. - * Finally, find the difference in the register values for - * the original and derivative runs. - */ - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - init_machine_deriv(ctx, machine, program, span, - 'X', &dMachine); - execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); - result[0] = aNext[0] - a[0]; - result[1] = aNext[1] - a[1]; - result[2] = aNext[2] - a[2]; - result[3] = aNext[3] - a[3]; - } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DDY: /* Partial derivative with respect to Y */ - { - GLfloat a[4], aNext[4], result[4]; - struct fp_machine dMachine; - if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'Y', - column, result)) { - init_machine_deriv(ctx, machine, program, span, - 'Y', &dMachine); - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); - result[0] = aNext[0] - a[0]; - result[1] = aNext[1] - a[1]; - result[2] = aNext[2] - a[2]; - result[3] = aNext[3] - a[3]; - } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DP3: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] = DOT3(a, b); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("DP3 %g = (%g %g %g) . (%g %g %g)\n", - result[0], a[0], a[1], a[2], b[0], b[1], b[2]); - } - } - break; - case OPCODE_DP4: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] = DOT4(a,b); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("DP4 %g = (%g, %g %g %g) . (%g, %g %g %g)\n", - result[0], a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_DPH: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] = - a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DST: /* Distance vector */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = 1.0F; - result[1] = a[1] * b[1]; - result[2] = a[2]; - result[3] = b[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_EX2: /* Exponential base 2 */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] = - (GLfloat) _mesa_pow(2.0, a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_FLR: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = FLOORF(a[0]); - result[1] = FLOORF(a[1]); - result[2] = FLOORF(a[2]); - result[3] = FLOORF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_FRC: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = a[0] - FLOORF(a[0]); - result[1] = a[1] - FLOORF(a[1]); - result[2] = a[2] - FLOORF(a[2]); - result[3] = a[3] - FLOORF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_IF: - if (eval_condition(machine, inst)) { - /* do if-clause (just continue execution) */ - } - else { - /* go to the instruction after ELSE or ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; - } - break; - case OPCODE_ELSE: - /* goto ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; - break; - case OPCODE_ENDIF: - /* nothing */ - break; - case OPCODE_INT: /* float to int */ - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = (GLfloat) (GLint) a[0]; - result[1] = (GLfloat) (GLint) a[1]; - result[2] = (GLfloat) (GLint) a[2]; - result[3] = (GLfloat) (GLint) a[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_KIL_NV: /* NV_f_p only (conditional) */ - if (eval_condition(machine, inst)) { - return GL_FALSE; - } - break; - case OPCODE_KIL: /* ARB_f_p only */ - { - GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { - return GL_FALSE; - } - } - break; - case OPCODE_LG2: /* log base 2 */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_LIT: - { - const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = MAX2(a[0], 0.0F); - a[1] = MAX2(a[1], 0.0F); - /* XXX ARB version clamps a[3], NV version doesn't */ - a[3] = CLAMP(a[3], -(128.0F - epsilon), (128.0F - epsilon)); - result[0] = 1.0F; - result[1] = a[0]; - /* XXX we could probably just use pow() here */ - if (a[0] > 0.0F) { - if (a[1] == 0.0 && a[3] == 0.0) - result[2] = 1.0; - else - result[2] = EXPF(a[3] * LOGF(a[1])); - } - else { - result[2] = 0.0; - } - result[3] = 1.0F; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("LIT (%g %g %g %g) : (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3]); - } - } - break; - case OPCODE_LRP: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; - result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; - result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; - result[3] = a[3] * b[3] + (1.0F - a[3]) * c[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("LRP (%g %g %g %g) = (%g %g %g %g), " - "(%g %g %g %g), (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3], - c[0], c[1], c[2], c[3]); - } - } - break; - case OPCODE_MAD: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] * b[0] + c[0]; - result[1] = a[1] * b[1] + c[1]; - result[2] = a[2] * b[2] + c[2]; - result[3] = a[3] * b[3] + c[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MAD (%g %g %g %g) = (%g %g %g %g) * " - "(%g %g %g %g) + (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3], - c[0], c[1], c[2], c[3]); - } - } - break; - case OPCODE_MAX: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = MAX2(a[0], b[0]); - result[1] = MAX2(a[1], b[1]); - result[2] = MAX2(a[2], b[2]); - result[3] = MAX2(a[3], b[3]); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MAX (%g %g %g %g) = (%g %g %g %g), (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_MIN: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = MIN2(a[0], b[0]); - result[1] = MIN2(a[1], b[1]); - result[2] = MIN2(a[2], b[2]); - result[3] = MIN2(a[3], b[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_MOV: - { - GLfloat result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, result ); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MOV (%g %g %g %g)\n", - result[0], result[1], result[2], result[3]); - } - } - break; - case OPCODE_MUL: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[0] * b[0]; - result[1] = a[1] * b[1]; - result[2] = a[2] * b[2]; - result[3] = a[3] * b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("MUL (%g %g %g %g) = (%g %g %g %g) * (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_NOISE1: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = - result[1] = - result[2] = - result[3] = _slang_library_noise1(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOISE2: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = - result[1] = - result[2] = - result[3] = _slang_library_noise2(a[0], a[1]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOISE3: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = - result[1] = - result[2] = - result[3] = _slang_library_noise3(a[0], a[1], a[2]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOISE4: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = - result[1] = - result[2] = - result[3] = _slang_library_noise4(a[0], a[1], a[2], a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOP: - break; - case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ - { - GLfloat a[4], result[4]; - GLhalfNV hx, hy; - GLuint *rawResult = (GLuint *) result; - GLuint twoHalves; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - hx = _mesa_float_to_half(a[0]); - hy = _mesa_float_to_half(a[1]); - twoHalves = hx | (hy << 16); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = twoHalves; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK2US: /* pack two GLushorts into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint usx, usy, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = CLAMP(a[0], 0.0F, 1.0F); - a[1] = CLAMP(a[1], 0.0F, 1.0F); - usx = IROUND(a[0] * 65535.0F); - usy = IROUND(a[1] * 65535.0F); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = usx | (usy << 16); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK4B: /* pack four GLbytes into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); - a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); - a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); - a[3] = CLAMP(a[3], -128.0F / 127.0F, 1.0F); - ubx = IROUND(127.0F * a[0] + 128.0F); - uby = IROUND(127.0F * a[1] + 128.0F); - ubz = IROUND(127.0F * a[2] + 128.0F); - ubw = IROUND(127.0F * a[3] + 128.0F); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK4UB: /* pack four GLubytes into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = CLAMP(a[0], 0.0F, 1.0F); - a[1] = CLAMP(a[1], 0.0F, 1.0F); - a[2] = CLAMP(a[2], 0.0F, 1.0F); - a[3] = CLAMP(a[3], 0.0F, 1.0F); - ubx = IROUND(255.0F * a[0]); - uby = IROUND(255.0F * a[1]); - ubz = IROUND(255.0F * a[2]); - ubw = IROUND(255.0F * a[3]); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_POW: - { - GLfloat a[4], b[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector1( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat)_mesa_pow(a[0], b[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RCP: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - if (DEBUG_FRAG) { - if (a[0] == 0) - printf("RCP(0)\n"); - else if (IS_INF_OR_NAN(a[0])) - printf("RCP(inf)\n"); - } - result[0] = result[1] = result[2] = result[3] = 1.0F / a[0]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RET: /* return from subroutine (conditional) */ - if (eval_condition(machine, inst)) { - if (machine->StackDepth == 0) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - pc = machine->CallStack[--machine->StackDepth]; - } - break; - case OPCODE_RFL: /* reflection vector */ - { - GLfloat axis[4], dir[4], result[4], tmpX, tmpW; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, axis ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dir ); - tmpW = DOT3(axis, axis); - tmpX = (2.0F * DOT3(axis, dir)) / tmpW; - result[0] = tmpX * axis[0] - dir[0]; - result[1] = tmpX * axis[1] - dir[1]; - result[2] = tmpX * axis[2] - dir[2]; - /* result[3] is never written! XXX enforce in parser! */ - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RSQ: /* 1 / sqrt() */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - a[0] = FABSF(a[0]); - result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("RSQ %g = 1/sqrt(|%g|)\n", result[0], a[0]); - } - } - break; - case OPCODE_SCS: /* sine and cos */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = (GLfloat) _mesa_cos(a[0]); - result[1] = (GLfloat) _mesa_sin(a[0]); - result[2] = 0.0; /* undefined! */ - result[3] = 0.0; /* undefined! */ - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SEQ: /* set on equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] == b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SFL: /* set false, operands ignored */ - { - static const GLfloat result[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SGE: /* set on greater or equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] >= b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SGT: /* set on greater */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("SGT %g %g %g %g\n", - result[0], result[1], result[2], result[3]); - } - } - break; - case OPCODE_SIN: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat) _mesa_sin(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SLE: /* set on less or equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] <= b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SLT: /* set on less */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] < b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SNE: /* set on not equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] != b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_STR: /* set true, operands ignored */ - { - static const GLfloat result[4] = { 1.0F, 1.0F, 1.0F, 1.0F }; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SUB: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[0] - b[0]; - result[1] = a[1] - b[1]; - result[2] = a[2] - b[2]; - result[3] = a[3] - b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_FRAG) { - printf("SUB (%g %g %g %g) = (%g %g %g %g) - (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_SWZ: /* extended swizzle */ - { - const struct prog_src_register *source = &inst->SrcReg[0]; - const GLfloat *src = get_register_pointer(ctx, source, - machine, program); - GLfloat result[4]; - GLuint i; - for (i = 0; i < 4; i++) { - const GLuint swz = GET_SWZ(source->Swizzle, i); - if (swz == SWIZZLE_ZERO) - result[i] = 0.0; - else if (swz == SWIZZLE_ONE) - result[i] = 1.0; - else { - ASSERT(swz >= 0); - ASSERT(swz <= 3); - result[i] = src[swz]; - } - if (source->NegateBase & (1 << i)) - result[i] = -result[i]; - } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_TEX: /* Both ARB and NV frag prog */ - /* Texel lookup */ - { - /* Note: only use the precomputed lambda value when we're - * sampling texture unit [K] with texcoord[K]. - * Otherwise, the lambda value may have no relation to the - * instruction's texcoord or texture image. Using the wrong - * lambda is usually bad news. - * The rest of the time, just use zero (until we get a more - * sophisticated way of computing lambda). - */ - GLfloat coord[4], color[4], lambda; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); - fetch_texel( ctx, coord, lambda, inst->TexSrcUnit, color ); - if (DEBUG_FRAG) { - printf("TEX (%g, %g, %g, %g) = texture[%d][%g, %g, %g, %g], " - "lod %f\n", - color[0], color[1], color[2], color[3], - inst->TexSrcUnit, - coord[0], coord[1], coord[2], coord[3], lambda); - } - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXB: /* GL_ARB_fragment_program only */ - /* Texel lookup with LOD bias */ - { - const struct gl_texture_unit *texUnit - = &ctx->Texture.Unit[inst->TexSrcUnit]; - GLfloat coord[4], color[4], lambda, bias; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); - /* coord[3] is the bias to add to lambda */ - bias = texUnit->LodBias + coord[3]; - if (texUnit->_Current) - bias += texUnit->_Current->LodBias; - fetch_texel(ctx, coord, lambda + bias, inst->TexSrcUnit, color); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXD: /* GL_NV_fragment_program only */ - /* Texture lookup w/ partial derivatives for LOD */ - { - GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, texcoord ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dtdx ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, dtdy ); - fetch_texel_deriv( ctx, texcoord, dtdx, dtdy, inst->TexSrcUnit, - color ); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXP: /* GL_ARB_fragment_program only */ - /* Texture lookup w/ projective divide */ - { - GLfloat texcoord[4], color[4], lambda; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); - /* Not so sure about this test - if texcoord[3] is - * zero, we'd probably be fine except for an ASSERT in - * IROUND_POS() which gets triggered by the inf values created. - */ - if (texcoord[3] != 0.0) { - texcoord[0] /= texcoord[3]; - texcoord[1] /= texcoord[3]; - texcoord[2] /= texcoord[3]; - } - fetch_texel( ctx, texcoord, lambda, inst->TexSrcUnit, color ); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXP_NV: /* GL_NV_fragment_program only */ - /* Texture lookup w/ projective divide */ - { - GLfloat texcoord[4], color[4], lambda; - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); - if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && - texcoord[3] != 0.0) { - texcoord[0] /= texcoord[3]; - texcoord[1] /= texcoord[3]; - texcoord[2] /= texcoord[3]; - } - fetch_texel( ctx, texcoord, lambda, inst->TexSrcUnit, color ); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_UP2H: /* unpack two 16-bit floats */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - GLhalfNV hx, hy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - hx = rawBits[0] & 0xffff; - hy = rawBits[0] >> 16; - result[0] = result[2] = _mesa_half_to_float(hx); - result[1] = result[3] = _mesa_half_to_float(hy); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP2US: /* unpack two GLushorts */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - GLushort usx, usy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - usx = rawBits[0] & 0xffff; - usy = rawBits[0] >> 16; - result[0] = result[2] = usx * (1.0f / 65535.0f); - result[1] = result[3] = usy * (1.0f / 65535.0f); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP4B: /* unpack four GLbytes */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; - result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; - result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; - result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP4UB: /* unpack four GLubytes */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; - result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; - result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; - result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_XPD: /* cross product */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = a[1] * b[2] - a[2] * b[1]; - result[1] = a[2] * b[0] - a[0] * b[2]; - result[2] = a[0] * b[1] - a[1] * b[0]; - result[3] = 1.0; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_X2D: /* 2-D matrix transform */ - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; - result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; - result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; - result[3] = a[3] + b[0] * c[2] + b[1] * c[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PRINT: - { - if (inst->SrcReg[0].File != -1) { - GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, - a[0], a[1], a[2], a[3]); - } - else { - _mesa_printf("%s\n", (const char *) inst->Data); - } - } - break; - case OPCODE_END: - return GL_TRUE; - default: - _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program", - inst->Opcode); - return GL_TRUE; /* return value doesn't matter */ - - } - total++; - if (total > MAX_EXEC) { - _mesa_problem(ctx, "Infinite loop detected in fragment program"); - return GL_TRUE; - abort(); - } - } - return GL_TRUE; -} - - /** * Initialize the virtual fragment program machine state prior to running * fragment program on a fragment. This involves initializing the input @@ -1599,9 +100,9 @@ execute_program( GLcontext *ctx, * \param col which element (column) of the span we'll operate on */ static void -init_machine( GLcontext *ctx, struct fp_machine *machine, - const struct gl_fragment_program *program, - const SWspan *span, GLuint col ) +init_machine(GLcontext *ctx, struct gl_program_machine *machine, + const struct gl_fragment_program *program, + const SWspan *span, GLuint col) { GLuint inputsRead = program->Base.InputsRead; @@ -1616,7 +117,7 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, /* Setup pointer to input attributes */ machine->Attribs = span->array->attribs; - machine->CurFrag = col; + machine->CurElement = col; /* init condition codes */ machine->CondCodes[0] = COND_EQ; @@ -1626,6 +127,9 @@ init_machine( GLcontext *ctx, struct fp_machine *machine, /* init call stack */ machine->StackDepth = 0; + + machine->FetchTexelLod = fetch_texel; + machine->FetchTexelDeriv = fetch_texel_deriv; } @@ -1636,17 +140,16 @@ static void run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) { const struct gl_fragment_program *program = ctx->FragmentProgram._Current; - struct fp_machine machine; + struct gl_program_machine machine; GLuint i; - CurrentMachine = &machine; - for (i = start; i < end; i++) { if (span->array->mask[i]) { init_machine(ctx, &machine, program, span, i); - if (execute_program(ctx, program, program->Base.NumInstructions, - &machine, span, i)) { + if (_mesa_execute_program(ctx, &program->Base, + program->Base.NumInstructions, + &machine, i)) { /* Store result color */ COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], machine.Outputs[FRAG_RESULT_COLR]); @@ -1669,8 +172,6 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) } } } - - CurrentMachine = NULL; } -- cgit v1.2.3 From 7aaefcbe487aedf53a46a66d2bac8b265b0176bf Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:08:30 -0700 Subject: use _mesa_get_program_register() --- src/mesa/drivers/common/driverfuncs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index bc637a879e..ee96339f12 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -30,6 +30,7 @@ #include "framebuffer.h" #include "occlude.h" #include "program.h" +#include "prog_execute.h" #include "renderbuffer.h" #include "texcompress.h" #include "texformat.h" @@ -128,7 +129,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->NewProgram = _mesa_new_program; driver->DeleteProgram = _mesa_delete_program; #if FEATURE_MESA_program_debug - driver->GetFragmentProgramRegister = _swrast_get_program_register; + driver->GetFragmentProgramRegister = _mesa_get_program_register; #endif /* FEATURE_MESA_program_debug */ /* simple state commands */ -- cgit v1.2.3 From 13e3b21b16b14112b416f3ee5742fc7bd1b2d823 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:09:40 -0700 Subject: New, unified interpretor/executor for vertex and fragment programs. This replaces the code formerly in nvvertexec.c and s_fragprog.c. Currently, DDX, DDY don't work. --- src/mesa/shader/prog_execute.c | 1585 ++++++++++++++++++++++++++++++++++++++++ src/mesa/shader/prog_execute.h | 77 ++ 2 files changed, 1662 insertions(+) create mode 100644 src/mesa/shader/prog_execute.c create mode 100644 src/mesa/shader/prog_execute.h (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c new file mode 100644 index 0000000000..f466cc7aff --- /dev/null +++ b/src/mesa/shader/prog_execute.c @@ -0,0 +1,1585 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file prog_execute.c + * Software interpreter for vertex/fragment programs. + * \author Brian Paul + */ + +/* + * NOTE: we do everything in single-precision floating point; we don't + * currently observe the single/half/fixed-precision qualifiers. + * + */ + + +#include "glheader.h" +#include "colormac.h" +#include "context.h" +#include "program.h" +#include "prog_execute.h" +#include "prog_instruction.h" +#include "prog_parameter.h" +#include "prog_print.h" +#include "slang_library_noise.h" + + +/* See comments below for info about this */ +#define LAMBDA_ZERO 1 + +/* debug predicate */ +#define DEBUG_PROG 0 + + +#if FEATURE_MESA_program_debug +static struct gl_program_machine *CurrentMachine = NULL; + +/** + * For GL_MESA_program_debug. + * Return current value (4*GLfloat) of a program register. + * Called via ctx->Driver.GetFragmentProgramRegister(). + */ +void +_mesa_get_program_register(GLcontext *ctx, enum register_file file, + GLuint index, GLfloat val[4]) +{ + if (CurrentMachine) { + switch (file) { + case PROGRAM_INPUT: + if (CurrentMachine->CurProgram->Target == GL_VERTEX_PROGRAM_ARB) { + COPY_4V(val, CurrentMachine->VertAttribs[index]); + } + else { + COPY_4V(val, + CurrentMachine->Attribs[index][CurrentMachine->CurElement]); + } + break; + case PROGRAM_OUTPUT: + COPY_4V(val, CurrentMachine->Outputs[index]); + break; + case PROGRAM_TEMPORARY: + COPY_4V(val, CurrentMachine->Temporaries[index]); + break; + default: + _mesa_problem(NULL, + "bad register file in _swrast_get_program_register"); + } + } +} +#endif /* FEATURE_MESA_program_debug */ + + + +/** + * Return a pointer to the 4-element float vector specified by the given + * source register. + */ +static INLINE const GLfloat * +get_register_pointer( GLcontext *ctx, + const struct prog_src_register *source, + const struct gl_program_machine *machine) +{ + /* XXX relative addressing... */ + switch (source->File) { + case PROGRAM_TEMPORARY: + ASSERT(source->Index < MAX_PROGRAM_TEMPS); + return machine->Temporaries[source->Index]; + + case PROGRAM_INPUT: + if (machine->CurProgram->Target == GL_VERTEX_PROGRAM_ARB) { + ASSERT(source->Index < VERT_ATTRIB_MAX); + return machine->VertAttribs[source->Index]; + } + else { + ASSERT(source->Index < FRAG_ATTRIB_MAX); + return machine->Attribs[source->Index][machine->CurElement]; + } + + case PROGRAM_OUTPUT: + /* This is only for PRINT */ + ASSERT(source->Index < FRAG_RESULT_MAX); + return machine->Outputs[source->Index]; + + case PROGRAM_LOCAL_PARAM: + ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); + return machine->CurProgram->LocalParams[source->Index]; + + case PROGRAM_ENV_PARAM: + ASSERT(source->Index < MAX_PROGRAM_ENV_PARAMS); + if (machine->CurProgram->Target == GL_VERTEX_PROGRAM_ARB) + return ctx->VertexProgram.Parameters[source->Index]; + else + return ctx->FragmentProgram.Parameters[source->Index]; + + case PROGRAM_STATE_VAR: + /* Fallthrough */ + case PROGRAM_CONSTANT: + /* Fallthrough */ + case PROGRAM_UNIFORM: + /* Fallthrough */ + case PROGRAM_NAMED_PARAM: + ASSERT(source->Index < + (GLint) machine->CurProgram->Parameters->NumParameters); + return machine->CurProgram->Parameters->ParameterValues[source->Index]; + + default: + _mesa_problem(ctx, + "Invalid input register file %d in get_register_pointer()", + source->File); + return NULL; + } +} + + +/** + * Fetch a 4-element float vector from the given source register. + * Apply swizzling and negating as needed. + */ +static void +fetch_vector4( GLcontext *ctx, + const struct prog_src_register *source, + const struct gl_program_machine *machine, + const struct gl_program *program, + GLfloat result[4] ) +{ + const GLfloat *src = get_register_pointer(ctx, source, machine); + ASSERT(src); + + if (source->Swizzle == SWIZZLE_NOOP) { + /* no swizzling */ + COPY_4V(result, src); + } + else { + ASSERT(GET_SWZ(source->Swizzle, 0) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 1) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 2) <= 3); + ASSERT(GET_SWZ(source->Swizzle, 3) <= 3); + result[0] = src[GET_SWZ(source->Swizzle, 0)]; + result[1] = src[GET_SWZ(source->Swizzle, 1)]; + result[2] = src[GET_SWZ(source->Swizzle, 2)]; + result[3] = src[GET_SWZ(source->Swizzle, 3)]; + } + + if (source->NegateBase) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } + if (source->Abs) { + result[0] = FABSF(result[0]); + result[1] = FABSF(result[1]); + result[2] = FABSF(result[2]); + result[3] = FABSF(result[3]); + } + if (source->NegateAbs) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } +} + +#if 0 +/** + * Fetch the derivative with respect to X for the given register. + * \return GL_TRUE if it was easily computed or GL_FALSE if we + * need to execute another instance of the program (ugh)! + */ +static GLboolean +fetch_vector4_deriv( GLcontext *ctx, + const struct prog_src_register *source, + const SWspan *span, + char xOrY, GLint column, GLfloat result[4] ) +{ + GLfloat src[4]; + + ASSERT(xOrY == 'X' || xOrY == 'Y'); + + switch (source->Index) { + case FRAG_ATTRIB_WPOS: + if (xOrY == 'X') { + src[0] = 1.0; + src[1] = 0.0; + src[2] = span->attrStepX[FRAG_ATTRIB_WPOS][2] + / ctx->DrawBuffer->_DepthMaxF; + src[3] = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + } + else { + src[0] = 0.0; + src[1] = 1.0; + src[2] = span->attrStepY[FRAG_ATTRIB_WPOS][2] + / ctx->DrawBuffer->_DepthMaxF; + src[3] = span->attrStepY[FRAG_ATTRIB_WPOS][3]; + } + break; + case FRAG_ATTRIB_COL0: + case FRAG_ATTRIB_COL1: + if (xOrY == 'X') { + src[0] = span->attrStepX[source->Index][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepX[source->Index][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepX[source->Index][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepX[source->Index][3] * (1.0F / CHAN_MAXF); + } + else { + src[0] = span->attrStepY[source->Index][0] * (1.0F / CHAN_MAXF); + src[1] = span->attrStepY[source->Index][1] * (1.0F / CHAN_MAXF); + src[2] = span->attrStepY[source->Index][2] * (1.0F / CHAN_MAXF); + src[3] = span->attrStepY[source->Index][3] * (1.0F / CHAN_MAXF); + } + break; + case FRAG_ATTRIB_FOGC: + if (xOrY == 'X') { + src[0] = span->attrStepX[FRAG_ATTRIB_FOGC][0] * (1.0F / CHAN_MAXF); + src[1] = 0.0; + src[2] = 0.0; + src[3] = 0.0; + } + else { + src[0] = span->attrStepY[FRAG_ATTRIB_FOGC][0] * (1.0F / CHAN_MAXF); + src[1] = 0.0; + src[2] = 0.0; + src[3] = 0.0; + } + break; + default: + assert(source->Index < FRAG_ATTRIB_MAX); + /* texcoord or varying */ + if (xOrY == 'X') { + /* this is a little tricky - I think I've got it right */ + const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] + + span->attrStepX[source->Index][3] * column); + src[0] = span->attrStepX[source->Index][0] * invQ; + src[1] = span->attrStepX[source->Index][1] * invQ; + src[2] = span->attrStepX[source->Index][2] * invQ; + src[3] = span->attrStepX[source->Index][3] * invQ; + } + else { + /* Tricky, as above, but in Y direction */ + const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] + + span->attrStepY[source->Index][3]); + src[0] = span->attrStepY[source->Index][0] * invQ; + src[1] = span->attrStepY[source->Index][1] * invQ; + src[2] = span->attrStepY[source->Index][2] * invQ; + src[3] = span->attrStepY[source->Index][3] * invQ; + } + break; + } + + result[0] = src[GET_SWZ(source->Swizzle, 0)]; + result[1] = src[GET_SWZ(source->Swizzle, 1)]; + result[2] = src[GET_SWZ(source->Swizzle, 2)]; + result[3] = src[GET_SWZ(source->Swizzle, 3)]; + + if (source->NegateBase) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } + if (source->Abs) { + result[0] = FABSF(result[0]); + result[1] = FABSF(result[1]); + result[2] = FABSF(result[2]); + result[3] = FABSF(result[3]); + } + if (source->NegateAbs) { + result[0] = -result[0]; + result[1] = -result[1]; + result[2] = -result[2]; + result[3] = -result[3]; + } + return GL_TRUE; +} +#endif + + +/** + * As above, but only return result[0] element. + */ +static void +fetch_vector1( GLcontext *ctx, + const struct prog_src_register *source, + const struct gl_program_machine *machine, + const struct gl_program *program, + GLfloat result[4] ) +{ + const GLfloat *src = get_register_pointer(ctx, source, machine); + ASSERT(src); + + result[0] = src[GET_SWZ(source->Swizzle, 0)]; + + if (source->NegateBase) { + result[0] = -result[0]; + } + if (source->Abs) { + result[0] = FABSF(result[0]); + } + if (source->NegateAbs) { + result[0] = -result[0]; + } +} + + +/** + * Test value against zero and return GT, LT, EQ or UN if NaN. + */ +static INLINE GLuint +generate_cc( float value ) +{ + if (value != value) + return COND_UN; /* NaN */ + if (value > 0.0F) + return COND_GT; + if (value < 0.0F) + return COND_LT; + return COND_EQ; +} + + +/** + * Test if the ccMaskRule is satisfied by the given condition code. + * Used to mask destination writes according to the current condition code. + */ +static INLINE GLboolean +test_cc(GLuint condCode, GLuint ccMaskRule) +{ + switch (ccMaskRule) { + case COND_EQ: return (condCode == COND_EQ); + case COND_NE: return (condCode != COND_EQ); + case COND_LT: return (condCode == COND_LT); + case COND_GE: return (condCode == COND_GT || condCode == COND_EQ); + case COND_LE: return (condCode == COND_LT || condCode == COND_EQ); + case COND_GT: return (condCode == COND_GT); + case COND_TR: return GL_TRUE; + case COND_FL: return GL_FALSE; + default: return GL_TRUE; + } +} + + +/** + * Evaluate the 4 condition codes against a predicate and return GL_TRUE + * or GL_FALSE to indicate result. + */ +static INLINE GLboolean +eval_condition(const struct gl_program_machine *machine, + const struct prog_instruction *inst) +{ + const GLuint swizzle = inst->DstReg.CondSwizzle; + const GLuint condMask = inst->DstReg.CondMask; + if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || + test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { + return GL_TRUE; + } + else { + return GL_FALSE; + } +} + + + +/** + * Store 4 floats into a register. Observe the instructions saturate and + * set-condition-code flags. + */ +static void +store_vector4( const struct prog_instruction *inst, + struct gl_program_machine *machine, + const GLfloat value[4] ) +{ + const struct prog_dst_register *dest = &(inst->DstReg); + const GLboolean clamp = inst->SaturateMode == SATURATE_ZERO_ONE; + GLfloat *dstReg; + GLfloat dummyReg[4]; + GLfloat clampedValue[4]; + GLuint writeMask = dest->WriteMask; + + switch (dest->File) { + case PROGRAM_OUTPUT: + dstReg = machine->Outputs[dest->Index]; + break; + case PROGRAM_TEMPORARY: + dstReg = machine->Temporaries[dest->Index]; + break; + case PROGRAM_WRITE_ONLY: + dstReg = dummyReg; + return; + default: + _mesa_problem(NULL, "bad register file in store_vector4(fp)"); + return; + } + +#if 0 + if (value[0] > 1.0e10 || + IS_INF_OR_NAN(value[0]) || + IS_INF_OR_NAN(value[1]) || + IS_INF_OR_NAN(value[2]) || + IS_INF_OR_NAN(value[3]) ) + printf("store %g %g %g %g\n", value[0], value[1], value[2], value[3]); +#endif + + if (clamp) { + clampedValue[0] = CLAMP(value[0], 0.0F, 1.0F); + clampedValue[1] = CLAMP(value[1], 0.0F, 1.0F); + clampedValue[2] = CLAMP(value[2], 0.0F, 1.0F); + clampedValue[3] = CLAMP(value[3], 0.0F, 1.0F); + value = clampedValue; + } + + if (dest->CondMask != COND_TR) { + /* condition codes may turn off some writes */ + if (writeMask & WRITEMASK_X) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 0)], + dest->CondMask)) + writeMask &= ~WRITEMASK_X; + } + if (writeMask & WRITEMASK_Y) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 1)], + dest->CondMask)) + writeMask &= ~WRITEMASK_Y; + } + if (writeMask & WRITEMASK_Z) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 2)], + dest->CondMask)) + writeMask &= ~WRITEMASK_Z; + } + if (writeMask & WRITEMASK_W) { + if (!test_cc(machine->CondCodes[GET_SWZ(dest->CondSwizzle, 3)], + dest->CondMask)) + writeMask &= ~WRITEMASK_W; + } + } + + if (writeMask & WRITEMASK_X) + dstReg[0] = value[0]; + if (writeMask & WRITEMASK_Y) + dstReg[1] = value[1]; + if (writeMask & WRITEMASK_Z) + dstReg[2] = value[2]; + if (writeMask & WRITEMASK_W) + dstReg[3] = value[3]; + + if (inst->CondUpdate) { + if (writeMask & WRITEMASK_X) + machine->CondCodes[0] = generate_cc(value[0]); + if (writeMask & WRITEMASK_Y) + machine->CondCodes[1] = generate_cc(value[1]); + if (writeMask & WRITEMASK_Z) + machine->CondCodes[2] = generate_cc(value[2]); + if (writeMask & WRITEMASK_W) + machine->CondCodes[3] = generate_cc(value[3]); + } +} + + +#if 0 +/** + * Initialize a new machine state instance from an existing one, adding + * the partial derivatives onto the input registers. + * Used to implement DDX and DDY instructions in non-trivial cases. + */ +static void +init_machine_deriv( GLcontext *ctx, + const struct gl_program_machine *machine, + const struct gl_fragment_program *program, + const SWspan *span, char xOrY, + struct gl_program_machine *dMachine ) +{ + GLuint attr; + + ASSERT(xOrY == 'X' || xOrY == 'Y'); + + /* copy existing machine */ + _mesa_memcpy(dMachine, machine, sizeof(struct gl_program_machine)); + + if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { + /* XXX also need to do this when using valgrind */ + /* Clear temporary registers (undefined for ARB_f_p) */ + _mesa_bzero( (void*) machine->Temporaries, + MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + } + + /* Add derivatives */ + if (program->Base.InputsRead & FRAG_BIT_WPOS) { + GLfloat *wpos = machine->Attribs[FRAG_ATTRIB_WPOS][machine->CurElement]; + if (xOrY == 'X') { + wpos[0] += 1.0F; + wpos[1] += 0.0F; + wpos[2] += span->attrStepX[FRAG_ATTRIB_WPOS][2]; + wpos[3] += span->attrStepX[FRAG_ATTRIB_WPOS][3]; + } + else { + wpos[0] += 0.0F; + wpos[1] += 1.0F; + wpos[2] += span->attrStepY[FRAG_ATTRIB_WPOS][2]; + wpos[3] += span->attrStepY[FRAG_ATTRIB_WPOS][3]; + } + } + + /* primary, secondary colors */ + for (attr = FRAG_ATTRIB_COL0; attr <= FRAG_ATTRIB_COL1; attr++) { + if (program->Base.InputsRead & (1 << attr)) { + GLfloat *col = machine->Attribs[attr][machine->CurElement]; + if (xOrY == 'X') { + col[0] += span->attrStepX[attr][0] * (1.0F / CHAN_MAXF); + col[1] += span->attrStepX[attr][1] * (1.0F / CHAN_MAXF); + col[2] += span->attrStepX[attr][2] * (1.0F / CHAN_MAXF); + col[3] += span->attrStepX[attr][3] * (1.0F / CHAN_MAXF); + } + else { + col[0] += span->attrStepY[attr][0] * (1.0F / CHAN_MAXF); + col[1] += span->attrStepY[attr][1] * (1.0F / CHAN_MAXF); + col[2] += span->attrStepY[attr][2] * (1.0F / CHAN_MAXF); + col[3] += span->attrStepY[attr][3] * (1.0F / CHAN_MAXF); + } + } + } + if (program->Base.InputsRead & FRAG_BIT_FOGC) { + GLfloat *fogc = machine->Attribs[FRAG_ATTRIB_FOGC][machine->CurElement]; + if (xOrY == 'X') { + fogc[0] += span->attrStepX[FRAG_ATTRIB_FOGC][0]; + } + else { + fogc[0] += span->attrStepY[FRAG_ATTRIB_FOGC][0]; + } + } + /* texcoord and varying vars */ + for (attr = FRAG_ATTRIB_TEX0; attr < FRAG_ATTRIB_MAX; attr++) { + if (program->Base.InputsRead & (1 << attr)) { + GLfloat *val = machine->Attribs[attr][machine->CurElement]; + /* XXX perspective-correct interpolation */ + if (xOrY == 'X') { + val[0] += span->attrStepX[attr][0]; + val[1] += span->attrStepX[attr][1]; + val[2] += span->attrStepX[attr][2]; + val[3] += span->attrStepX[attr][3]; + } + else { + val[0] += span->attrStepY[attr][0]; + val[1] += span->attrStepY[attr][1]; + val[2] += span->attrStepY[attr][2]; + val[3] += span->attrStepY[attr][3]; + } + } + } + + /* init condition codes */ + dMachine->CondCodes[0] = COND_EQ; + dMachine->CondCodes[1] = COND_EQ; + dMachine->CondCodes[2] = COND_EQ; + dMachine->CondCodes[3] = COND_EQ; +} +#endif + + +/** + * Execute the given vertex/fragment program. + * + * \param ctx - rendering context + * \param program - the fragment program to execute + * \param machine - machine state (register file) + * \param maxInst - max number of instructions to execute + * \return GL_TRUE if program completed or GL_FALSE if program executed KIL. + */ +GLboolean +_mesa_execute_program(GLcontext *ctx, + const struct gl_program *program, GLuint maxInst, + struct gl_program_machine *machine, GLuint element) +{ + const GLuint MAX_EXEC = 10000; + GLint pc, total = 0; + + machine->CurProgram = program; + + if (DEBUG_PROG) { + printf("execute program %u --------------------\n", program->Id); + } + +#if FEATURE_MESA_program_debug + CurrentMachine = machine; +#endif + + for (pc = 0; pc < maxInst; pc++) { + const struct prog_instruction *inst = program->Instructions + pc; + +#if FEATURE_MESA_program_debug + if (ctx->FragmentProgram.CallbackEnabled && + ctx->FragmentProgram.Callback) { + ctx->FragmentProgram.CurrentPosition = inst->StringPos; + ctx->FragmentProgram.Callback(program->Target, + ctx->FragmentProgram.CallbackData); + } +#endif + + if (DEBUG_PROG) { + _mesa_print_instruction(inst); + } + + switch (inst->Opcode) { + case OPCODE_ABS: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = FABSF(a[0]); + result[1] = FABSF(a[1]); + result[2] = FABSF(a[2]); + result[3] = FABSF(a[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_ADD: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[0] + b[0]; + result[1] = a[1] + b[1]; + result[2] = a[2] + b[2]; + result[3] = a[3] + b[3]; + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("ADD (%g %g %g %g) = (%g %g %g %g) + (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_BGNLOOP: + /* no-op */ + break; + case OPCODE_ENDLOOP: + /* subtract 1 here since pc is incremented by for(pc) loop */ + pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ + break; + case OPCODE_BGNSUB: /* begin subroutine */ + break; + case OPCODE_ENDSUB: /* end subroutine */ + break; + case OPCODE_BRA: /* branch (conditional) */ + /* fall-through */ + case OPCODE_BRK: /* break out of loop (conditional) */ + /* fall-through */ + case OPCODE_CONT: /* continue loop (conditional) */ + if (eval_condition(machine, inst)) { + /* take branch */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; + } + break; + case OPCODE_CAL: /* Call subroutine (conditional) */ + if (eval_condition(machine, inst)) { + /* call the subroutine */ + if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ + } + machine->CallStack[machine->StackDepth++] = pc + 1; + pc = inst->BranchTarget; /* XXX - 1 ??? */ + } + break; + case OPCODE_CMP: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] < 0.0F ? b[0] : c[0]; + result[1] = a[1] < 0.0F ? b[1] : c[1]; + result[2] = a[2] < 0.0F ? b[2] : c[2]; + result[3] = a[3] < 0.0F ? b[3] : c[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_COS: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_cos(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_DDX: /* Partial derivative with respect to X */ + { +#if 0 + GLfloat a[4], aNext[4], result[4]; + struct gl_program_machine dMachine; + if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'X', + column, result)) { + /* This is tricky. Make a copy of the current machine state, + * increment the input registers by the dx or dy partial + * derivatives, then re-execute the program up to the + * preceeding instruction, then fetch the source register. + * Finally, find the difference in the register values for + * the original and derivative runs. + */ + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); + init_machine_deriv(ctx, machine, program, span, + 'X', &dMachine); + execute_program(ctx, program, pc, &dMachine, span, column); + fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); + result[0] = aNext[0] - a[0]; + result[1] = aNext[1] - a[1]; + result[2] = aNext[2] - a[2]; + result[3] = aNext[3] - a[3]; + } + store_vector4( inst, machine, result ); +#else + static const GLfloat result[4] = { 0, 0, 0, 0 }; + store_vector4( inst, machine, result ); +#endif + } + break; + case OPCODE_DDY: /* Partial derivative with respect to Y */ + { +#if 0 + GLfloat a[4], aNext[4], result[4]; + struct gl_program_machine dMachine; + if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'Y', + column, result)) { + init_machine_deriv(ctx, machine, program, span, + 'Y', &dMachine); + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); + execute_program(ctx, program, pc, &dMachine, span, column); + fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); + result[0] = aNext[0] - a[0]; + result[1] = aNext[1] - a[1]; + result[2] = aNext[2] - a[2]; + result[3] = aNext[3] - a[3]; + } + store_vector4( inst, machine, result ); +#else + static const GLfloat result[4] = { 0, 0, 0, 0 }; + store_vector4( inst, machine, result ); +#endif + } + break; + case OPCODE_DP3: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] = DOT3(a, b); + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("DP3 %g = (%g %g %g) . (%g %g %g)\n", + result[0], a[0], a[1], a[2], b[0], b[1], b[2]); + } + } + break; + case OPCODE_DP4: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] = DOT4(a,b); + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("DP4 %g = (%g, %g %g %g) . (%g, %g %g %g)\n", + result[0], a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_DPH: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] = + a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_DST: /* Distance vector */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = 1.0F; + result[1] = a[1] * b[1]; + result[2] = a[2]; + result[3] = b[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_EX2: /* Exponential base 2 */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] = + (GLfloat) _mesa_pow(2.0, a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_FLR: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = FLOORF(a[0]); + result[1] = FLOORF(a[1]); + result[2] = FLOORF(a[2]); + result[3] = FLOORF(a[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_FRC: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = a[0] - FLOORF(a[0]); + result[1] = a[1] - FLOORF(a[1]); + result[2] = a[2] - FLOORF(a[2]); + result[3] = a[3] - FLOORF(a[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_IF: + if (eval_condition(machine, inst)) { + /* do if-clause (just continue execution) */ + } + else { + /* go to the instruction after ELSE or ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + } + break; + case OPCODE_ELSE: + /* goto ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + break; + case OPCODE_ENDIF: + /* nothing */ + break; + case OPCODE_INT: /* float to int */ + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = (GLfloat) (GLint) a[0]; + result[1] = (GLfloat) (GLint) a[1]; + result[2] = (GLfloat) (GLint) a[2]; + result[3] = (GLfloat) (GLint) a[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_KIL_NV: /* NV_f_p only (conditional) */ + if (eval_condition(machine, inst)) { + return GL_FALSE; + } + break; + case OPCODE_KIL: /* ARB_f_p only */ + { + GLfloat a[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { + return GL_FALSE; + } + } + break; + case OPCODE_LG2: /* log base 2 */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_LIT: + { + const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = MAX2(a[0], 0.0F); + a[1] = MAX2(a[1], 0.0F); + /* XXX ARB version clamps a[3], NV version doesn't */ + a[3] = CLAMP(a[3], -(128.0F - epsilon), (128.0F - epsilon)); + result[0] = 1.0F; + result[1] = a[0]; + /* XXX we could probably just use pow() here */ + if (a[0] > 0.0F) { + if (a[1] == 0.0 && a[3] == 0.0) + result[2] = 1.0; + else + result[2] = EXPF(a[3] * LOGF(a[1])); + } + else { + result[2] = 0.0; + } + result[3] = 1.0F; + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("LIT (%g %g %g %g) : (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3]); + } + } + break; + case OPCODE_LRP: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; + result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; + result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; + result[3] = a[3] * b[3] + (1.0F - a[3]) * c[3]; + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("LRP (%g %g %g %g) = (%g %g %g %g), " + "(%g %g %g %g), (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3], + c[0], c[1], c[2], c[3]); + } + } + break; + case OPCODE_MAD: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] * b[0] + c[0]; + result[1] = a[1] * b[1] + c[1]; + result[2] = a[2] * b[2] + c[2]; + result[3] = a[3] * b[3] + c[3]; + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("MAD (%g %g %g %g) = (%g %g %g %g) * " + "(%g %g %g %g) + (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3], + c[0], c[1], c[2], c[3]); + } + } + break; + case OPCODE_MAX: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = MAX2(a[0], b[0]); + result[1] = MAX2(a[1], b[1]); + result[2] = MAX2(a[2], b[2]); + result[3] = MAX2(a[3], b[3]); + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("MAX (%g %g %g %g) = (%g %g %g %g), (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_MIN: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = MIN2(a[0], b[0]); + result[1] = MIN2(a[1], b[1]); + result[2] = MIN2(a[2], b[2]); + result[3] = MIN2(a[3], b[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_MOV: + { + GLfloat result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, result ); + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("MOV (%g %g %g %g)\n", + result[0], result[1], result[2], result[3]); + } + } + break; + case OPCODE_MUL: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[0] * b[0]; + result[1] = a[1] * b[1]; + result[2] = a[2] * b[2]; + result[3] = a[3] * b[3]; + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("MUL (%g %g %g %g) = (%g %g %g %g) * (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_NOISE1: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise1(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_NOISE2: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise2(a[0], a[1]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_NOISE3: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise3(a[0], a[1], a[2]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_NOISE4: + { + GLfloat a[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = + result[1] = + result[2] = + result[3] = _slang_library_noise4(a[0], a[1], a[2], a[3]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_NOP: + break; + case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ + { + GLfloat a[4], result[4]; + GLhalfNV hx, hy; + GLuint *rawResult = (GLuint *) result; + GLuint twoHalves; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + hx = _mesa_float_to_half(a[0]); + hy = _mesa_float_to_half(a[1]); + twoHalves = hx | (hy << 16); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = twoHalves; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PK2US: /* pack two GLushorts into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint usx, usy, *rawResult = (GLuint *) result; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = CLAMP(a[0], 0.0F, 1.0F); + a[1] = CLAMP(a[1], 0.0F, 1.0F); + usx = IROUND(a[0] * 65535.0F); + usy = IROUND(a[1] * 65535.0F); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = usx | (usy << 16); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PK4B: /* pack four GLbytes into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); + a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); + a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); + a[3] = CLAMP(a[3], -128.0F / 127.0F, 1.0F); + ubx = IROUND(127.0F * a[0] + 128.0F); + uby = IROUND(127.0F * a[1] + 128.0F); + ubz = IROUND(127.0F * a[2] + 128.0F); + ubw = IROUND(127.0F * a[3] + 128.0F); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PK4UB: /* pack four GLubytes into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = CLAMP(a[0], 0.0F, 1.0F); + a[1] = CLAMP(a[1], 0.0F, 1.0F); + a[2] = CLAMP(a[2], 0.0F, 1.0F); + a[3] = CLAMP(a[3], 0.0F, 1.0F); + ubx = IROUND(255.0F * a[0]); + uby = IROUND(255.0F * a[1]); + ubz = IROUND(255.0F * a[2]); + ubw = IROUND(255.0F * a[3]); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_POW: + { + GLfloat a[4], b[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = result[1] = result[2] = result[3] + = (GLfloat)_mesa_pow(a[0], b[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_RCP: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + if (DEBUG_PROG) { + if (a[0] == 0) + printf("RCP(0)\n"); + else if (IS_INF_OR_NAN(a[0])) + printf("RCP(inf)\n"); + } + result[0] = result[1] = result[2] = result[3] = 1.0F / a[0]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_RET: /* return from subroutine (conditional) */ + if (eval_condition(machine, inst)) { + if (machine->StackDepth == 0) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ + } + pc = machine->CallStack[--machine->StackDepth]; + } + break; + case OPCODE_RFL: /* reflection vector */ + { + GLfloat axis[4], dir[4], result[4], tmpX, tmpW; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, axis ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dir ); + tmpW = DOT3(axis, axis); + tmpX = (2.0F * DOT3(axis, dir)) / tmpW; + result[0] = tmpX * axis[0] - dir[0]; + result[1] = tmpX * axis[1] - dir[1]; + result[2] = tmpX * axis[2] - dir[2]; + /* result[3] is never written! XXX enforce in parser! */ + store_vector4( inst, machine, result ); + } + break; + case OPCODE_RSQ: /* 1 / sqrt() */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + a[0] = FABSF(a[0]); + result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("RSQ %g = 1/sqrt(|%g|)\n", result[0], a[0]); + } + } + break; + case OPCODE_SCS: /* sine and cos */ + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = (GLfloat) _mesa_cos(a[0]); + result[1] = (GLfloat) _mesa_sin(a[0]); + result[2] = 0.0; /* undefined! */ + result[3] = 0.0; /* undefined! */ + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SEQ: /* set on equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] == b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SFL: /* set false, operands ignored */ + { + static const GLfloat result[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SGE: /* set on greater or equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] >= b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SGT: /* set on greater */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("SGT %g %g %g %g\n", + result[0], result[1], result[2], result[3]); + } + } + break; + case OPCODE_SIN: + { + GLfloat a[4], result[4]; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_sin(a[0]); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SLE: /* set on less or equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] <= b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SLT: /* set on less */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] < b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SNE: /* set on not equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] != b[3]) ? 1.0F : 0.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_STR: /* set true, operands ignored */ + { + static const GLfloat result[4] = { 1.0F, 1.0F, 1.0F, 1.0F }; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_SUB: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[0] - b[0]; + result[1] = a[1] - b[1]; + result[2] = a[2] - b[2]; + result[3] = a[3] - b[3]; + store_vector4( inst, machine, result ); + if (DEBUG_PROG) { + printf("SUB (%g %g %g %g) = (%g %g %g %g) - (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); + } + } + break; + case OPCODE_SWZ: /* extended swizzle */ + { + const struct prog_src_register *source = &inst->SrcReg[0]; + const GLfloat *src = get_register_pointer(ctx, source, machine); + GLfloat result[4]; + GLuint i; + for (i = 0; i < 4; i++) { + const GLuint swz = GET_SWZ(source->Swizzle, i); + if (swz == SWIZZLE_ZERO) + result[i] = 0.0; + else if (swz == SWIZZLE_ONE) + result[i] = 1.0; + else { + ASSERT(swz >= 0); + ASSERT(swz <= 3); + result[i] = src[swz]; + } + if (source->NegateBase & (1 << i)) + result[i] = -result[i]; + } + store_vector4( inst, machine, result ); + } + break; + case OPCODE_TEX: /* Both ARB and NV frag prog */ + /* Texel lookup */ + { + /* Note: only use the precomputed lambda value when we're + * sampling texture unit [K] with texcoord[K]. + * Otherwise, the lambda value may have no relation to the + * instruction's texcoord or texture image. Using the wrong + * lambda is usually bad news. + * The rest of the time, just use zero (until we get a more + * sophisticated way of computing lambda). + */ + GLfloat coord[4], color[4], lambda; +#if 0 + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else +#endif + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); + machine->FetchTexelLod(ctx, coord, lambda, inst->TexSrcUnit, color); + if (DEBUG_PROG) { + printf("TEX (%g, %g, %g, %g) = texture[%d][%g, %g, %g, %g], " + "lod %f\n", + color[0], color[1], color[2], color[3], + inst->TexSrcUnit, + coord[0], coord[1], coord[2], coord[3], lambda); + } + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXB: /* GL_ARB_fragment_program only */ + /* Texel lookup with LOD bias */ + { + const struct gl_texture_unit *texUnit + = &ctx->Texture.Unit[inst->TexSrcUnit]; + GLfloat coord[4], color[4], lambda, bias; +#if 0 + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else +#endif + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); + /* coord[3] is the bias to add to lambda */ + bias = texUnit->LodBias + coord[3]; + if (texUnit->_Current) + bias += texUnit->_Current->LodBias; + machine->FetchTexelLod(ctx, coord, lambda + bias, + inst->TexSrcUnit, color); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXD: /* GL_NV_fragment_program only */ + /* Texture lookup w/ partial derivatives for LOD */ + { + GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, texcoord ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dtdx ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, dtdy ); + machine->FetchTexelDeriv(ctx, texcoord, dtdx, dtdy, + inst->TexSrcUnit, color ); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXP: /* GL_ARB_fragment_program only */ + /* Texture lookup w/ projective divide */ + { + GLfloat texcoord[4], color[4], lambda; +#if 0 + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else +#endif + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); + /* Not so sure about this test - if texcoord[3] is + * zero, we'd probably be fine except for an ASSERT in + * IROUND_POS() which gets triggered by the inf values created. + */ + if (texcoord[3] != 0.0) { + texcoord[0] /= texcoord[3]; + texcoord[1] /= texcoord[3]; + texcoord[2] /= texcoord[3]; + } + machine->FetchTexelLod(ctx, texcoord, lambda, + inst->TexSrcUnit, color); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_TXP_NV: /* GL_NV_fragment_program only */ + /* Texture lookup w/ projective divide */ + { + GLfloat texcoord[4], color[4], lambda; +#if 0 + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else +#endif + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); + if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && + texcoord[3] != 0.0) { + texcoord[0] /= texcoord[3]; + texcoord[1] /= texcoord[3]; + texcoord[2] /= texcoord[3]; + } + machine->FetchTexelLod(ctx, texcoord, lambda, + inst->TexSrcUnit, color); + store_vector4( inst, machine, color ); + } + break; + case OPCODE_UP2H: /* unpack two 16-bit floats */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + GLhalfNV hx, hy; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + hx = rawBits[0] & 0xffff; + hy = rawBits[0] >> 16; + result[0] = result[2] = _mesa_half_to_float(hx); + result[1] = result[3] = _mesa_half_to_float(hy); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_UP2US: /* unpack two GLushorts */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + GLushort usx, usy; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + usx = rawBits[0] & 0xffff; + usy = rawBits[0] >> 16; + result[0] = result[2] = usx * (1.0f / 65535.0f); + result[1] = result[3] = usy * (1.0f / 65535.0f); + store_vector4( inst, machine, result ); + } + break; + case OPCODE_UP4B: /* unpack four GLbytes */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; + result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; + result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; + result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_UP4UB: /* unpack four GLubytes */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; + result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; + result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; + result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_XPD: /* cross product */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + result[0] = a[1] * b[2] - a[2] * b[1]; + result[1] = a[2] * b[0] - a[0] * b[2]; + result[2] = a[0] * b[1] - a[1] * b[0]; + result[3] = 1.0; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_X2D: /* 2-D matrix transform */ + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; + result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; + result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; + result[3] = a[3] + b[0] * c[2] + b[1] * c[3]; + store_vector4( inst, machine, result ); + } + break; + case OPCODE_PRINT: + { + if (inst->SrcReg[0].File != -1) { + GLfloat a[4]; + fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); + _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, + a[0], a[1], a[2], a[3]); + } + else { + _mesa_printf("%s\n", (const char *) inst->Data); + } + } + break; + case OPCODE_END: + return GL_TRUE; + default: + _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program", + inst->Opcode); + return GL_TRUE; /* return value doesn't matter */ + + } + total++; + if (total > MAX_EXEC) { + _mesa_problem(ctx, "Infinite loop detected in fragment program"); + return GL_TRUE; + abort(); + } + } + +#if FEATURE_MESA_program_debug + CurrentMachine = NULL; +#endif + + return GL_TRUE; +} diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h new file mode 100644 index 0000000000..0e737657e3 --- /dev/null +++ b/src/mesa/shader/prog_execute.h @@ -0,0 +1,77 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef PROG_EXECUTE_H +#define PROG_EXECUTE_H + + +typedef void (*FetchTexelLodFunc)(GLcontext *ctx, const GLfloat texcoord[4], + GLfloat lambda, GLuint unit, GLfloat color[4]); + +typedef void (*FetchTexelDerivFunc)(GLcontext *ctx, const GLfloat texcoord[4], + const GLfloat texdx[4], + const GLfloat texdy[4], + GLuint unit, GLfloat color[4]); + + +/** + * Virtual machine state used during execution of vertex/fragment programs. + */ +struct gl_program_machine +{ + const struct gl_program *CurProgram; + + /** Fragment Input attributes */ + GLfloat (*Attribs)[MAX_WIDTH][4]; + GLuint CurElement; /**< Index into Attribs arrays */ + + /** Vertex Input attribs */ + GLfloat VertAttribs[VERT_ATTRIB_MAX][4]; + + GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; + GLfloat Outputs[FRAG_RESULT_MAX][4]; + GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ + + GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; + + GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ + GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ + + /** Texture fetch functions */ + FetchTexelLodFunc FetchTexelLod; + FetchTexelDerivFunc FetchTexelDeriv; +}; + + +extern void +_mesa_get_program_register(GLcontext *ctx, enum register_file file, + GLuint index, GLfloat val[4]); + +extern GLboolean +_mesa_execute_program(GLcontext *ctx, + const struct gl_program *program, GLuint maxInst, + struct gl_program_machine *machine, GLuint element); + + +#endif /* PROG_EXECUTE_H */ -- cgit v1.2.3 From da46353056c2e20f81ef620efe81d5d076ab0c12 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:14:02 -0700 Subject: Remove obsolete files. --- src/mesa/shader/nvvertexec.c | 1029 ------------------------------------------ src/mesa/shader/nvvertexec.h | 71 --- 2 files changed, 1100 deletions(-) delete mode 100644 src/mesa/shader/nvvertexec.c delete mode 100644 src/mesa/shader/nvvertexec.h (limited to 'src') diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c deleted file mode 100644 index 7dc0edbd9e..0000000000 --- a/src/mesa/shader/nvvertexec.c +++ /dev/null @@ -1,1029 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file nvvertexec.c - * Code to execute vertex programs. - * \author Brian Paul - */ - -#include "glheader.h" -#include "context.h" -#include "imports.h" -#include "macros.h" -#include "nvvertexec.h" -#include "prog_parameter.h" -#include "prog_statevars.h" -#include "prog_instruction.h" -#include "math/m_matrix.h" - - -static const GLboolean DEBUG_VERT = GL_FALSE; - -static const GLfloat ZeroVec[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; - - -/** - * Load/initialize the vertex program registers which need to be set - * per-vertex. - */ -void -_mesa_init_vp_per_vertex_registers(GLcontext *ctx, struct vp_machine *machine) -{ - /* Input registers get initialized from the current vertex attribs */ - MEMCPY(machine->Inputs, ctx->Current.Attrib, - MAX_VERTEX_PROGRAM_ATTRIBS * 4 * sizeof(GLfloat)); - - if (ctx->VertexProgram.Current->IsNVProgram) { - GLuint i; - /* Output/result regs are initialized to [0,0,0,1] */ - for (i = 0; i < MAX_NV_VERTEX_PROGRAM_OUTPUTS; i++) { - ASSIGN_4V(machine->Outputs[i], 0.0F, 0.0F, 0.0F, 1.0F); - } - /* Temp regs are initialized to [0,0,0,0] */ - for (i = 0; i < MAX_NV_VERTEX_PROGRAM_TEMPS; i++) { - ASSIGN_4V(machine->Temporaries[i], 0.0F, 0.0F, 0.0F, 0.0F); - } - for (i = 0; i < MAX_VERTEX_PROGRAM_ADDRESS_REGS; i++) { - ASSIGN_4V(machine->AddressReg[i], 0, 0, 0, 0); - } - } - - /* init condition codes */ - machine->CondCodes[0] = COND_EQ; - machine->CondCodes[1] = COND_EQ; - machine->CondCodes[2] = COND_EQ; - machine->CondCodes[3] = COND_EQ; -} - - - -/** - * Copy the 16 elements of a matrix into four consecutive program - * registers starting at 'pos'. - */ -static void -load_matrix(GLfloat registers[][4], GLuint pos, const GLfloat mat[16]) -{ - GLuint i; - for (i = 0; i < 4; i++) { - registers[pos + i][0] = mat[0 + i]; - registers[pos + i][1] = mat[4 + i]; - registers[pos + i][2] = mat[8 + i]; - registers[pos + i][3] = mat[12 + i]; - } -} - - -/** - * As above, but transpose the matrix. - */ -static void -load_transpose_matrix(GLfloat registers[][4], GLuint pos, - const GLfloat mat[16]) -{ - MEMCPY(registers[pos], mat, 16 * sizeof(GLfloat)); -} - - -/** - * Load program parameter registers with tracked matrices (if NV program) - * or GL state values (if ARB program). - * This needs to be done per glBegin/glEnd, not per-vertex. - */ -void -_mesa_init_vp_per_primitive_registers(GLcontext *ctx) -{ - if (ctx->VertexProgram.Current->IsNVProgram) { - GLuint i; - - for (i = 0; i < MAX_NV_VERTEX_PROGRAM_PARAMS / 4; i++) { - /* point 'mat' at source matrix */ - GLmatrix *mat; - if (ctx->VertexProgram.TrackMatrix[i] == GL_MODELVIEW) { - mat = ctx->ModelviewMatrixStack.Top; - } - else if (ctx->VertexProgram.TrackMatrix[i] == GL_PROJECTION) { - mat = ctx->ProjectionMatrixStack.Top; - } - else if (ctx->VertexProgram.TrackMatrix[i] == GL_TEXTURE) { - mat = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top; - } - else if (ctx->VertexProgram.TrackMatrix[i] == GL_COLOR) { - mat = ctx->ColorMatrixStack.Top; - } - else if (ctx->VertexProgram.TrackMatrix[i]==GL_MODELVIEW_PROJECTION_NV) { - /* XXX verify the combined matrix is up to date */ - mat = &ctx->_ModelProjectMatrix; - } - else if (ctx->VertexProgram.TrackMatrix[i] >= GL_MATRIX0_NV && - ctx->VertexProgram.TrackMatrix[i] <= GL_MATRIX7_NV) { - GLuint n = ctx->VertexProgram.TrackMatrix[i] - GL_MATRIX0_NV; - ASSERT(n < MAX_PROGRAM_MATRICES); - mat = ctx->ProgramMatrixStack[n].Top; - } - else { - /* no matrix is tracked, but we leave the register values as-is */ - assert(ctx->VertexProgram.TrackMatrix[i] == GL_NONE); - continue; - } - - /* load the matrix values into sequential registers */ - if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_IDENTITY_NV) { - load_matrix(ctx->VertexProgram.Parameters, i*4, mat->m); - } - else if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_INVERSE_NV) { - _math_matrix_analyse(mat); /* update the inverse */ - ASSERT(!_math_matrix_is_dirty(mat)); - load_matrix(ctx->VertexProgram.Parameters, i*4, mat->inv); - } - else if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_TRANSPOSE_NV) { - load_transpose_matrix(ctx->VertexProgram.Parameters, i*4, mat->m); - } - else { - assert(ctx->VertexProgram.TrackMatrixTransform[i] - == GL_INVERSE_TRANSPOSE_NV); - _math_matrix_analyse(mat); /* update the inverse */ - ASSERT(!_math_matrix_is_dirty(mat)); - load_transpose_matrix(ctx->VertexProgram.Parameters, i*4, mat->inv); - } - } - } - else { - /* ARB vertex program */ - if (ctx->VertexProgram.Current->Base.Parameters) { - /* Grab the state GL state and put into registers */ - _mesa_load_state_parameters(ctx, - ctx->VertexProgram.Current->Base.Parameters); - } - } -} - - - -/** - * For debugging. Dump the current vertex program machine registers. - */ -void -_mesa_dump_vp_state( const struct gl_vertex_program_state *state, - const struct vp_machine *machine) -{ - int i; - _mesa_printf("VertexIn:\n"); - for (i = 0; i < MAX_NV_VERTEX_PROGRAM_INPUTS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - machine->Inputs[i][0], - machine->Inputs[i][1], - machine->Inputs[i][2], - machine->Inputs[i][3]); - } - _mesa_printf("\n"); - - _mesa_printf("VertexOut:\n"); - for (i = 0; i < MAX_NV_VERTEX_PROGRAM_OUTPUTS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - machine->Outputs[i][0], - machine->Outputs[i][1], - machine->Outputs[i][2], - machine->Outputs[i][3]); - } - _mesa_printf("\n"); - - _mesa_printf("Registers:\n"); - for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - machine->Temporaries[i][0], - machine->Temporaries[i][1], - machine->Temporaries[i][2], - machine->Temporaries[i][3]); - } - _mesa_printf("\n"); - - _mesa_printf("Parameters:\n"); - for (i = 0; i < MAX_NV_VERTEX_PROGRAM_PARAMS; i++) { - _mesa_printf("%d: %f %f %f %f ", i, - state->Parameters[i][0], - state->Parameters[i][1], - state->Parameters[i][2], - state->Parameters[i][3]); - } - _mesa_printf("\n"); -} - - - -/** - * Return a pointer to the 4-element float vector specified by the given - * source register. - */ -static INLINE const GLfloat * -get_register_pointer( GLcontext *ctx, - const struct prog_src_register *source, - struct vp_machine *machine, - const struct gl_vertex_program *program ) -{ - if (source->RelAddr) { - const GLint reg = source->Index + machine->AddressReg[0][0]; - ASSERT(source->File == PROGRAM_ENV_PARAM || - source->File == PROGRAM_STATE_VAR || - source->File == PROGRAM_LOCAL_PARAM); - if (reg < 0 || reg > MAX_NV_VERTEX_PROGRAM_PARAMS) - return ZeroVec; - else if (source->File == PROGRAM_ENV_PARAM) - return ctx->VertexProgram.Parameters[reg]; - else { - ASSERT(source->File == PROGRAM_LOCAL_PARAM || - source->File == PROGRAM_STATE_VAR); - return program->Base.Parameters->ParameterValues[reg]; - } - } - else { - switch (source->File) { - case PROGRAM_TEMPORARY: - ASSERT(source->Index < MAX_PROGRAM_TEMPS); - return machine->Temporaries[source->Index]; - case PROGRAM_INPUT: - ASSERT(source->Index < VERT_ATTRIB_MAX); - return machine->Inputs[source->Index]; - case PROGRAM_OUTPUT: - /* This is only needed for the PRINT instruction */ - ASSERT(source->Index < VERT_RESULT_MAX); - return machine->Outputs[source->Index]; - case PROGRAM_LOCAL_PARAM: - ASSERT(source->Index < MAX_PROGRAM_LOCAL_PARAMS); - return program->Base.LocalParams[source->Index]; - case PROGRAM_ENV_PARAM: - ASSERT(source->Index < MAX_NV_VERTEX_PROGRAM_PARAMS); - return ctx->VertexProgram.Parameters[source->Index]; - case PROGRAM_STATE_VAR: - /* Fallthrough */ - case PROGRAM_CONSTANT: - /* Fallthrough */ - case PROGRAM_UNIFORM: - /* Fallthrough */ - case PROGRAM_NAMED_PARAM: - ASSERT(source->Index < program->Base.Parameters->NumParameters); - return program->Base.Parameters->ParameterValues[source->Index]; - default: - _mesa_problem(NULL, - "Bad source register file in get_register_pointer"); - return NULL; - } - } - return NULL; -} - - -/** - * Fetch a 4-element float vector from the given source register. - * Apply swizzling and negating as needed. - */ -static INLINE void -fetch_vector4( GLcontext *ctx, - const struct prog_src_register *source, - struct vp_machine *machine, - const struct gl_vertex_program *program, - GLfloat result[4] ) -{ - const GLfloat *src = get_register_pointer(ctx, source, machine, program); - ASSERT(src); - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - result[1] = src[GET_SWZ(source->Swizzle, 1)]; - result[2] = src[GET_SWZ(source->Swizzle, 2)]; - result[3] = src[GET_SWZ(source->Swizzle, 3)]; - if (source->NegateBase) { - result[0] = -result[0]; - result[1] = -result[1]; - result[2] = -result[2]; - result[3] = -result[3]; - } -} - - - -/** - * As above, but only return result[0] element. - */ -static INLINE void -fetch_vector1( GLcontext *ctx, - const struct prog_src_register *source, - struct vp_machine *machine, - const struct gl_vertex_program *program, - GLfloat result[4] ) -{ - const GLfloat *src = get_register_pointer(ctx, source, machine, program); - ASSERT(src); - result[0] = src[GET_SWZ(source->Swizzle, 0)]; - if (source->NegateBase) { - result[0] = -result[0]; - } -} - - -/** - * Test value against zero and return GT, LT, EQ or UN if NaN. - */ -static INLINE GLuint -generate_cc( float value ) -{ - if (value != value) - return COND_UN; /* NaN */ - if (value > 0.0F) - return COND_GT; - if (value < 0.0F) - return COND_LT; - return COND_EQ; -} - - -/** - * Test if the ccMaskRule is satisfied by the given condition code. - * Used to mask destination writes according to the current condition code. - */ -static INLINE GLboolean -test_cc(GLuint condCode, GLuint ccMaskRule) -{ - switch (ccMaskRule) { - case COND_EQ: return (condCode == COND_EQ); - case COND_NE: return (condCode != COND_EQ); - case COND_LT: return (condCode == COND_LT); - case COND_GE: return (condCode == COND_GT || condCode == COND_EQ); - case COND_LE: return (condCode == COND_LT || condCode == COND_EQ); - case COND_GT: return (condCode == COND_GT); - case COND_TR: return GL_TRUE; - case COND_FL: return GL_FALSE; - default: return GL_TRUE; - } -} - - -/** - * Evaluate the 4 condition codes against a predicate and return GL_TRUE - * or GL_FALSE to indicate result. - */ -static INLINE GLboolean -eval_condition(const struct vp_machine *machine, - const struct prog_instruction *inst) -{ - const GLuint swizzle = inst->DstReg.CondSwizzle; - const GLuint condMask = inst->DstReg.CondMask; - if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || - test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { - return GL_TRUE; - } - else { - return GL_FALSE; - } -} - - -/** - * Store 4 floats into a register. - */ -static void -store_vector4( const struct prog_instruction *inst, - struct vp_machine *machine, - const GLfloat value[4] ) -{ - const struct prog_dst_register *dest = &(inst->DstReg); - GLuint writeMask = dest->WriteMask; - GLfloat *dst; - - switch (dest->File) { - case PROGRAM_OUTPUT: - ASSERT(dest->Index < VERT_RESULT_MAX); - dst = machine->Outputs[dest->Index]; - break; - case PROGRAM_TEMPORARY: - ASSERT(dest->Index < MAX_PROGRAM_TEMPS); - dst = machine->Temporaries[dest->Index]; - break; - case PROGRAM_ENV_PARAM: - /* Only for VP state programs */ - { - /* a slight hack */ - GET_CURRENT_CONTEXT(ctx); - ASSERT(dest->Index < MAX_PROGRAM_ENV_PARAMS); - dst = ctx->VertexProgram.Parameters[dest->Index]; - } - break; - default: - _mesa_problem(NULL, "Invalid register file in store_vector4(file=%d)", - dest->File); - return; - } - - if (dest->WriteMask & WRITEMASK_X) - dst[0] = value[0]; - if (dest->WriteMask & WRITEMASK_Y) - dst[1] = value[1]; - if (dest->WriteMask & WRITEMASK_Z) - dst[2] = value[2]; - if (dest->WriteMask & WRITEMASK_W) - dst[3] = value[3]; - - if (inst->CondUpdate) { - if (writeMask & WRITEMASK_X) - machine->CondCodes[0] = generate_cc(value[0]); - if (writeMask & WRITEMASK_Y) - machine->CondCodes[1] = generate_cc(value[1]); - if (writeMask & WRITEMASK_Z) - machine->CondCodes[2] = generate_cc(value[2]); - if (writeMask & WRITEMASK_W) - machine->CondCodes[3] = generate_cc(value[3]); - } -} - - -/** - * Set x to positive or negative infinity. - */ -#if defined(USE_IEEE) || defined(_WIN32) -#define SET_POS_INFINITY(x) ( *((GLuint *) (void *)&x) = 0x7F800000 ) -#define SET_NEG_INFINITY(x) ( *((GLuint *) (void *)&x) = 0xFF800000 ) -#elif defined(VMS) -#define SET_POS_INFINITY(x) x = __MAXFLOAT -#define SET_NEG_INFINITY(x) x = -__MAXFLOAT -#else -#define SET_POS_INFINITY(x) x = (GLfloat) HUGE_VAL -#define SET_NEG_INFINITY(x) x = (GLfloat) -HUGE_VAL -#endif - -#define SET_FLOAT_BITS(x, bits) ((fi_type *) (void *) &(x))->i = bits - - -/** - * Execute the given vertex program - */ -void -_mesa_exec_vertex_program(GLcontext *ctx, - struct vp_machine *machine, - const struct gl_vertex_program *program) -{ - const GLuint maxInst = program->Base.NumInstructions; - GLuint pc; - - ctx->_CurrentProgram = GL_VERTEX_PROGRAM_ARB; /* or NV, doesn't matter */ - - /* If the program is position invariant, multiply the input position - * by the MVP matrix and store in the vertex position result register. - */ - if (ctx->VertexProgram.Current->IsPositionInvariant) { - TRANSFORM_POINT( machine->Outputs[VERT_RESULT_HPOS], - ctx->_ModelProjectMatrix.m, - machine->Inputs[VERT_ATTRIB_POS]); - - /* XXX: This could go elsewhere */ - ctx->VertexProgram.Current->Base.OutputsWritten |= VERT_BIT_POS; - } - - for (pc = 0; pc < maxInst; pc++) { - const struct prog_instruction *inst = program->Base.Instructions + pc; - - if (ctx->VertexProgram.CallbackEnabled && - ctx->VertexProgram.Callback) { - ctx->VertexProgram.CurrentPosition = inst->StringPos; - ctx->VertexProgram.Callback(program->Base.Target, - ctx->VertexProgram.CallbackData); - } - - switch (inst->Opcode) { - case OPCODE_ABS: /* GL_NV_vertex_program1_1 */ - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - if (t[0] < 0.0) t[0] = -t[0]; - if (t[1] < 0.0) t[1] = -t[1]; - if (t[2] < 0.0) t[2] = -t[2]; - if (t[3] < 0.0) t[3] = -t[3]; - store_vector4( inst, machine, t ); - } - break; - case OPCODE_ADD: - { - GLfloat t[4], u[4], sum[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - sum[0] = t[0] + u[0]; - sum[1] = t[1] + u[1]; - sum[2] = t[2] + u[2]; - sum[3] = t[3] + u[3]; - store_vector4( inst, machine, sum ); - } - break; - case OPCODE_ARA: - break; - case OPCODE_ARL: - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - machine->AddressReg[0][0] = (GLint) FLOORF(t[0]); - } - break; - case OPCODE_ARL_NV: - break; - case OPCODE_ARR: - break; - case OPCODE_BGNLOOP: - /* no-op */ - break; - case OPCODE_ENDLOOP: - /* subtract 1 here since pc is incremented by for(pc) loop */ - pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ - break; - case OPCODE_BRA: /* branch (conditional) */ - /* fall-through */ - case OPCODE_BRK: /* break out of loop (conditional) */ - /* fall-through */ - case OPCODE_CONT: /* continue loop (conditional) */ - if (eval_condition(machine, inst)) { - /* take branch */ - /* Subtract 1 here since we'll do pc++ at end of for-loop */ - pc = inst->BranchTarget - 1; - } - break; - case OPCODE_CAL: /* Call subroutine (conditional) */ - if (eval_condition(machine, inst)) { - /* call the subroutine */ - if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { - return; /* abort execution */ - } - machine->CallStack[machine->StackDepth++] = pc + 1; - pc = inst->BranchTarget; /* XXX - 1 ??? */ - } - break; - case OPCODE_CMP: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); - result[0] = a[0] < 0.0F ? b[0] : c[0]; - result[1] = a[1] < 0.0F ? b[1] : c[1]; - result[2] = a[2] < 0.0F ? b[2] : c[2]; - result[3] = a[3] < 0.0F ? b[3] : c[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_COS: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat) _mesa_cos(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DDX: - /* fallthrough */ - case OPCODE_DDY: - _mesa_problem(ctx, "DDX/DDY not allowed in vertex programs"); - break; - - case OPCODE_DP3: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( inst, machine, dot ); - } - break; - case OPCODE_DP4: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + t[3] * u[3]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( inst, machine, dot ); - } - break; - case OPCODE_DPH: - { - GLfloat t[4], u[4], dot[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dot[0] = t[0] * u[0] + t[1] * u[1] + t[2] * u[2] + u[3]; - dot[1] = dot[2] = dot[3] = dot[0]; - store_vector4( inst, machine, dot ); - } - break; - case OPCODE_DST: - { - GLfloat t[4], u[4], dst[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - dst[0] = 1.0F; - dst[1] = t[1] * u[1]; - dst[2] = t[2]; - dst[3] = u[3]; - store_vector4( inst, machine, dst ); - } - break; - case OPCODE_EXP: - { - GLfloat t[4], q[4], floor_t0; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - floor_t0 = FLOORF(t[0]); - if (floor_t0 > FLT_MAX_EXP) { - SET_POS_INFINITY(q[0]); - SET_POS_INFINITY(q[2]); - } - else if (floor_t0 < FLT_MIN_EXP) { - q[0] = 0.0F; - q[2] = 0.0F; - } - else { -#ifdef USE_IEEE - GLint ii = (GLint) floor_t0; - ii = (ii < 23) + 0x3f800000; - SET_FLOAT_BITS(q[0], ii); - q[0] = *((GLfloat *) (void *)&ii); -#else - q[0] = (GLfloat) pow(2.0, floor_t0); -#endif - q[2] = (GLfloat) (q[0] * LOG2(q[1])); - } - q[1] = t[0] - floor_t0; - q[3] = 1.0F; - store_vector4( inst, machine, q ); - } - break; - case OPCODE_EX2: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = t[1] = t[2] = t[3] = (GLfloat)_mesa_pow(2.0, t[0]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_FLR: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = FLOORF(t[0]); - t[1] = FLOORF(t[1]); - t[2] = FLOORF(t[2]); - t[3] = FLOORF(t[3]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_FRC: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = t[0] - FLOORF(t[0]); - t[1] = t[1] - FLOORF(t[1]); - t[2] = t[2] - FLOORF(t[2]); - t[3] = t[3] - FLOORF(t[3]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_IF: - if (eval_condition(machine, inst)) { - /* do if-clause (just continue execution) */ - } - else { - /* go to the instruction after ELSE or ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; - } - break; - case OPCODE_ELSE: - /* goto ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; - break; - case OPCODE_ENDIF: - /* nothing */ - break; - case OPCODE_MOV: - { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_LIT: - { - const GLfloat epsilon = 1.0F / 256.0F; /* per NV spec */ - GLfloat t[4], lit[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = MAX2(t[0], 0.0F); - t[1] = MAX2(t[1], 0.0F); - t[3] = CLAMP(t[3], -(128.0F - epsilon), (128.0F - epsilon)); - lit[0] = 1.0; - lit[1] = t[0]; - lit[2] = (t[0] > 0.0) ? (GLfloat) _mesa_pow(t[1], t[3]) : 0.0F; - lit[3] = 1.0; - store_vector4( inst, machine, lit ); - } - break; - case OPCODE_LOG: - { - GLfloat t[4], q[4], abs_t0; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - abs_t0 = FABSF(t[0]); - if (abs_t0 != 0.0F) { - /* Since we really can't handle infinite values on VMS - * like other OSes we'll use __MAXFLOAT to represent - * infinity. This may need some tweaking. - */ -#ifdef VMS - if (abs_t0 == __MAXFLOAT) -#else - if (IS_INF_OR_NAN(abs_t0)) -#endif - { - SET_POS_INFINITY(q[0]); - q[1] = 1.0F; - SET_POS_INFINITY(q[2]); - } - else { - int exponent; - GLfloat mantissa = FREXPF(t[0], &exponent); - q[0] = (GLfloat) (exponent - 1); - q[1] = (GLfloat) (2.0 * mantissa); /* map [.5, 1) -> [1, 2) */ - q[2] = (GLfloat) (q[0] + LOG2(q[1])); - } - } - else { - SET_NEG_INFINITY(q[0]); - q[1] = 1.0F; - SET_NEG_INFINITY(q[2]); - } - q[3] = 1.0; - store_vector4( inst, machine, q ); - } - break; - case OPCODE_MAD: - { - GLfloat t[4], u[4], v[4], sum[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, v ); - sum[0] = t[0] * u[0] + v[0]; - sum[1] = t[1] * u[1] + v[1]; - sum[2] = t[2] * u[2] + v[2]; - sum[3] = t[3] * u[3] + v[3]; - store_vector4( inst, machine, sum ); - } - break; - case OPCODE_MAX: - { - GLfloat t[4], u[4], max[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - max[0] = (t[0] > u[0]) ? t[0] : u[0]; - max[1] = (t[1] > u[1]) ? t[1] : u[1]; - max[2] = (t[2] > u[2]) ? t[2] : u[2]; - max[3] = (t[3] > u[3]) ? t[3] : u[3]; - store_vector4( inst, machine, max ); - } - break; - case OPCODE_MIN: - { - GLfloat t[4], u[4], min[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - min[0] = (t[0] < u[0]) ? t[0] : u[0]; - min[1] = (t[1] < u[1]) ? t[1] : u[1]; - min[2] = (t[2] < u[2]) ? t[2] : u[2]; - min[3] = (t[3] < u[3]) ? t[3] : u[3]; - store_vector4( inst, machine, min ); - } - break; - case OPCODE_MUL: - { - GLfloat t[4], u[4], prod[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - prod[0] = t[0] * u[0]; - prod[1] = t[1] * u[1]; - prod[2] = t[2] * u[2]; - prod[3] = t[3] * u[3]; - store_vector4( inst, machine, prod ); - } - break; - case OPCODE_RCP: - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - if (t[0] != 1.0F) - t[0] = 1.0F / t[0]; /* div by zero is infinity! */ - t[1] = t[2] = t[3] = t[0]; - store_vector4( inst, machine, t ); - } - break; - case OPCODE_RSQ: - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = INV_SQRTF(FABSF(t[0])); - t[1] = t[2] = t[3] = t[0]; - store_vector4( inst, machine, t ); - } - break; - case OPCODE_SLT: - { - GLfloat t[4], u[4], slt[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - slt[0] = (t[0] < u[0]) ? 1.0F : 0.0F; - slt[1] = (t[1] < u[1]) ? 1.0F : 0.0F; - slt[2] = (t[2] < u[2]) ? 1.0F : 0.0F; - slt[3] = (t[3] < u[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, slt ); - } - break; - case OPCODE_SGE: - { - GLfloat t[4], u[4], sge[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - sge[0] = (t[0] >= u[0]) ? 1.0F : 0.0F; - sge[1] = (t[1] >= u[1]) ? 1.0F : 0.0F; - sge[2] = (t[2] >= u[2]) ? 1.0F : 0.0F; - sge[3] = (t[3] >= u[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, sge ); - } - break; - case OPCODE_SGT: /* set on greater */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - if (DEBUG_VERT) { - printf("SGT %g %g %g %g\n", - result[0], result[1], result[2], result[3]); - } - } - break; - case OPCODE_RCC: - { - GLfloat t[4], u; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - if (t[0] == 1.0F) - u = 1.0F; - else - u = 1.0F / t[0]; - if (u > 0.0F) { - if (u > 1.884467e+019F) { - u = 1.884467e+019F; /* IEEE 32-bit binary value 0x5F800000 */ - } - else if (u < 5.42101e-020F) { - u = 5.42101e-020F; /* IEEE 32-bit binary value 0x1F800000 */ - } - } - else { - if (u < -1.884467e+019F) { - u = -1.884467e+019F; /* IEEE 32-bit binary value 0xDF800000 */ - } - else if (u > -5.42101e-020F) { - u = -5.42101e-020F; /* IEEE 32-bit binary value 0x9F800000 */ - } - } - t[0] = t[1] = t[2] = t[3] = u; - store_vector4( inst, machine, t ); - } - break; - case OPCODE_SUB: /* GL_NV_vertex_program1_1 */ - { - GLfloat t[4], u[4], sum[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - sum[0] = t[0] - u[0]; - sum[1] = t[1] - u[1]; - sum[2] = t[2] - u[2]; - sum[3] = t[3] - u[3]; - store_vector4( inst, machine, sum ); - } - break; - case OPCODE_LG2: /* GL_ARB_vertex_program */ - { - GLfloat t[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - t[0] = t[1] = t[2] = t[3] = LOG2(t[0]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_POW: /* GL_ARB_vertex_program */ - { - GLfloat t[4], u[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector1( ctx, &inst->SrcReg[1], machine, program, u ); - t[0] = t[1] = t[2] = t[3] = (GLfloat)_mesa_pow(t[0], u[0]); - store_vector4( inst, machine, t ); - } - break; - case OPCODE_XPD: /* GL_ARB_vertex_program */ - { - GLfloat t[4], u[4], cross[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, u ); - cross[0] = t[1] * u[2] - t[2] * u[1]; - cross[1] = t[2] * u[0] - t[0] * u[2]; - cross[2] = t[0] * u[1] - t[1] * u[0]; - cross[3] = 0.0; - store_vector4( inst, machine, cross ); - } - break; - case OPCODE_SWZ: /* GL_ARB_vertex_program */ - { - const struct prog_src_register *source = &inst->SrcReg[0]; - const GLfloat *src = get_register_pointer(ctx, source, - machine, program); - GLfloat result[4]; - GLuint i; - - /* do extended swizzling here */ - for (i = 0; i < 4; i++) { - const GLuint swz = GET_SWZ(source->Swizzle, i); - if (swz == SWIZZLE_ZERO) - result[i] = 0.0; - else if (swz == SWIZZLE_ONE) - result[i] = 1.0; - else { - ASSERT(swz >= 0); - ASSERT(swz <= 3); - result[i] = src[swz]; - } - if (source->NegateBase & (1 << i)) - result[i] = -result[i]; - } - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PRINT: - if (inst->SrcReg[0].File) { - GLfloat t[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, t ); - _mesa_printf("%s%g, %g, %g, %g\n", - (char *) inst->Data, t[0], t[1], t[2], t[3]); - } - else { - _mesa_printf("%s\n", (char *) inst->Data); - } - break; - case OPCODE_END: - ctx->_CurrentProgram = 0; - return; - case OPCODE_NOP: - break; - default: - /* bad instruction opcode */ - _mesa_problem(ctx, "Bad VP Opcode in _mesa_exec_vertex_program"); - ctx->_CurrentProgram = 0; - return; - } /* switch */ - } /* for */ - - ctx->_CurrentProgram = 0; -} - - -/** - * Execute a vertex state program. - * \sa _mesa_ExecuteProgramNV - */ -void -_mesa_exec_vertex_state_program(GLcontext *ctx, - struct gl_vertex_program *vprog, - const GLfloat *params) -{ - struct vp_machine machine; - _mesa_init_vp_per_vertex_registers(ctx, &machine); - _mesa_init_vp_per_primitive_registers(ctx); - COPY_4V(machine.Inputs[VERT_ATTRIB_POS], params); - _mesa_exec_vertex_program(ctx, &machine, vprog); -} diff --git a/src/mesa/shader/nvvertexec.h b/src/mesa/shader/nvvertexec.h deleted file mode 100644 index 9e66c6ebb2..0000000000 --- a/src/mesa/shader/nvvertexec.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Brian Paul - */ - -#ifndef NVVERTEXEC_H -#define NVVERTEXEC_H - - -/** - * Virtual vertex program machine state. - * Only used during program execution. - */ -struct vp_machine -{ - GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; - GLfloat Inputs[VERT_ATTRIB_MAX][4]; - GLuint InputsSize[VERT_ATTRIB_MAX]; - GLfloat Outputs[VERT_RESULT_MAX][4]; - GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ - GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; - - GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ - GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ -}; - - - -extern void -_mesa_init_vp_per_vertex_registers(GLcontext *ctx, struct vp_machine *machine); - -extern void -_mesa_init_vp_per_primitive_registers(GLcontext *ctx); - -extern void -_mesa_exec_vertex_program(GLcontext *ctx, - struct vp_machine *machine, - const struct gl_vertex_program *program); - -extern void -_mesa_exec_vertex_state_program(GLcontext *ctx, - struct gl_vertex_program *vprog, - const GLfloat *params); - -extern void -_mesa_dump_vp_state( const struct gl_vertex_program_state *state, - const struct vp_machine *machine); - -#endif -- cgit v1.2.3 From bc18ac45a3b8ef746ce4a3c8abf79bd984a4614b Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 16:29:25 -0700 Subject: updated for vbo --- src/mesa/drivers/glslcompiler/glslcompiler.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/glslcompiler/glslcompiler.c b/src/mesa/drivers/glslcompiler/glslcompiler.c index a27f749df7..016b53d57a 100644 --- a/src/mesa/drivers/glslcompiler/glslcompiler.c +++ b/src/mesa/drivers/glslcompiler/glslcompiler.c @@ -53,7 +53,6 @@ #include "shader/shader_api.h" #include "shader/prog_print.h" #include "drivers/common/driverfuncs.h" -#include "array_cache/acache.h" #include "tnl/tnl.h" #include "tnl/t_context.h" #include "tnl/t_pipeline.h" @@ -61,6 +60,7 @@ #include "swrast/s_context.h" #include "swrast/s_triangle.h" #include "swrast_setup/swrast_setup.h" +#include "vbo/vbo.h" static const char *Prog = "glslcompiler"; @@ -96,8 +96,8 @@ UpdateState(GLcontext *ctx, GLuint new_state) /* easy - just propogate */ _swrast_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); - _ac_InvalidateState( ctx, new_state ); _tnl_InvalidateState( ctx, new_state ); + _vbo_InvalidateState( ctx, new_state ); } @@ -136,7 +136,7 @@ CreateContext(void) _mesa_enable_sw_extensions(ctx); if (!_swrast_CreateContext( ctx ) || - !_ac_CreateContext( ctx ) || + !_vbo_CreateContext( ctx ) || !_tnl_CreateContext( ctx ) || !_swsetup_CreateContext( ctx )) { _mesa_destroy_visual(vis); @@ -277,6 +277,11 @@ ParseOptions(int argc, char *argv[]) Options.FragFile = NULL; Options.OutputFile = NULL; + if (argc == 1) { + Usage(); + exit(0); + } + for (i = 1; i < argc; i++) { if (strcmp(argv[i], "--vs") == 0) { Options.VertFile = argv[i + 1]; -- cgit v1.2.3 From 059376c855cbeb160e98f438a35edb8bd88b8bb2 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 17:45:32 -0700 Subject: expose _mesa_swizzle_string() --- src/mesa/shader/prog_print.c | 34 ++++++++++++++++++++-------------- src/mesa/shader/prog_print.h | 3 +++ 2 files changed, 23 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 95b62fcfb5..0d21912a0e 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -291,8 +291,8 @@ reg_string(enum register_file f, GLint index, gl_prog_print_mode mode, * \param negateBase 4-bit negation vector * \param extended if true, also allow 0, 1 values */ -static const char * -swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended) +const char * +_mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended) { static const char swz[] = "xyzw01?!"; static char s[20]; @@ -403,13 +403,13 @@ print_src_reg(const struct prog_src_register *srcReg, gl_prog_print_mode mode, _mesa_printf("%s%s", reg_string((enum register_file) srcReg->File, srcReg->Index, mode, prog), - swizzle_string(srcReg->Swizzle, + _mesa_swizzle_string(srcReg->Swizzle, srcReg->NegateBase, GL_FALSE)); #if 0 _mesa_printf("%s[%d]%s", file_string((enum register_file) srcReg->File, mode), srcReg->Index, - swizzle_string(srcReg->Swizzle, + _mesa_swizzle_string(srcReg->Swizzle, srcReg->NegateBase, GL_FALSE)); #endif } @@ -498,8 +498,8 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, file_string((enum register_file) inst->SrcReg[0].File, mode), inst->SrcReg[0].Index, - swizzle_string(inst->SrcReg[0].Swizzle, - inst->SrcReg[0].NegateBase, GL_FALSE)); + _mesa_swizzle_string(inst->SrcReg[0].Swizzle, + inst->SrcReg[0].NegateBase, GL_FALSE)); } if (inst->Comment) _mesa_printf(" # %s", inst->Comment); @@ -515,8 +515,8 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, file_string((enum register_file) inst->SrcReg[0].File, mode), inst->SrcReg[0].Index, - swizzle_string(inst->SrcReg[0].Swizzle, - inst->SrcReg[0].NegateBase, GL_TRUE)); + _mesa_swizzle_string(inst->SrcReg[0].Swizzle, + inst->SrcReg[0].NegateBase, GL_TRUE)); print_comment(inst); break; case OPCODE_TEX: @@ -550,7 +550,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, _mesa_printf("BRA %u (%s%s)", inst->BranchTarget, condcode_string(inst->DstReg.CondMask), - swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); + _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); print_comment(inst); break; case OPCODE_CAL: @@ -560,7 +560,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, case OPCODE_IF: _mesa_printf("IF (%s%s); # (if false, goto %d)", condcode_string(inst->DstReg.CondMask), - swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); print_comment(inst); return indent + 3; @@ -579,14 +579,14 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, case OPCODE_BRK: _mesa_printf("BRK (%s%s); #(goto %d)", condcode_string(inst->DstReg.CondMask), - swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); print_comment(inst); break; case OPCODE_CONT: _mesa_printf("CONT (%s%s); #(goto %d)", condcode_string(inst->DstReg.CondMask), - swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); print_comment(inst); break; @@ -602,8 +602,14 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, _mesa_printf("END\n"); break; case OPCODE_NOP: - _mesa_printf("NOP"); - print_comment(inst); + if (mode == PROG_PRINT_DEBUG) { + _mesa_printf("NOP"); + print_comment(inst); + } + else if (inst->Comment) { + /* ARB/NV extensions don't have NOP instruction */ + _mesa_printf("# %s\n", inst->Comment); + } break; /* XXX may need other special-case instructions */ default: diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h index 79c599f5a7..c0101b6b0f 100644 --- a/src/mesa/shader/prog_print.h +++ b/src/mesa/shader/prog_print.h @@ -37,6 +37,9 @@ typedef enum { } gl_prog_print_mode; +extern const char * +_mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended); + extern void _mesa_print_instruction(const struct prog_instruction *inst); -- cgit v1.2.3 From 0cc941963197fcdf8913462dbb225bc2bfca9d85 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Feb 2007 17:46:20 -0700 Subject: debug code for emitting variable allocation comments --- src/mesa/shader/slang/slang_emit.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 8ea54412ed..76b03753b6 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1410,7 +1410,22 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) */ assert(n->Var->aux == n->Store); } - break; +#ifdef DEBUG_foo + /* emit NOP with comment describing the variable's storage location */ + { + char s[1000]; + sprintf(s, "TEMP[%d]%s = %s (size %d)", + n->Store->Index, + _mesa_swizzle_string(n->Store->Swizzle, 0, GL_FALSE), + (char *) n->Var->a_name, + n->Store->Size); + inst = new_instruction(prog, OPCODE_NOP); + inst->Comment = _mesa_strdup(s); + return inst; + } +#else + return NULL; +#endif case IR_VAR: /* Reference to a variable -- cgit v1.2.3 From d8d07b2a8aa5cf9c5ce877b20351983b1aa8d01d Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 09:36:29 -0700 Subject: label routines for implementing branches, jumps --- src/mesa/shader/slang/slang_label.c | 77 +++++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_label.h | 42 ++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 src/mesa/shader/slang/slang_label.c create mode 100644 src/mesa/shader/slang/slang_label.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_label.c b/src/mesa/shader/slang/slang_label.c new file mode 100644 index 0000000000..4d35d2e72a --- /dev/null +++ b/src/mesa/shader/slang/slang_label.c @@ -0,0 +1,77 @@ + + +/** + * Functions for managing instruction labels. + * Basically, this is used to manage the problem of forward branches where + * we have a branch instruciton but don't know the target address yet. + */ + + +#include "slang_label.h" + + +slang_label * +_slang_label_new(const char *name) +{ + slang_label *l = (slang_label *) _mesa_calloc(sizeof(slang_label)); + if (l) { + l->Name = _mesa_strdup(name); + l->Location = -1; + } + return l; +} + +void +_slang_label_delete(slang_label *l) +{ + if (l->Name) + _mesa_free(l->Name); + if (l->References) + _mesa_free(l->References); + _mesa_free(l); +} + + +void +_slang_label_add_reference(slang_label *l, GLuint inst) +{ + const GLuint oldSize = l->NumReferences * sizeof(GLuint); + assert(l->Location < 0); + l->References = _mesa_realloc(l->References, + oldSize, oldSize + sizeof(GLuint)); + if (l->References) { + l->References[l->NumReferences] = inst; + l->NumReferences++; + } +} + + +GLint +_slang_label_get_location(const slang_label *l) +{ + return l->Location; +} + + +void +_slang_label_set_location(slang_label *l, GLint location, + struct gl_program *prog) +{ + GLuint i; + + assert(l->Location < 0); + assert(location >= 0); + + l->Location = location; + + /* for the instructions that were waiting to learn the label's location: */ + for (i = 0; i < l->NumReferences; i++) { + const GLuint j = l->References[i]; + prog->Instructions[j].BranchTarget = location; + } + + if (l->References) { + _mesa_free(l->References); + l->References = NULL; + } +} diff --git a/src/mesa/shader/slang/slang_label.h b/src/mesa/shader/slang/slang_label.h new file mode 100644 index 0000000000..661624f173 --- /dev/null +++ b/src/mesa/shader/slang/slang_label.h @@ -0,0 +1,42 @@ +#ifndef SLANG_LABEL_H +#define SLANG_LABEL_H 1 + +#include "imports.h" +#include "mtypes.h" +#include "prog_instruction.h" + + +struct slang_label_ +{ + char *Name; + GLint Location; + /** + * List of instruction references (numbered starting at zero) which need + * their BranchTarget field filled in with the location eventually + * assigned to the label. + */ + GLuint NumReferences; + GLuint *References; /** Array [NumReferences] */ +}; + +typedef struct slang_label_ slang_label; + + +extern slang_label * +_slang_label_new(const char *name); + +extern void +_slang_label_delete(slang_label *l); + +extern void +_slang_label_add_reference(slang_label *l, GLuint inst); + +extern GLint +_slang_label_get_location(const slang_label *l); + +extern void +_slang_label_set_location(slang_label *l, GLint location, + struct gl_program *prog); + + +#endif /* SLANG_LABEL_H */ -- cgit v1.2.3 From afbf7c7e6b7613d8d219807adaf7d17971ac2e6d Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 09:38:17 -0700 Subject: Re-implement branching with slang_labels. This eliminates the NOP instructions that had been used as placeholders for branch targets. Also, fix "return" statement bug. --- src/mesa/shader/slang/slang_codegen.c | 79 +++++++++++++------------ src/mesa/shader/slang/slang_compile_function.h | 11 ++-- src/mesa/shader/slang/slang_compile_operation.h | 9 +-- src/mesa/shader/slang/slang_emit.c | 54 +++++++++-------- src/mesa/shader/slang/slang_ir.h | 4 +- src/mesa/shader/slang/slang_link.c | 42 ------------- 6 files changed, 76 insertions(+), 123 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 51c8f27c80..3d9b23693a 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -39,6 +39,7 @@ #include "slang_codegen.h" #include "slang_compile.h" #include "slang_error.h" +#include "slang_label.h" #include "slang_simplify.h" #include "slang_emit.h" #include "slang_vartable.h" @@ -425,10 +426,11 @@ new_seq(slang_ir_node *left, slang_ir_node *right) } static slang_ir_node * -new_label(slang_atom labName) +new_label(slang_label *label) { slang_ir_node *n = new_node0(IR_LABEL); - n->Target = (char *) labName; /*_mesa_strdup(name);*/ + if (n) + n->Label = label; return n; } @@ -450,11 +452,11 @@ new_float_literal(const float v[4]) * XXX maybe pass an IR node as second param to indicate the jump target??? */ static slang_ir_node * -new_cjump(slang_atom target, GLuint zeroOrOne) +new_cjump(slang_label *dest, GLuint zeroOrOne) { slang_ir_node *n = new_node0(zeroOrOne ? IR_CJUMP1 : IR_CJUMP0); if (n) - n->Target = (char *) target; + n->Label = dest; return n; } @@ -463,11 +465,11 @@ new_cjump(slang_atom target, GLuint zeroOrOne) * XXX maybe pass an IR node as second param to indicate the jump target??? */ static slang_ir_node * -new_jump(slang_atom target) +new_jump(slang_label *dest) { slang_ir_node *n = new_node0(IR_JUMP); if (n) - n->Target = (char *) target; + n->Label = dest; return n; } @@ -599,6 +601,18 @@ slang_is_asm_function(const slang_function *fun) } +static GLboolean +_slang_is_noop(const slang_operation *oper) +{ + if (!oper || + oper->type == SLANG_OPER_VOID || + (oper->num_children == 1 && oper->children[0].type == SLANG_OPER_VOID)) + return GL_TRUE; + else + return GL_FALSE; +} + + /** * Produce inline code for a call to an assembly instruction. */ @@ -709,11 +723,11 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, } } break; -#if 1 /* XXX rely on default case below */ + case SLANG_OPER_RETURN: /* do return replacement here too */ assert(oper->num_children == 0 || oper->num_children == 1); - if (oper->num_children == 1) { + if (!_slang_is_noop(oper)) { /* replace: * return expr; * with: @@ -751,7 +765,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, slang_operation_destruct(blockOper); } break; -#endif + case SLANG_OPER_ASSIGN: case SLANG_OPER_SUBSCRIPT: /* special case: @@ -992,8 +1006,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, &inlined->children, inlined->num_children); lab->type = SLANG_OPER_LABEL; - lab->a_id = slang_atom_pool_atom(A->atoms, - (char *) A->CurFunction->end_label); + lab->label = A->CurFunction->end_label; } for (i = 0; i < totalArgs; i++) { @@ -1044,7 +1057,7 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, if (!A->CurFunction->end_label) { char name[200]; sprintf(name, "__endOfFunc_%s_", (char *) A->CurFunction->header.a_name); - A->CurFunction->end_label = slang_atom_pool_gen(A->atoms, name); + A->CurFunction->end_label = _slang_label_new(name); } if (slang_is_asm_function(fun) && !dest) { @@ -1075,7 +1088,7 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, n = _slang_gen_operation(A, oper); - A->CurFunction->end_label = NULL; + A->CurFunction->end_label = NULL; /* XXX delete/free? */ A->CurFunction = prevFunc; @@ -1198,19 +1211,6 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, } - -static GLboolean -_slang_is_noop(const slang_operation *oper) -{ - if (!oper || - oper->type == SLANG_OPER_VOID || - (oper->num_children == 1 && oper->children[0].type == SLANG_OPER_VOID)) - return GL_TRUE; - else - return GL_FALSE; -} - - static void print_funcs(struct slang_function_scope_ *scope, const char *name) { @@ -1617,8 +1617,7 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) static slang_ir_node * _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) { - slang_atom altAtom = slang_atom_pool_gen(A->atoms, "__selectAlt"); - slang_atom endAtom = slang_atom_pool_gen(A->atoms, "__selectEnd"); + slang_label *altLabel, *endLabel; slang_ir_node *altLab, *endLab; slang_ir_node *tree, *tmpDecl, *tmpVar, *cond, *cjump, *jump; slang_ir_node *bodx, *body, *assignx, *assigny; @@ -1628,6 +1627,9 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) assert(oper->type == SLANG_OPER_SELECT); assert(oper->num_children == 3); + altLabel = _slang_label_new("selectAlt"); + endLabel = _slang_label_new("selectEnd"); + /* size of x or y's type */ slang_typeinfo_construct(&type); _slang_typeof_operation(A, &oper->children[1], &type); @@ -1643,7 +1645,7 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(tmpDecl, cond); /* jump if false to "alt" label */ - cjump = new_cjump(altAtom, 0); + cjump = new_cjump(altLabel, 0); tree = new_seq(tree, cjump); /* evaluate child 1 (x) and assign to tmp */ @@ -1654,11 +1656,11 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(tree, assigny); /* jump to "end" label */ - jump = new_jump(endAtom); + jump = new_jump(endLabel); tree = new_seq(tree, jump); /* "alt" label */ - altLab = new_label(altAtom); + altLab = new_label(altLabel); tree = new_seq(tree, altLab); /* evaluate child 2 (y) and assign to tmp */ @@ -1669,7 +1671,7 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(tree, assignx); /* "end" label */ - endLab = new_label(endAtom); + endLab = new_label(endLabel); tree = new_seq(tree, endLab); /* tmp var value */ @@ -1762,8 +1764,8 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) slang_operation_construct(&gotoOp); gotoOp.type = SLANG_OPER_GOTO; /* XXX don't call function? */ - gotoOp.a_id = slang_atom_pool_atom(A->atoms, - (char *) A->CurFunction->end_label); + gotoOp.label = A->CurFunction->end_label; + /* assemble the new code */ n = _slang_gen_operation(A, &gotoOp); /* destroy temp code */ @@ -1819,8 +1821,7 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) jump->type = SLANG_OPER_GOTO; assert(A->CurFunction->end_label); /* XXX don't call function? */ - jump->a_id = slang_atom_pool_atom(A->atoms, - (char *) A->CurFunction->end_label); + jump->label = A->CurFunction->end_label; #if 0 /* debug */ printf("NEW RETURN:\n"); @@ -2439,9 +2440,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case SLANG_OPER_RETURN: return _slang_gen_return(A, oper); case SLANG_OPER_GOTO: - return new_jump((char*) oper->a_id); + return new_jump(oper->label); case SLANG_OPER_LABEL: - return new_label((char*) oper->a_id); + return new_label(oper->label); case SLANG_OPER_IDENTIFIER: return _slang_gen_variable(A, oper); case SLANG_OPER_IF: @@ -2716,7 +2717,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* Create an end-of-function label */ if (!A->CurFunction->end_label) - A->CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_"); + A->CurFunction->end_label = _slang_label_new("__endOfFunc__main"); /* push new vartable scope */ _slang_push_var_table(A->vartable); diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index b60b4a223f..09fbfd9090 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -25,9 +25,6 @@ #ifndef SLANG_COMPILE_FUNCTION_H #define SLANG_COMPILE_FUNCTION_H -#if defined __cplusplus -extern "C" { -#endif struct slang_code_unit_; @@ -69,7 +66,11 @@ typedef struct slang_function_ slang_operation *body; /**< The instruction tree */ unsigned int address; /**< Address of this func in memory */ slang_fixup_table fixups; /**< Mem locations which need func's address */ +#if 0 slang_atom end_label; /**< The end-of-function label */ +#else + struct slang_label_ *end_label; +#endif } slang_function; extern int slang_function_construct(slang_function *); @@ -102,8 +103,4 @@ slang_function_scope_find_by_name(slang_function_scope *, slang_atom, int); extern slang_function * slang_function_scope_find(slang_function_scope *, slang_function *, int); -#ifdef __cplusplus -} -#endif - #endif /* SLANG_COMPILE_FUNCTION_H */ diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index a59f968456..4adcd2ab0e 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -25,10 +25,6 @@ #ifndef SLANG_COMPILE_OPERATION_H #define SLANG_COMPILE_OPERATION_H -#if defined __cplusplus -extern "C" { -#endif - /** * Types of slang operations. @@ -122,6 +118,7 @@ typedef struct slang_operation_ slang_variable_scope *locals; /**< local vars for scope */ struct slang_function_ *fun; /**< If type == SLANG_OPER_CALL */ struct slang_variable_ *var; /**< If type == slang_oper_identier */ + struct slang_label_ *label; /**< If type == SLANG_OPER_LABEL or GOTO */ } slang_operation; @@ -148,8 +145,4 @@ slang_operation_insert(GLuint *numChildren, slang_operation **children, GLuint pos); -#ifdef __cplusplus -} -#endif - #endif /* SLANG_COMPILE_OPERATION_H */ diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 76b03753b6..6b950debf4 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -278,7 +278,7 @@ slang_print_ir(const slang_ir_node *n, int indent) slang_print_ir(n->Children[1], indent+3); break; case IR_LABEL: - printf("LABEL: %s\n", n->Target); + printf("LABEL: %s\n", n->Label->Name); break; case IR_COND: printf("COND\n"); @@ -848,38 +848,44 @@ emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -emit_label(const char *target, struct gl_program *prog) +emit_label(const slang_ir_node *n, struct gl_program *prog) { - struct prog_instruction *inst; - inst = new_instruction(prog, OPCODE_NOP); - inst->Comment = _mesa_strdup(target); - return inst; + assert(n->Label); + assert(_slang_label_get_location(n->Label) < 0); + _slang_label_set_location(n->Label, prog->NumInstructions, prog); + return NULL; } static struct prog_instruction * -emit_cjump(const char *target, struct gl_program *prog, GLuint zeroOrOne) +emit_cjump(slang_ir_node *n, struct gl_program *prog, GLuint zeroOrOne) { struct prog_instruction *inst; + assert(n->Opcode == IR_CJUMP0 || n->Opcode == IR_CJUMP1); inst = new_instruction(prog, OPCODE_BRA); if (zeroOrOne) inst->DstReg.CondMask = COND_NE; /* branch if non-zero */ else inst->DstReg.CondMask = COND_EQ; /* branch if equal to zero */ inst->DstReg.CondSwizzle = SWIZZLE_X; - inst->Comment = _mesa_strdup(target); + inst->BranchTarget = _slang_label_get_location(n->Label); + if (inst->BranchTarget < 0) { + _slang_label_add_reference(n->Label, prog->NumInstructions - 1); + } return inst; } static struct prog_instruction * -emit_jump(const char *target, struct gl_program *prog) +emit_jump(slang_ir_node *n, struct gl_program *prog) { struct prog_instruction *inst; inst = new_instruction(prog, OPCODE_BRA); inst->DstReg.CondMask = COND_TR; /* always branch */ - /*inst->DstReg.CondSwizzle = SWIZZLE_X;*/ - inst->Comment = _mesa_strdup(target); + inst->BranchTarget = _slang_label_get_location(n->Label); + if (inst->BranchTarget < 0) { + _slang_label_add_reference(n->Label, prog->NumInstructions - 1); + } return inst; } @@ -1522,13 +1528,13 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return emit_not(vt, n, prog); case IR_LABEL: - return emit_label(n->Target, prog); + return emit_label(n, prog); case IR_JUMP: - return emit_jump(n->Target, prog); + return emit_jump(n, prog); case IR_CJUMP0: - return emit_cjump(n->Target, prog, 0); + return emit_cjump(n, prog, 0); case IR_CJUMP1: - return emit_cjump(n->Target, prog, 1); + return emit_cjump(n, prog, 1); case IR_KILL: return emit_kill(prog); @@ -1572,18 +1578,14 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, { GLboolean success; - if (emit(vt, n, prog)) { - /* finish up by adding the END opcode to program */ - if (withEnd) { - struct prog_instruction *inst; - inst = new_instruction(prog, OPCODE_END); - } - success = GL_TRUE; - } - else { - /* record an error? */ - success = GL_FALSE; + (void) emit(vt, n, prog); + + /* finish up by adding the END opcode to program */ + if (withEnd) { + struct prog_instruction *inst; + inst = new_instruction(prog, OPCODE_END); } + success = GL_TRUE; printf("*********** End generate code (%u inst):\n", prog->NumInstructions); #if 0 diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 0c827d9cd8..ba8b613112 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -35,6 +35,7 @@ #include "imports.h" #include "slang_compile.h" +#include "slang_label.h" #include "mtypes.h" @@ -153,7 +154,8 @@ typedef struct slang_ir_node_ slang_variable *Var; /**< If Opcode == IR_VAR or IR_VAR_DECL */ slang_ir_storage *Store; /**< location of result of this operation */ GLint InstLocation; /**< Location of instruction emitted for this node */ - struct slang_ir_node_ *BranchNode; /**< Used for branch instructions */ + struct slang_ir_node_ *BranchNode; /**< Used for branching instructions */ + slang_label *Label; /**< Used for branches */ } slang_ir_node; diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 23977b7c2c..e2bb6ee2d8 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -273,46 +273,6 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) } -/** - * XXX Temporary - */ -static void -_slang_resolve_branches(struct gl_program *prog) -{ - struct target { - const char *Name; - GLuint Pos; - }; - struct target targets[500]; - GLuint numTargets = 0; - GLuint i, j; - - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_NOP && inst->Comment) { - targets[numTargets].Name = inst->Comment; - targets[numTargets].Pos = i; - numTargets++; - } - } - - for (i = 0; i < prog->NumInstructions; i++) { - struct prog_instruction *inst = prog->Instructions + i; - if (inst->Opcode == OPCODE_BRA && inst->BranchTarget < 0) { - for (j = 0; j < numTargets; j++) { - if (!strcmp(inst->Comment, targets[j].Name)) { - inst->BranchTarget = targets[j].Pos; - break; - } - } - if (j == numTargets) { - abort(); - } - } - } -} - - /** * Resolve binding of generic vertex attributes. * For example, if the vertex shader declared "attribute vec4 foobar" we'll @@ -574,11 +534,9 @@ _slang_link(GLcontext *ctx, } if (shProg->VertexProgram) { - _slang_resolve_branches(&shProg->VertexProgram->Base); _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); } if (shProg->FragmentProgram) { - _slang_resolve_branches(&shProg->FragmentProgram->Base); _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); } -- cgit v1.2.3 From c18c75b0b78a7a4391d94864fdd3466a0095342f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 09:38:46 -0700 Subject: remove old _slang_gen_if() --- src/mesa/shader/slang/slang_codegen.c | 52 ----------------------------------- 1 file changed, 52 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 3d9b23693a..fb3bab4f3f 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1439,58 +1439,6 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) } -#if 0 -/** - * Generate IR tree for an if/then/else conditional using BRAnch instructions. - */ -static slang_ir_node * -_slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) -{ - /* - * eval expr (child[0]), updating condcodes - * branch if false to _else or _endif - * "true" code block - * if haveElseClause clause: - * jump "__endif" - * label "__else" - * "false" code block - * label "__endif" - */ - const GLboolean haveElseClause = !_slang_is_noop(&oper->children[2]); - slang_ir_node *cond, *bra, *trueBody, *endifLab, *tree; - slang_atom elseAtom = slang_atom_pool_gen(A->atoms, "__else"); - slang_atom endifAtom = slang_atom_pool_gen(A->atoms, "__endif"); - - cond = _slang_gen_operation(A, &oper->children[0]); - cond = new_cond(cond); - /*assert(cond->Store);*/ - bra = new_cjump(haveElseClause ? elseAtom : endifAtom, 0); - tree = new_seq(cond, bra); - - trueBody = _slang_gen_operation(A, &oper->children[1]); - tree = new_seq(tree, trueBody); - - if (haveElseClause) { - /* else clause */ - slang_ir_node *jump, *elseLab, *falseBody; - jump = new_jump(endifAtom); - tree = new_seq(tree, jump); - - elseLab = new_label(elseAtom); - tree = new_seq(tree, elseLab); - - falseBody = _slang_gen_operation(A, &oper->children[2]); - tree = new_seq(tree, falseBody); - } - - endifLab = new_label(endifAtom); - tree = new_seq(tree, endifLab); - - return tree; -} -#endif - - /** * Determine if the given operation is of a specific type. */ -- cgit v1.2.3 From 75d4ed968d48d95c274a5965cc19b13a0e47ef9f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 09:42:11 -0700 Subject: Replace slang_ir_node::Target w/ Field. Remove Comment field. Clean-up. --- src/mesa/shader/slang/slang_builtin.c | 2 +- src/mesa/shader/slang/slang_codegen.c | 2 +- src/mesa/shader/slang/slang_emit.c | 9 ++++----- src/mesa/shader/slang/slang_ir.h | 9 +++++---- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 7f4290b91f..2e4687afc5 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -348,7 +348,7 @@ _slang_alloc_statevar(slang_ir_node *n, GLuint swizzle; if (n->Opcode == IR_FIELD) { - field = n->Target; + field = n->Field; n = n->Children[0]; } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index fb3bab4f3f..6d6b15f403 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2077,7 +2077,7 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) n = new_node1(IR_FIELD, base); if (n) { - n->Target = (char *) oper->a_id; + n->Field = (char *) oper->a_id; n->Store = _slang_new_ir_storage(base->Store->File, base->Store->Index, size); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6b950debf4..764b5f6138 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -285,14 +285,14 @@ slang_print_ir(const slang_ir_node *n, int indent) slang_print_ir(n->Children[0], indent + 3); break; case IR_JUMP: - printf("JUMP %s\n", n->Target); + printf("JUMP %s\n", n->Label->Name); break; case IR_CJUMP0: - printf("CJUMP0 %s\n", n->Target); + printf("CJUMP0 %s\n", n->Label->Name); slang_print_ir(n->Children[0], indent+3); break; case IR_CJUMP1: - printf("CJUMP1 %s\n", n->Target); + printf("CJUMP1 %s\n", n->Label->Name); slang_print_ir(n->Children[0], indent+3); break; @@ -365,7 +365,7 @@ slang_print_ir(const slang_ir_node *n, int indent) (void*) n->Store); break; case IR_FIELD: - printf("FIELD %s of\n", n->Target); + printf("FIELD %s of\n", n->Field); slang_print_ir(n->Children[0], indent+3); break; case IR_FLOAT: @@ -842,7 +842,6 @@ emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); inst->SrcReg[0].NegateBase = NEGATE_XYZW; - inst->Comment = n->Comment; return inst; } diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index ba8b613112..cd1f606012 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -147,13 +147,14 @@ typedef struct slang_ir_node_ { slang_ir_opcode Opcode; struct slang_ir_node_ *Children[3]; - const char *Comment; - const char *Target; /**< Branch target string */ + slang_ir_storage *Store; /**< location of result of this operation */ + GLint InstLocation; /**< Location of instruction emitted for this node */ + + /** special fields depending on Opcode: */ + const char *Field; /**< If Opcode == IR_FIELD */ GLuint Writemask; /**< If Opcode == IR_MOVE */ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; /**< If Opcode == IR_VAR or IR_VAR_DECL */ - slang_ir_storage *Store; /**< location of result of this operation */ - GLint InstLocation; /**< Location of instruction emitted for this node */ struct slang_ir_node_ *BranchNode; /**< Used for branching instructions */ slang_label *Label; /**< Used for branches */ } slang_ir_node; -- cgit v1.2.3 From c2a261f4930f6f73595b6f5df5594d160f3249af Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 09:55:21 -0700 Subject: comments, clean-up --- src/mesa/shader/slang/slang_codegen.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6d6b15f403..d239a97500 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -28,6 +28,15 @@ * \author Brian Paul */ + +/*** + *** NOTES: + *** The new_() functions return a new instance of a simple IR node. + *** The gen_() functions generate larger IR trees from the simple nodes. + ***/ + + + #include "imports.h" #include "macros.h" #include "mtypes.h" @@ -1711,7 +1720,6 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) slang_operation gotoOp; slang_operation_construct(&gotoOp); gotoOp.type = SLANG_OPER_GOTO; - /* XXX don't call function? */ gotoOp.label = A->CurFunction->end_label; /* assemble the new code */ @@ -2636,7 +2644,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, GLboolean _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) { - slang_ir_node *n, *endLabel; + slang_ir_node *n; GLboolean success = GL_TRUE; if (_mesa_strcmp((char *) fun->header.a_name, "main") != 0) { @@ -2684,8 +2692,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) } /* append an end-of-function-label to IR tree */ - endLabel = new_label(fun->end_label); - n = new_seq(n, endLabel); + n = new_seq(n, new_label(fun->end_label)); A->CurFunction = NULL; -- cgit v1.2.3 From 308be21c2fe8e5d33bd63eca1d3e8250cd80199d Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 10:04:18 -0700 Subject: added slang_label.c --- src/mesa/sources | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/sources b/src/mesa/sources index 49d8dc997c..a7bbc02012 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -180,6 +180,7 @@ SLANG_SOURCES = \ shader/slang/slang_compile_variable.c \ shader/slang/slang_emit.c \ shader/slang/slang_error.c \ + shader/slang/slang_label.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_link.c \ shader/slang/slang_preprocess.c \ -- cgit v1.2.3 From 5186ae9bbe8c630c2434c7488fbe5bffdfba46a7 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 10:12:38 -0700 Subject: remove unused slang_atom_pool_gen() --- src/mesa/shader/slang/slang_utility.c | 14 -------------- src/mesa/shader/slang/slang_utility.h | 10 ---------- 2 files changed, 24 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 314ecc8d75..9b98a2c76c 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -219,17 +219,3 @@ slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom) { return (const char *) (atom); } - - -/** - * Generate a new, unique atom with given prefix. - */ -slang_atom -slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix) -{ - char name[1000]; - static int nextFree = 100; - sprintf(name, "%s%d", prefix, nextFree); - nextFree++; - return slang_atom_pool_atom(pool, name); -} diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index c969ffcd2a..360241916f 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -25,9 +25,6 @@ #if !defined SLANG_UTILITY_H #define SLANG_UTILITY_H -#if defined __cplusplus -extern "C" { -#endif /* Compile-time assertions. If the expression is zero, try to declare an * array of size [-1] to cause compilation error. @@ -102,13 +99,6 @@ GLvoid slang_atom_pool_destruct (slang_atom_pool *); slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *); const char *slang_atom_pool_id (slang_atom_pool *, slang_atom); -slang_atom -slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix); - - -#ifdef __cplusplus -} -#endif #endif -- cgit v1.2.3 From 99902198de9a81fa95ab058048d618c5ecb7856e Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 10:19:55 -0700 Subject: comments, clean-up --- src/mesa/shader/slang/slang_emit.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 764b5f6138..e57f215dfe 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -28,6 +28,14 @@ * \author Brian Paul */ +/*** + *** NOTES + *** + *** To emit GPU instructions, we basically just do an in-order traversal + *** of the IR tree. + ***/ + + #include "imports.h" #include "context.h" #include "macros.h" @@ -46,6 +54,7 @@ /* XXX temporarily here */ static GLboolean EmitHighLevelInstructions = GL_TRUE; +static GLboolean EmitComments = GL_FALSE; @@ -1415,9 +1424,8 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) */ assert(n->Var->aux == n->Store); } -#ifdef DEBUG_foo - /* emit NOP with comment describing the variable's storage location */ - { + if (EmitComments) { + /* emit NOP with comment describing the variable's storage location */ char s[1000]; sprintf(s, "TEMP[%d]%s = %s (size %d)", n->Store->Index, @@ -1428,9 +1436,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) inst->Comment = _mesa_strdup(s); return inst; } -#else return NULL; -#endif case IR_VAR: /* Reference to a variable -- cgit v1.2.3 From aa9d22a1c0f3256497088985c290d4046e089456 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 11:21:03 -0700 Subject: replace GLint with gl_state_index --- src/mesa/shader/arbprogparse.c | 18 +++++++++++------- src/mesa/shader/prog_parameter.c | 2 +- src/mesa/shader/prog_parameter.h | 4 ++-- src/mesa/shader/prog_statevars.c | 4 ++-- src/mesa/shader/prog_statevars.h | 4 ++-- src/mesa/shader/programopt.c | 6 +++--- src/mesa/shader/slang/slang_builtin.c | 4 ++-- src/mesa/shader/slang/slang_link.c | 2 +- 8 files changed, 24 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 43e2c7e1be..6058fc9889 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1085,7 +1085,8 @@ parse_matrix (GLcontext * ctx, const GLubyte ** inst, struct arb_program *Progra */ static GLuint parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, - struct arb_program *Program, GLint * state_tokens) + struct arb_program *Program, + gl_state_index state_tokens[STATE_LENGTH]) { switch (*(*inst)++) { case STATE_MATERIAL_PARSER: @@ -1269,7 +1270,8 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, case STATE_CLIP_PLANE: state_tokens[0] = STATE_CLIPPLANE; state_tokens[1] = parse_integer (inst, Program); - if (parse_clipplane_num (ctx, inst, Program, &state_tokens[1])) + if (parse_clipplane_num (ctx, inst, Program, + (GLint *) &state_tokens[1])) return 1; break; @@ -1287,9 +1289,10 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, /* XXX: I think this is the correct format for a matrix row */ case STATE_MATRIX_ROWS: - if (parse_matrix - (ctx, inst, Program, &state_tokens[0], &state_tokens[1], - &state_tokens[4])) + if (parse_matrix(ctx, inst, Program, + (GLint *) &state_tokens[0], + (GLint *) &state_tokens[1], + (GLint *) &state_tokens[4])) return 1; state_tokens[2] = parse_integer (inst, Program); /* The first row to grab */ @@ -1345,7 +1348,8 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, */ static GLuint parse_program_single_item (GLcontext * ctx, const GLubyte ** inst, - struct arb_program *Program, GLint * state_tokens) + struct arb_program *Program, + gl_state_index state_tokens[STATE_LENGTH]) { if (Program->Base.Target == GL_FRAGMENT_PROGRAM_ARB) state_tokens[0] = STATE_FRAGMENT_PROGRAM; @@ -1720,7 +1724,7 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst, { GLint idx; GLuint err = 0; - GLint state_tokens[STATE_LENGTH]; + gl_state_index state_tokens[STATE_LENGTH]; GLfloat const_values[4]; switch (*(*inst)++) { diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 505c5016ac..14b272c2c5 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -370,7 +370,7 @@ sizeof_state_reference(const GLint *stateTokens) */ GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint stateTokens[STATE_LENGTH]) + const gl_state_index stateTokens[STATE_LENGTH]) { const GLuint size = 4; /* XXX fix */ const char *name; diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index 459643f425..3d32a64f38 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -50,7 +50,7 @@ struct gl_program_parameter /** * A sequence of STATE_* tokens and integers to identify GL state. */ - GLint StateIndexes[STATE_LENGTH]; + gl_state_index StateIndexes[STATE_LENGTH]; }; @@ -115,7 +115,7 @@ _mesa_add_attribute(struct gl_program_parameter_list *paramList, extern GLint _mesa_add_state_reference(struct gl_program_parameter_list *paramList, - const GLint stateTokens[STATE_LENGTH]); + const gl_state_index stateTokens[STATE_LENGTH]); extern GLfloat * _mesa_lookup_parameter_value(const struct gl_program_parameter_list *paramList, diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 0d70af3b27..93d9244523 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -439,7 +439,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], * some GL state has changed. */ GLbitfield -_mesa_program_state_flags(const GLint state[STATE_LENGTH]) +_mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]) { switch (state[0]) { case STATE_MATERIAL: @@ -678,7 +678,7 @@ append_index(char *dst, GLint index) * Use _mesa_free() to deallocate the string. */ const char * -_mesa_program_state_string(const GLint state[STATE_LENGTH]) +_mesa_program_state_string(const gl_state_index state[STATE_LENGTH]) { char str[1000] = ""; char tmp[30]; diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 82169342cd..3281a4a2a0 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -119,11 +119,11 @@ _mesa_load_state_parameters(GLcontext *ctx, extern GLbitfield -_mesa_program_state_flags(const GLint state[STATE_LENGTH]); +_mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]); extern const char * -_mesa_program_state_string(const GLint state[STATE_LENGTH]); +_mesa_program_state_string(const gl_state_index state[STATE_LENGTH]); #endif /* PROG_STATEVARS_H */ diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index 18da39c2d3..2d14cd3855 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -56,7 +56,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) * Setup state references for the modelview/projection matrix. * XXX we should check if these state vars are already declared. */ - static const GLint mvpState[4][STATE_LENGTH] = { + static const gl_state_index mvpState[4][STATE_LENGTH] = { { STATE_MVP_MATRIX, 0, 0, 0, 0 }, /* state.matrix.mvp.row[0] */ { STATE_MVP_MATRIX, 0, 1, 1, 0 }, /* state.matrix.mvp.row[1] */ { STATE_MVP_MATRIX, 0, 2, 2, 0 }, /* state.matrix.mvp.row[2] */ @@ -125,9 +125,9 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog) void _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) { - static const GLint fogPStateOpt[STATE_LENGTH] + static const gl_state_index fogPStateOpt[STATE_LENGTH] = { STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 }; - static const GLint fogColorState[STATE_LENGTH] + static const gl_state_index fogColorState[STATE_LENGTH] = { STATE_FOG_COLOR, 0, 0, 0, 0}; struct prog_instruction *newInst, *inst; const GLuint origLen = fprog->Base.NumInstructions; diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 2e4687afc5..b01b74d359 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -309,7 +309,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, GLuint j; for (j = 0; j < 4; j++) { tokens[2] = tokens[3] = j; /* jth row of matrix */ - pos[j] = _mesa_add_state_reference(paramList, (GLint *) tokens); + pos[j] = _mesa_add_state_reference(paramList, tokens); assert(pos[j] >= 0); ASSERT(pos[j] >= 0); } @@ -317,7 +317,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, } else { /* allocate a single register */ - GLint pos = _mesa_add_state_reference(paramList, (GLint *) tokens); + GLint pos = _mesa_add_state_reference(paramList, tokens); ASSERT(pos >= 0); return pos; } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index e2bb6ee2d8..f468a8cbc2 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -199,7 +199,7 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size); break; case PROGRAM_STATE_VAR: - j = _mesa_add_state_reference(shProg->Uniforms, (const GLint *) p->StateIndexes); + j = _mesa_add_state_reference(shProg->Uniforms, p->StateIndexes); break; case PROGRAM_UNIFORM: j = _mesa_add_uniform(shProg->Uniforms, p->Name, p->Size); -- cgit v1.2.3 From ef0cc9db547017309988c848376569174cfb90e8 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 11:43:14 -0700 Subject: remove dead code --- src/mesa/shader/prog_statevars.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 93d9244523..21d518a810 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -287,19 +287,11 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], /* state[5] = transpose, inverse or invtrans */ const GLmatrix *matrix; -#if 0 - const gl_state_index mat = state[1]; - const GLuint index = (GLuint) state[2]; - const GLuint firstRow = (GLuint) state[3]; - const GLuint lastRow = (GLuint) state[4]; - const gl_state_index modifier = state[5]; -#else const gl_state_index mat = state[0]; const GLuint index = (GLuint) state[1]; const GLuint firstRow = (GLuint) state[2]; const GLuint lastRow = (GLuint) state[3]; const gl_state_index modifier = state[4]; -#endif const GLfloat *m; GLuint row, i; ASSERT(firstRow >= 0); -- cgit v1.2.3 From 0020d1022f4b5befe4adf783bedc4cf83e09f01f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 11:43:44 -0700 Subject: re-expose _mesa_print_alu_instruction() --- src/mesa/shader/prog_print.c | 10 +++++++++- src/mesa/shader/prog_print.h | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 0d21912a0e..4519f0c030 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -426,7 +426,7 @@ print_comment(const struct prog_instruction *inst) static void print_alu_instruction(const struct prog_instruction *inst, - const char *opcode_string, GLuint numRegs, + const char *opcode_string, GLuint numRegs, gl_prog_print_mode mode, const struct gl_program *prog) { @@ -461,6 +461,14 @@ print_alu_instruction(const struct prog_instruction *inst, } +void +_mesa_print_alu_instruction(const struct prog_instruction *inst, + const char *opcode_string, GLuint numRegs) +{ + print_alu_instruction(inst, opcode_string, numRegs, PROG_PRINT_DEBUG, NULL); +} + + void _mesa_print_instruction(const struct prog_instruction *inst) { diff --git a/src/mesa/shader/prog_print.h b/src/mesa/shader/prog_print.h index c0101b6b0f..9c7607f9d5 100644 --- a/src/mesa/shader/prog_print.h +++ b/src/mesa/shader/prog_print.h @@ -40,6 +40,10 @@ typedef enum { extern const char * _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended); +extern void +_mesa_print_alu_instruction(const struct prog_instruction *inst, + const char *opcode_string, GLuint numRegs); + extern void _mesa_print_instruction(const struct prog_instruction *inst); -- cgit v1.2.3 From 9fe3e2efc3a76b2a2fb82031041f6a6170c5b1d9 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 11:44:14 -0700 Subject: s/GLint/gl_state_index/, length is now 5 not 6 --- src/mesa/main/texenvprogram.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index b69e650159..917acf06d7 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -411,31 +411,29 @@ static void release_temps( struct texenv_fragment_program *p ) } -static struct ureg register_param6( struct texenv_fragment_program *p, +static struct ureg register_param5( struct texenv_fragment_program *p, GLint s0, GLint s1, GLint s2, GLint s3, - GLint s4, - GLint s5) + GLint s4) { - GLint tokens[6]; + gl_state_index tokens[STATE_LENGTH]; GLuint idx; tokens[0] = s0; tokens[1] = s1; tokens[2] = s2; tokens[3] = s3; tokens[4] = s4; - tokens[5] = s5; idx = _mesa_add_state_reference( p->program->Base.Parameters, tokens ); return make_ureg(PROGRAM_STATE_VAR, idx); } -#define register_param1(p,s0) register_param6(p,s0,0,0,0,0,0) -#define register_param2(p,s0,s1) register_param6(p,s0,s1,0,0,0,0) -#define register_param3(p,s0,s1,s2) register_param6(p,s0,s1,s2,0,0,0) -#define register_param4(p,s0,s1,s2,s3) register_param6(p,s0,s1,s2,s3,0,0) +#define register_param1(p,s0) register_param5(p,s0,0,0,0,0) +#define register_param2(p,s0,s1) register_param5(p,s0,s1,0,0,0) +#define register_param3(p,s0,s1,s2) register_param5(p,s0,s1,s2,0,0) +#define register_param4(p,s0,s1,s2,s3) register_param5(p,s0,s1,s2,s3,0) static struct ureg register_input( struct texenv_fragment_program *p, GLuint input ) -- cgit v1.2.3 From fce8409cbbe6aa5309163f3d63894233b8833308 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 11:44:44 -0700 Subject: s/GLint/gl_state_index/, length is now 5 not 6 --- src/mesa/tnl/t_vp_build.c | 61 ++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 17f115f4a2..f9e5045be7 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -414,40 +414,37 @@ static struct ureg get_identity_param( struct tnl_program *p ) return p->identity; } -static struct ureg register_param6( struct tnl_program *p, +static struct ureg register_param5(struct tnl_program *p, GLint s0, GLint s1, GLint s2, GLint s3, - GLint s4, - GLint s5) + GLint s4) { - GLint tokens[6]; + gl_state_index tokens[STATE_LENGTH]; GLint idx; tokens[0] = s0; tokens[1] = s1; tokens[2] = s2; tokens[3] = s3; tokens[4] = s4; - tokens[5] = s5; idx = _mesa_add_state_reference( p->program->Base.Parameters, tokens ); return make_ureg(PROGRAM_STATE_VAR, idx); } -#define register_param1(p,s0) register_param6(p,s0,0,0,0,0,0) -#define register_param2(p,s0,s1) register_param6(p,s0,s1,0,0,0,0) -#define register_param3(p,s0,s1,s2) register_param6(p,s0,s1,s2,0,0,0) -#define register_param4(p,s0,s1,s2,s3) register_param6(p,s0,s1,s2,s3,0,0) +#define register_param1(p,s0) register_param5(p,s0,0,0,0,0) +#define register_param2(p,s0,s1) register_param5(p,s0,s1,0,0,0) +#define register_param3(p,s0,s1,s2) register_param5(p,s0,s1,s2,0,0) +#define register_param4(p,s0,s1,s2,s3) register_param5(p,s0,s1,s2,s3,0) -static void register_matrix_param6( struct tnl_program *p, - GLint s0, - GLint s1, - GLint s2, - GLint s3, - GLint s4, - GLint s5, +static void register_matrix_param5( struct tnl_program *p, + GLint s0, /* modelview, projection, etc */ + GLint s1, /* texture matrix number */ + GLint s2, /* first row */ + GLint s3, /* last row */ + GLint s4, /* inverse, transpose, etc */ struct ureg *matrix ) { GLint i; @@ -455,8 +452,8 @@ static void register_matrix_param6( struct tnl_program *p, /* This is a bit sad as the support is there to pull the whole * matrix out in one go: */ - for (i = 0; i <= s4 - s3; i++) - matrix[i] = register_param6( p, s0, s1, s2, i, i, s5 ); + for (i = 0; i <= s3 - s2; i++) + matrix[i] = register_param5( p, s0, s1, i, i, s4 ); } @@ -636,14 +633,14 @@ static struct ureg get_eye_position( struct tnl_program *p ) p->eye_position = reserve_temp(p); if (PREFER_DP4) { - register_matrix_param6( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, - 0, 0, modelview ); + register_matrix_param5( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, + 0, modelview ); emit_matrix_transform_vec4(p, p->eye_position, modelview, pos); } else { - register_matrix_param6( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, - STATE_MATRIX_TRANSPOSE, 0, modelview ); + register_matrix_param5( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, + STATE_MATRIX_TRANSPOSE, modelview ); emit_transpose_matrix_transform_vec4(p, p->eye_position, modelview, pos); } @@ -671,8 +668,8 @@ static struct ureg get_eye_normal( struct tnl_program *p ) struct ureg normal = register_input(p, VERT_ATTRIB_NORMAL ); struct ureg mvinv[3]; - register_matrix_param6( p, STATE_MODELVIEW_MATRIX, 0, 0, 2, - STATE_MATRIX_INVTRANS, 0, mvinv ); + register_matrix_param5( p, STATE_MODELVIEW_MATRIX, 0, 0, 2, + STATE_MATRIX_INVTRANS, mvinv ); p->eye_normal = reserve_temp(p); @@ -706,13 +703,13 @@ static void build_hpos( struct tnl_program *p ) struct ureg mvp[4]; if (PREFER_DP4) { - register_matrix_param6( p, STATE_MVP_MATRIX, 0, 0, 3, - 0, 0, mvp ); + register_matrix_param5( p, STATE_MVP_MATRIX, 0, 0, 3, + 0, mvp ); emit_matrix_transform_vec4( p, hpos, mvp, pos ); } else { - register_matrix_param6( p, STATE_MVP_MATRIX, 0, 0, 3, - STATE_MATRIX_TRANSPOSE, 0, mvp ); + register_matrix_param5( p, STATE_MVP_MATRIX, 0, 0, 3, + STATE_MATRIX_TRANSPOSE, mvp ); emit_transpose_matrix_transform_vec4( p, hpos, mvp, pos ); } } @@ -1300,13 +1297,13 @@ static void build_texture_transform( struct tnl_program *p ) out_texgen : register_input(p, VERT_ATTRIB_TEX0+i)); if (PREFER_DP4) { - register_matrix_param6( p, STATE_TEXTURE_MATRIX, i, 0, 3, - 0, 0, texmat ); + register_matrix_param5( p, STATE_TEXTURE_MATRIX, i, 0, 3, + 0, texmat ); emit_matrix_transform_vec4( p, out, texmat, in ); } else { - register_matrix_param6( p, STATE_TEXTURE_MATRIX, i, 0, 3, - STATE_MATRIX_TRANSPOSE, 0, texmat ); + register_matrix_param5( p, STATE_TEXTURE_MATRIX, i, 0, 3, + STATE_MATRIX_TRANSPOSE, texmat ); emit_transpose_matrix_transform_vec4( p, out, texmat, in ); } } -- cgit v1.2.3 From cc6a08b2a01c1ac774eaf0ca22eca325f82a064b Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 11:45:15 -0700 Subject: SWvertex no longer has texcoord field, use attrib field instead --- src/mesa/tnl_dd/t_dd_vb.c | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl_dd/t_dd_vb.c b/src/mesa/tnl_dd/t_dd_vb.c index edd78f7acf..629f328a4d 100644 --- a/src/mesa/tnl_dd/t_dd_vb.c +++ b/src/mesa/tnl_dd/t_dd_vb.c @@ -141,45 +141,45 @@ void TAG(translate_vertex)(GLcontext *ctx, ((HAVE_TEX2_VERTICES && format == PROJ_TEX3_VERTEX_FORMAT) || (format == PROJ_TEX1_VERTEX_FORMAT))) { - dst->texcoord[0][0] = src->pv.u0; - dst->texcoord[0][1] = src->pv.v0; - dst->texcoord[0][3] = src->pv.q0; + dst->attrib[FRAG_ATTRIB_TEX0][0] = src->pv.u0; + dst->attrib[FRAG_ATTRIB_TEX0][1] = src->pv.v0; + dst->attrib[FRAG_ATTRIB_TEX0][3] = src->pv.q0; - dst->texcoord[1][0] = src->pv.u1; - dst->texcoord[1][1] = src->pv.v1; - dst->texcoord[1][3] = src->pv.q1; + dst->attrib[FRAG_ATTRIB_TEX1][0] = src->pv.u1; + dst->attrib[FRAG_ATTRIB_TEX1][1] = src->pv.v1; + dst->attrib[FRAG_ATTRIB_TEX1][3] = src->pv.q1; if (HAVE_TEX2_VERTICES) { - dst->texcoord[2][0] = src->pv.u2; - dst->texcoord[2][1] = src->pv.v2; - dst->texcoord[2][3] = src->pv.q2; + dst->attrib[FRAG_ATTRIB_TEX2][0] = src->pv.u2; + dst->attrib[FRAG_ATTRIB_TEX2][1] = src->pv.v2; + dst->attrib[FRAG_ATTRIB_TEX2][3] = src->pv.q2; } if (HAVE_TEX3_VERTICES) { - dst->texcoord[3][0] = src->pv.u3; - dst->texcoord[3][1] = src->pv.v3; - dst->texcoord[3][3] = src->pv.q3; + dst->attrib[FRAG_ATTRIB_TEX3][0] = src->pv.u3; + dst->attrib[FRAG_ATTRIB_TEX3][1] = src->pv.v3; + dst->attrib[FRAG_ATTRIB_TEX3][3] = src->pv.q3; } } else { - dst->texcoord[0][0] = src->v.u0; - dst->texcoord[0][1] = src->v.v0; - dst->texcoord[0][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX0][0] = src->v.u0; + dst->attrib[FRAG_ATTRIB_TEX0][1] = src->v.v0; + dst->attrib[FRAG_ATTRIB_TEX0][3] = 1.0; - dst->texcoord[1][0] = src->v.u1; - dst->texcoord[1][1] = src->v.v1; - dst->texcoord[1][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX1][0] = src->v.u1; + dst->attrib[FRAG_ATTRIB_TEX1][1] = src->v.v1; + dst->attrib[FRAG_ATTRIB_TEX1][3] = 1.0; if (HAVE_TEX2_VERTICES) { - dst->texcoord[2][0] = src->v.u2; - dst->texcoord[2][1] = src->v.v2; - dst->texcoord[2][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX2][0] = src->v.u2; + dst->attrib[FRAG_ATTRIB_TEX2][1] = src->v.v2; + dst->attrib[FRAG_ATTRIB_TEX2][3] = 1.0; } if (HAVE_TEX3_VERTICES) { - dst->texcoord[3][0] = src->v.u3; - dst->texcoord[3][1] = src->v.v3; - dst->texcoord[3][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX3][0] = src->v.u3; + dst->attrib[FRAG_ATTRIB_TEX3][1] = src->v.v3; + dst->attrib[FRAG_ATTRIB_TEX3][3] = 1.0; } } } -- cgit v1.2.3 From 36a0ee199ddc5f29273f9761eeed8e18ad5c874f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 13:38:37 -0700 Subject: expose _mesa_load_tracked_matrices() --- src/mesa/tnl/t_vb_program.c | 14 ++++++++------ src/mesa/tnl/tnl.h | 3 +++ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 422aae69e2..72a65f89f1 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -38,6 +38,7 @@ #include "prog_statevars.h" #include "prog_execute.h" +#include "tnl.h" #include "t_context.h" #include "t_pipeline.h" @@ -121,11 +122,12 @@ load_transpose_matrix(GLfloat registers[][4], GLuint pos, /** - * Load program parameter registers with tracked matrices (if NV program). - * This only needs to be done per glBegin/glEnd, not per-vertex. + * Load current vertex program's parameter registers with tracked + * matrices (if NV program). This only needs to be done per + * glBegin/glEnd, not per-vertex. */ -static void -load_program_parameters(GLcontext *ctx) +void +_mesa_load_tracked_matrices(GLcontext *ctx) { GLuint i; @@ -160,7 +162,7 @@ load_program_parameters(GLcontext *ctx) continue; } - /* load the matrix values into sequential registers */ + /* load the matrix values into sequential registers */ if (ctx->VertexProgram.TrackMatrixTransform[i] == GL_IDENTITY_NV) { load_matrix(ctx->VertexProgram.Parameters, i*4, mat->m); } @@ -206,7 +208,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) #endif if (ctx->VertexProgram.Current->IsNVProgram) { - load_program_parameters(ctx); + _mesa_load_tracked_matrices(ctx); } else { _mesa_load_state_parameters(ctx, program->Base.Parameters); diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h index 17cb30adc7..20bed5546d 100644 --- a/src/mesa/tnl/tnl.h +++ b/src/mesa/tnl/tnl.h @@ -82,4 +82,7 @@ _tnl_draw_prims( GLcontext *ctx, GLuint min_index, GLuint max_index); +extern void +_mesa_load_tracked_matrices(GLcontext *ctx); + #endif -- cgit v1.2.3 From 064ae479a770bf434958d673baf6f7530f642697 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 13:40:13 -0700 Subject: Update DRI drivers for new glsl compiler. Mostly: - update #includes - update STATE_* token code --- src/mesa/drivers/dri/i915/i915_context.c | 2 +- src/mesa/drivers/dri/i915/i915_fragprog.c | 6 +- src/mesa/drivers/dri/i915/i915_program.c | 12 ++-- src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/i915/i915_vtbl.c | 2 +- src/mesa/drivers/dri/i915tex/i915_context.c | 4 +- src/mesa/drivers/dri/i915tex/i915_fragprog.c | 6 +- src/mesa/drivers/dri/i915tex/i915_program.c | 12 ++-- src/mesa/drivers/dri/i915tex/i915_state.c | 2 +- src/mesa/drivers/dri/i965/brw_context.c | 2 +- src/mesa/drivers/dri/i965/brw_curbe.c | 3 +- src/mesa/drivers/dri/i965/brw_eu.h | 2 +- src/mesa/drivers/dri/i965/brw_metaops.c | 2 - src/mesa/drivers/dri/i965/brw_util.c | 32 +++++------ src/mesa/drivers/dri/i965/brw_vs.c | 3 +- src/mesa/drivers/dri/i965/brw_vs_constval.c | 4 +- src/mesa/drivers/dri/i965/brw_vs_emit.c | 5 +- src/mesa/drivers/dri/i965/brw_vs_tnl.c | 75 ++++++++++++------------- src/mesa/drivers/dri/i965/brw_wm.c | 4 -- src/mesa/drivers/dri/i965/brw_wm.h | 2 +- src/mesa/drivers/dri/i965/brw_wm_debug.c | 3 - src/mesa/drivers/dri/i965/brw_wm_emit.c | 4 +- src/mesa/drivers/dri/i965/brw_wm_fp.c | 34 +++++------ src/mesa/drivers/dri/i965/brw_wm_pass0.c | 4 +- src/mesa/drivers/dri/i965/brw_wm_pass1.c | 3 - src/mesa/drivers/dri/i965/brw_wm_pass2.c | 4 +- src/mesa/drivers/dri/mach64/mach64_native_vb.c | 20 +++---- src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 +- src/mesa/drivers/dri/nouveau/nouveau_shader.c | 5 +- src/mesa/drivers/dri/nouveau/nouveau_shader_0.c | 16 ++++-- src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 3 +- src/mesa/drivers/dri/r200/r200_vertprog.c | 10 ++-- src/mesa/drivers/dri/r300/r300_context.c | 2 +- src/mesa/drivers/dri/r300/r300_fragprog.c | 5 +- src/mesa/drivers/dri/r300/r300_fragprog.h | 5 +- src/mesa/drivers/dri/r300/r300_shader.c | 5 -- src/mesa/drivers/dri/r300/r300_state.c | 8 ++- src/mesa/drivers/dri/r300/r300_vertexprog.c | 13 +++-- src/mesa/drivers/dri/s3v/s3v_tritmp.h | 46 +++++++-------- src/mesa/drivers/dri/tdfx/tdfx_tris.c | 16 +++--- src/mesa/drivers/dri/trident/trident_context.h | 2 +- 41 files changed, 187 insertions(+), 205 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index e58c9498ce..4ab9d2686c 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -167,7 +167,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis, I915_MAX_TEX_INSN); ctx->Const.FragmentProgram.MaxNativeTexIndirections = I915_MAX_TEX_INDIRECT; ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* I don't think we have one */ - ctx->_MaintainTexEnvProgram = GL_TRUE; + ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; driInitExtensions( ctx, i915_extensions, GL_FALSE ); diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index ef14f3eef7..a28c8bb6fc 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -37,7 +37,8 @@ #include "i915_context.h" #include "i915_program.h" -#include "program_instruction.h" +#include "prog_instruction.h" +#include "prog_parameter.h" #include "program.h" #include "programopt.h" @@ -782,9 +783,6 @@ static void fixup_depth_write( struct i915_fragment_program *p ) } -#define FRAG_BIT_TEX(n) (FRAG_BIT_TEX0 << (n)) - - static void check_wpos( struct i915_fragment_program *p ) { GLuint inputs = p->FragProg.Base.InputsRead; diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 9c13290d11..6849112444 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -430,17 +430,17 @@ void i915_fini_program( struct i915_fragment_program *p ) if (p->error) { p->FragProg.Base.NumNativeInstructions = 0; - p->FragProg.NumNativeAluInstructions = 0; - p->FragProg.NumNativeTexInstructions = 0; - p->FragProg.NumNativeTexIndirections = 0; + p->FragProg.Base.NumNativeAluInstructions = 0; + p->FragProg.Base.NumNativeTexInstructions = 0; + p->FragProg.Base.NumNativeTexIndirections = 0; } else { p->FragProg.Base.NumNativeInstructions = (p->nr_alu_insn + p->nr_tex_insn + p->nr_decl_insn); - p->FragProg.NumNativeAluInstructions = p->nr_alu_insn; - p->FragProg.NumNativeTexInstructions = p->nr_tex_insn; - p->FragProg.NumNativeTexIndirections = p->nr_tex_indirect; + p->FragProg.Base.NumNativeAluInstructions = p->nr_alu_insn; + p->FragProg.Base.NumNativeTexInstructions = p->nr_tex_insn; + p->FragProg.Base.NumNativeTexIndirections = p->nr_tex_indirect; } p->declarations[0] |= program_size + decl_size - 2; diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index fd11e10652..5692289336 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -531,7 +531,7 @@ void i915_update_fog( GLcontext *ctx ) GLboolean enabled; GLboolean try_pixel_fog; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Enabled) { /* Pull in static fog state from program */ mode = ctx->FragmentProgram._Current->FogOption; diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 7924754c82..82a421b961 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -49,7 +49,7 @@ static void i915_render_start( intelContextPtr intel ) if (ctx->FragmentProgram._Current) i915ValidateFragmentProgram( i915 ); else { - assert(!ctx->_MaintainTexEnvProgram); + assert(!ctx->FragmentProgram._MaintainTexEnvProgram); i915ValidateTextureProgram( i915 ); } } diff --git a/src/mesa/drivers/dri/i915tex/i915_context.c b/src/mesa/drivers/dri/i915tex/i915_context.c index 9b4d72eab3..d4187238f3 100644 --- a/src/mesa/drivers/dri/i915tex/i915_context.c +++ b/src/mesa/drivers/dri/i915tex/i915_context.c @@ -157,8 +157,8 @@ i915CreateContext(const __GLcontextModes * mesaVis, I915_MAX_TEX_INDIRECT; ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* I don't think we have one */ - ctx->_MaintainTexEnvProgram = 1; - ctx->_UseTexEnvProgram = 1; + ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; + /*ctx->_UseTexEnvProgram = 1;*/ driInitExtensions(ctx, i915_extensions, GL_FALSE); diff --git a/src/mesa/drivers/dri/i915tex/i915_fragprog.c b/src/mesa/drivers/dri/i915tex/i915_fragprog.c index 8772e70230..cbea6092a8 100644 --- a/src/mesa/drivers/dri/i915tex/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915tex/i915_fragprog.c @@ -37,7 +37,8 @@ #include "i915_context.h" #include "i915_program.h" -#include "program_instruction.h" +#include "prog_instruction.h" +#include "prog_parameter.h" #include "program.h" #include "programopt.h" @@ -772,9 +773,6 @@ fixup_depth_write(struct i915_fragment_program *p) } -#define FRAG_BIT_TEX(n) (FRAG_BIT_TEX0 << (n)) - - static void check_wpos(struct i915_fragment_program *p) { diff --git a/src/mesa/drivers/dri/i915tex/i915_program.c b/src/mesa/drivers/dri/i915tex/i915_program.c index 0be89d3320..ed45e4f806 100644 --- a/src/mesa/drivers/dri/i915tex/i915_program.c +++ b/src/mesa/drivers/dri/i915tex/i915_program.c @@ -446,17 +446,17 @@ i915_fini_program(struct i915_fragment_program *p) if (p->error) { p->FragProg.Base.NumNativeInstructions = 0; - p->FragProg.NumNativeAluInstructions = 0; - p->FragProg.NumNativeTexInstructions = 0; - p->FragProg.NumNativeTexIndirections = 0; + p->FragProg.Base.NumNativeAluInstructions = 0; + p->FragProg.Base.NumNativeTexInstructions = 0; + p->FragProg.Base.NumNativeTexIndirections = 0; } else { p->FragProg.Base.NumNativeInstructions = (p->nr_alu_insn + p->nr_tex_insn + p->nr_decl_insn); - p->FragProg.NumNativeAluInstructions = p->nr_alu_insn; - p->FragProg.NumNativeTexInstructions = p->nr_tex_insn; - p->FragProg.NumNativeTexIndirections = p->nr_tex_indirect; + p->FragProg.Base.NumNativeAluInstructions = p->nr_alu_insn; + p->FragProg.Base.NumNativeTexInstructions = p->nr_tex_insn; + p->FragProg.Base.NumNativeTexIndirections = p->nr_tex_indirect; } p->declarations[0] |= program_size + decl_size - 2; diff --git a/src/mesa/drivers/dri/i915tex/i915_state.c b/src/mesa/drivers/dri/i915tex/i915_state.c index 78ae4bdb5f..4816afc934 100644 --- a/src/mesa/drivers/dri/i915tex/i915_state.c +++ b/src/mesa/drivers/dri/i915tex/i915_state.c @@ -561,7 +561,7 @@ i915_update_fog(GLcontext * ctx) GLboolean enabled; GLboolean try_pixel_fog; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Enabled) { /* Pull in static fog state from program */ mode = ctx->FragmentProgram._Current->FogOption; diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 6faee65542..397a9bd3f5 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -148,7 +148,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis, brw->emit_state_always = 0; - ctx->_MaintainTexEnvProgram = 1; + ctx->FragmentProgram._MaintainTexEnvProgram = 1; brw_draw_init( brw ); diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c index 4352c3bcb0..3f0aaa1f86 100644 --- a/src/mesa/drivers/dri/i965/brw_curbe.c +++ b/src/mesa/drivers/dri/i965/brw_curbe.c @@ -35,7 +35,8 @@ #include "context.h" #include "macros.h" #include "enums.h" -#include "shader/program.h" +#include "shader/prog_parameter.h" +#include "shader/prog_statevars.h" #include "intel_batchbuffer.h" #include "brw_context.h" #include "brw_defines.h" diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index d4dbcf38a7..52f89d577c 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -35,7 +35,7 @@ #include "brw_structs.h" #include "brw_defines.h" -#include "shader/program.h" +#include "shader/prog_instruction.h" #define BRW_SWIZZLE4(a,b,c,d) (((a)<<0) | ((b)<<2) | ((c)<<4) | ((d)<<6)) #define BRW_GET_SWZ(swz, idx) (((swz) >> ((idx)*2)) & 0x3) diff --git a/src/mesa/drivers/dri/i965/brw_metaops.c b/src/mesa/drivers/dri/i965/brw_metaops.c index 1579762b6d..6e030f191e 100644 --- a/src/mesa/drivers/dri/i965/brw_metaops.c +++ b/src/mesa/drivers/dri/i965/brw_metaops.c @@ -35,8 +35,6 @@ #include "glheader.h" #include "context.h" #include "macros.h" -#include "enums.h" -#include "dd.h" #include "shader/arbprogparse.h" diff --git a/src/mesa/drivers/dri/i965/brw_util.c b/src/mesa/drivers/dri/i965/brw_util.c index 9d12c26486..b6deee2376 100644 --- a/src/mesa/drivers/dri/i965/brw_util.c +++ b/src/mesa/drivers/dri/i965/brw_util.c @@ -30,9 +30,9 @@ */ -#include "brw_util.h" #include "mtypes.h" -#include "shader/program.h" +#include "shader/prog_parameter.h" +#include "brw_util.h" #include "brw_defines.h" GLuint brw_count_bits( GLuint val ) @@ -45,7 +45,7 @@ GLuint brw_count_bits( GLuint val ) } -static GLuint brw_parameter_state_flags(const enum state_index state[]) +static GLuint brw_parameter_state_flags(const gl_state_index state[]) { switch (state[0]) { case STATE_MATERIAL: @@ -70,22 +70,16 @@ static GLuint brw_parameter_state_flags(const enum state_index state[]) case STATE_POINT_ATTENUATION: return _NEW_POINT; - case STATE_MATRIX: - switch (state[1]) { - case STATE_MODELVIEW: - return _NEW_MODELVIEW; - case STATE_PROJECTION: - return _NEW_PROJECTION; - case STATE_MVP: - return _NEW_MODELVIEW | _NEW_PROJECTION; - case STATE_TEXTURE: - return _NEW_TEXTURE_MATRIX; - case STATE_PROGRAM: - return _NEW_TRACK_MATRIX; - default: - assert(0); - return 0; - } + case STATE_MODELVIEW_MATRIX: + return _NEW_MODELVIEW; + case STATE_PROJECTION_MATRIX: + return _NEW_PROJECTION; + case STATE_MVP_MATRIX: + return _NEW_MODELVIEW | _NEW_PROJECTION; + case STATE_TEXTURE_MATRIX: + return _NEW_TEXTURE_MATRIX; + case STATE_PROGRAM_MATRIX: + return _NEW_TRACK_MATRIX; case STATE_DEPTH_RANGE: return _NEW_VIEWPORT; diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 74c9d88e46..e173f6fce3 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -34,8 +34,7 @@ #include "brw_vs.h" #include "brw_util.h" #include "brw_state.h" -#include "program.h" -#include "shader/arbprogparse.h" +#include "shader/prog_print.h" diff --git a/src/mesa/drivers/dri/i965/brw_vs_constval.c b/src/mesa/drivers/dri/i965/brw_vs_constval.c index 528e164db8..caef042f1c 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_constval.c +++ b/src/mesa/drivers/dri/i965/brw_vs_constval.c @@ -30,10 +30,8 @@ */ -#include "brw_context.h" -#include "program.h" -#include "program_instruction.h" #include "macros.h" +#include "brw_context.h" #include "brw_vs.h" /* Component is active if it may diverge from [0,0,0,1]. Undef values diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index ffdb843e85..6eb11b19ad 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -30,10 +30,11 @@ */ -#include "brw_context.h" #include "program.h" -#include "program_instruction.h" #include "macros.h" +#include "shader/prog_parameter.h" +#include "shader/prog_print.h" +#include "brw_context.h" #include "brw_vs.h" diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c index 0d61092247..21e961ce9c 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c @@ -33,12 +33,11 @@ #include "glheader.h" #include "macros.h" #include "enums.h" +#include "shader/prog_parameter.h" +#include "shader/prog_print.h" #include "brw_vs.h" #include "brw_state.h" -#include "shader/program.h" -#include "shader/program_instruction.h" -#include "shader/arbprogparse.h" struct state_key { unsigned light_global_enabled:1; @@ -398,11 +397,14 @@ static struct ureg register_const4f( struct tnl_program *p, { GLfloat values[4]; GLint idx; + GLuint swizzle; values[0] = s0; values[1] = s1; values[2] = s2; values[3] = s3; - idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4 ); + idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4, + &swizzle); + /* XXX what about swizzle? */ return make_ureg(PROGRAM_STATE_VAR, idx); } @@ -424,40 +426,37 @@ static struct ureg get_identity_param( struct tnl_program *p ) return p->identity; } -static struct ureg register_param6( struct tnl_program *p, - GLint s0, - GLint s1, - GLint s2, - GLint s3, - GLint s4, - GLint s5) +static struct ureg register_param5( struct tnl_program *p, + GLint s0, + GLint s1, + GLint s2, + GLint s3, + GLint s4) { - GLint tokens[6]; + gl_state_index tokens[STATE_LENGTH]; GLint idx; tokens[0] = s0; tokens[1] = s1; tokens[2] = s2; tokens[3] = s3; tokens[4] = s4; - tokens[5] = s5; idx = _mesa_add_state_reference( p->program->Base.Parameters, tokens ); return make_ureg(PROGRAM_STATE_VAR, idx); } -#define register_param1(p,s0) register_param6(p,s0,0,0,0,0,0) -#define register_param2(p,s0,s1) register_param6(p,s0,s1,0,0,0,0) -#define register_param3(p,s0,s1,s2) register_param6(p,s0,s1,s2,0,0,0) -#define register_param4(p,s0,s1,s2,s3) register_param6(p,s0,s1,s2,s3,0,0) +#define register_param1(p,s0) register_param5(p,s0,0,0,0,0) +#define register_param2(p,s0,s1) register_param5(p,s0,s1,0,0,0) +#define register_param3(p,s0,s1,s2) register_param5(p,s0,s1,s2,0,0) +#define register_param4(p,s0,s1,s2,s3) register_param5(p,s0,s1,s2,s3,0) -static void register_matrix_param6( struct tnl_program *p, - GLint s0, - GLint s1, - GLint s2, - GLint s3, - GLint s4, - GLint s5, +static void register_matrix_param5( struct tnl_program *p, + GLint s0, /* matrix name */ + GLint s1, /* texture matrix number */ + GLint s2, /* first row */ + GLint s3, /* last row */ + GLint s4, /* modifier */ struct ureg *matrix ) { GLint i; @@ -465,8 +464,8 @@ static void register_matrix_param6( struct tnl_program *p, /* This is a bit sad as the support is there to pull the whole * matrix out in one go: */ - for (i = 0; i <= s4 - s3; i++) - matrix[i] = register_param6( p, s0, s1, s2, i, i, s5 ); + for (i = 0; i <= s3 - s2; i++) + matrix[i] = register_param5( p, s0, s1, i, i, s4 ); } @@ -650,13 +649,13 @@ static struct ureg get_eye_position( struct tnl_program *p ) p->eye_position = reserve_temp(p); if (PREFER_DP4) { - register_matrix_param6( p, STATE_MATRIX, STATE_MODELVIEW, 0, 0, 3, - STATE_MATRIX, modelview ); + register_matrix_param5( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, + 0, modelview ); emit_matrix_transform_vec4(p, p->eye_position, modelview, pos); } else { - register_matrix_param6( p, STATE_MATRIX, STATE_MODELVIEW, 0, 0, 3, + register_matrix_param5( p, STATE_MODELVIEW_MATRIX, 0, 0, 3, STATE_MATRIX_TRANSPOSE, modelview ); emit_transpose_matrix_transform_vec4(p, p->eye_position, modelview, pos); @@ -710,7 +709,7 @@ static struct ureg get_eye_normal( struct tnl_program *p ) struct ureg normal = register_input(p, VERT_ATTRIB_NORMAL ); struct ureg mvinv[3]; - register_matrix_param6( p, STATE_MATRIX, STATE_MODELVIEW, 0, 0, 2, + register_matrix_param5( p, STATE_MODELVIEW_MATRIX, 0, 0, 2, STATE_MATRIX_INVTRANS, mvinv ); p->eye_normal = reserve_temp(p); @@ -745,12 +744,12 @@ static void build_hpos( struct tnl_program *p ) struct ureg mvp[4]; if (PREFER_DP4) { - register_matrix_param6( p, STATE_MATRIX, STATE_MVP, 0, 0, 3, - STATE_MATRIX, mvp ); + register_matrix_param5( p, STATE_MVP_MATRIX, 0, 0, 3, + 0, mvp ); emit_matrix_transform_vec4( p, hpos, mvp, pos ); } else { - register_matrix_param6( p, STATE_MATRIX, STATE_MVP, 0, 0, 3, + register_matrix_param5( p, STATE_MVP_MATRIX, 0, 0, 3, STATE_MATRIX_TRANSPOSE, mvp ); emit_transpose_matrix_transform_vec4( p, hpos, mvp, pos ); } @@ -988,7 +987,7 @@ static void build_lighting( struct tnl_program *p ) */ VPpli = register_param3(p, STATE_LIGHT, i, STATE_POSITION_NORMALIZED); - half = register_param3(p, STATE_LIGHT, i, STATE_HALF); + half = register_param3(p, STATE_LIGHT, i, STATE_HALF_VECTOR); } else { struct ureg Ppli = register_param3(p, STATE_LIGHT, i, @@ -1356,13 +1355,13 @@ static void build_texture_transform( struct tnl_program *p ) out_texgen : register_input(p, VERT_ATTRIB_TEX0+i)); if (PREFER_DP4) { - register_matrix_param6( p, STATE_MATRIX, STATE_TEXTURE, i, - 0, 3, STATE_MATRIX, texmat ); + register_matrix_param5( p, STATE_TEXTURE_MATRIX, i, 0, 3, + 0, texmat ); emit_matrix_transform_vec4( p, out, texmat, in ); } else { - register_matrix_param6( p, STATE_MATRIX, STATE_TEXTURE, i, - 0, 3, STATE_MATRIX_TRANSPOSE, texmat ); + register_matrix_param5( p, STATE_TEXTURE_MATRIX, i, 0, 3, + STATE_MATRIX_TRANSPOSE, texmat ); emit_transpose_matrix_transform_vec4( p, out, texmat, in ); } } diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 0f842d289d..1497dc7968 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -36,10 +36,6 @@ #include "brw_state.h" #include "brw_hal.h" -#include "program.h" -#include "program_instruction.h" -#include "arbprogparse.h" - GLuint brw_wm_nr_args( GLuint opcode ) { diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h index ec6ad6105c..f5fddfdb68 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.h +++ b/src/mesa/drivers/dri/i965/brw_wm.h @@ -36,7 +36,7 @@ #include "brw_context.h" #include "brw_eu.h" -#include "program_instruction.h" +#include "prog_instruction.h" /* A big lookup table is used to figure out which and how many * additional regs will inserted before the main payload in the WM diff --git a/src/mesa/drivers/dri/i965/brw_wm_debug.c b/src/mesa/drivers/dri/i965/brw_wm_debug.c index 9a6154b333..f31d0974ec 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_debug.c +++ b/src/mesa/drivers/dri/i965/brw_wm_debug.c @@ -32,9 +32,6 @@ #include "brw_context.h" #include "brw_wm.h" -#include "program.h" -#include "shader/arbprogparse.h" -#include "shader/program_instruction.h" void brw_wm_print_value( struct brw_wm_compile *c, diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c index d96a9b717c..fd60515972 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_emit.c +++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c @@ -30,10 +30,8 @@ */ -#include "brw_context.h" -#include "program.h" -#include "program_instruction.h" #include "macros.h" +#include "brw_context.h" #include "brw_wm.h" #define SATURATE (1<<5) diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c index bb0aa35615..47ddcd0f05 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c @@ -37,9 +37,10 @@ #include "brw_wm.h" #include "brw_util.h" -#include "shader/program.h" -#include "shader/program_instruction.h" -#include "shader/arbprogparse.h" +#include "shader/prog_parameter.h" +#include "shader/prog_print.h" +#include "shader/prog_statevars.h" + #define FIRST_INTERNAL_TEMP MAX_NV_FRAGMENT_PROGRAM_TEMPS @@ -370,23 +371,21 @@ static void emit_interp( struct brw_wm_compile *c, * harm and it's not as if the parameter handling isn't a big hack * anyway. */ -static struct prog_src_register search_or_add_param6( struct brw_wm_compile *c, - GLint s0, - GLint s1, - GLint s2, - GLint s3, - GLint s4, - GLint s5) +static struct prog_src_register search_or_add_param5(struct brw_wm_compile *c, + GLint s0, + GLint s1, + GLint s2, + GLint s3, + GLint s4) { struct gl_program_parameter_list *paramList = c->fp->program.Base.Parameters; - GLint tokens[6]; + gl_state_index tokens[STATE_LENGTH]; GLuint idx; tokens[0] = s0; tokens[1] = s1; tokens[2] = s2; tokens[3] = s3; tokens[4] = s4; - tokens[5] = s5; for (idx = 0; idx < paramList->NumParameters; idx++) { if (paramList->Parameters[idx].Type == PROGRAM_STATE_VAR && @@ -413,6 +412,7 @@ static struct prog_src_register search_or_add_const4f( struct brw_wm_compile *c, struct gl_program_parameter_list *paramList = c->fp->program.Base.Parameters; GLfloat values[4]; GLuint idx; + GLuint swizzle; values[0] = s0; values[1] = s1; @@ -432,8 +432,8 @@ static struct prog_src_register search_or_add_const4f( struct brw_wm_compile *c, return src_reg(PROGRAM_STATE_VAR, idx); } - idx = _mesa_add_unnamed_constant( paramList, values, 4 ); - + idx = _mesa_add_unnamed_constant( paramList, values, 4, &swizzle ); + /* XXX what about swizzle? */ return src_reg(PROGRAM_STATE_VAR, idx); } @@ -527,11 +527,11 @@ static void precalc_tex( struct brw_wm_compile *c, if (inst->TexSrcTarget == TEXTURE_RECT_INDEX) { struct prog_src_register scale = - search_or_add_param6( c, + search_or_add_param5( c, STATE_INTERNAL, STATE_TEXRECT_SCALE, inst->TexSrcUnit, - 0,0,0 ); + 0,0 ); tmpcoord = get_temp(c); @@ -724,7 +724,7 @@ static void fog_blend( struct brw_wm_compile *c, struct prog_src_register fog_factor ) { struct prog_dst_register outcolor = dst_reg(PROGRAM_OUTPUT, FRAG_RESULT_COLR); - struct prog_src_register fogcolor = search_or_add_param6( c, STATE_FOG_COLOR, 0,0,0,0,0 ); + struct prog_src_register fogcolor = search_or_add_param5( c, STATE_FOG_COLOR, 0,0,0,0 ); /* color.xyz = LRP fog_factor.xxxx, output_color, fog_color */ diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass0.c b/src/mesa/drivers/dri/i965/brw_wm_pass0.c index 36b69b7068..00f6f6b9a4 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_pass0.c +++ b/src/mesa/drivers/dri/i965/brw_wm_pass0.c @@ -32,9 +32,7 @@ #include "brw_context.h" #include "brw_wm.h" -#include "program.h" -#include "arbprogparse.h" -#include "program_instruction.h" +#include "shader/prog_parameter.h" diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass1.c b/src/mesa/drivers/dri/i965/brw_wm_pass1.c index 21d0881d57..d668def700 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_pass1.c +++ b/src/mesa/drivers/dri/i965/brw_wm_pass1.c @@ -32,9 +32,6 @@ #include "brw_context.h" #include "brw_wm.h" -#include "program.h" -#include "arbprogparse.h" -#include "program_instruction.h" static GLuint get_tracked_mask(struct brw_wm_compile *c, diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass2.c b/src/mesa/drivers/dri/i965/brw_wm_pass2.c index cb8d51fb5c..a1edbd6168 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_pass2.c +++ b/src/mesa/drivers/dri/i965/brw_wm_pass2.c @@ -32,9 +32,7 @@ #include "brw_context.h" #include "brw_wm.h" -#include "program.h" -#include "arbprogparse.h" -#include "program_instruction.h" + /* Use these to force spilling so that that functionality can be * tested with known-good examples rather than having to construct new diff --git a/src/mesa/drivers/dri/mach64/mach64_native_vb.c b/src/mesa/drivers/dri/mach64/mach64_native_vb.c index 7872c206f5..519ec81e54 100644 --- a/src/mesa/drivers/dri/mach64/mach64_native_vb.c +++ b/src/mesa/drivers/dri/mach64/mach64_native_vb.c @@ -52,14 +52,14 @@ void TAG(translate_vertex)(GLcontext *ctx, { float rhw = 1.0 / LE32_IN_FLOAT( p + 2 ); - dst->texcoord[1][0] = rhw*LE32_IN_FLOAT( p++ ); - dst->texcoord[1][1] = rhw*LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX1][0] = rhw*LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX1][1] = rhw*LE32_IN_FLOAT( p++ ); } #else - dst->texcoord[1][0] = LE32_IN_FLOAT( p++ ); - dst->texcoord[1][1] = LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX1][0] = LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX1][1] = LE32_IN_FLOAT( p++ ); #endif - dst->texcoord[1][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX1][3] = 1.0; p++; case TEX0_VERTEX_FORMAT: @@ -67,14 +67,14 @@ void TAG(translate_vertex)(GLcontext *ctx, { float rhw = 1.0 / LE32_IN_FLOAT( p + 2 ); - dst->texcoord[0][0] = rhw*LE32_IN_FLOAT( p++ ); - dst->texcoord[0][1] = rhw*LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX0][0] = rhw*LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX0][1] = rhw*LE32_IN_FLOAT( p++ ); } #else - dst->texcoord[0][0] = LE32_IN_FLOAT( p++ ); - dst->texcoord[0][1] = LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX0][0] = LE32_IN_FLOAT( p++ ); + dst->attrib[FRAG_ATTRIB_TEX0][1] = LE32_IN_FLOAT( p++ ); #endif - dst->texcoord[0][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX0][3] = 1.0; dst->win[3] = LE32_IN_FLOAT( p++ ); case NOTEX_VERTEX_FORMAT: diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index f811dc1b72..6f1b57d74e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -195,7 +195,7 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, nouveauShaderInitFuncs(ctx); /* Install Mesa's fixed-function texenv shader support */ if (nmesa->screen->card->type >= NV_40) - ctx->_MaintainTexEnvProgram = GL_TRUE; + ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; /* Initialize the swrast */ _swrast_CreateContext( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index ba471325aa..bee8d5a935 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -35,9 +35,10 @@ #include "enums.h" #include "extensions.h" -#include "program.h" +#include "shader/program.h" +#include "shader/prog_instruction.h" +/*#include "shader/arbprogparse.h"*/ #include "tnl/tnl.h" -#include "shader/arbprogparse.h" #include "nouveau_context.h" #include "nouveau_shader.h" diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c index 73c1f7c2a5..abba59dc0c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c @@ -34,9 +34,10 @@ #include "macros.h" #include "enums.h" -#include "program.h" -#include "programopt.h" -#include "program_instruction.h" +#include "shader/prog_instruction.h" +#include "shader/prog_parameter.h" +#include "shader/prog_statevars.h" +#include "shader/programopt.h" #include "nouveau_context.h" #include "nouveau_shader.h" @@ -411,8 +412,10 @@ pass0_fixup_swizzle(nvsPtr nvs, nvsFragmentHeader *parent, int fpos, if (!rec->swzconst_done) { struct gl_program *prog = &nvs->mesa.vp.Base; + GLuint swizzle; rec->swzconst_id = _mesa_add_unnamed_constant(prog->Parameters, - sc, 4); + sc, 4, &swizzle); + /* XXX what about swizzle? */ rec->swzconst_done = 1; COPY_4V(nvs->params[rec->swzconst_id].val, sc); } @@ -818,7 +821,8 @@ pass0_vp_insert_ff_clip_planes(GLcontext *ctx, nouveauShader *nvs) nvsInstruction *nvsinst; GLuint fpos = 0; nvsRegister opos, epos, eqn, mv[4]; - GLint tokens[6] = { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 }; + gl_state_index tokens[STATE_LENGTH] + = { STATE_MODELVIEW_MATRIX, 0, 0, 0, 0 }; GLint id; int i; @@ -826,7 +830,7 @@ pass0_vp_insert_ff_clip_planes(GLcontext *ctx, nouveauShader *nvs) pass0_make_reg(nvs, &opos, NVS_FILE_ATTRIB, NVS_FR_POSITION); pass0_make_reg(nvs, &epos, NVS_FILE_TEMP , -1); for (i=0; i<4; i++) { - tokens[3] = tokens[4] = i; + tokens[2] = tokens[3] = i; id = _mesa_add_state_reference(prog->Parameters, tokens); pass0_make_reg(nvs, &mv[i], NVS_FILE_CONST, id); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c index b043f877e4..6eb9de4776 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c @@ -34,7 +34,8 @@ #include "macros.h" #include "enums.h" -#include "program.h" +#include "shader/prog_parameter.h" +#include "shader/prog_print.h" #include "nouveau_context.h" #include "nouveau_shader.h" diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index 4960d481d5..6089d617c6 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -34,14 +34,16 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "macros.h" #include "enums.h" #include "program.h" +#include "shader/prog_instruction.h" +#include "shader/prog_parameter.h" +#include "shader/prog_statevars.h" +#include "shader/programopt.h" +#include "tnl/tnl.h" #include "r200_context.h" #include "r200_vertprog.h" #include "r200_ioctl.h" #include "r200_tcl.h" -#include "program_instruction.h" -#include "programopt.h" -#include "tnl/tnl.h" #if SWIZZLE_X != VSF_IN_COMPONENT_X || \ SWIZZLE_Y != VSF_IN_COMPONENT_Y || \ @@ -462,7 +464,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte base e isn't directly available neither. */ if ((mesa_vp->Base.OutputsWritten & (1 << VERT_RESULT_FOGC)) && !vp->fogpidx) { struct gl_program_parameter_list *paramList; - GLint tokens[6] = { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 }; + gl_state_index tokens[STATE_LENGTH] = { STATE_FOG_PARAMS, 0, 0, 0, 0 }; paramList = mesa_vp->Base.Parameters; vp->fogpidx = _mesa_add_state_reference(paramList, tokens); } diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index d10a9d87d3..8aaf50b6d8 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -334,7 +334,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual, ctx->Const.FragmentProgram.MaxNativeTexIndirections = PFS_MAX_TEX_INDIRECT; ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* and these are?? */ _tnl_ProgramCacheInit(ctx); - ctx->_MaintainTexEnvProgram = GL_TRUE; + ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; driInitExtensions(ctx, card_extensions, GL_TRUE); diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 8e45bd5403..9330ec5b95 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -43,9 +43,10 @@ #include "glheader.h" #include "macros.h" #include "enums.h" +#include "shader/prog_instruction.h" +#include "shader/prog_parameter.h" +#include "shader/prog_print.h" -#include "program.h" -#include "program_instruction.h" #include "r300_context.h" #include "r300_fragprog.h" #include "r300_reg.h" diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.h b/src/mesa/drivers/dri/r300/r300_fragprog.h index 73986abc3c..d883aee2d7 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.h +++ b/src/mesa/drivers/dri/r300/r300_fragprog.h @@ -36,10 +36,11 @@ #include "glheader.h" #include "macros.h" #include "enums.h" +#include "shader/program.h" +#include "shader/prog_instruction.h" -#include "program.h" #include "r300_context.h" -#include "program_instruction.h" + #if 0 /* representation of a register for emit_arith/swizzle */ diff --git a/src/mesa/drivers/dri/r300/r300_shader.c b/src/mesa/drivers/dri/r300/r300_shader.c index 26721e8dfd..e8bce93458 100644 --- a/src/mesa/drivers/dri/r300/r300_shader.c +++ b/src/mesa/drivers/dri/r300/r300_shader.c @@ -10,11 +10,6 @@ static void r300BindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog) { - - r300ContextPtr rmesa = R300_CONTEXT(ctx); - struct r300_vertex_program_cont *vp=(void *)prog; - - switch(target){ case GL_VERTEX_PROGRAM_ARB: //rmesa->curr_vp = (struct gl_vertex_program *)vp; diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 906dfceb48..62bbc96544 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -46,6 +46,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "api_arrayelt.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" +#include "shader/prog_parameter.h" +#include "shader/prog_statevars.h" #include "vbo/vbo.h" #include "tnl/tnl.h" #include "texformat.h" @@ -1055,8 +1057,10 @@ r300UpdateDrawBuffer(GLcontext *ctx) #endif } -static void r300FetchStateParameter(GLcontext *ctx, const enum state_index state[], - GLfloat *value) +static void +r300FetchStateParameter(GLcontext *ctx, + const gl_state_index state[STATE_LENGTH], + GLfloat *value) { r300ContextPtr r300 = R300_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index 2ff92e1328..cc8e0775f8 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -33,11 +33,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "macros.h" #include "enums.h" #include "program.h" -#include "nvvertexec.h" +#include "shader/prog_instruction.h" +#include "shader/prog_parameter.h" +#include "shader/prog_statevars.h" +#include "tnl/tnl.h" #include "r300_context.h" #include "r300_program.h" -#include "program_instruction.h" #if SWIZZLE_X != VSF_IN_COMPONENT_X || \ SWIZZLE_Y != VSF_IN_COMPONENT_Y || \ @@ -103,7 +105,7 @@ int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program_cont * struct gl_program_parameter_list *paramList; if (mesa_vp->IsNVProgram) { - _mesa_init_vp_per_primitive_registers(ctx); + _mesa_load_tracked_matrices(ctx); for (pi=0; pi < MAX_NV_VERTEX_PROGRAM_PARAMS; pi++) { *dst++=ctx->VertexProgram.Parameters[pi][0]; @@ -880,7 +882,7 @@ static void position_invariant(struct gl_program *prog) struct gl_program_parameter_list *paramList; int i; - GLint tokens[6] = { STATE_MATRIX, STATE_MVP, 0, 0, 0, STATE_MATRIX }; + gl_state_index tokens[STATE_LENGTH] = { STATE_MVP_MATRIX, 0, 0, 0, 0 }; #ifdef PREFER_DP4 tokens[5] = STATE_MATRIX; @@ -963,7 +965,8 @@ static void insert_wpos(struct r300_vertex_program *vp, GLuint temp_index) { - GLint tokens[6] = { STATE_INTERNAL, STATE_R300_WINDOW_DIMENSION, 0, 0, 0, 0 }; + gl_state_index tokens[STATE_LENGTH] + = { STATE_INTERNAL, STATE_R300_WINDOW_DIMENSION, 0, 0, 0 }; struct prog_instruction *vpi; struct prog_instruction *vpi_insert; GLuint window_index; diff --git a/src/mesa/drivers/dri/s3v/s3v_tritmp.h b/src/mesa/drivers/dri/s3v/s3v_tritmp.h index 16318f4c40..696fc02250 100644 --- a/src/mesa/drivers/dri/s3v/s3v_tritmp.h +++ b/src/mesa/drivers/dri/s3v/s3v_tritmp.h @@ -407,17 +407,17 @@ do { \ ctx->Texture.Unit[0]._Current->DriverData); \ deltwx = deltwy = wstart = deltdx = deltdy = dstart = 0; \ \ - u0 = (v[idx[0]].texcoord[0][0] \ + u0 = (v[idx[0]].attrib[FRAG_ATTRIB_TEX0][0] \ * (GLfloat)(t->image[0].image->Width) * 256.0); \ - u1 = (v[idx[1]].texcoord[0][0] \ + u1 = (v[idx[1]].attrib[FRAG_ATTRIB_TEX0][0] \ * (GLfloat)(t->globj->Image[0][0]->Width) * 256.0); \ - u2 = (v[idx[2]].texcoord[0][0] \ + u2 = (v[idx[2]].attrib[FRAG_ATTRIB_TEX0][0] \ * (GLfloat)(t->globj->Image[0][0]->Width) * 256.0); \ - v0 = (v[idx[0]].texcoord[0][1] \ + v0 = (v[idx[0]].attrib[FRAG_ATTRIB_TEX0][1] \ * (GLfloat)(t->globj->Image[0][0]->Height) * 256.0); \ - v1 = (v[idx[1]].texcoord[0][1] \ + v1 = (v[idx[1]].attrib[FRAG_ATTRIB_TEX0][1] \ * (GLfloat)(t->globj->Image[0][0]->Height) * 256.0); \ - v2 = (v[idx[2]].texcoord[0][1] \ + v2 = (v[idx[2]].attrib[FRAG_ATTRIB_TEX0][1] \ * (GLfloat)(t->globj->Image[0][0]->Height) * 256.0); \ \ w0 = (v[idx[0]].win[3]); \ @@ -485,23 +485,23 @@ do { \ GLfloat sxy, suv; \ int lev; \ \ - suv = (v[idx[0]].texcoord[0][0] - \ - v[idx[2]].texcoord[0][0]) * \ - (v[idx[1]].texcoord[0][1] - \ - v[idx[2]].texcoord[0][1]) - \ - (v[idx[1]].texcoord[0][0] - \ - v[idx[2]].texcoord[0][0]) * \ - (v[idx[0]].texcoord[0][1] - \ - v[idx[2]].texcoord[0][2]); \ -\ - sxy = (v[idx[0]].texcoord[0][0] - \ - v[idx[2]].texcoord[0][0]) * \ - (v[idx[1]].texcoord[0][1] - \ - v[idx[2]].texcoord[0][1]) - \ - (v[idx[1]].texcoord[0][0] - \ - v[idx[2]].texcoord[0][0]) * \ - (v[idx[0]].texcoord[0][1] - \ - v[idx[2]].texcoord[0][2]); \ + suv = (v[idx[0]].attrib[FRAG_ATTRIB_TEX0][0] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][0]) * \ + (v[idx[1]].attrib[FRAG_ATTRIB_TEX0][1] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][1]) - \ + (v[idx[1]].attrib[FRAG_ATTRIB_TEX0][0] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][0]) * \ + (v[idx[0]].attrib[FRAG_ATTRIB_TEX0][1] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][2]); \ +\ + sxy = (v[idx[0]].attrib[FRAG_ATTRIB_TEX0][0] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][0]) * \ + (v[idx[1]].attrib[FRAG_ATTRIB_TEX0][1] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][1]) - \ + (v[idx[1]].attrib[FRAG_ATTRIB_TEX0][0] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][0]) * \ + (v[idx[0]].attrib[FRAG_ATTRIB_TEX0][1] - \ + v[idx[2]].attrib[FRAG_ATTRIB_TEX0][2]); \ \ if (sxy < 0) sxy *= -1.0; \ if (suv < 0) suv *= -1.0; \ diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tris.c b/src/mesa/drivers/dri/tdfx/tdfx_tris.c index ac8daf4749..4ba2f40b9e 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_tris.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_tris.c @@ -165,21 +165,21 @@ tdfx_translate_vertex( GLcontext *ctx, const tdfxVertex *src, SWvertex *dst) dst->color[2] = src->color[0]; dst->color[3] = src->color[3]; - dst->texcoord[0][0] = 1.0 / fxMesa->sScale0 * w * src->tu0; - dst->texcoord[0][1] = 1.0 / fxMesa->tScale0 * w * src->tv0; + dst->attrib[FRAG_ATTRIB_TEX0][0] = 1.0 / fxMesa->sScale0 * w * src->tu0; + dst->attrib[FRAG_ATTRIB_TEX0][1] = 1.0 / fxMesa->tScale0 * w * src->tv0; if (fxMesa->vertexFormat == TDFX_LAYOUT_PROJ1 || fxMesa->vertexFormat == TDFX_LAYOUT_PROJ2) { - dst->texcoord[0][3] = w * src->tq0; + dst->attrib[FRAG_ATTRIB_TEX0][3] = w * src->tq0; } else { - dst->texcoord[0][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX0][3] = 1.0; } if (fxMesa->SetupIndex & TDFX_TEX1_BIT) { - dst->texcoord[1][0] = 1.0 / fxMesa->sScale1 * w * src->tu1; - dst->texcoord[1][1] = 1.0 / fxMesa->tScale1 * w * src->tv1; + dst->attrib[FRAG_ATTRIB_TEX1][0] = 1.0 / fxMesa->sScale1 * w * src->tu1; + dst->attrib[FRAG_ATTRIB_TEX1][1] = 1.0 / fxMesa->tScale1 * w * src->tv1; if (fxMesa->vertexFormat == TDFX_LAYOUT_PROJ2) { - dst->texcoord[1][3] = w * src->tq1; + dst->attrib[FRAG_ATTRIB_TEX1][3] = w * src->tq1; } else { - dst->texcoord[1][3] = 1.0; + dst->attrib[FRAG_ATTRIB_TEX1][3] = 1.0; } } } diff --git a/src/mesa/drivers/dri/trident/trident_context.h b/src/mesa/drivers/dri/trident/trident_context.h index b1e68b0166..1d3ca84400 100644 --- a/src/mesa/drivers/dri/trident/trident_context.h +++ b/src/mesa/drivers/dri/trident/trident_context.h @@ -179,7 +179,7 @@ struct trident_context { GLuint vertex_format; GLuint vertex_size; GLuint vertex_stride_shift; - char *verts; + GLubyte *verts; GLint tmu_source[2]; -- cgit v1.2.3 From 6df328e84d270ad0e6e2fab9a884313f0e780aa1 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 16:48:07 -0700 Subject: don't pass program ptr to fetch_vector[14]() --- src/mesa/shader/prog_execute.c | 166 ++++++++++++++++++++--------------------- 1 file changed, 82 insertions(+), 84 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index f466cc7aff..d75a55b95b 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -161,7 +161,6 @@ static void fetch_vector4( GLcontext *ctx, const struct prog_src_register *source, const struct gl_program_machine *machine, - const struct gl_program *program, GLfloat result[4] ) { const GLfloat *src = get_register_pointer(ctx, source, machine); @@ -323,7 +322,6 @@ static void fetch_vector1( GLcontext *ctx, const struct prog_src_register *source, const struct gl_program_machine *machine, - const struct gl_program *program, GLfloat result[4] ) { const GLfloat *src = get_register_pointer(ctx, source, machine); @@ -644,7 +642,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_ABS: { GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); result[0] = FABSF(a[0]); result[1] = FABSF(a[1]); result[2] = FABSF(a[2]); @@ -655,8 +653,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_ADD: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = a[0] + b[0]; result[1] = a[1] + b[1]; result[2] = a[2] + b[2]; @@ -705,9 +703,9 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_CMP: { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); result[0] = a[0] < 0.0F ? b[0] : c[0]; result[1] = a[1] < 0.0F ? b[1] : c[1]; result[2] = a[2] < 0.0F ? b[2] : c[2]; @@ -718,7 +716,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_COS: { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = result[3] = (GLfloat) _mesa_cos(a[0]); store_vector4( inst, machine, result ); @@ -782,8 +780,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_DP3: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = result[1] = result[2] = result[3] = DOT3(a, b); store_vector4( inst, machine, result ); if (DEBUG_PROG) { @@ -795,8 +793,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_DP4: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = result[1] = result[2] = result[3] = DOT4(a,b); store_vector4( inst, machine, result ); if (DEBUG_PROG) { @@ -809,8 +807,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_DPH: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = result[1] = result[2] = result[3] = a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; store_vector4( inst, machine, result ); @@ -819,8 +817,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_DST: /* Distance vector */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = 1.0F; result[1] = a[1] * b[1]; result[2] = a[2]; @@ -831,7 +829,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_EX2: /* Exponential base 2 */ { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = result[3] = (GLfloat) _mesa_pow(2.0, a[0]); store_vector4( inst, machine, result ); @@ -840,7 +838,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_FLR: { GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); result[0] = FLOORF(a[0]); result[1] = FLOORF(a[1]); result[2] = FLOORF(a[2]); @@ -851,7 +849,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_FRC: { GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); result[0] = a[0] - FLOORF(a[0]); result[1] = a[1] - FLOORF(a[1]); result[2] = a[2] - FLOORF(a[2]); @@ -880,7 +878,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_INT: /* float to int */ { GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); result[0] = (GLfloat) (GLint) a[0]; result[1] = (GLfloat) (GLint) a[1]; result[2] = (GLfloat) (GLint) a[2]; @@ -896,7 +894,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_KIL: /* ARB_f_p only */ { GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { return GL_FALSE; } @@ -905,7 +903,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_LG2: /* log base 2 */ { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); store_vector4( inst, machine, result ); } @@ -914,7 +912,7 @@ _mesa_execute_program(GLcontext *ctx, { const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); a[0] = MAX2(a[0], 0.0F); a[1] = MAX2(a[1], 0.0F); /* XXX ARB version clamps a[3], NV version doesn't */ @@ -943,9 +941,9 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_LRP: { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; @@ -964,9 +962,9 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_MAD: { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); result[0] = a[0] * b[0] + c[0]; result[1] = a[1] * b[1] + c[1]; result[2] = a[2] * b[2] + c[2]; @@ -985,8 +983,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_MAX: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = MAX2(a[0], b[0]); result[1] = MAX2(a[1], b[1]); result[2] = MAX2(a[2], b[2]); @@ -1003,8 +1001,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_MIN: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = MIN2(a[0], b[0]); result[1] = MIN2(a[1], b[1]); result[2] = MIN2(a[2], b[2]); @@ -1015,7 +1013,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_MOV: { GLfloat result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, result ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, result ); store_vector4( inst, machine, result ); if (DEBUG_PROG) { printf("MOV (%g %g %g %g)\n", @@ -1026,8 +1024,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_MUL: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = a[0] * b[0]; result[1] = a[1] * b[1]; result[2] = a[2] * b[2]; @@ -1044,7 +1042,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_NOISE1: { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = @@ -1055,7 +1053,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_NOISE2: { GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = @@ -1066,7 +1064,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_NOISE3: { GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = @@ -1077,7 +1075,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_NOISE4: { GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = @@ -1093,7 +1091,7 @@ _mesa_execute_program(GLcontext *ctx, GLhalfNV hx, hy; GLuint *rawResult = (GLuint *) result; GLuint twoHalves; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); hx = _mesa_float_to_half(a[0]); hy = _mesa_float_to_half(a[1]); twoHalves = hx | (hy << 16); @@ -1106,7 +1104,7 @@ _mesa_execute_program(GLcontext *ctx, { GLfloat a[4], result[4]; GLuint usx, usy, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); a[0] = CLAMP(a[0], 0.0F, 1.0F); a[1] = CLAMP(a[1], 0.0F, 1.0F); usx = IROUND(a[0] * 65535.0F); @@ -1120,7 +1118,7 @@ _mesa_execute_program(GLcontext *ctx, { GLfloat a[4], result[4]; GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); @@ -1138,7 +1136,7 @@ _mesa_execute_program(GLcontext *ctx, { GLfloat a[4], result[4]; GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); a[0] = CLAMP(a[0], 0.0F, 1.0F); a[1] = CLAMP(a[1], 0.0F, 1.0F); a[2] = CLAMP(a[2], 0.0F, 1.0F); @@ -1155,8 +1153,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_POW: { GLfloat a[4], b[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector1( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector1( ctx, &inst->SrcReg[1], machine, b ); result[0] = result[1] = result[2] = result[3] = (GLfloat)_mesa_pow(a[0], b[0]); store_vector4( inst, machine, result ); @@ -1165,7 +1163,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_RCP: { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); if (DEBUG_PROG) { if (a[0] == 0) printf("RCP(0)\n"); @@ -1187,8 +1185,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_RFL: /* reflection vector */ { GLfloat axis[4], dir[4], result[4], tmpX, tmpW; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, axis ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dir ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, axis ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, dir ); tmpW = DOT3(axis, axis); tmpX = (2.0F * DOT3(axis, dir)) / tmpW; result[0] = tmpX * axis[0] - dir[0]; @@ -1201,7 +1199,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_RSQ: /* 1 / sqrt() */ { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); a[0] = FABSF(a[0]); result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); store_vector4( inst, machine, result ); @@ -1213,7 +1211,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SCS: /* sine and cos */ { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = (GLfloat) _mesa_cos(a[0]); result[1] = (GLfloat) _mesa_sin(a[0]); result[2] = 0.0; /* undefined! */ @@ -1224,8 +1222,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SEQ: /* set on equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; @@ -1242,8 +1240,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SGE: /* set on greater or equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; @@ -1254,8 +1252,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SGT: /* set on greater */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; @@ -1270,7 +1268,7 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SIN: { GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = result[1] = result[2] = result[3] = (GLfloat) _mesa_sin(a[0]); store_vector4( inst, machine, result ); @@ -1279,8 +1277,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SLE: /* set on less or equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; @@ -1291,8 +1289,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SLT: /* set on less */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; @@ -1303,8 +1301,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SNE: /* set on not equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; @@ -1321,8 +1319,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_SUB: { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = a[0] - b[0]; result[1] = a[1] - b[1]; result[2] = a[2] - b[2]; @@ -1377,7 +1375,7 @@ _mesa_execute_program(GLcontext *ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); + fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); machine->FetchTexelLod(ctx, coord, lambda, inst->TexSrcUnit, color); if (DEBUG_PROG) { printf("TEX (%g, %g, %g, %g) = texture[%d][%g, %g, %g, %g], " @@ -1402,7 +1400,7 @@ _mesa_execute_program(GLcontext *ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, coord); + fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); /* coord[3] is the bias to add to lambda */ bias = texUnit->LodBias + coord[3]; if (texUnit->_Current) @@ -1416,9 +1414,9 @@ _mesa_execute_program(GLcontext *ctx, /* Texture lookup w/ partial derivatives for LOD */ { GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, texcoord ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, dtdx ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, dtdy ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, texcoord ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, dtdx ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, dtdy ); machine->FetchTexelDeriv(ctx, texcoord, dtdx, dtdy, inst->TexSrcUnit, color ); store_vector4( inst, machine, color ); @@ -1435,7 +1433,7 @@ _mesa_execute_program(GLcontext *ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); + fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); /* Not so sure about this test - if texcoord[3] is * zero, we'd probably be fine except for an ASSERT in * IROUND_POS() which gets triggered by the inf values created. @@ -1461,7 +1459,7 @@ _mesa_execute_program(GLcontext *ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, program,texcoord); + fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && texcoord[3] != 0.0) { texcoord[0] /= texcoord[3]; @@ -1478,7 +1476,7 @@ _mesa_execute_program(GLcontext *ctx, GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; GLhalfNV hx, hy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); hx = rawBits[0] & 0xffff; hy = rawBits[0] >> 16; result[0] = result[2] = _mesa_half_to_float(hx); @@ -1491,7 +1489,7 @@ _mesa_execute_program(GLcontext *ctx, GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; GLushort usx, usy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); usx = rawBits[0] & 0xffff; usy = rawBits[0] >> 16; result[0] = result[2] = usx * (1.0f / 65535.0f); @@ -1503,7 +1501,7 @@ _mesa_execute_program(GLcontext *ctx, { GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; @@ -1515,7 +1513,7 @@ _mesa_execute_program(GLcontext *ctx, { GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, program, a ); + fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; @@ -1526,8 +1524,8 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_XPD: /* cross product */ { GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); result[0] = a[1] * b[2] - a[2] * b[1]; result[1] = a[2] * b[0] - a[0] * b[2]; result[2] = a[0] * b[1] - a[1] * b[0]; @@ -1538,9 +1536,9 @@ _mesa_execute_program(GLcontext *ctx, case OPCODE_X2D: /* 2-D matrix transform */ { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, program, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, program, c ); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); + fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); + fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; @@ -1552,7 +1550,7 @@ _mesa_execute_program(GLcontext *ctx, { if (inst->SrcReg[0].File != -1) { GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); + fetch_vector4( ctx, &inst->SrcReg[0], machine, a); _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, a[0], a[1], a[2], a[3]); } -- cgit v1.2.3 From e80d901d9854b7c24a71fcd5a3377c33f408c8c0 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 16:53:24 -0700 Subject: reindent --- src/mesa/shader/prog_execute.c | 1852 ++++++++++++++++++++-------------------- 1 file changed, 924 insertions(+), 928 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index d75a55b95b..82c578f983 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -73,7 +73,7 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file, } else { COPY_4V(val, - CurrentMachine->Attribs[index][CurrentMachine->CurElement]); + CurrentMachine->Attribs[index][CurrentMachine->CurElement]); } break; case PROGRAM_OUTPUT: @@ -97,9 +97,9 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file, * source register. */ static INLINE const GLfloat * -get_register_pointer( GLcontext *ctx, - const struct prog_src_register *source, - const struct gl_program_machine *machine) +get_register_pointer(GLcontext * ctx, + const struct prog_src_register *source, + const struct gl_program_machine *machine) { /* XXX relative addressing... */ switch (source->File) { @@ -158,10 +158,9 @@ get_register_pointer( GLcontext *ctx, * Apply swizzling and negating as needed. */ static void -fetch_vector4( GLcontext *ctx, - const struct prog_src_register *source, - const struct gl_program_machine *machine, - GLfloat result[4] ) +fetch_vector4(GLcontext * ctx, + const struct prog_src_register *source, + const struct gl_program_machine *machine, GLfloat result[4]) { const GLfloat *src = get_register_pointer(ctx, source, machine); ASSERT(src); @@ -208,10 +207,10 @@ fetch_vector4( GLcontext *ctx, * need to execute another instance of the program (ugh)! */ static GLboolean -fetch_vector4_deriv( GLcontext *ctx, - const struct prog_src_register *source, - const SWspan *span, - char xOrY, GLint column, GLfloat result[4] ) +fetch_vector4_deriv(GLcontext * ctx, + const struct prog_src_register *source, + const SWspan * span, + char xOrY, GLint column, GLfloat result[4]) { GLfloat src[4]; @@ -223,14 +222,14 @@ fetch_vector4_deriv( GLcontext *ctx, src[0] = 1.0; src[1] = 0.0; src[2] = span->attrStepX[FRAG_ATTRIB_WPOS][2] - / ctx->DrawBuffer->_DepthMaxF; + / ctx->DrawBuffer->_DepthMaxF; src[3] = span->attrStepX[FRAG_ATTRIB_WPOS][3]; } else { src[0] = 0.0; src[1] = 1.0; src[2] = span->attrStepY[FRAG_ATTRIB_WPOS][2] - / ctx->DrawBuffer->_DepthMaxF; + / ctx->DrawBuffer->_DepthMaxF; src[3] = span->attrStepY[FRAG_ATTRIB_WPOS][3]; } break; @@ -269,7 +268,9 @@ fetch_vector4_deriv( GLcontext *ctx, if (xOrY == 'X') { /* this is a little tricky - I think I've got it right */ const GLfloat invQ = 1.0f / (span->attrStart[source->Index][3] - + span->attrStepX[source->Index][3] * column); + + + span->attrStepX[source->Index][3] * + column); src[0] = span->attrStepX[source->Index][0] * invQ; src[1] = span->attrStepX[source->Index][1] * invQ; src[2] = span->attrStepX[source->Index][2] * invQ; @@ -319,10 +320,9 @@ fetch_vector4_deriv( GLcontext *ctx, * As above, but only return result[0] element. */ static void -fetch_vector1( GLcontext *ctx, - const struct prog_src_register *source, - const struct gl_program_machine *machine, - GLfloat result[4] ) +fetch_vector1(GLcontext * ctx, + const struct prog_src_register *source, + const struct gl_program_machine *machine, GLfloat result[4]) { const GLfloat *src = get_register_pointer(ctx, source, machine); ASSERT(src); @@ -345,10 +345,10 @@ fetch_vector1( GLcontext *ctx, * Test value against zero and return GT, LT, EQ or UN if NaN. */ static INLINE GLuint -generate_cc( float value ) +generate_cc(float value) { if (value != value) - return COND_UN; /* NaN */ + return COND_UN; /* NaN */ if (value > 0.0F) return COND_GT; if (value < 0.0F) @@ -406,9 +406,8 @@ eval_condition(const struct gl_program_machine *machine, * set-condition-code flags. */ static void -store_vector4( const struct prog_instruction *inst, - struct gl_program_machine *machine, - const GLfloat value[4] ) +store_vector4(const struct prog_instruction *inst, + struct gl_program_machine *machine, const GLfloat value[4]) { const struct prog_dst_register *dest = &(inst->DstReg); const GLboolean clamp = inst->SaturateMode == SATURATE_ZERO_ONE; @@ -418,26 +417,25 @@ store_vector4( const struct prog_instruction *inst, GLuint writeMask = dest->WriteMask; switch (dest->File) { - case PROGRAM_OUTPUT: - dstReg = machine->Outputs[dest->Index]; - break; - case PROGRAM_TEMPORARY: - dstReg = machine->Temporaries[dest->Index]; - break; - case PROGRAM_WRITE_ONLY: - dstReg = dummyReg; - return; - default: - _mesa_problem(NULL, "bad register file in store_vector4(fp)"); - return; + case PROGRAM_OUTPUT: + dstReg = machine->Outputs[dest->Index]; + break; + case PROGRAM_TEMPORARY: + dstReg = machine->Temporaries[dest->Index]; + break; + case PROGRAM_WRITE_ONLY: + dstReg = dummyReg; + return; + default: + _mesa_problem(NULL, "bad register file in store_vector4(fp)"); + return; } #if 0 if (value[0] > 1.0e10 || IS_INF_OR_NAN(value[0]) || IS_INF_OR_NAN(value[1]) || - IS_INF_OR_NAN(value[2]) || - IS_INF_OR_NAN(value[3]) ) + IS_INF_OR_NAN(value[2]) || IS_INF_OR_NAN(value[3])) printf("store %g %g %g %g\n", value[0], value[1], value[2], value[3]); #endif @@ -502,11 +500,11 @@ store_vector4( const struct prog_instruction *inst, * Used to implement DDX and DDY instructions in non-trivial cases. */ static void -init_machine_deriv( GLcontext *ctx, - const struct gl_program_machine *machine, - const struct gl_fragment_program *program, - const SWspan *span, char xOrY, - struct gl_program_machine *dMachine ) +init_machine_deriv(GLcontext * ctx, + const struct gl_program_machine *machine, + const struct gl_fragment_program *program, + const SWspan * span, char xOrY, + struct gl_program_machine *dMachine) { GLuint attr; @@ -518,8 +516,8 @@ init_machine_deriv( GLcontext *ctx, if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { /* XXX also need to do this when using valgrind */ /* Clear temporary registers (undefined for ARB_f_p) */ - _mesa_bzero( (void*) machine->Temporaries, - MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + _mesa_bzero((void *) machine->Temporaries, + MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); } /* Add derivatives */ @@ -605,7 +603,7 @@ init_machine_deriv( GLcontext *ctx, * \return GL_TRUE if program completed or GL_FALSE if program executed KIL. */ GLboolean -_mesa_execute_program(GLcontext *ctx, +_mesa_execute_program(GLcontext * ctx, const struct gl_program *program, GLuint maxInst, struct gl_program_machine *machine, GLuint element) { @@ -639,941 +637,939 @@ _mesa_execute_program(GLcontext *ctx, } switch (inst->Opcode) { - case OPCODE_ABS: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - result[0] = FABSF(a[0]); - result[1] = FABSF(a[1]); - result[2] = FABSF(a[2]); - result[3] = FABSF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_ADD: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = a[0] + b[0]; - result[1] = a[1] + b[1]; - result[2] = a[2] + b[2]; - result[3] = a[3] + b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("ADD (%g %g %g %g) = (%g %g %g %g) + (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_BGNLOOP: - /* no-op */ - break; - case OPCODE_ENDLOOP: - /* subtract 1 here since pc is incremented by for(pc) loop */ - pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ - break; - case OPCODE_BGNSUB: /* begin subroutine */ - break; - case OPCODE_ENDSUB: /* end subroutine */ - break; - case OPCODE_BRA: /* branch (conditional) */ - /* fall-through */ - case OPCODE_BRK: /* break out of loop (conditional) */ - /* fall-through */ - case OPCODE_CONT: /* continue loop (conditional) */ - if (eval_condition(machine, inst)) { - /* take branch */ - /* Subtract 1 here since we'll do pc++ at end of for-loop */ - pc = inst->BranchTarget - 1; - } - break; - case OPCODE_CAL: /* Call subroutine (conditional) */ - if (eval_condition(machine, inst)) { - /* call the subroutine */ - if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - machine->CallStack[machine->StackDepth++] = pc + 1; - pc = inst->BranchTarget; /* XXX - 1 ??? */ - } - break; - case OPCODE_CMP: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); - result[0] = a[0] < 0.0F ? b[0] : c[0]; - result[1] = a[1] < 0.0F ? b[1] : c[1]; - result[2] = a[2] < 0.0F ? b[2] : c[2]; - result[3] = a[3] < 0.0F ? b[3] : c[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_COS: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat) _mesa_cos(a[0]); - store_vector4( inst, machine, result ); + case OPCODE_ABS: + { + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + result[0] = FABSF(a[0]); + result[1] = FABSF(a[1]); + result[2] = FABSF(a[2]); + result[3] = FABSF(a[3]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_ADD: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = a[0] + b[0]; + result[1] = a[1] + b[1]; + result[2] = a[2] + b[2]; + result[3] = a[3] + b[3]; + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("ADD (%g %g %g %g) = (%g %g %g %g) + (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); } - break; - case OPCODE_DDX: /* Partial derivative with respect to X */ - { + } + break; + case OPCODE_BGNLOOP: + /* no-op */ + break; + case OPCODE_ENDLOOP: + /* subtract 1 here since pc is incremented by for(pc) loop */ + pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ + break; + case OPCODE_BGNSUB: /* begin subroutine */ + break; + case OPCODE_ENDSUB: /* end subroutine */ + break; + case OPCODE_BRA: /* branch (conditional) */ + /* fall-through */ + case OPCODE_BRK: /* break out of loop (conditional) */ + /* fall-through */ + case OPCODE_CONT: /* continue loop (conditional) */ + if (eval_condition(machine, inst)) { + /* take branch */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; + } + break; + case OPCODE_CAL: /* Call subroutine (conditional) */ + if (eval_condition(machine, inst)) { + /* call the subroutine */ + if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ + } + machine->CallStack[machine->StackDepth++] = pc + 1; + pc = inst->BranchTarget; /* XXX - 1 ??? */ + } + break; + case OPCODE_CMP: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + result[0] = a[0] < 0.0F ? b[0] : c[0]; + result[1] = a[1] < 0.0F ? b[1] : c[1]; + result[2] = a[2] < 0.0F ? b[2] : c[2]; + result[3] = a[3] < 0.0F ? b[3] : c[3]; + store_vector4(inst, machine, result); + } + break; + case OPCODE_COS: + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_cos(a[0]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_DDX: /* Partial derivative with respect to X */ + { #if 0 - GLfloat a[4], aNext[4], result[4]; - struct gl_program_machine dMachine; - if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'X', - column, result)) { - /* This is tricky. Make a copy of the current machine state, - * increment the input registers by the dx or dy partial - * derivatives, then re-execute the program up to the - * preceeding instruction, then fetch the source register. - * Finally, find the difference in the register values for - * the original and derivative runs. - */ - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - init_machine_deriv(ctx, machine, program, span, - 'X', &dMachine); - execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); - result[0] = aNext[0] - a[0]; - result[1] = aNext[1] - a[1]; - result[2] = aNext[2] - a[2]; - result[3] = aNext[3] - a[3]; - } - store_vector4( inst, machine, result ); + GLfloat a[4], aNext[4], result[4]; + struct gl_program_machine dMachine; + if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'X', + column, result)) { + /* This is tricky. Make a copy of the current machine state, + * increment the input registers by the dx or dy partial + * derivatives, then re-execute the program up to the + * preceeding instruction, then fetch the source register. + * Finally, find the difference in the register values for + * the original and derivative runs. + */ + fetch_vector4(ctx, &inst->SrcReg[0], machine, program, a); + init_machine_deriv(ctx, machine, program, span, + 'X', &dMachine); + execute_program(ctx, program, pc, &dMachine, span, column); + fetch_vector4(ctx, &inst->SrcReg[0], &dMachine, program, + aNext); + result[0] = aNext[0] - a[0]; + result[1] = aNext[1] - a[1]; + result[2] = aNext[2] - a[2]; + result[3] = aNext[3] - a[3]; + } + store_vector4(inst, machine, result); #else - static const GLfloat result[4] = { 0, 0, 0, 0 }; - store_vector4( inst, machine, result ); + static const GLfloat result[4] = { 0, 0, 0, 0 }; + store_vector4(inst, machine, result); #endif - } - break; - case OPCODE_DDY: /* Partial derivative with respect to Y */ - { + } + break; + case OPCODE_DDY: /* Partial derivative with respect to Y */ + { #if 0 - GLfloat a[4], aNext[4], result[4]; - struct gl_program_machine dMachine; - if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'Y', - column, result)) { - init_machine_deriv(ctx, machine, program, span, - 'Y', &dMachine); - fetch_vector4( ctx, &inst->SrcReg[0], machine, program, a); - execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4( ctx, &inst->SrcReg[0], &dMachine, program, aNext ); - result[0] = aNext[0] - a[0]; - result[1] = aNext[1] - a[1]; - result[2] = aNext[2] - a[2]; - result[3] = aNext[3] - a[3]; - } - store_vector4( inst, machine, result ); + GLfloat a[4], aNext[4], result[4]; + struct gl_program_machine dMachine; + if (!fetch_vector4_deriv(ctx, &inst->SrcReg[0], span, 'Y', + column, result)) { + init_machine_deriv(ctx, machine, program, span, + 'Y', &dMachine); + fetch_vector4(ctx, &inst->SrcReg[0], machine, program, a); + execute_program(ctx, program, pc, &dMachine, span, column); + fetch_vector4(ctx, &inst->SrcReg[0], &dMachine, program, + aNext); + result[0] = aNext[0] - a[0]; + result[1] = aNext[1] - a[1]; + result[2] = aNext[2] - a[2]; + result[3] = aNext[3] - a[3]; + } + store_vector4(inst, machine, result); #else - static const GLfloat result[4] = { 0, 0, 0, 0 }; - store_vector4( inst, machine, result ); + static const GLfloat result[4] = { 0, 0, 0, 0 }; + store_vector4(inst, machine, result); #endif + } + break; + case OPCODE_DP3: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = result[1] = result[2] = result[3] = DOT3(a, b); + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("DP3 %g = (%g %g %g) . (%g %g %g)\n", + result[0], a[0], a[1], a[2], b[0], b[1], b[2]); } - break; - case OPCODE_DP3: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = result[1] = result[2] = result[3] = DOT3(a, b); - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("DP3 %g = (%g %g %g) . (%g %g %g)\n", - result[0], a[0], a[1], a[2], b[0], b[1], b[2]); - } - } - break; - case OPCODE_DP4: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = result[1] = result[2] = result[3] = DOT4(a,b); - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("DP4 %g = (%g, %g %g %g) . (%g, %g %g %g)\n", - result[0], a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } - } - break; - case OPCODE_DPH: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = result[1] = result[2] = result[3] = - a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_DST: /* Distance vector */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = 1.0F; - result[1] = a[1] * b[1]; - result[2] = a[2]; - result[3] = b[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_EX2: /* Exponential base 2 */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = result[1] = result[2] = result[3] = - (GLfloat) _mesa_pow(2.0, a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_FLR: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - result[0] = FLOORF(a[0]); - result[1] = FLOORF(a[1]); - result[2] = FLOORF(a[2]); - result[3] = FLOORF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_FRC: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - result[0] = a[0] - FLOORF(a[0]); - result[1] = a[1] - FLOORF(a[1]); - result[2] = a[2] - FLOORF(a[2]); - result[3] = a[3] - FLOORF(a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_IF: - if (eval_condition(machine, inst)) { - /* do if-clause (just continue execution) */ - } - else { - /* go to the instruction after ELSE or ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; + } + break; + case OPCODE_DP4: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = result[1] = result[2] = result[3] = DOT4(a, b); + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("DP4 %g = (%g, %g %g %g) . (%g, %g %g %g)\n", + result[0], a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); } - break; - case OPCODE_ELSE: - /* goto ENDIF */ + } + break; + case OPCODE_DPH: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = result[1] = result[2] = result[3] = + a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; + store_vector4(inst, machine, result); + } + break; + case OPCODE_DST: /* Distance vector */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = 1.0F; + result[1] = a[1] * b[1]; + result[2] = a[2]; + result[3] = b[3]; + store_vector4(inst, machine, result); + } + break; + case OPCODE_EX2: /* Exponential base 2 */ + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = result[2] = result[3] = + (GLfloat) _mesa_pow(2.0, a[0]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_FLR: + { + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + result[0] = FLOORF(a[0]); + result[1] = FLOORF(a[1]); + result[2] = FLOORF(a[2]); + result[3] = FLOORF(a[3]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_FRC: + { + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + result[0] = a[0] - FLOORF(a[0]); + result[1] = a[1] - FLOORF(a[1]); + result[2] = a[2] - FLOORF(a[2]); + result[3] = a[3] - FLOORF(a[3]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_IF: + if (eval_condition(machine, inst)) { + /* do if-clause (just continue execution) */ + } + else { + /* go to the instruction after ELSE or ENDIF */ assert(inst->BranchTarget >= 0); pc = inst->BranchTarget - 1; - break; - case OPCODE_ENDIF: - /* nothing */ - break; - case OPCODE_INT: /* float to int */ - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - result[0] = (GLfloat) (GLint) a[0]; - result[1] = (GLfloat) (GLint) a[1]; - result[2] = (GLfloat) (GLint) a[2]; - result[3] = (GLfloat) (GLint) a[3]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_KIL_NV: /* NV_f_p only (conditional) */ - if (eval_condition(machine, inst)) { + } + break; + case OPCODE_ELSE: + /* goto ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + break; + case OPCODE_ENDIF: + /* nothing */ + break; + case OPCODE_INT: /* float to int */ + { + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + result[0] = (GLfloat) (GLint) a[0]; + result[1] = (GLfloat) (GLint) a[1]; + result[2] = (GLfloat) (GLint) a[2]; + result[3] = (GLfloat) (GLint) a[3]; + store_vector4(inst, machine, result); + } + break; + case OPCODE_KIL_NV: /* NV_f_p only (conditional) */ + if (eval_condition(machine, inst)) { + return GL_FALSE; + } + break; + case OPCODE_KIL: /* ARB_f_p only */ + { + GLfloat a[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { return GL_FALSE; } - break; - case OPCODE_KIL: /* ARB_f_p only */ - { - GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { - return GL_FALSE; - } - } - break; - case OPCODE_LG2: /* log base 2 */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); - store_vector4( inst, machine, result ); + } + break; + case OPCODE_LG2: /* log base 2 */ + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_LIT: + { + const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + a[0] = MAX2(a[0], 0.0F); + a[1] = MAX2(a[1], 0.0F); + /* XXX ARB version clamps a[3], NV version doesn't */ + a[3] = CLAMP(a[3], -(128.0F - epsilon), (128.0F - epsilon)); + result[0] = 1.0F; + result[1] = a[0]; + /* XXX we could probably just use pow() here */ + if (a[0] > 0.0F) { + if (a[1] == 0.0 && a[3] == 0.0) + result[2] = 1.0; + else + result[2] = EXPF(a[3] * LOGF(a[1])); } - break; - case OPCODE_LIT: - { - const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - a[0] = MAX2(a[0], 0.0F); - a[1] = MAX2(a[1], 0.0F); - /* XXX ARB version clamps a[3], NV version doesn't */ - a[3] = CLAMP(a[3], -(128.0F - epsilon), (128.0F - epsilon)); - result[0] = 1.0F; - result[1] = a[0]; - /* XXX we could probably just use pow() here */ - if (a[0] > 0.0F) { - if (a[1] == 0.0 && a[3] == 0.0) - result[2] = 1.0; - else - result[2] = EXPF(a[3] * LOGF(a[1])); - } - else { - result[2] = 0.0; - } - result[3] = 1.0F; - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("LIT (%g %g %g %g) : (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3]); - } + else { + result[2] = 0.0; } - break; - case OPCODE_LRP: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); - result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; - result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; - result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; - result[3] = a[3] * b[3] + (1.0F - a[3]) * c[3]; - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("LRP (%g %g %g %g) = (%g %g %g %g), " - "(%g %g %g %g), (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3], - c[0], c[1], c[2], c[3]); - } + result[3] = 1.0F; + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("LIT (%g %g %g %g) : (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3]); } - break; - case OPCODE_MAD: - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); - result[0] = a[0] * b[0] + c[0]; - result[1] = a[1] * b[1] + c[1]; - result[2] = a[2] * b[2] + c[2]; - result[3] = a[3] * b[3] + c[3]; - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("MAD (%g %g %g %g) = (%g %g %g %g) * " - "(%g %g %g %g) + (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3], - c[0], c[1], c[2], c[3]); - } + } + break; + case OPCODE_LRP: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; + result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; + result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; + result[3] = a[3] * b[3] + (1.0F - a[3]) * c[3]; + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("LRP (%g %g %g %g) = (%g %g %g %g), " + "(%g %g %g %g), (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3], c[0], c[1], c[2], c[3]); } - break; - case OPCODE_MAX: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = MAX2(a[0], b[0]); - result[1] = MAX2(a[1], b[1]); - result[2] = MAX2(a[2], b[2]); - result[3] = MAX2(a[3], b[3]); - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("MAX (%g %g %g %g) = (%g %g %g %g), (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } + } + break; + case OPCODE_MAD: + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + result[0] = a[0] * b[0] + c[0]; + result[1] = a[1] * b[1] + c[1]; + result[2] = a[2] * b[2] + c[2]; + result[3] = a[3] * b[3] + c[3]; + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("MAD (%g %g %g %g) = (%g %g %g %g) * " + "(%g %g %g %g) + (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3], c[0], c[1], c[2], c[3]); } - break; - case OPCODE_MIN: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = MIN2(a[0], b[0]); - result[1] = MIN2(a[1], b[1]); - result[2] = MIN2(a[2], b[2]); - result[3] = MIN2(a[3], b[3]); - store_vector4( inst, machine, result ); + } + break; + case OPCODE_MAX: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = MAX2(a[0], b[0]); + result[1] = MAX2(a[1], b[1]); + result[2] = MAX2(a[2], b[2]); + result[3] = MAX2(a[3], b[3]); + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("MAX (%g %g %g %g) = (%g %g %g %g), (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); } - break; - case OPCODE_MOV: - { - GLfloat result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, result ); - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("MOV (%g %g %g %g)\n", - result[0], result[1], result[2], result[3]); - } + } + break; + case OPCODE_MIN: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = MIN2(a[0], b[0]); + result[1] = MIN2(a[1], b[1]); + result[2] = MIN2(a[2], b[2]); + result[3] = MIN2(a[3], b[3]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_MOV: + { + GLfloat result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, result); + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("MOV (%g %g %g %g)\n", + result[0], result[1], result[2], result[3]); } - break; - case OPCODE_MUL: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = a[0] * b[0]; - result[1] = a[1] * b[1]; - result[2] = a[2] * b[2]; - result[3] = a[3] * b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("MUL (%g %g %g %g) = (%g %g %g %g) * (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], - b[0], b[1], b[2], b[3]); - } + } + break; + case OPCODE_MUL: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = a[0] * b[0]; + result[1] = a[1] * b[1]; + result[2] = a[2] * b[2]; + result[3] = a[3] * b[3]; + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("MUL (%g %g %g %g) = (%g %g %g %g) * (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); } - break; - case OPCODE_NOISE1: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = + } + break; + case OPCODE_NOISE1: + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = - result[2] = - result[3] = _slang_library_noise1(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOISE2: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - result[0] = + result[2] = result[3] = _slang_library_noise1(a[0]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_NOISE2: + { + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = - result[2] = - result[3] = _slang_library_noise2(a[0], a[1]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOISE3: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - result[0] = + result[2] = result[3] = _slang_library_noise2(a[0], a[1]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_NOISE3: + { + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = result[2] = result[3] = _slang_library_noise3(a[0], a[1], a[2]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOISE4: - { - GLfloat a[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - result[0] = + store_vector4(inst, machine, result); + } + break; + case OPCODE_NOISE4: + { + GLfloat a[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = result[2] = result[3] = _slang_library_noise4(a[0], a[1], a[2], a[3]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_NOP: - break; - case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ - { - GLfloat a[4], result[4]; - GLhalfNV hx, hy; - GLuint *rawResult = (GLuint *) result; - GLuint twoHalves; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - hx = _mesa_float_to_half(a[0]); - hy = _mesa_float_to_half(a[1]); - twoHalves = hx | (hy << 16); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = twoHalves; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK2US: /* pack two GLushorts into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint usx, usy, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - a[0] = CLAMP(a[0], 0.0F, 1.0F); - a[1] = CLAMP(a[1], 0.0F, 1.0F); - usx = IROUND(a[0] * 65535.0F); - usy = IROUND(a[1] * 65535.0F); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = usx | (usy << 16); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK4B: /* pack four GLbytes into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); - a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); - a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); - a[3] = CLAMP(a[3], -128.0F / 127.0F, 1.0F); - ubx = IROUND(127.0F * a[0] + 128.0F); - uby = IROUND(127.0F * a[1] + 128.0F); - ubz = IROUND(127.0F * a[2] + 128.0F); - ubw = IROUND(127.0F * a[3] + 128.0F); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_PK4UB: /* pack four GLubytes into one 32-bit float */ - { - GLfloat a[4], result[4]; - GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - a[0] = CLAMP(a[0], 0.0F, 1.0F); - a[1] = CLAMP(a[1], 0.0F, 1.0F); - a[2] = CLAMP(a[2], 0.0F, 1.0F); - a[3] = CLAMP(a[3], 0.0F, 1.0F); - ubx = IROUND(255.0F * a[0]); - uby = IROUND(255.0F * a[1]); - ubz = IROUND(255.0F * a[2]); - ubw = IROUND(255.0F * a[3]); - rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] - = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_POW: - { - GLfloat a[4], b[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector1( ctx, &inst->SrcReg[1], machine, b ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat)_mesa_pow(a[0], b[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RCP: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - if (DEBUG_PROG) { - if (a[0] == 0) - printf("RCP(0)\n"); - else if (IS_INF_OR_NAN(a[0])) - printf("RCP(inf)\n"); - } - result[0] = result[1] = result[2] = result[3] = 1.0F / a[0]; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RET: /* return from subroutine (conditional) */ - if (eval_condition(machine, inst)) { - if (machine->StackDepth == 0) { - return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ - } - pc = machine->CallStack[--machine->StackDepth]; - } - break; - case OPCODE_RFL: /* reflection vector */ - { - GLfloat axis[4], dir[4], result[4], tmpX, tmpW; - fetch_vector4( ctx, &inst->SrcReg[0], machine, axis ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, dir ); - tmpW = DOT3(axis, axis); - tmpX = (2.0F * DOT3(axis, dir)) / tmpW; - result[0] = tmpX * axis[0] - dir[0]; - result[1] = tmpX * axis[1] - dir[1]; - result[2] = tmpX * axis[2] - dir[2]; - /* result[3] is never written! XXX enforce in parser! */ - store_vector4( inst, machine, result ); - } - break; - case OPCODE_RSQ: /* 1 / sqrt() */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - a[0] = FABSF(a[0]); - result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("RSQ %g = 1/sqrt(|%g|)\n", result[0], a[0]); - } - } - break; - case OPCODE_SCS: /* sine and cos */ - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = (GLfloat) _mesa_cos(a[0]); - result[1] = (GLfloat) _mesa_sin(a[0]); - result[2] = 0.0; /* undefined! */ - result[3] = 0.0; /* undefined! */ - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SEQ: /* set on equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] == b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SFL: /* set false, operands ignored */ - { - static const GLfloat result[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SGE: /* set on greater or equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] >= b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SGT: /* set on greater */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("SGT %g %g %g %g\n", - result[0], result[1], result[2], result[3]); - } - } - break; - case OPCODE_SIN: - { - GLfloat a[4], result[4]; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = result[1] = result[2] = result[3] - = (GLfloat) _mesa_sin(a[0]); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SLE: /* set on less or equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] <= b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_SLT: /* set on less */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] < b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); + store_vector4(inst, machine, result); + } + break; + case OPCODE_NOP: + break; + case OPCODE_PK2H: /* pack two 16-bit floats in one 32-bit float */ + { + GLfloat a[4], result[4]; + GLhalfNV hx, hy; + GLuint *rawResult = (GLuint *) result; + GLuint twoHalves; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + hx = _mesa_float_to_half(a[0]); + hy = _mesa_float_to_half(a[1]); + twoHalves = hx | (hy << 16); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = twoHalves; + store_vector4(inst, machine, result); + } + break; + case OPCODE_PK2US: /* pack two GLushorts into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint usx, usy, *rawResult = (GLuint *) result; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + a[0] = CLAMP(a[0], 0.0F, 1.0F); + a[1] = CLAMP(a[1], 0.0F, 1.0F); + usx = IROUND(a[0] * 65535.0F); + usy = IROUND(a[1] * 65535.0F); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = usx | (usy << 16); + store_vector4(inst, machine, result); + } + break; + case OPCODE_PK4B: /* pack four GLbytes into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); + a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); + a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); + a[3] = CLAMP(a[3], -128.0F / 127.0F, 1.0F); + ubx = IROUND(127.0F * a[0] + 128.0F); + uby = IROUND(127.0F * a[1] + 128.0F); + ubz = IROUND(127.0F * a[2] + 128.0F); + ubw = IROUND(127.0F * a[3] + 128.0F); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); + store_vector4(inst, machine, result); + } + break; + case OPCODE_PK4UB: /* pack four GLubytes into one 32-bit float */ + { + GLfloat a[4], result[4]; + GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + a[0] = CLAMP(a[0], 0.0F, 1.0F); + a[1] = CLAMP(a[1], 0.0F, 1.0F); + a[2] = CLAMP(a[2], 0.0F, 1.0F); + a[3] = CLAMP(a[3], 0.0F, 1.0F); + ubx = IROUND(255.0F * a[0]); + uby = IROUND(255.0F * a[1]); + ubz = IROUND(255.0F * a[2]); + ubw = IROUND(255.0F * a[3]); + rawResult[0] = rawResult[1] = rawResult[2] = rawResult[3] + = ubx | (uby << 8) | (ubz << 16) | (ubw << 24); + store_vector4(inst, machine, result); + } + break; + case OPCODE_POW: + { + GLfloat a[4], b[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(ctx, &inst->SrcReg[1], machine, b); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_pow(a[0], b[0]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_RCP: + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + if (DEBUG_PROG) { + if (a[0] == 0) + printf("RCP(0)\n"); + else if (IS_INF_OR_NAN(a[0])) + printf("RCP(inf)\n"); + } + result[0] = result[1] = result[2] = result[3] = 1.0F / a[0]; + store_vector4(inst, machine, result); + } + break; + case OPCODE_RET: /* return from subroutine (conditional) */ + if (eval_condition(machine, inst)) { + if (machine->StackDepth == 0) { + return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ } - break; - case OPCODE_SNE: /* set on not equal */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; - result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; - result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; - result[3] = (a[3] != b[3]) ? 1.0F : 0.0F; - store_vector4( inst, machine, result ); + pc = machine->CallStack[--machine->StackDepth]; + } + break; + case OPCODE_RFL: /* reflection vector */ + { + GLfloat axis[4], dir[4], result[4], tmpX, tmpW; + fetch_vector4(ctx, &inst->SrcReg[0], machine, axis); + fetch_vector4(ctx, &inst->SrcReg[1], machine, dir); + tmpW = DOT3(axis, axis); + tmpX = (2.0F * DOT3(axis, dir)) / tmpW; + result[0] = tmpX * axis[0] - dir[0]; + result[1] = tmpX * axis[1] - dir[1]; + result[2] = tmpX * axis[2] - dir[2]; + /* result[3] is never written! XXX enforce in parser! */ + store_vector4(inst, machine, result); + } + break; + case OPCODE_RSQ: /* 1 / sqrt() */ + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + a[0] = FABSF(a[0]); + result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("RSQ %g = 1/sqrt(|%g|)\n", result[0], a[0]); } - break; - case OPCODE_STR: /* set true, operands ignored */ - { - static const GLfloat result[4] = { 1.0F, 1.0F, 1.0F, 1.0F }; - store_vector4( inst, machine, result ); + } + break; + case OPCODE_SCS: /* sine and cos */ + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = (GLfloat) _mesa_cos(a[0]); + result[1] = (GLfloat) _mesa_sin(a[0]); + result[2] = 0.0; /* undefined! */ + result[3] = 0.0; /* undefined! */ + store_vector4(inst, machine, result); + } + break; + case OPCODE_SEQ: /* set on equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] == b[3]) ? 1.0F : 0.0F; + store_vector4(inst, machine, result); + } + break; + case OPCODE_SFL: /* set false, operands ignored */ + { + static const GLfloat result[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; + store_vector4(inst, machine, result); + } + break; + case OPCODE_SGE: /* set on greater or equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] >= b[3]) ? 1.0F : 0.0F; + store_vector4(inst, machine, result); + } + break; + case OPCODE_SGT: /* set on greater */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("SGT %g %g %g %g\n", + result[0], result[1], result[2], result[3]); } - break; - case OPCODE_SUB: - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = a[0] - b[0]; - result[1] = a[1] - b[1]; - result[2] = a[2] - b[2]; - result[3] = a[3] - b[3]; - store_vector4( inst, machine, result ); - if (DEBUG_PROG) { - printf("SUB (%g %g %g %g) = (%g %g %g %g) - (%g %g %g %g)\n", - result[0], result[1], result[2], result[3], - a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); - } + } + break; + case OPCODE_SIN: + { + GLfloat a[4], result[4]; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = result[1] = result[2] = result[3] + = (GLfloat) _mesa_sin(a[0]); + store_vector4(inst, machine, result); + } + break; + case OPCODE_SLE: /* set on less or equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] <= b[3]) ? 1.0F : 0.0F; + store_vector4(inst, machine, result); + } + break; + case OPCODE_SLT: /* set on less */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] < b[3]) ? 1.0F : 0.0F; + store_vector4(inst, machine, result); + } + break; + case OPCODE_SNE: /* set on not equal */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; + result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; + result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; + result[3] = (a[3] != b[3]) ? 1.0F : 0.0F; + store_vector4(inst, machine, result); + } + break; + case OPCODE_STR: /* set true, operands ignored */ + { + static const GLfloat result[4] = { 1.0F, 1.0F, 1.0F, 1.0F }; + store_vector4(inst, machine, result); + } + break; + case OPCODE_SUB: + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = a[0] - b[0]; + result[1] = a[1] - b[1]; + result[2] = a[2] - b[2]; + result[3] = a[3] - b[3]; + store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("SUB (%g %g %g %g) = (%g %g %g %g) - (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]); } - break; - case OPCODE_SWZ: /* extended swizzle */ - { - const struct prog_src_register *source = &inst->SrcReg[0]; - const GLfloat *src = get_register_pointer(ctx, source, machine); - GLfloat result[4]; - GLuint i; - for (i = 0; i < 4; i++) { - const GLuint swz = GET_SWZ(source->Swizzle, i); - if (swz == SWIZZLE_ZERO) - result[i] = 0.0; - else if (swz == SWIZZLE_ONE) - result[i] = 1.0; - else { - ASSERT(swz >= 0); - ASSERT(swz <= 3); - result[i] = src[swz]; - } - if (source->NegateBase & (1 << i)) - result[i] = -result[i]; + } + break; + case OPCODE_SWZ: /* extended swizzle */ + { + const struct prog_src_register *source = &inst->SrcReg[0]; + const GLfloat *src = get_register_pointer(ctx, source, machine); + GLfloat result[4]; + GLuint i; + for (i = 0; i < 4; i++) { + const GLuint swz = GET_SWZ(source->Swizzle, i); + if (swz == SWIZZLE_ZERO) + result[i] = 0.0; + else if (swz == SWIZZLE_ONE) + result[i] = 1.0; + else { + ASSERT(swz >= 0); + ASSERT(swz <= 3); + result[i] = src[swz]; } - store_vector4( inst, machine, result ); + if (source->NegateBase & (1 << i)) + result[i] = -result[i]; } - break; - case OPCODE_TEX: /* Both ARB and NV frag prog */ - /* Texel lookup */ - { - /* Note: only use the precomputed lambda value when we're - * sampling texture unit [K] with texcoord[K]. - * Otherwise, the lambda value may have no relation to the - * instruction's texcoord or texture image. Using the wrong - * lambda is usually bad news. - * The rest of the time, just use zero (until we get a more - * sophisticated way of computing lambda). - */ - GLfloat coord[4], color[4], lambda; + store_vector4(inst, machine, result); + } + break; + case OPCODE_TEX: /* Both ARB and NV frag prog */ + /* Texel lookup */ + { + /* Note: only use the precomputed lambda value when we're + * sampling texture unit [K] with texcoord[K]. + * Otherwise, the lambda value may have no relation to the + * instruction's texcoord or texture image. Using the wrong + * lambda is usually bad news. + * The rest of the time, just use zero (until we get a more + * sophisticated way of computing lambda). + */ + GLfloat coord[4], color[4], lambda; #if 0 - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0 + inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else #endif - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); - machine->FetchTexelLod(ctx, coord, lambda, inst->TexSrcUnit, color); - if (DEBUG_PROG) { - printf("TEX (%g, %g, %g, %g) = texture[%d][%g, %g, %g, %g], " - "lod %f\n", - color[0], color[1], color[2], color[3], - inst->TexSrcUnit, - coord[0], coord[1], coord[2], coord[3], lambda); - } - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXB: /* GL_ARB_fragment_program only */ - /* Texel lookup with LOD bias */ - { - const struct gl_texture_unit *texUnit - = &ctx->Texture.Unit[inst->TexSrcUnit]; - GLfloat coord[4], color[4], lambda, bias; + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); + machine->FetchTexelLod(ctx, coord, lambda, inst->TexSrcUnit, + color); + if (DEBUG_PROG) { + printf("TEX (%g, %g, %g, %g) = texture[%d][%g, %g, %g, %g], " + "lod %f\n", + color[0], color[1], color[2], color[3], + inst->TexSrcUnit, + coord[0], coord[1], coord[2], coord[3], lambda); + } + store_vector4(inst, machine, color); + } + break; + case OPCODE_TXB: /* GL_ARB_fragment_program only */ + /* Texel lookup with LOD bias */ + { + const struct gl_texture_unit *texUnit + = &ctx->Texture.Unit[inst->TexSrcUnit]; + GLfloat coord[4], color[4], lambda, bias; #if 0 - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0 + inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else #endif - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); - /* coord[3] is the bias to add to lambda */ - bias = texUnit->LodBias + coord[3]; - if (texUnit->_Current) - bias += texUnit->_Current->LodBias; - machine->FetchTexelLod(ctx, coord, lambda + bias, - inst->TexSrcUnit, color); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXD: /* GL_NV_fragment_program only */ - /* Texture lookup w/ partial derivatives for LOD */ - { - GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, texcoord ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, dtdx ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, dtdy ); - machine->FetchTexelDeriv(ctx, texcoord, dtdx, dtdy, - inst->TexSrcUnit, color ); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXP: /* GL_ARB_fragment_program only */ - /* Texture lookup w/ projective divide */ - { - GLfloat texcoord[4], color[4], lambda; + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); + /* coord[3] is the bias to add to lambda */ + bias = texUnit->LodBias + coord[3]; + if (texUnit->_Current) + bias += texUnit->_Current->LodBias; + machine->FetchTexelLod(ctx, coord, lambda + bias, + inst->TexSrcUnit, color); + store_vector4(inst, machine, color); + } + break; + case OPCODE_TXD: /* GL_NV_fragment_program only */ + /* Texture lookup w/ partial derivatives for LOD */ + { + GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); + fetch_vector4(ctx, &inst->SrcReg[1], machine, dtdx); + fetch_vector4(ctx, &inst->SrcReg[2], machine, dtdy); + machine->FetchTexelDeriv(ctx, texcoord, dtdx, dtdy, + inst->TexSrcUnit, color); + store_vector4(inst, machine, color); + } + break; + case OPCODE_TXP: /* GL_ARB_fragment_program only */ + /* Texture lookup w/ projective divide */ + { + GLfloat texcoord[4], color[4], lambda; #if 0 - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0 + inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else #endif - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); - /* Not so sure about this test - if texcoord[3] is - * zero, we'd probably be fine except for an ASSERT in - * IROUND_POS() which gets triggered by the inf values created. - */ - if (texcoord[3] != 0.0) { - texcoord[0] /= texcoord[3]; - texcoord[1] /= texcoord[3]; - texcoord[2] /= texcoord[3]; - } - machine->FetchTexelLod(ctx, texcoord, lambda, - inst->TexSrcUnit, color); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_TXP_NV: /* GL_NV_fragment_program only */ - /* Texture lookup w/ projective divide */ - { - GLfloat texcoord[4], color[4], lambda; + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); + /* Not so sure about this test - if texcoord[3] is + * zero, we'd probably be fine except for an ASSERT in + * IROUND_POS() which gets triggered by the inf values created. + */ + if (texcoord[3] != 0.0) { + texcoord[0] /= texcoord[3]; + texcoord[1] /= texcoord[3]; + texcoord[2] /= texcoord[3]; + } + machine->FetchTexelLod(ctx, texcoord, lambda, + inst->TexSrcUnit, color); + store_vector4(inst, machine, color); + } + break; + case OPCODE_TXP_NV: /* GL_NV_fragment_program only */ + /* Texture lookup w/ projective divide */ + { + GLfloat texcoord[4], color[4], lambda; #if 0 - if (inst->SrcReg[0].File == PROGRAM_INPUT && - inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0+inst->TexSrcUnit) - lambda = span->array->lambda[inst->TexSrcUnit][column]; - else + if (inst->SrcReg[0].File == PROGRAM_INPUT && + inst->SrcReg[0].Index == FRAG_ATTRIB_TEX0 + inst->TexSrcUnit) + lambda = span->array->lambda[inst->TexSrcUnit][column]; + else #endif - lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); - if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && - texcoord[3] != 0.0) { - texcoord[0] /= texcoord[3]; - texcoord[1] /= texcoord[3]; - texcoord[2] /= texcoord[3]; - } - machine->FetchTexelLod(ctx, texcoord, lambda, - inst->TexSrcUnit, color); - store_vector4( inst, machine, color ); - } - break; - case OPCODE_UP2H: /* unpack two 16-bit floats */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - GLhalfNV hx, hy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - hx = rawBits[0] & 0xffff; - hy = rawBits[0] >> 16; - result[0] = result[2] = _mesa_half_to_float(hx); - result[1] = result[3] = _mesa_half_to_float(hy); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP2US: /* unpack two GLushorts */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - GLushort usx, usy; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - usx = rawBits[0] & 0xffff; - usy = rawBits[0] >> 16; - result[0] = result[2] = usx * (1.0f / 65535.0f); - result[1] = result[3] = usy * (1.0f / 65535.0f); - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP4B: /* unpack four GLbytes */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; - result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; - result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; - result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_UP4UB: /* unpack four GLubytes */ - { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1( ctx, &inst->SrcReg[0], machine, a ); - result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; - result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; - result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; - result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_XPD: /* cross product */ - { - GLfloat a[4], b[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - result[0] = a[1] * b[2] - a[2] * b[1]; - result[1] = a[2] * b[0] - a[0] * b[2]; - result[2] = a[0] * b[1] - a[1] * b[0]; - result[3] = 1.0; - store_vector4( inst, machine, result ); - } - break; - case OPCODE_X2D: /* 2-D matrix transform */ - { - GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a ); - fetch_vector4( ctx, &inst->SrcReg[1], machine, b ); - fetch_vector4( ctx, &inst->SrcReg[2], machine, c ); - result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; - result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; - result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; - result[3] = a[3] + b[0] * c[2] + b[1] * c[3]; - store_vector4( inst, machine, result ); + lambda = 0.0; + fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); + if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && + texcoord[3] != 0.0) { + texcoord[0] /= texcoord[3]; + texcoord[1] /= texcoord[3]; + texcoord[2] /= texcoord[3]; + } + machine->FetchTexelLod(ctx, texcoord, lambda, + inst->TexSrcUnit, color); + store_vector4(inst, machine, color); + } + break; + case OPCODE_UP2H: /* unpack two 16-bit floats */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + GLhalfNV hx, hy; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + hx = rawBits[0] & 0xffff; + hy = rawBits[0] >> 16; + result[0] = result[2] = _mesa_half_to_float(hx); + result[1] = result[3] = _mesa_half_to_float(hy); + store_vector4(inst, machine, result); + } + break; + case OPCODE_UP2US: /* unpack two GLushorts */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + GLushort usx, usy; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + usx = rawBits[0] & 0xffff; + usy = rawBits[0] >> 16; + result[0] = result[2] = usx * (1.0f / 65535.0f); + result[1] = result[3] = usy * (1.0f / 65535.0f); + store_vector4(inst, machine, result); + } + break; + case OPCODE_UP4B: /* unpack four GLbytes */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; + result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; + result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; + result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; + store_vector4(inst, machine, result); + } + break; + case OPCODE_UP4UB: /* unpack four GLubytes */ + { + GLfloat a[4], result[4]; + const GLuint *rawBits = (const GLuint *) a; + fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; + result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; + result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; + result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; + store_vector4(inst, machine, result); + } + break; + case OPCODE_XPD: /* cross product */ + { + GLfloat a[4], b[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + result[0] = a[1] * b[2] - a[2] * b[1]; + result[1] = a[2] * b[0] - a[0] * b[2]; + result[2] = a[0] * b[1] - a[1] * b[0]; + result[3] = 1.0; + store_vector4(inst, machine, result); + } + break; + case OPCODE_X2D: /* 2-D matrix transform */ + { + GLfloat a[4], b[4], c[4], result[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; + result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; + result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; + result[3] = a[3] + b[0] * c[2] + b[1] * c[3]; + store_vector4(inst, machine, result); + } + break; + case OPCODE_PRINT: + { + if (inst->SrcReg[0].File != -1) { + GLfloat a[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, + a[0], a[1], a[2], a[3]); } - break; - case OPCODE_PRINT: - { - if (inst->SrcReg[0].File != -1) { - GLfloat a[4]; - fetch_vector4( ctx, &inst->SrcReg[0], machine, a); - _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, - a[0], a[1], a[2], a[3]); - } - else { - _mesa_printf("%s\n", (const char *) inst->Data); - } + else { + _mesa_printf("%s\n", (const char *) inst->Data); } - break; - case OPCODE_END: - return GL_TRUE; - default: - _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program", - inst->Opcode); - return GL_TRUE; /* return value doesn't matter */ + } + break; + case OPCODE_END: + return GL_TRUE; + default: + _mesa_problem(ctx, "Bad opcode %d in _mesa_exec_fragment_program", + inst->Opcode); + return GL_TRUE; /* return value doesn't matter */ } + total++; if (total > MAX_EXEC) { _mesa_problem(ctx, "Infinite loop detected in fragment program"); return GL_TRUE; abort(); } - } + + } /* for pc */ #if FEATURE_MESA_program_debug CurrentMachine = NULL; -- cgit v1.2.3 From f1390a34241d5efcf931b0edec81dd802ad3b835 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 17:11:01 -0700 Subject: fix fog breakage --- src/mesa/shader/arbprogparse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 6058fc9889..7d34bfbc80 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1188,12 +1188,10 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst, case STATE_FOG: switch (*(*inst)++) { case FOG_COLOR: - state_tokens[0] = STATE_FOG; - state_tokens[1] = STATE_FOG_COLOR; + state_tokens[0] = STATE_FOG_COLOR; break; case FOG_PARAMS: - state_tokens[0] = STATE_FOG; - state_tokens[1] = STATE_FOG_PARAMS; + state_tokens[0] = STATE_FOG_PARAMS; break; } break; -- cgit v1.2.3 From a2786a97d74647662f1fe6aa29257e70b9e3636a Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 17:13:30 -0700 Subject: add some missing cases in _mesa_program_state_string() --- src/mesa/shader/prog_statevars.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 21d518a810..1f5d5598e8 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -744,6 +744,14 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]) append(str, tmp); } break; + case STATE_POINT_SIZE: + break; + case STATE_POINT_ATTENUATION: + break; + case STATE_FOG_PARAMS: + break; + case STATE_FOG_COLOR: + break; case STATE_DEPTH_RANGE: break; case STATE_FRAGMENT_PROGRAM: -- cgit v1.2.3 From f183a2d7ea31a4fea89af834dc19c5b232eb1970 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 17:14:30 -0700 Subject: added ARL, EXP, LOG, relative indexing --- src/mesa/shader/prog_execute.c | 119 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 115 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 82c578f983..91ea52070e 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -53,6 +53,27 @@ #define DEBUG_PROG 0 +/** + * Set x to positive or negative infinity. + */ +#if defined(USE_IEEE) || defined(_WIN32) +#define SET_POS_INFINITY(x) ( *((GLuint *) (void *)&x) = 0x7F800000 ) +#define SET_NEG_INFINITY(x) ( *((GLuint *) (void *)&x) = 0xFF800000 ) +#elif defined(VMS) +#define SET_POS_INFINITY(x) x = __MAXFLOAT +#define SET_NEG_INFINITY(x) x = -__MAXFLOAT +#else +#define SET_POS_INFINITY(x) x = (GLfloat) HUGE_VAL +#define SET_NEG_INFINITY(x) x = (GLfloat) -HUGE_VAL +#endif + +#define SET_FLOAT_BITS(x, bits) ((fi_type *) (void *) &(x))->i = bits + + +static const GLfloat ZeroVec[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; + + + #if FEATURE_MESA_program_debug static struct gl_program_machine *CurrentMachine = NULL; @@ -102,6 +123,24 @@ get_register_pointer(GLcontext * ctx, const struct gl_program_machine *machine) { /* XXX relative addressing... */ + + if (source->RelAddr) { + const GLint reg = source->Index + machine->AddressReg[0][0]; + ASSERT( (source->File == PROGRAM_ENV_PARAM) || + (source->File == PROGRAM_STATE_VAR) ); + if (reg < 0 || reg > MAX_NV_VERTEX_PROGRAM_PARAMS) + return ZeroVec; + else if (source->File == PROGRAM_ENV_PARAM) + return ctx->VertexProgram.Parameters[reg]; + else { + /* + ASSERT(source->File == PROGRAM_LOCAL_PARAM); + */ + return machine->CurProgram->Parameters->ParameterValues[reg]; + } + } + + switch (source->File) { case PROGRAM_TEMPORARY: ASSERT(source->Index < MAX_PROGRAM_TEMPS); @@ -665,6 +704,13 @@ _mesa_execute_program(GLcontext * ctx, } } break; + case OPCODE_ARL: + { + GLfloat t[4]; + fetch_vector4(ctx, &inst->SrcReg[0], machine, t); + machine->AddressReg[0][0] = (GLint) FLOORF(t[0]); + } + break; case OPCODE_BGNLOOP: /* no-op */ break; @@ -746,8 +792,7 @@ _mesa_execute_program(GLcontext * ctx, } store_vector4(inst, machine, result); #else - static const GLfloat result[4] = { 0, 0, 0, 0 }; - store_vector4(inst, machine, result); + store_vector4(inst, machine, ZeroVec); #endif } break; @@ -771,8 +816,7 @@ _mesa_execute_program(GLcontext * ctx, } store_vector4(inst, machine, result); #else - static const GLfloat result[4] = { 0, 0, 0, 0 }; - store_vector4(inst, machine, result); + store_vector4(inst, machine, ZeroVec); #endif } break; @@ -825,6 +869,36 @@ _mesa_execute_program(GLcontext * ctx, store_vector4(inst, machine, result); } break; + case OPCODE_EXP: + /* XXX currently broken! */ + { + GLfloat t[4], q[4], floor_t0; + fetch_vector1(ctx, &inst->SrcReg[0], machine, t); + floor_t0 = FLOORF(t[0]); + if (floor_t0 > FLT_MAX_EXP) { + SET_POS_INFINITY(q[0]); + SET_POS_INFINITY(q[2]); + } + else if (floor_t0 < FLT_MIN_EXP) { + q[0] = 0.0F; + q[2] = 0.0F; + } + else { +#ifdef USE_IEEE + GLint ii = (GLint) floor_t0; + ii = (ii < 23) + 0x3f800000; + SET_FLOAT_BITS(q[0], ii); + q[0] = *((GLfloat *) (void *)&ii); +#else + q[0] = (GLfloat) pow(2.0, floor_t0); +#endif + q[2] = (GLfloat) (q[0] * LOG2(q[1])); + } + q[1] = t[0] - floor_t0; + q[3] = 1.0F; + store_vector4( inst, machine, q ); + } + break; case OPCODE_EX2: /* Exponential base 2 */ { GLfloat a[4], result[4]; @@ -937,6 +1011,43 @@ _mesa_execute_program(GLcontext * ctx, } } break; + case OPCODE_LOG: + { + GLfloat t[4], q[4], abs_t0; + fetch_vector1(ctx, &inst->SrcReg[0], machine, t); + abs_t0 = FABSF(t[0]); + if (abs_t0 != 0.0F) { + /* Since we really can't handle infinite values on VMS + * like other OSes we'll use __MAXFLOAT to represent + * infinity. This may need some tweaking. + */ +#ifdef VMS + if (abs_t0 == __MAXFLOAT) +#else + if (IS_INF_OR_NAN(abs_t0)) +#endif + { + SET_POS_INFINITY(q[0]); + q[1] = 1.0F; + SET_POS_INFINITY(q[2]); + } + else { + int exponent; + GLfloat mantissa = FREXPF(t[0], &exponent); + q[0] = (GLfloat) (exponent - 1); + q[1] = (GLfloat) (2.0 * mantissa); /* map [.5, 1) -> [1, 2) */ + q[2] = (GLfloat) (q[0] + LOG2(q[1])); + } + } + else { + SET_NEG_INFINITY(q[0]); + q[1] = 1.0F; + SET_NEG_INFINITY(q[2]); + } + q[3] = 1.0; + store_vector4(inst, machine, q); + } + break; case OPCODE_LRP: { GLfloat a[4], b[4], c[4], result[4]; -- cgit v1.2.3 From 761728afe8b81fc0ff7928f99f8b5668a0a7824d Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 11:14:57 -0700 Subject: Fix assertion in get_register_pointer(), fix EXP case. Note that GL_ARB_v_p and GL_NV_v_p define the z component of the EXP instruction differently. We follow the ARB extension. --- src/mesa/shader/prog_execute.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 91ea52070e..9d5894deb9 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -133,14 +133,12 @@ get_register_pointer(GLcontext * ctx, else if (source->File == PROGRAM_ENV_PARAM) return ctx->VertexProgram.Parameters[reg]; else { - /* - ASSERT(source->File == PROGRAM_LOCAL_PARAM); - */ + ASSERT(source->File == PROGRAM_LOCAL_PARAM || + source->File == PROGRAM_STATE_VAR); return machine->CurProgram->Parameters->ParameterValues[reg]; } } - switch (source->File) { case PROGRAM_TEMPORARY: ASSERT(source->Index < MAX_PROGRAM_TEMPS); @@ -870,7 +868,6 @@ _mesa_execute_program(GLcontext * ctx, } break; case OPCODE_EXP: - /* XXX currently broken! */ { GLfloat t[4], q[4], floor_t0; fetch_vector1(ctx, &inst->SrcReg[0], machine, t); @@ -884,15 +881,12 @@ _mesa_execute_program(GLcontext * ctx, q[2] = 0.0F; } else { -#ifdef USE_IEEE - GLint ii = (GLint) floor_t0; - ii = (ii < 23) + 0x3f800000; - SET_FLOAT_BITS(q[0], ii); - q[0] = *((GLfloat *) (void *)&ii); -#else - q[0] = (GLfloat) pow(2.0, floor_t0); -#endif - q[2] = (GLfloat) (q[0] * LOG2(q[1])); + q[0] = LDEXPF(1.0, (int) floor_t0); + /* Note: GL_NV_vertex_program expects + * result.z = result.x * APPX(result.y) + * We do what the ARB extension says. + */ + q[2] = pow(2.0, t[0]); } q[1] = t[0] - floor_t0; q[3] = 1.0F; -- cgit v1.2.3 From 824dcd43990eb696210d2e0a25e4994bd9c6c644 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 11:15:27 -0700 Subject: remove comment --- src/mesa/shader/prog_execute.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 9d5894deb9..6417a88e90 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -122,8 +122,6 @@ get_register_pointer(GLcontext * ctx, const struct prog_src_register *source, const struct gl_program_machine *machine) { - /* XXX relative addressing... */ - if (source->RelAddr) { const GLint reg = source->Index + machine->AddressReg[0][0]; ASSERT( (source->File == PROGRAM_ENV_PARAM) || -- cgit v1.2.3 From 197af3dc3242af4cac5213e095ac6639f6c782cd Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 11:16:58 -0700 Subject: Use prog_execute.c to run vertex programs until t_vb_arbprogram.c is updated to handle branch instructions, etc. --- src/mesa/tnl/t_vb_arbprogram.c | 16 +++++----------- src/mesa/tnl/t_vb_program.c | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 1d9a6ac460..b322d48b23 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1151,7 +1151,6 @@ static void compile_vertex_program( struct gl_vertex_program *program, - /* ---------------------------------------------------------------------- * Execution */ @@ -1264,6 +1263,7 @@ static INLINE void call_func( struct tnl_compiled_program *p, p->compiled_func(m); } + /** * Execute the given vertex program. * @@ -1283,7 +1283,7 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) GLuint i, j; GLbitfield outputs; -#define FORCE_PROG_EXECUTE_C 0 +#define FORCE_PROG_EXECUTE_C 1 #if FORCE_PROG_EXECUTE_C return GL_TRUE; #else @@ -1498,11 +1498,6 @@ validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage ) } - - - - - /** * Called the first time stage->run is called. In effect, don't * allocate data until the first time the stage is run. @@ -1563,8 +1558,6 @@ static GLboolean init_vertex_program( GLcontext *ctx, } - - /** * Destructor for this pipeline stage. */ @@ -1589,6 +1582,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) } } + /** * Public description of this pipeline stage. */ diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 72a65f89f1..62c78dc7d1 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -198,7 +198,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct gl_program_machine machine; GLuint i; -#define FORCE_PROG_EXECUTE_C 0 +#define FORCE_PROG_EXECUTE_C 1 #if FORCE_PROG_EXECUTE_C if (!program) return GL_TRUE; -- cgit v1.2.3 From 5e80c62f3178a65bebca942aa0b1e5d16c34b2a9 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 15:39:37 -0700 Subject: Remove unneeded _Fragment/VertexShaderPresent fields, update comments. --- src/mesa/main/mtypes.h | 16 +++++++++------- src/mesa/shader/shader_api.c | 3 +-- src/mesa/swrast/s_context.c | 4 ---- 3 files changed, 10 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b83beb8f91..bd9198ef12 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1929,9 +1929,11 @@ struct gl_vertex_program_state GLboolean _Enabled; /**< Enabled and valid program? */ GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ - struct gl_vertex_program *Current; /**< ptr to currently bound program */ + struct gl_vertex_program *Current; /**< user-bound vertex program */ - /** Currently enabled and valid program (including internal programs) */ + /** Currently enabled and valid program (including internal programs + * and compiled shader programs). + */ struct gl_vertex_program *_Current; GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ @@ -1962,9 +1964,11 @@ struct gl_fragment_program_state { GLboolean Enabled; /**< User-set fragment program enable flag */ GLboolean _Enabled; /**< Fragment program enabled and valid? */ - struct gl_fragment_program *Current; /**< User-bound program */ + struct gl_fragment_program *Current; /**< User-bound fragment program */ - /** Currently enabled and valid program (including internal programs) */ + /** Currently enabled and valid program (including internal programs + * and compiled shader programs). + */ struct gl_fragment_program *_Current; GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ @@ -2099,9 +2103,7 @@ struct gl_shader_program */ struct gl_shader_state { - GLboolean _VertexShaderPresent; - GLboolean _FragmentShaderPresent; - struct gl_shader_program *CurrentProgram; + struct gl_shader_program *CurrentProgram; /**< The user-bound program */ }; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index c439f71f41..70ceb70fe7 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -199,8 +199,7 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name) void _mesa_init_shader_state(GLcontext * ctx) { - ctx->Shader._FragmentShaderPresent = GL_FALSE; - ctx->Shader._VertexShaderPresent = GL_FALSE; + /* no-op */ } diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 5e174f81d5..031d74f31b 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -102,10 +102,6 @@ _swrast_update_rasterflags( GLcontext *ctx ) rasterMask |= FRAGPROG_BIT; } - if (ctx->Shader._FragmentShaderPresent) { - rasterMask |= FRAGPROG_BIT; - } - if (ctx->ATIFragmentShader._Enabled) { rasterMask |= ATIFRAGSHADER_BIT; } -- cgit v1.2.3 From 292a80466d3e0b1cec998f2dc1b0abe25dc10fb8 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 15:49:54 -0700 Subject: Outputs[] array wasn't large enough, define MAX_PROGRAM_OUTPUTS, new assertions. --- src/mesa/shader/prog_execute.c | 5 +++-- src/mesa/shader/prog_execute.h | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 6417a88e90..063d572428 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -153,8 +153,7 @@ get_register_pointer(GLcontext * ctx, } case PROGRAM_OUTPUT: - /* This is only for PRINT */ - ASSERT(source->Index < FRAG_RESULT_MAX); + ASSERT(source->Index < MAX_PROGRAM_OUTPUTS); return machine->Outputs[source->Index]; case PROGRAM_LOCAL_PARAM: @@ -453,9 +452,11 @@ store_vector4(const struct prog_instruction *inst, switch (dest->File) { case PROGRAM_OUTPUT: + ASSERT(dest->Index < MAX_PROGRAM_OUTPUTS); dstReg = machine->Outputs[dest->Index]; break; case PROGRAM_TEMPORARY: + ASSERT(dest->Index < MAX_PROGRAM_TEMPS); dstReg = machine->Temporaries[dest->Index]; break; case PROGRAM_WRITE_ONLY: diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h index 0e737657e3..1eb9e73d01 100644 --- a/src/mesa/shader/prog_execute.h +++ b/src/mesa/shader/prog_execute.h @@ -35,6 +35,10 @@ typedef void (*FetchTexelDerivFunc)(GLcontext *ctx, const GLfloat texcoord[4], GLuint unit, GLfloat color[4]); +/** The larger of VERT_RESULT_MAX, FRAG_RESULT_MAX */ +#define MAX_PROGRAM_OUTPUTS VERT_RESULT_MAX + + /** * Virtual machine state used during execution of vertex/fragment programs. */ @@ -50,7 +54,7 @@ struct gl_program_machine GLfloat VertAttribs[VERT_ATTRIB_MAX][4]; GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; - GLfloat Outputs[FRAG_RESULT_MAX][4]; + GLfloat Outputs[MAX_PROGRAM_OUTPUTS][4]; GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; -- cgit v1.2.3 From efcfdbd4d16071088e60a59cb966abd730d9d111 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 15:51:41 -0700 Subject: Undo some changes to _mesa_UpdateTexEnvProgram(). Fixes broken i915 texturing. --- src/mesa/main/texenvprogram.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 917acf06d7..54ae7ce0a1 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -1239,10 +1239,12 @@ _mesa_UpdateTexEnvProgram( GLcontext *ctx ) ASSERT(ctx->FragmentProgram._MaintainTexEnvProgram); /* If a conventional fragment program/shader isn't in effect... */ - if (!ctx->FragmentProgram._Current) { + if (!ctx->FragmentProgram._Enabled && + !ctx->Shader.CurrentProgram) { make_state_key(ctx, &key); hash = hash_key(&key); + ctx->FragmentProgram._Current = ctx->FragmentProgram._TexEnvProgram = search_cache(&ctx->Texture.env_fp_cache, hash, &key, sizeof(key)); @@ -1251,7 +1253,9 @@ _mesa_UpdateTexEnvProgram( GLcontext *ctx ) _mesa_printf("Building new texenv proggy for key %x\n", hash); /* create new tex env program */ - ctx->FragmentProgram._TexEnvProgram = (struct gl_fragment_program *) + ctx->FragmentProgram._Current = + ctx->FragmentProgram._TexEnvProgram = + (struct gl_fragment_program *) ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); create_new_program(ctx, &key, ctx->FragmentProgram._TexEnvProgram); @@ -1263,8 +1267,10 @@ _mesa_UpdateTexEnvProgram( GLcontext *ctx ) if (0) _mesa_printf("Found existing texenv program for key %x\n", hash); } - ctx->FragmentProgram._Current = ctx->FragmentProgram._TexEnvProgram; } + else { + ctx->FragmentProgram._Current = ctx->FragmentProgram.Current; + } /* Tell the driver about the change. Could define a new target for * this? -- cgit v1.2.3 From fbc4929185ca1dc7d729ec737095ef0895f5b570 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 17:00:50 -0700 Subject: add missing code for newer STATE_INTERNAL items --- src/mesa/shader/prog_statevars.c | 60 +++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 1f5d5598e8..8b4903ea01 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -396,23 +396,51 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], return; case STATE_INTERNAL: - { - switch (state[1]) { - case STATE_TEXRECT_SCALE: { - const int unit = (int) state[2]; - const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; - if (texObj) { - struct gl_texture_image *texImage = texObj->Image[0][0]; - ASSIGN_4V(value, 1.0 / texImage->Width, 1.0 / texImage->Height, 0, 1); - } - break; - } - default: - /* unknown state indexes are silently ignored - * should be handled by the driver. - */ - return; + switch (state[1]) { + case STATE_NORMAL_SCALE: + ASSIGN_4V(value, ctx->_ModelViewInvScale, 0, 0, 1); + return; + case STATE_TEXRECT_SCALE: + { + const int unit = (int) state[2]; + const struct gl_texture_object *texObj + = ctx->Texture.Unit[unit]._Current; + if (texObj) { + struct gl_texture_image *texImage = texObj->Image[0][0]; + ASSIGN_4V(value, 1.0 / texImage->Width, + 1.0 / texImage->Height, + 0.0, 1.0); + } } + return; + case STATE_FOG_PARAMS_OPTIMIZED: + /* for simpler per-vertex/pixel fog calcs. POW (for EXP/EXP2 fog) + * might be more expensive than EX2 on some hw, plus it needs + * another constant (e) anyway. Linear fog can now be done with a + * single MAD. + * linear: fogcoord * -1/(end-start) + end/(end-start) + * exp: 2^-(density/ln(2) * fogcoord) + * exp2: 2^-((density/(ln(2)^2) * fogcoord)^2) + */ + value[0] = -1.0F / (ctx->Fog.End - ctx->Fog.Start); + value[1] = ctx->Fog.End / (ctx->Fog.End - ctx->Fog.Start); + value[2] = ctx->Fog.Density * ONE_DIV_LN2; + value[3] = ctx->Fog.Density * ONE_DIV_SQRT_LN2; + return; + case STATE_SPOT_DIR_NORMALIZED: { + /* here, state[2] is the light number */ + /* pre-normalize spot dir */ + const GLuint ln = (GLuint) state[2]; + COPY_3V(value, ctx->Light.Light[ln].EyeDirection); + NORMALIZE_3FV(value); + value[3] = ctx->Light.Light[ln]._CosCutoff; + return; + } + default: + /* unknown state indexes are silently ignored + * should be handled by the driver. + */ + return; } return; -- cgit v1.2.3 From 9854a17f292193c9720cf25ab00818ecc210f911 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 12:47:25 -0700 Subject: only copy used outputs --- src/mesa/tnl/t_vb_program.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 62c78dc7d1..82e007a3ac 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -244,7 +244,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) const GLuint size = VB->AttribPtr[attr]->size; const GLuint stride = VB->AttribPtr[attr]->stride; const GLfloat *data = (GLfloat *) (ptr + stride * i); - COPY_CLEAN_4V(machine.VertAttribs/*Inputs*/[attr], size, data); + COPY_CLEAN_4V(machine.VertAttribs[attr], size, data); } } @@ -264,9 +264,10 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) } /* copy the output registers into the VB->attribs arrays */ - /* XXX (optimize) could use a conditional and smaller loop limit here */ for (attr = 0; attr < VERT_RESULT_MAX; attr++) { - COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]); + if (program->Base.OutputsWritten & (1 << attr)) { + COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]); + } } #if 0 printf("HPOS: %f %f %f %f\n", -- cgit v1.2.3 From e71a33bbf87649150bc748b85ca7213af7c737f4 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 17:29:00 -0700 Subject: Optimize the loop for copying output results. --- src/mesa/tnl/t_vb_program.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 82e007a3ac..4ea134a97e 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -196,7 +196,8 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct vertex_buffer *VB = &tnl->vb; struct gl_vertex_program *program = ctx->VertexProgram._Current; struct gl_program_machine machine; - GLuint i; + GLuint outputs[VERT_RESULT_MAX], numOutputs; + GLuint i, j; #define FORCE_PROG_EXECUTE_C 1 #if FORCE_PROG_EXECUTE_C @@ -214,6 +215,13 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) _mesa_load_state_parameters(ctx, program->Base.Parameters); } + numOutputs = 0; + for (i = 0; i < VERT_RESULT_MAX; i++) { + if (program->Base.OutputsWritten & (1 << i)) { + outputs[numOutputs++] = i; + } + } + for (i = 0; i < VB->Count; i++) { GLuint attr; @@ -264,10 +272,9 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) } /* copy the output registers into the VB->attribs arrays */ - for (attr = 0; attr < VERT_RESULT_MAX; attr++) { - if (program->Base.OutputsWritten & (1 << attr)) { - COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]); - } + for (j = 0; j < numOutputs; j++) { + const GLuint attr = outputs[j]; + COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]); } #if 0 printf("HPOS: %f %f %f %f\n", -- cgit v1.2.3 From 29796b62bd4a0f536525c8704577434e2248aab7 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 17:33:46 -0700 Subject: remove unused VaryingPtr --- src/mesa/tnl/t_context.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index 733b3a5fe1..31b89aca41 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -217,7 +217,6 @@ struct vertex_buffer GLvector4f *ColorPtr[2]; /* _TNL_BIT_COLOR0 */ GLvector4f *SecondaryColorPtr[2]; /* _TNL_BIT_COLOR1 */ GLvector4f *FogCoordPtr; /* _TNL_BIT_FOG */ - GLvector4f *VaryingPtr[MAX_VARYING]; const struct _mesa_prim *Primitive; GLuint PrimitiveCount; -- cgit v1.2.3 From 12fd8faa5dd10457b2360493e9a56ab12659f282 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:08:16 -0700 Subject: s/attribs/results/ --- src/mesa/tnl/t_vb_program.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 4ea134a97e..3fe796ac56 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -49,7 +49,7 @@ */ struct vp_stage_data { /** The results of running the vertex program go into these arrays. */ - GLvector4f attribs[VERT_RESULT_MAX]; + GLvector4f results[VERT_RESULT_MAX]; GLvector4f ndcCoords; /**< normalized device coords */ GLubyte *clipmask; /**< clip flags */ @@ -274,7 +274,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) /* copy the output registers into the VB->attribs arrays */ for (j = 0; j < numOutputs; j++) { const GLuint attr = outputs[j]; - COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]); + COPY_4V(store->results[attr].data[i], machine.Outputs[attr]); } #if 0 printf("HPOS: %f %f %f %f\n", @@ -288,31 +288,31 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) /* Setup the VB pointers so that the next pipeline stages get * their data from the right place (the program output arrays). */ - VB->ClipPtr = &store->attribs[VERT_RESULT_HPOS]; + VB->ClipPtr = &store->results[VERT_RESULT_HPOS]; VB->ClipPtr->size = 4; VB->ClipPtr->count = VB->Count; - VB->ColorPtr[0] = &store->attribs[VERT_RESULT_COL0]; - VB->ColorPtr[1] = &store->attribs[VERT_RESULT_BFC0]; - VB->SecondaryColorPtr[0] = &store->attribs[VERT_RESULT_COL1]; - VB->SecondaryColorPtr[1] = &store->attribs[VERT_RESULT_BFC1]; - VB->FogCoordPtr = &store->attribs[VERT_RESULT_FOGC]; + VB->ColorPtr[0] = &store->results[VERT_RESULT_COL0]; + VB->ColorPtr[1] = &store->results[VERT_RESULT_BFC0]; + VB->SecondaryColorPtr[0] = &store->results[VERT_RESULT_COL1]; + VB->SecondaryColorPtr[1] = &store->results[VERT_RESULT_BFC1]; + VB->FogCoordPtr = &store->results[VERT_RESULT_FOGC]; - VB->AttribPtr[VERT_ATTRIB_COLOR0] = &store->attribs[VERT_RESULT_COL0]; - VB->AttribPtr[VERT_ATTRIB_COLOR1] = &store->attribs[VERT_RESULT_COL1]; - VB->AttribPtr[VERT_ATTRIB_FOG] = &store->attribs[VERT_RESULT_FOGC]; - VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->attribs[VERT_RESULT_PSIZ]; + VB->AttribPtr[VERT_ATTRIB_COLOR0] = &store->results[VERT_RESULT_COL0]; + VB->AttribPtr[VERT_ATTRIB_COLOR1] = &store->results[VERT_RESULT_COL1]; + VB->AttribPtr[VERT_ATTRIB_FOG] = &store->results[VERT_RESULT_FOGC]; + VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->results[VERT_RESULT_PSIZ]; for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { VB->TexCoordPtr[i] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i] - = &store->attribs[VERT_RESULT_TEX0 + i]; + = &store->results[VERT_RESULT_TEX0 + i]; } for (i = 0; i < ctx->Const.MaxVarying; i++) { if (program->Base.OutputsWritten & (1 << (VERT_RESULT_VAR0 + i))) { /* Note: varying results get put into the generic attributes */ VB->AttribPtr[VERT_ATTRIB_GENERIC0+i] - = &store->attribs[VERT_RESULT_VAR0 + i]; + = &store->results[VERT_RESULT_VAR0 + i]; } } @@ -374,8 +374,8 @@ static GLboolean init_vp( GLcontext *ctx, /* Allocate arrays of vertex output values */ for (i = 0; i < VERT_RESULT_MAX; i++) { - _mesa_vector4f_alloc( &store->attribs[i], 0, size, 32 ); - store->attribs[i].size = 4; + _mesa_vector4f_alloc( &store->results[i], 0, size, 32 ); + store->results[i].size = 4; } /* a few other misc allocations */ @@ -398,7 +398,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) /* free the vertex program result arrays */ for (i = 0; i < VERT_RESULT_MAX; i++) - _mesa_vector4f_free( &store->attribs[i] ); + _mesa_vector4f_free( &store->results[i] ); /* free misc arrays */ _mesa_vector4f_free( &store->ndcCoords ); -- cgit v1.2.3 From 085d7d59f0e167bb546c4a1675e09631b14fc9f7 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:23:37 -0700 Subject: remove unused 'element' parameter from _mesa_execute_program() --- src/mesa/shader/prog_execute.c | 2 +- src/mesa/shader/prog_execute.h | 2 +- src/mesa/swrast/s_fragprog.c | 3 +-- src/mesa/tnl/t_vb_program.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 063d572428..0982e3e322 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -641,7 +641,7 @@ init_machine_deriv(GLcontext * ctx, GLboolean _mesa_execute_program(GLcontext * ctx, const struct gl_program *program, GLuint maxInst, - struct gl_program_machine *machine, GLuint element) + struct gl_program_machine *machine) { const GLuint MAX_EXEC = 10000; GLint pc, total = 0; diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h index 1eb9e73d01..feda65fe03 100644 --- a/src/mesa/shader/prog_execute.h +++ b/src/mesa/shader/prog_execute.h @@ -75,7 +75,7 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file, extern GLboolean _mesa_execute_program(GLcontext *ctx, const struct gl_program *program, GLuint maxInst, - struct gl_program_machine *machine, GLuint element); + struct gl_program_machine *machine); #endif /* PROG_EXECUTE_H */ diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 4482006ba6..f88714d5c7 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -148,8 +148,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) init_machine(ctx, &machine, program, span, i); if (_mesa_execute_program(ctx, &program->Base, - program->Base.NumInstructions, - &machine, i)) { + program->Base.NumInstructions, &machine)) { /* Store result color */ COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], machine.Outputs[FRAG_RESULT_COLR]); diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 3fe796ac56..05b1a4aaab 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -258,7 +258,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) /* execute the program */ _mesa_execute_program(ctx, &program->Base, program->Base.NumInstructions, - &machine, 0); + &machine); /* Fixup fog an point size results if needed */ if (ctx->Fog.Enabled && -- cgit v1.2.3 From 8b34b7da4131d2b07037ce062c522fddd614f127 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:26:50 -0700 Subject: remove 'maxInst' parameter from _mesa_execute_program() --- src/mesa/shader/prog_execute.c | 6 +++--- src/mesa/shader/prog_execute.h | 2 +- src/mesa/swrast/s_fragprog.c | 3 +-- src/mesa/tnl/t_vb_program.c | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 0982e3e322..b3d017bd9b 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -635,14 +635,14 @@ init_machine_deriv(GLcontext * ctx, * \param ctx - rendering context * \param program - the fragment program to execute * \param machine - machine state (register file) - * \param maxInst - max number of instructions to execute * \return GL_TRUE if program completed or GL_FALSE if program executed KIL. */ GLboolean _mesa_execute_program(GLcontext * ctx, - const struct gl_program *program, GLuint maxInst, + const struct gl_program *program, struct gl_program_machine *machine) { + const GLuint numInst = program->NumInstructions; const GLuint MAX_EXEC = 10000; GLint pc, total = 0; @@ -656,7 +656,7 @@ _mesa_execute_program(GLcontext * ctx, CurrentMachine = machine; #endif - for (pc = 0; pc < maxInst; pc++) { + for (pc = 0; pc < numInst; pc++) { const struct prog_instruction *inst = program->Instructions + pc; #if FEATURE_MESA_program_debug diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h index feda65fe03..2dbd922fb0 100644 --- a/src/mesa/shader/prog_execute.h +++ b/src/mesa/shader/prog_execute.h @@ -74,7 +74,7 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file, extern GLboolean _mesa_execute_program(GLcontext *ctx, - const struct gl_program *program, GLuint maxInst, + const struct gl_program *program, struct gl_program_machine *machine); diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index f88714d5c7..4e1c829773 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -147,8 +147,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) if (span->array->mask[i]) { init_machine(ctx, &machine, program, span, i); - if (_mesa_execute_program(ctx, &program->Base, - program->Base.NumInstructions, &machine)) { + if (_mesa_execute_program(ctx, &program->Base, &machine)) { /* Store result color */ COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], machine.Outputs[FRAG_RESULT_COLR]); diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 05b1a4aaab..17eefe7032 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -257,8 +257,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) } /* execute the program */ - _mesa_execute_program(ctx, &program->Base, program->Base.NumInstructions, - &machine); + _mesa_execute_program(ctx, &program->Base, &machine); /* Fixup fog an point size results if needed */ if (ctx->Fog.Enabled && -- cgit v1.2.3 From cfd0011f2fe3aad2ea0f66c151b3fb12d05f644e Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:30:45 -0700 Subject: minor clean-ups in _mesa_execute_program() --- src/mesa/shader/prog_execute.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index b3d017bd9b..1b7ed4c5d0 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -643,8 +643,8 @@ _mesa_execute_program(GLcontext * ctx, struct gl_program_machine *machine) { const GLuint numInst = program->NumInstructions; - const GLuint MAX_EXEC = 10000; - GLint pc, total = 0; + const GLuint maxExec = 10000; + GLint pc, numExec = 0; machine->CurProgram = program; @@ -1666,11 +1666,10 @@ _mesa_execute_program(GLcontext * ctx, } - total++; - if (total > MAX_EXEC) { + numExec++; + if (numExec > maxExec) { _mesa_problem(ctx, "Infinite loop detected in fragment program"); return GL_TRUE; - abort(); } } /* for pc */ -- cgit v1.2.3 From 21bcb2e1f64fe7161e05e4dbb7bea5609ba30e2a Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:35:47 -0700 Subject: s/GetFragmentProgramRegister/GetProgramRegister/ --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/main/dd.h | 6 +++--- src/mesa/shader/prog_debug.c | 26 ++++++++++---------------- 3 files changed, 14 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index ee96339f12..f543de183a 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -129,7 +129,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->NewProgram = _mesa_new_program; driver->DeleteProgram = _mesa_delete_program; #if FEATURE_MESA_program_debug - driver->GetFragmentProgramRegister = _mesa_get_program_register; + driver->GetProgramRegister = _mesa_get_program_register; #endif /* FEATURE_MESA_program_debug */ /* simple state commands */ diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 90c1f69c3d..88f33943b3 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -570,9 +570,9 @@ struct dd_function_table { /** Notify driver that a program string has been specified. */ void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, struct gl_program *prog); - /** Get value of a fragment program register during program execution. */ - void (*GetFragmentProgramRegister)(GLcontext *ctx, enum register_file file, - GLuint index, GLfloat val[4]); + /** Get value of a program register during program execution. */ + void (*GetProgramRegister)(GLcontext *ctx, enum register_file file, + GLuint index, GLfloat val[4]); /** Query if program can be loaded onto hardware */ GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, diff --git a/src/mesa/shader/prog_debug.c b/src/mesa/shader/prog_debug.c index e3e5396bb1..57929fcbca 100644 --- a/src/mesa/shader/prog_debug.c +++ b/src/mesa/shader/prog_debug.c @@ -141,9 +141,7 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, "glGetProgramRegisterfvMESA(registerName)"); return; } -#if 0 /* FIX ME */ - ctx->Driver.GetVertexProgramRegister(ctx, PROGRAM_TEMPORARY, i, v); -#endif + ctx->Driver.GetProgramRegister(ctx, PROGRAM_TEMPORARY, i, v); } else if (reg[0] == 'v' && reg[1] == '[') { /* Vertex Input attribute */ @@ -154,10 +152,7 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, _mesa_sprintf(number, "%d", i); if (_mesa_strncmp(reg + 2, name, 4) == 0 || _mesa_strncmp(reg + 2, number, _mesa_strlen(number)) == 0) { -#if 0 /* FIX ME */ - ctx->Driver.GetVertexProgramRegister(ctx, PROGRAM_INPUT, - i, v); -#endif + ctx->Driver.GetProgramRegister(ctx, PROGRAM_INPUT, i, v); return; } } @@ -210,7 +205,7 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, "glGetProgramRegisterfvMESA(registerName)"); return; } - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_TEMPORARY, + ctx->Driver.GetProgramRegister(ctx, PROGRAM_TEMPORARY, i, v); } else if (reg[0] == 'f' && reg[1] == '[') { @@ -219,8 +214,7 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, for (i = 0; i < ctx->Const.FragmentProgram.MaxAttribs; i++) { const char *name = _mesa_nv_fragment_input_register_name(i); if (_mesa_strncmp(reg + 2, name, 4) == 0) { - ctx->Driver.GetFragmentProgramRegister(ctx, - PROGRAM_INPUT, i, v); + ctx->Driver.GetProgramRegister(ctx, PROGRAM_INPUT, i, v); return; } } @@ -230,18 +224,18 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, } else if (_mesa_strcmp(reg, "o[COLR]") == 0) { /* Fragment output color */ - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, - FRAG_RESULT_COLR, v); + ctx->Driver.GetProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_COLR, v); } else if (_mesa_strcmp(reg, "o[COLH]") == 0) { /* Fragment output color */ - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, - FRAG_RESULT_COLH, v); + ctx->Driver.GetProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_COLH, v); } else if (_mesa_strcmp(reg, "o[DEPR]") == 0) { /* Fragment output depth */ - ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, - FRAG_RESULT_DEPR, v); + ctx->Driver.GetProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_DEPR, v); } else { /* try user-defined identifiers */ -- cgit v1.2.3 From 6774f32adba96237d7a2f422435044661772d70c Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:39:46 -0700 Subject: simplify _mesa_get_program_register() --- src/mesa/shader/prog_execute.c | 63 ++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 39 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 1b7ed4c5d0..562650e8ca 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -74,45 +74,6 @@ static const GLfloat ZeroVec[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; -#if FEATURE_MESA_program_debug -static struct gl_program_machine *CurrentMachine = NULL; - -/** - * For GL_MESA_program_debug. - * Return current value (4*GLfloat) of a program register. - * Called via ctx->Driver.GetFragmentProgramRegister(). - */ -void -_mesa_get_program_register(GLcontext *ctx, enum register_file file, - GLuint index, GLfloat val[4]) -{ - if (CurrentMachine) { - switch (file) { - case PROGRAM_INPUT: - if (CurrentMachine->CurProgram->Target == GL_VERTEX_PROGRAM_ARB) { - COPY_4V(val, CurrentMachine->VertAttribs[index]); - } - else { - COPY_4V(val, - CurrentMachine->Attribs[index][CurrentMachine->CurElement]); - } - break; - case PROGRAM_OUTPUT: - COPY_4V(val, CurrentMachine->Outputs[index]); - break; - case PROGRAM_TEMPORARY: - COPY_4V(val, CurrentMachine->Temporaries[index]); - break; - default: - _mesa_problem(NULL, - "bad register file in _swrast_get_program_register"); - } - } -} -#endif /* FEATURE_MESA_program_debug */ - - - /** * Return a pointer to the 4-element float vector specified by the given * source register. @@ -187,6 +148,30 @@ get_register_pointer(GLcontext * ctx, } +#if FEATURE_MESA_program_debug +static struct gl_program_machine *CurrentMachine = NULL; + +/** + * For GL_MESA_program_debug. + * Return current value (4*GLfloat) of a program register. + * Called via ctx->Driver.GetProgramRegister(). + */ +void +_mesa_get_program_register(GLcontext *ctx, enum register_file file, + GLuint index, GLfloat val[4]) +{ + if (CurrentMachine) { + struct prog_src_register src; + const GLfloat *reg; + src.File = file; + src.Index = index; + reg = get_register_pointer(ctx, &src, CurrentMachine); + COPY_4V(val, reg); + } +} +#endif /* FEATURE_MESA_program_debug */ + + /** * Fetch a 4-element float vector from the given source register. * Apply swizzling and negating as needed. -- cgit v1.2.3 From 33eac56e4a48143aa8acd5757feb68570e860de5 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:52:41 -0700 Subject: Add EnvParams field to gl_program_machine, avoid passing ctx to a bunch of functions. --- src/mesa/shader/prog_execute.c | 213 ++++++++++++++++++++--------------------- src/mesa/shader/prog_execute.h | 2 +- 2 files changed, 107 insertions(+), 108 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 562650e8ca..2db4e69522 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -79,18 +79,15 @@ static const GLfloat ZeroVec[4] = { 0.0F, 0.0F, 0.0F, 0.0F }; * source register. */ static INLINE const GLfloat * -get_register_pointer(GLcontext * ctx, - const struct prog_src_register *source, +get_register_pointer(const struct prog_src_register *source, const struct gl_program_machine *machine) { if (source->RelAddr) { const GLint reg = source->Index + machine->AddressReg[0][0]; - ASSERT( (source->File == PROGRAM_ENV_PARAM) || - (source->File == PROGRAM_STATE_VAR) ); if (reg < 0 || reg > MAX_NV_VERTEX_PROGRAM_PARAMS) return ZeroVec; else if (source->File == PROGRAM_ENV_PARAM) - return ctx->VertexProgram.Parameters[reg]; + return machine->EnvParams[reg]; else { ASSERT(source->File == PROGRAM_LOCAL_PARAM || source->File == PROGRAM_STATE_VAR); @@ -123,10 +120,7 @@ get_register_pointer(GLcontext * ctx, case PROGRAM_ENV_PARAM: ASSERT(source->Index < MAX_PROGRAM_ENV_PARAMS); - if (machine->CurProgram->Target == GL_VERTEX_PROGRAM_ARB) - return ctx->VertexProgram.Parameters[source->Index]; - else - return ctx->FragmentProgram.Parameters[source->Index]; + return machine->EnvParams[source->Index]; case PROGRAM_STATE_VAR: /* Fallthrough */ @@ -140,7 +134,7 @@ get_register_pointer(GLcontext * ctx, return machine->CurProgram->Parameters->ParameterValues[source->Index]; default: - _mesa_problem(ctx, + _mesa_problem(NULL, "Invalid input register file %d in get_register_pointer()", source->File); return NULL; @@ -165,7 +159,7 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file, const GLfloat *reg; src.File = file; src.Index = index; - reg = get_register_pointer(ctx, &src, CurrentMachine); + reg = get_register_pointer(&src, CurrentMachine); COPY_4V(val, reg); } } @@ -177,11 +171,10 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file, * Apply swizzling and negating as needed. */ static void -fetch_vector4(GLcontext * ctx, - const struct prog_src_register *source, +fetch_vector4(const struct prog_src_register *source, const struct gl_program_machine *machine, GLfloat result[4]) { - const GLfloat *src = get_register_pointer(ctx, source, machine); + const GLfloat *src = get_register_pointer(source, machine); ASSERT(src); if (source->Swizzle == SWIZZLE_NOOP) { @@ -339,11 +332,10 @@ fetch_vector4_deriv(GLcontext * ctx, * As above, but only return result[0] element. */ static void -fetch_vector1(GLcontext * ctx, - const struct prog_src_register *source, +fetch_vector1(const struct prog_src_register *source, const struct gl_program_machine *machine, GLfloat result[4]) { - const GLfloat *src = get_register_pointer(ctx, source, machine); + const GLfloat *src = get_register_pointer(source, machine); ASSERT(src); result[0] = src[GET_SWZ(source->Swizzle, 0)]; @@ -641,6 +633,13 @@ _mesa_execute_program(GLcontext * ctx, CurrentMachine = machine; #endif + if (program->Target == GL_VERTEX_PROGRAM_ARB) { + machine->EnvParams = ctx->VertexProgram.Parameters; + } + else { + machine->EnvParams = ctx->FragmentProgram.Parameters; + } + for (pc = 0; pc < numInst; pc++) { const struct prog_instruction *inst = program->Instructions + pc; @@ -661,7 +660,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_ABS: { GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); result[0] = FABSF(a[0]); result[1] = FABSF(a[1]); result[2] = FABSF(a[2]); @@ -672,8 +671,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_ADD: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = a[0] + b[0]; result[1] = a[1] + b[1]; result[2] = a[2] + b[2]; @@ -689,7 +688,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_ARL: { GLfloat t[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, t); + fetch_vector4(&inst->SrcReg[0], machine, t); machine->AddressReg[0][0] = (GLint) FLOORF(t[0]); } break; @@ -728,9 +727,9 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_CMP: { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); - fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[2], machine, c); result[0] = a[0] < 0.0F ? b[0] : c[0]; result[1] = a[1] < 0.0F ? b[1] : c[1]; result[2] = a[2] < 0.0F ? b[2] : c[2]; @@ -741,7 +740,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_COS: { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = result[3] = (GLfloat) _mesa_cos(a[0]); store_vector4(inst, machine, result); @@ -761,11 +760,11 @@ _mesa_execute_program(GLcontext * ctx, * Finally, find the difference in the register values for * the original and derivative runs. */ - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, a); + fetch_vector4(&inst->SrcReg[0], machine, program, a); init_machine_deriv(ctx, machine, program, span, 'X', &dMachine); execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4(ctx, &inst->SrcReg[0], &dMachine, program, + fetch_vector4(&inst->SrcReg[0], &dMachine, program, aNext); result[0] = aNext[0] - a[0]; result[1] = aNext[1] - a[1]; @@ -787,9 +786,9 @@ _mesa_execute_program(GLcontext * ctx, column, result)) { init_machine_deriv(ctx, machine, program, span, 'Y', &dMachine); - fetch_vector4(ctx, &inst->SrcReg[0], machine, program, a); + fetch_vector4(&inst->SrcReg[0], machine, program, a); execute_program(ctx, program, pc, &dMachine, span, column); - fetch_vector4(ctx, &inst->SrcReg[0], &dMachine, program, + fetch_vector4(&inst->SrcReg[0], &dMachine, program, aNext); result[0] = aNext[0] - a[0]; result[1] = aNext[1] - a[1]; @@ -805,8 +804,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_DP3: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = result[1] = result[2] = result[3] = DOT3(a, b); store_vector4(inst, machine, result); if (DEBUG_PROG) { @@ -818,8 +817,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_DP4: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = result[1] = result[2] = result[3] = DOT4(a, b); store_vector4(inst, machine, result); if (DEBUG_PROG) { @@ -832,8 +831,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_DPH: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = result[1] = result[2] = result[3] = a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + b[3]; store_vector4(inst, machine, result); @@ -842,8 +841,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_DST: /* Distance vector */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = 1.0F; result[1] = a[1] * b[1]; result[2] = a[2]; @@ -854,7 +853,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_EXP: { GLfloat t[4], q[4], floor_t0; - fetch_vector1(ctx, &inst->SrcReg[0], machine, t); + fetch_vector1(&inst->SrcReg[0], machine, t); floor_t0 = FLOORF(t[0]); if (floor_t0 > FLT_MAX_EXP) { SET_POS_INFINITY(q[0]); @@ -880,7 +879,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_EX2: /* Exponential base 2 */ { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = result[3] = (GLfloat) _mesa_pow(2.0, a[0]); store_vector4(inst, machine, result); @@ -889,7 +888,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_FLR: { GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); result[0] = FLOORF(a[0]); result[1] = FLOORF(a[1]); result[2] = FLOORF(a[2]); @@ -900,7 +899,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_FRC: { GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); result[0] = a[0] - FLOORF(a[0]); result[1] = a[1] - FLOORF(a[1]); result[2] = a[2] - FLOORF(a[2]); @@ -929,7 +928,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_INT: /* float to int */ { GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); result[0] = (GLfloat) (GLint) a[0]; result[1] = (GLfloat) (GLint) a[1]; result[2] = (GLfloat) (GLint) a[2]; @@ -945,7 +944,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_KIL: /* ARB_f_p only */ { GLfloat a[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { return GL_FALSE; } @@ -954,7 +953,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_LG2: /* log base 2 */ { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = result[3] = LOG2(a[0]); store_vector4(inst, machine, result); } @@ -963,7 +962,7 @@ _mesa_execute_program(GLcontext * ctx, { const GLfloat epsilon = 1.0F / 256.0F; /* from NV VP spec */ GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); a[0] = MAX2(a[0], 0.0F); a[1] = MAX2(a[1], 0.0F); /* XXX ARB version clamps a[3], NV version doesn't */ @@ -992,7 +991,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_LOG: { GLfloat t[4], q[4], abs_t0; - fetch_vector1(ctx, &inst->SrcReg[0], machine, t); + fetch_vector1(&inst->SrcReg[0], machine, t); abs_t0 = FABSF(t[0]); if (abs_t0 != 0.0F) { /* Since we really can't handle infinite values on VMS @@ -1029,9 +1028,9 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_LRP: { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); - fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[2], machine, c); result[0] = a[0] * b[0] + (1.0F - a[0]) * c[0]; result[1] = a[1] * b[1] + (1.0F - a[1]) * c[1]; result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2]; @@ -1049,9 +1048,9 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_MAD: { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); - fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[2], machine, c); result[0] = a[0] * b[0] + c[0]; result[1] = a[1] * b[1] + c[1]; result[2] = a[2] * b[2] + c[2]; @@ -1069,8 +1068,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_MAX: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = MAX2(a[0], b[0]); result[1] = MAX2(a[1], b[1]); result[2] = MAX2(a[2], b[2]); @@ -1086,8 +1085,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_MIN: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = MIN2(a[0], b[0]); result[1] = MIN2(a[1], b[1]); result[2] = MIN2(a[2], b[2]); @@ -1098,7 +1097,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_MOV: { GLfloat result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, result); + fetch_vector4(&inst->SrcReg[0], machine, result); store_vector4(inst, machine, result); if (DEBUG_PROG) { printf("MOV (%g %g %g %g)\n", @@ -1109,8 +1108,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_MUL: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = a[0] * b[0]; result[1] = a[1] * b[1]; result[2] = a[2] * b[2]; @@ -1126,7 +1125,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_NOISE1: { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = result[3] = _slang_library_noise1(a[0]); @@ -1136,7 +1135,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_NOISE2: { GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = result[3] = _slang_library_noise2(a[0], a[1]); @@ -1146,7 +1145,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_NOISE3: { GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = @@ -1157,7 +1156,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_NOISE4: { GLfloat a[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = @@ -1173,7 +1172,7 @@ _mesa_execute_program(GLcontext * ctx, GLhalfNV hx, hy; GLuint *rawResult = (GLuint *) result; GLuint twoHalves; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); hx = _mesa_float_to_half(a[0]); hy = _mesa_float_to_half(a[1]); twoHalves = hx | (hy << 16); @@ -1186,7 +1185,7 @@ _mesa_execute_program(GLcontext * ctx, { GLfloat a[4], result[4]; GLuint usx, usy, *rawResult = (GLuint *) result; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); a[0] = CLAMP(a[0], 0.0F, 1.0F); a[1] = CLAMP(a[1], 0.0F, 1.0F); usx = IROUND(a[0] * 65535.0F); @@ -1200,7 +1199,7 @@ _mesa_execute_program(GLcontext * ctx, { GLfloat a[4], result[4]; GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); @@ -1218,7 +1217,7 @@ _mesa_execute_program(GLcontext * ctx, { GLfloat a[4], result[4]; GLuint ubx, uby, ubz, ubw, *rawResult = (GLuint *) result; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); a[0] = CLAMP(a[0], 0.0F, 1.0F); a[1] = CLAMP(a[1], 0.0F, 1.0F); a[2] = CLAMP(a[2], 0.0F, 1.0F); @@ -1235,8 +1234,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_POW: { GLfloat a[4], b[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); - fetch_vector1(ctx, &inst->SrcReg[1], machine, b); + fetch_vector1(&inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[1], machine, b); result[0] = result[1] = result[2] = result[3] = (GLfloat) _mesa_pow(a[0], b[0]); store_vector4(inst, machine, result); @@ -1245,7 +1244,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_RCP: { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); if (DEBUG_PROG) { if (a[0] == 0) printf("RCP(0)\n"); @@ -1267,8 +1266,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_RFL: /* reflection vector */ { GLfloat axis[4], dir[4], result[4], tmpX, tmpW; - fetch_vector4(ctx, &inst->SrcReg[0], machine, axis); - fetch_vector4(ctx, &inst->SrcReg[1], machine, dir); + fetch_vector4(&inst->SrcReg[0], machine, axis); + fetch_vector4(&inst->SrcReg[1], machine, dir); tmpW = DOT3(axis, axis); tmpX = (2.0F * DOT3(axis, dir)) / tmpW; result[0] = tmpX * axis[0] - dir[0]; @@ -1281,7 +1280,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_RSQ: /* 1 / sqrt() */ { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); a[0] = FABSF(a[0]); result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]); store_vector4(inst, machine, result); @@ -1293,7 +1292,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SCS: /* sine and cos */ { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = (GLfloat) _mesa_cos(a[0]); result[1] = (GLfloat) _mesa_sin(a[0]); result[2] = 0.0; /* undefined! */ @@ -1304,8 +1303,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SEQ: /* set on equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = (a[0] == b[0]) ? 1.0F : 0.0F; result[1] = (a[1] == b[1]) ? 1.0F : 0.0F; result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; @@ -1322,8 +1321,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SGE: /* set on greater or equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = (a[0] >= b[0]) ? 1.0F : 0.0F; result[1] = (a[1] >= b[1]) ? 1.0F : 0.0F; result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; @@ -1334,8 +1333,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SGT: /* set on greater */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = (a[0] > b[0]) ? 1.0F : 0.0F; result[1] = (a[1] > b[1]) ? 1.0F : 0.0F; result[2] = (a[2] > b[2]) ? 1.0F : 0.0F; @@ -1350,7 +1349,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SIN: { GLfloat a[4], result[4]; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = result[1] = result[2] = result[3] = (GLfloat) _mesa_sin(a[0]); store_vector4(inst, machine, result); @@ -1359,8 +1358,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SLE: /* set on less or equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = (a[0] <= b[0]) ? 1.0F : 0.0F; result[1] = (a[1] <= b[1]) ? 1.0F : 0.0F; result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; @@ -1371,8 +1370,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SLT: /* set on less */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = (a[0] < b[0]) ? 1.0F : 0.0F; result[1] = (a[1] < b[1]) ? 1.0F : 0.0F; result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; @@ -1383,8 +1382,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SNE: /* set on not equal */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = (a[0] != b[0]) ? 1.0F : 0.0F; result[1] = (a[1] != b[1]) ? 1.0F : 0.0F; result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; @@ -1401,8 +1400,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SUB: { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = a[0] - b[0]; result[1] = a[1] - b[1]; result[2] = a[2] - b[2]; @@ -1418,7 +1417,7 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_SWZ: /* extended swizzle */ { const struct prog_src_register *source = &inst->SrcReg[0]; - const GLfloat *src = get_register_pointer(ctx, source, machine); + const GLfloat *src = get_register_pointer(source, machine); GLfloat result[4]; GLuint i; for (i = 0; i < 4; i++) { @@ -1457,7 +1456,7 @@ _mesa_execute_program(GLcontext * ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); + fetch_vector4(&inst->SrcReg[0], machine, coord); machine->FetchTexelLod(ctx, coord, lambda, inst->TexSrcUnit, color); if (DEBUG_PROG) { @@ -1483,7 +1482,7 @@ _mesa_execute_program(GLcontext * ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, coord); + fetch_vector4(&inst->SrcReg[0], machine, coord); /* coord[3] is the bias to add to lambda */ bias = texUnit->LodBias + coord[3]; if (texUnit->_Current) @@ -1497,9 +1496,9 @@ _mesa_execute_program(GLcontext * ctx, /* Texture lookup w/ partial derivatives for LOD */ { GLfloat texcoord[4], dtdx[4], dtdy[4], color[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); - fetch_vector4(ctx, &inst->SrcReg[1], machine, dtdx); - fetch_vector4(ctx, &inst->SrcReg[2], machine, dtdy); + fetch_vector4(&inst->SrcReg[0], machine, texcoord); + fetch_vector4(&inst->SrcReg[1], machine, dtdx); + fetch_vector4(&inst->SrcReg[2], machine, dtdy); machine->FetchTexelDeriv(ctx, texcoord, dtdx, dtdy, inst->TexSrcUnit, color); store_vector4(inst, machine, color); @@ -1516,7 +1515,7 @@ _mesa_execute_program(GLcontext * ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); + fetch_vector4(&inst->SrcReg[0], machine, texcoord); /* Not so sure about this test - if texcoord[3] is * zero, we'd probably be fine except for an ASSERT in * IROUND_POS() which gets triggered by the inf values created. @@ -1542,7 +1541,7 @@ _mesa_execute_program(GLcontext * ctx, else #endif lambda = 0.0; - fetch_vector4(ctx, &inst->SrcReg[0], machine, texcoord); + fetch_vector4(&inst->SrcReg[0], machine, texcoord); if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX && texcoord[3] != 0.0) { texcoord[0] /= texcoord[3]; @@ -1559,7 +1558,7 @@ _mesa_execute_program(GLcontext * ctx, GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; GLhalfNV hx, hy; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); hx = rawBits[0] & 0xffff; hy = rawBits[0] >> 16; result[0] = result[2] = _mesa_half_to_float(hx); @@ -1572,7 +1571,7 @@ _mesa_execute_program(GLcontext * ctx, GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; GLushort usx, usy; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); usx = rawBits[0] & 0xffff; usy = rawBits[0] >> 16; result[0] = result[2] = usx * (1.0f / 65535.0f); @@ -1584,7 +1583,7 @@ _mesa_execute_program(GLcontext * ctx, { GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; @@ -1596,7 +1595,7 @@ _mesa_execute_program(GLcontext * ctx, { GLfloat a[4], result[4]; const GLuint *rawBits = (const GLuint *) a; - fetch_vector1(ctx, &inst->SrcReg[0], machine, a); + fetch_vector1(&inst->SrcReg[0], machine, a); result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; @@ -1607,8 +1606,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_XPD: /* cross product */ { GLfloat a[4], b[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); result[0] = a[1] * b[2] - a[2] * b[1]; result[1] = a[2] * b[0] - a[0] * b[2]; result[2] = a[0] * b[1] - a[1] * b[0]; @@ -1619,9 +1618,9 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_X2D: /* 2-D matrix transform */ { GLfloat a[4], b[4], c[4], result[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); - fetch_vector4(ctx, &inst->SrcReg[1], machine, b); - fetch_vector4(ctx, &inst->SrcReg[2], machine, c); + fetch_vector4(&inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[1], machine, b); + fetch_vector4(&inst->SrcReg[2], machine, c); result[0] = a[0] + b[0] * c[0] + b[1] * c[1]; result[1] = a[1] + b[0] * c[2] + b[1] * c[3]; result[2] = a[2] + b[0] * c[0] + b[1] * c[1]; @@ -1633,7 +1632,7 @@ _mesa_execute_program(GLcontext * ctx, { if (inst->SrcReg[0].File != -1) { GLfloat a[4]; - fetch_vector4(ctx, &inst->SrcReg[0], machine, a); + fetch_vector4(&inst->SrcReg[0], machine, a); _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, a[0], a[1], a[2], a[3]); } diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h index 2dbd922fb0..0f4956d6ee 100644 --- a/src/mesa/shader/prog_execute.h +++ b/src/mesa/shader/prog_execute.h @@ -55,8 +55,8 @@ struct gl_program_machine GLfloat Temporaries[MAX_PROGRAM_TEMPS][4]; GLfloat Outputs[MAX_PROGRAM_OUTPUTS][4]; + GLfloat (*EnvParams)[4]; /**< Vertex or Fragment env parameters */ GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ - GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ -- cgit v1.2.3 From b85d4d61a7f93a9f2d58a1d701808584e0fce8c7 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 18:56:57 -0700 Subject: define and use MAX_PROGRAM_ADDRESS_REGS --- src/mesa/main/config.h | 1 + src/mesa/shader/prog_execute.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 82ea72a59d..00df084fc8 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -201,6 +201,7 @@ #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 #define MAX_PROGRAM_CALL_DEPTH 8 #define MAX_PROGRAM_TEMPS 128 +#define MAX_PROGRAM_ADDRESS_REGS 2 #define MAX_UNIFORMS 128 #define MAX_VARYING 8 /*@}*/ diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h index 0f4956d6ee..47845e9111 100644 --- a/src/mesa/shader/prog_execute.h +++ b/src/mesa/shader/prog_execute.h @@ -57,7 +57,7 @@ struct gl_program_machine GLfloat Outputs[MAX_PROGRAM_OUTPUTS][4]; GLfloat (*EnvParams)[4]; /**< Vertex or Fragment env parameters */ GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */ - GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4]; + GLint AddressReg[MAX_PROGRAM_ADDRESS_REGS][4]; GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */ GLuint StackDepth; /**< Index/ptr to top of CallStack[] */ -- cgit v1.2.3 From 313d50e9036558185e189873acb861bfa73f41a1 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 19:01:16 -0700 Subject: fix bounds checking in get_register_pointer() --- src/mesa/shader/prog_execute.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 2db4e69522..d42b2e99b9 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -84,14 +84,20 @@ get_register_pointer(const struct prog_src_register *source, { if (source->RelAddr) { const GLint reg = source->Index + machine->AddressReg[0][0]; - if (reg < 0 || reg > MAX_NV_VERTEX_PROGRAM_PARAMS) - return ZeroVec; - else if (source->File == PROGRAM_ENV_PARAM) - return machine->EnvParams[reg]; + if (source->File == PROGRAM_ENV_PARAM) + if (reg < 0 || reg >= MAX_PROGRAM_ENV_PARAMS) + return ZeroVec; + else + return machine->EnvParams[reg]; else { + const struct gl_program_parameter_list *params; ASSERT(source->File == PROGRAM_LOCAL_PARAM || source->File == PROGRAM_STATE_VAR); - return machine->CurProgram->Parameters->ParameterValues[reg]; + params = machine->CurProgram->Parameters; + if (reg < 0 || reg >= params->NumParameters) + return ZeroVec; + else + return params->ParameterValues[reg]; } } -- cgit v1.2.3 From 3c1c999226859216b8af35c4806413b4488f21b4 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 19:11:44 -0700 Subject: update comments --- src/mesa/shader/prog_execute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index d42b2e99b9..a63298ba7d 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -615,9 +615,9 @@ init_machine_deriv(GLcontext * ctx, /** * Execute the given vertex/fragment program. * - * \param ctx - rendering context - * \param program - the fragment program to execute - * \param machine - machine state (register file) + * \param ctx rendering context + * \param program the program to execute + * \param machine machine state (must be initialized) * \return GL_TRUE if program completed or GL_FALSE if program executed KIL. */ GLboolean -- cgit v1.2.3 From 4e53ce81cfa2a98d045433ffbc4d295a239ad0b6 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 25 Feb 2007 20:05:22 -0700 Subject: remove unneeded includes --- src/mesa/swrast/s_fragprog.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 4e1c829773..698925cdba 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -27,13 +27,9 @@ #include "context.h" #include "prog_execute.h" #include "prog_instruction.h" -#include "prog_parameter.h" -#include "prog_print.h" -#include "program.h" #include "s_fragprog.h" #include "s_span.h" -#include "slang_library_noise.h" /** -- cgit v1.2.3 From e63c7e089334fd219e0c738fb089be2f75c689d5 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 14:22:05 -0700 Subject: Use new slang_emit_info struct for passing context info around. --- src/mesa/shader/slang/slang_emit.c | 303 ++++++++++++++++++++----------------- 1 file changed, 160 insertions(+), 143 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index e57f215dfe..f5b6fb4d65 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -57,6 +57,13 @@ static GLboolean EmitHighLevelInstructions = GL_TRUE; static GLboolean EmitComments = GL_FALSE; +typedef struct +{ + slang_info_log *log; + slang_var_table *vt; + struct gl_program *prog; +} slang_emit_info; + /** * Assembly and IR info @@ -408,14 +415,16 @@ slang_print_ir(const slang_ir_node *n, int indent) * a multiply or add, etc. */ static GLboolean -alloc_temp_storage(slang_var_table *vt, slang_ir_node *n, GLint size) +alloc_temp_storage(slang_emit_info *emitInfo, slang_ir_node *n, GLint size) { assert(!n->Var); assert(!n->Store); assert(size > 0); n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, -1, size); - if (!_slang_alloc_temp(vt, n->Store)) { - RETURN_ERROR("Ran out of registers, too many temporaries", 0); + if (!_slang_alloc_temp(emitInfo->vt, n->Store)) { + slang_info_log_error(emitInfo->log, + "Ran out of registers, too many temporaries"); + return GL_FALSE; } return GL_TRUE; } @@ -507,8 +516,9 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st) * \return pointer to the new instruction */ static struct prog_instruction * -new_instruction(struct gl_program *prog, gl_inst_opcode opcode) +new_instruction(slang_emit_info *emitInfo, gl_inst_opcode opcode) { + struct gl_program *prog = emitInfo->prog; struct prog_instruction *inst; prog->Instructions = _mesa_realloc_instructions(prog->Instructions, prog->NumInstructions, @@ -538,7 +548,7 @@ prev_instruction(struct gl_program *prog) static struct prog_instruction * -emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog); +emit(slang_emit_info *emitInfo, slang_ir_node *n); /** @@ -678,7 +688,7 @@ instruction_annotation(gl_inst_opcode opcode, char *dstAnnot, * Either 1, 2 or 3 operands. */ static struct prog_instruction * -emit_arith(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_arith(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; const slang_ir_info *info = slang_find_ir_info(n->Opcode); @@ -695,34 +705,34 @@ emit_arith(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) if (info->NumParams == 2 && n->Opcode == IR_ADD && n->Children[0]->Opcode == IR_MUL) { /* found pattern IR_ADD(IR_MUL(A, B), C) */ - emit(vt, n->Children[0]->Children[0], prog); /* A */ - emit(vt, n->Children[0]->Children[1], prog); /* B */ - emit(vt, n->Children[1], prog); /* C */ + emit(emitInfo, n->Children[0]->Children[0]); /* A */ + emit(emitInfo, n->Children[0]->Children[1]); /* B */ + emit(emitInfo, n->Children[1]); /* C */ /* generate MAD instruction */ - inst = new_instruction(prog, OPCODE_MAD); + inst = new_instruction(emitInfo, OPCODE_MAD); /* operands: A, B, C: */ storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Children[0]->Store); storage_to_src_reg(&inst->SrcReg[1], n->Children[0]->Children[1]->Store); storage_to_src_reg(&inst->SrcReg[2], n->Children[1]->Store); - free_temp_storage(vt, n->Children[0]->Children[0]); - free_temp_storage(vt, n->Children[0]->Children[1]); - free_temp_storage(vt, n->Children[1]); + free_temp_storage(emitInfo->vt, n->Children[0]->Children[0]); + free_temp_storage(emitInfo->vt, n->Children[0]->Children[1]); + free_temp_storage(emitInfo->vt, n->Children[1]); } else if (info->NumParams == 2 && n->Opcode == IR_ADD && n->Children[1]->Opcode == IR_MUL) { /* found pattern IR_ADD(A, IR_MUL(B, C)) */ - emit(vt, n->Children[0], prog); /* A */ - emit(vt, n->Children[1]->Children[0], prog); /* B */ - emit(vt, n->Children[1]->Children[1], prog); /* C */ + emit(emitInfo, n->Children[0]); /* A */ + emit(emitInfo, n->Children[1]->Children[0]); /* B */ + emit(emitInfo, n->Children[1]->Children[1]); /* C */ /* generate MAD instruction */ - inst = new_instruction(prog, OPCODE_MAD); + inst = new_instruction(emitInfo, OPCODE_MAD); /* operands: B, C, A */ storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Children[0]->Store); storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Children[1]->Store); storage_to_src_reg(&inst->SrcReg[2], n->Children[0]->Store); - free_temp_storage(vt, n->Children[1]->Children[0]); - free_temp_storage(vt, n->Children[1]->Children[1]); - free_temp_storage(vt, n->Children[0]); + free_temp_storage(emitInfo->vt, n->Children[1]->Children[0]); + free_temp_storage(emitInfo->vt, n->Children[1]->Children[1]); + free_temp_storage(emitInfo->vt, n->Children[0]); } else #endif @@ -731,30 +741,30 @@ emit_arith(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* gen code for children */ for (i = 0; i < info->NumParams; i++) - emit(vt, n->Children[i], prog); + emit(emitInfo, n->Children[i]); /* gen this instruction and src registers */ - inst = new_instruction(prog, info->InstOpcode); + inst = new_instruction(emitInfo, info->InstOpcode); for (i = 0; i < info->NumParams; i++) storage_to_src_reg(&inst->SrcReg[i], n->Children[i]->Store); /* annotation */ for (i = 0; i < info->NumParams; i++) - srcAnnot[i] = storage_annotation(n->Children[i], prog); + srcAnnot[i] = storage_annotation(n->Children[i], emitInfo->prog); /* free temps */ for (i = 0; i < info->NumParams; i++) - free_temp_storage(vt, n->Children[i]); + free_temp_storage(emitInfo->vt, n->Children[i]); } /* result storage */ if (!n->Store) { - if (!alloc_temp_storage(vt, n, info->ResultSize)) + if (!alloc_temp_storage(emitInfo, n, info->ResultSize)) return NULL; } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - dstAnnot = storage_annotation(n, prog); + dstAnnot = storage_annotation(n, emitInfo->prog); inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, srcAnnot[0], srcAnnot[1], srcAnnot[2]); @@ -768,7 +778,7 @@ emit_arith(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * Generate code for an IR_CLAMP instruction. */ static struct prog_instruction * -emit_clamp(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; @@ -778,7 +788,7 @@ emit_clamp(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * ch[2] = max limit */ - inst = emit(vt, n->Children[0], prog); + inst = emit(emitInfo, n->Children[0]); /* If lower limit == 0.0 and upper limit == 1.0, * set prev instruction's SaturateMode field to SATURATE_ZERO_ONE. @@ -810,20 +820,20 @@ emit_clamp(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) #endif if (!n->Store) - if (!alloc_temp_storage(vt, n, n->Children[0]->Store->Size)) + if (!alloc_temp_storage(emitInfo, n, n->Children[0]->Store->Size)) return NULL; - emit(vt, n->Children[1], prog); - emit(vt, n->Children[2], prog); + emit(emitInfo, n->Children[1]); + emit(emitInfo, n->Children[2]); /* tmp = max(ch[0], ch[1]) */ - inst = new_instruction(prog, OPCODE_MAX); + inst = new_instruction(emitInfo, OPCODE_MAX); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); /* tmp = min(tmp, ch[2]) */ - inst = new_instruction(prog, OPCODE_MIN); + inst = new_instruction(emitInfo, OPCODE_MIN); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Store); storage_to_src_reg(&inst->SrcReg[1], n->Children[2]->Store); @@ -833,7 +843,7 @@ emit_clamp(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_negation(slang_emit_info *emitInfo, slang_ir_node *n) { /* Implement as MOV dst, -src; */ /* XXX we could look at the previous instruction and in some circumstances @@ -841,13 +851,13 @@ emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) */ struct prog_instruction *inst; - emit(vt, n->Children[0], prog); + emit(emitInfo, n->Children[0]); if (!n->Store) - if (!alloc_temp_storage(vt, n, n->Children[0]->Store->Size)) + if (!alloc_temp_storage(emitInfo, n, n->Children[0]->Store->Size)) return NULL; - inst = new_instruction(prog, OPCODE_MOV); + inst = new_instruction(emitInfo, OPCODE_MOV); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); inst->SrcReg[0].NegateBase = NEGATE_XYZW; @@ -856,21 +866,22 @@ emit_negation(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -emit_label(const slang_ir_node *n, struct gl_program *prog) +emit_label(slang_emit_info *emitInfo, const slang_ir_node *n) { assert(n->Label); assert(_slang_label_get_location(n->Label) < 0); - _slang_label_set_location(n->Label, prog->NumInstructions, prog); + _slang_label_set_location(n->Label, emitInfo->prog->NumInstructions, + emitInfo->prog); return NULL; } static struct prog_instruction * -emit_cjump(slang_ir_node *n, struct gl_program *prog, GLuint zeroOrOne) +emit_cjump(slang_emit_info *emitInfo, slang_ir_node *n, GLuint zeroOrOne) { struct prog_instruction *inst; assert(n->Opcode == IR_CJUMP0 || n->Opcode == IR_CJUMP1); - inst = new_instruction(prog, OPCODE_BRA); + inst = new_instruction(emitInfo, OPCODE_BRA); if (zeroOrOne) inst->DstReg.CondMask = COND_NE; /* branch if non-zero */ else @@ -878,61 +889,61 @@ emit_cjump(slang_ir_node *n, struct gl_program *prog, GLuint zeroOrOne) inst->DstReg.CondSwizzle = SWIZZLE_X; inst->BranchTarget = _slang_label_get_location(n->Label); if (inst->BranchTarget < 0) { - _slang_label_add_reference(n->Label, prog->NumInstructions - 1); + _slang_label_add_reference(n->Label, emitInfo->prog->NumInstructions - 1); } return inst; } static struct prog_instruction * -emit_jump(slang_ir_node *n, struct gl_program *prog) +emit_jump(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; - inst = new_instruction(prog, OPCODE_BRA); + inst = new_instruction(emitInfo, OPCODE_BRA); inst->DstReg.CondMask = COND_TR; /* always branch */ inst->BranchTarget = _slang_label_get_location(n->Label); if (inst->BranchTarget < 0) { - _slang_label_add_reference(n->Label, prog->NumInstructions - 1); + _slang_label_add_reference(n->Label, emitInfo->prog->NumInstructions - 1); } return inst; } static struct prog_instruction * -emit_kill(struct gl_program *prog) +emit_kill(slang_emit_info *emitInfo) { struct prog_instruction *inst; /* NV-KILL - discard fragment depending on condition code. * Note that ARB-KILL depends on sign of vector operand. */ - inst = new_instruction(prog, OPCODE_KIL_NV); + inst = new_instruction(emitInfo, OPCODE_KIL_NV); inst->DstReg.CondMask = COND_TR; /* always branch */ return inst; } static struct prog_instruction * -emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_tex(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; if (n->Opcode == IR_TEX) { - inst = new_instruction(prog, OPCODE_TEX); + inst = new_instruction(emitInfo, OPCODE_TEX); } else if (n->Opcode == IR_TEXB) { - inst = new_instruction(prog, OPCODE_TXB); + inst = new_instruction(emitInfo, OPCODE_TXB); } else { assert(n->Opcode == IR_TEXP); - inst = new_instruction(prog, OPCODE_TXP); + inst = new_instruction(emitInfo, OPCODE_TXP); } if (!n->Store) - if (!alloc_temp_storage(vt, n, 4)) + if (!alloc_temp_storage(emitInfo, n, 4)) return NULL; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - (void) emit(vt, n->Children[1], prog); + (void) emit(emitInfo, n->Children[1]); /* Child[1] is the coord */ storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); @@ -951,29 +962,29 @@ emit_tex(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_move(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; /* rhs */ assert(n->Children[1]); - inst = emit(vt, n->Children[1], prog); + inst = emit(emitInfo, n->Children[1]); assert(n->Children[1]->Store->Index >= 0); /* lhs */ - emit(vt, n->Children[0], prog); + emit(emitInfo, n->Children[0]); assert(!n->Store); n->Store = n->Children[0]->Store; #if PEEPHOLE_OPTIMIZATIONS - if (inst && _slang_is_temp(vt, n->Children[1]->Store)) { + if (inst && _slang_is_temp(emitInfo->vt, n->Children[1]->Store)) { /* Peephole optimization: * Just modify the RHS to put its result into the dest of this * MOVE operation. Then, this MOVE is a no-op. */ - _slang_free_temp(vt, n->Children[1]->Store); + _slang_free_temp(emitInfo->vt, n->Children[1]->Store); *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ assert(n->Children[0]->Store->Index >= 0); @@ -994,7 +1005,7 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) dstStore.Size = 4; srcStore.Size = 4; while (size >= 4) { - inst = new_instruction(prog, OPCODE_MOV); + inst = new_instruction(emitInfo, OPCODE_MOV); inst->Comment = _mesa_strdup("IR_MOVE block"); storage_to_dst_reg(&inst->DstReg, &dstStore, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], &srcStore); @@ -1006,31 +1017,31 @@ emit_move(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) else { /* single register move */ char *srcAnnot, *dstAnnot; - inst = new_instruction(prog, OPCODE_MOV); + inst = new_instruction(emitInfo, OPCODE_MOV); assert(n->Children[0]->Store->Index >= 0); assert(n->Children[0]->Store->Index < 16); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); - dstAnnot = storage_annotation(n->Children[0], prog); - srcAnnot = storage_annotation(n->Children[1], prog); + dstAnnot = storage_annotation(n->Children[0], emitInfo->prog); + srcAnnot = storage_annotation(n->Children[1], emitInfo->prog); inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, srcAnnot, NULL, NULL); } - free_temp_storage(vt, n->Children[1]); + free_temp_storage(emitInfo->vt, n->Children[1]); return inst; } } static struct prog_instruction * -emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_cond(slang_emit_info *emitInfo, slang_ir_node *n) { /* Conditional expression (in if/while/for stmts). * Need to update condition code register. * Next instruction is typically an IR_CJUMP0/1. */ /* last child expr instruction: */ - struct prog_instruction *inst = emit(vt, n->Children[0], prog); + struct prog_instruction *inst = emit(emitInfo, n->Children[0]); if (inst) { /* set inst's CondUpdate flag */ inst->CondUpdate = GL_TRUE; @@ -1043,13 +1054,13 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * Note: must use full 4-component vector since all four * condition codes must be set identically. */ - if (!alloc_temp_storage(vt, n, 4)) + if (!alloc_temp_storage(emitInfo, n, 4)) return NULL; - inst = new_instruction(prog, OPCODE_MOV); + inst = new_instruction(emitInfo, OPCODE_MOV); inst->CondUpdate = GL_TRUE; storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - _slang_free_temp(vt, n->Store); + _slang_free_temp(emitInfo->vt, n->Store); inst->Comment = _mesa_strdup("COND expr"); return inst; /* XXX or null? */ } @@ -1060,7 +1071,7 @@ emit_cond(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * Logical-NOT */ static struct prog_instruction * -emit_not(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_not(slang_emit_info *emitInfo, slang_ir_node *n) { GLfloat zero = 0.0; slang_ir_storage st; @@ -1069,23 +1080,23 @@ emit_not(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* need zero constant */ st.File = PROGRAM_CONSTANT; st.Size = 1; - st.Index = _mesa_add_unnamed_constant(prog->Parameters, &zero, + st.Index = _mesa_add_unnamed_constant(emitInfo->prog->Parameters, &zero, 1, &st.Swizzle); /* child expr */ - (void) emit(vt, n->Children[0], prog); + (void) emit(emitInfo, n->Children[0]); /* XXXX if child instr is SGT convert to SLE, if SEQ, SNE, etc */ if (!n->Store) - if (!alloc_temp_storage(vt, n, n->Children[0]->Store->Size)) + if (!alloc_temp_storage(emitInfo, n, n->Children[0]->Store->Size)) return NULL; - inst = new_instruction(prog, OPCODE_SEQ); + inst = new_instruction(emitInfo, OPCODE_SEQ); storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); storage_to_src_reg(&inst->SrcReg[1], &st); - free_temp_storage(vt, n->Children[0]); + free_temp_storage(emitInfo->vt, n->Children[0]); inst->Comment = _mesa_strdup("NOT"); return inst; @@ -1093,46 +1104,47 @@ emit_not(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -emit_if(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_if(slang_emit_info *emitInfo, slang_ir_node *n) { + struct gl_program *prog = emitInfo->prog; struct prog_instruction *ifInst; - GLuint ifInstLoc, elseInstLoc; + GLuint ifInstLoc, elseInstLoc = 0; - emit(vt, n->Children[0], prog); /* the condition */ + emit(emitInfo, n->Children[0]); /* the condition */ ifInstLoc = prog->NumInstructions; if (EmitHighLevelInstructions) { - ifInst = new_instruction(prog, OPCODE_IF); + ifInst = new_instruction(emitInfo, OPCODE_IF); ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ ifInst->DstReg.CondSwizzle = SWIZZLE_X; } else { /* conditional jump to else, or endif */ - ifInst = new_instruction(prog, OPCODE_BRA); + ifInst = new_instruction(emitInfo, OPCODE_BRA); ifInst->DstReg.CondMask = COND_EQ; /* BRA if cond is zero */ ifInst->DstReg.CondSwizzle = SWIZZLE_X; ifInst->Comment = _mesa_strdup("if zero"); } /* if body */ - emit(vt, n->Children[1], prog); + emit(emitInfo, n->Children[1]); if (n->Children[2]) { /* have else body */ elseInstLoc = prog->NumInstructions; if (EmitHighLevelInstructions) { - (void) new_instruction(prog, OPCODE_ELSE); + (void) new_instruction(emitInfo, OPCODE_ELSE); } else { /* jump to endif instruction */ struct prog_instruction *inst; - inst = new_instruction(prog, OPCODE_BRA); + inst = new_instruction(emitInfo, OPCODE_BRA); inst->Comment = _mesa_strdup("else"); inst->DstReg.CondMask = COND_TR; /* always branch */ } ifInst = prog->Instructions + ifInstLoc; ifInst->BranchTarget = prog->NumInstructions; - emit(vt, n->Children[2], prog); + emit(emitInfo, n->Children[2]); } else { /* no else body */ @@ -1141,7 +1153,7 @@ emit_if(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) } if (EmitHighLevelInstructions) { - (void) new_instruction(prog, OPCODE_ENDIF); + (void) new_instruction(emitInfo, OPCODE_ENDIF); } if (n->Children[2]) { @@ -1154,8 +1166,9 @@ emit_if(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) static struct prog_instruction * -emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) { + struct gl_program *prog = emitInfo->prog; struct prog_instruction *beginInst, *endInst; GLuint beginInstLoc, endInstLoc; slang_ir_node *ir; @@ -1163,20 +1176,20 @@ emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* emit OPCODE_BGNLOOP */ beginInstLoc = prog->NumInstructions; if (EmitHighLevelInstructions) { - (void) new_instruction(prog, OPCODE_BGNLOOP); + (void) new_instruction(emitInfo, OPCODE_BGNLOOP); } /* body */ - emit(vt, n->Children[0], prog); + emit(emitInfo, n->Children[0]); endInstLoc = prog->NumInstructions; if (EmitHighLevelInstructions) { /* emit OPCODE_ENDLOOP */ - endInst = new_instruction(prog, OPCODE_ENDLOOP); + endInst = new_instruction(emitInfo, OPCODE_ENDLOOP); } else { /* emit unconditional BRA-nch */ - endInst = new_instruction(prog, OPCODE_BRA); + endInst = new_instruction(emitInfo, OPCODE_BRA); endInst->DstReg.CondMask = COND_TR; /* always true */ } /* end instruction's BranchTarget points to top of loop */ @@ -1222,18 +1235,18 @@ emit_loop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * Either OPCODE_CONT, OPCODE_BRK or OPCODE_BRA will be emitted. */ static struct prog_instruction * -emit_cont_break(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_cont_break(slang_emit_info *emitInfo, slang_ir_node *n) { gl_inst_opcode opcode; struct prog_instruction *inst; - n->InstLocation = prog->NumInstructions; + n->InstLocation = emitInfo->prog->NumInstructions; if (EmitHighLevelInstructions) { opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; } else { opcode = OPCODE_BRA; } - inst = new_instruction(prog, opcode); + inst = new_instruction(emitInfo, opcode); inst->DstReg.CondMask = COND_TR; /* always true */ return inst; } @@ -1244,18 +1257,18 @@ emit_cont_break(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * Either OPCODE_CONT, OPCODE_BRK or OPCODE_BRA will be emitted. */ static struct prog_instruction * -emit_cont_break_if(slang_var_table *vt, slang_ir_node *n, - struct gl_program *prog, GLboolean breakTrue) +emit_cont_break_if(slang_emit_info *emitInfo, slang_ir_node *n, + GLboolean breakTrue) { gl_inst_opcode opcode; struct prog_instruction *inst; /* evaluate condition expr, setting cond codes */ - inst = emit(vt, n->Children[0], prog); + inst = emit(emitInfo, n->Children[0]); assert(inst); inst->CondUpdate = GL_TRUE; - n->InstLocation = prog->NumInstructions; + n->InstLocation = emitInfo->prog->NumInstructions; if (EmitHighLevelInstructions) { if (n->Opcode == IR_CONT_IF_TRUE || n->Opcode == IR_CONT_IF_FALSE) @@ -1266,7 +1279,7 @@ emit_cont_break_if(slang_var_table *vt, slang_ir_node *n, else { opcode = OPCODE_BRA; } - inst = new_instruction(prog, opcode); + inst = new_instruction(emitInfo, opcode); inst->DstReg.CondMask = breakTrue ? COND_NE : COND_EQ; return inst; } @@ -1292,12 +1305,12 @@ fix_swizzle(GLuint swizzle) static struct prog_instruction * -emit_swizzle(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit_swizzle(slang_emit_info *emitInfo, slang_ir_node *n) { GLuint swizzle; /* swizzled storage access */ - (void) emit(vt, n->Children[0], prog); + (void) emit(emitInfo, n->Children[0]); /* "pull-up" the child's storage info, applying our swizzle info */ n->Store->File = n->Children[0]->Store->File; @@ -1329,15 +1342,14 @@ emit_swizzle(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) * element represented by this node. */ static struct prog_instruction * -emit_array_element(slang_var_table *vt, slang_ir_node *n, - struct gl_program *prog) +emit_array_element(slang_emit_info *emitInfo, slang_ir_node *n) { assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Size > 0); if (n->Store->File == PROGRAM_STATE_VAR) { - n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); + n->Store->Index = _slang_alloc_statevar(n, emitInfo->prog->Parameters); return NULL; } @@ -1363,11 +1375,10 @@ emit_array_element(slang_var_table *vt, slang_ir_node *n, * Resolve storage for accessing a structure field. */ static struct prog_instruction * -emit_struct_field(slang_var_table *vt, slang_ir_node *n, - struct gl_program *prog) +emit_struct_field(slang_emit_info *emitInfo, slang_ir_node *n) { if (n->Store->File == PROGRAM_STATE_VAR) { - n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); + n->Store->Index = _slang_alloc_statevar(n, emitInfo->prog->Parameters); return NULL; } else { @@ -1378,7 +1389,7 @@ emit_struct_field(slang_var_table *vt, slang_ir_node *n, static struct prog_instruction * -emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) +emit(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; if (!n) @@ -1389,17 +1400,17 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) /* sequence of two sub-trees */ assert(n->Children[0]); assert(n->Children[1]); - emit(vt, n->Children[0], prog); - inst = emit(vt, n->Children[1], prog); + emit(emitInfo, n->Children[0]); + inst = emit(emitInfo, n->Children[1]); assert(!n->Store); n->Store = n->Children[1]->Store; return inst; case IR_SCOPE: /* new variable scope */ - _slang_push_var_table(vt); - inst = emit(vt, n->Children[0], prog); - _slang_pop_var_table(vt); + _slang_push_var_table(emitInfo->vt); + inst = emit(emitInfo, n->Children[0]); + _slang_pop_var_table(emitInfo->vt); return inst; case IR_VAR_DECL: @@ -1410,13 +1421,13 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store->Index < 0); if (!n->Var || n->Var->isTemp) { /* a nameless/temporary variable, will be freed after first use */ - if (!_slang_alloc_temp(vt, n->Store)) + if (!_slang_alloc_temp(emitInfo->vt, n->Store)) RETURN_ERROR("Ran out of registers, too many temporaries", 0); } else { /* a regular variable */ - _slang_add_variable(vt, n->Var); - if (!_slang_alloc_var(vt, n->Store)) + _slang_add_variable(emitInfo->vt, n->Var); + if (!_slang_alloc_var(emitInfo->vt, n->Store)) RETURN_ERROR("Ran out of registers, too many variables", 0); /* printf("IR_VAR_DECL %s %d store %p\n", @@ -1432,7 +1443,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) _mesa_swizzle_string(n->Store->Swizzle, 0, GL_FALSE), (char *) n->Var->a_name, n->Store->Size); - inst = new_instruction(prog, OPCODE_NOP); + inst = new_instruction(emitInfo, OPCODE_NOP); inst->Comment = _mesa_strdup(s); return inst; } @@ -1447,7 +1458,7 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) if (n->Store->File == PROGRAM_STATE_VAR && n->Store->Index < 0) { - n->Store->Index = _slang_alloc_statevar(n, prog->Parameters); + n->Store->Index = _slang_alloc_statevar(n, emitInfo->prog->Parameters); } if (n->Store->Index < 0) { @@ -1458,11 +1469,11 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) break; case IR_ELEMENT: - return emit_array_element(vt, n, prog); + return emit_array_element(emitInfo, n); case IR_FIELD: - return emit_struct_field(vt, n, prog); + return emit_struct_field(emitInfo, n); case IR_SWIZZLE: - return emit_swizzle(vt, n, prog); + return emit_swizzle(emitInfo, n); case IR_I_TO_F: { @@ -1504,18 +1515,18 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) case IR_EXP2: /* trinary operators */ case IR_LRP: - return emit_arith(vt, n, prog); + return emit_arith(emitInfo, n); case IR_CLAMP: - return emit_clamp(vt, n, prog); + return emit_clamp(emitInfo, n); case IR_TEX: case IR_TEXB: case IR_TEXP: - return emit_tex(vt, n, prog); + return emit_tex(emitInfo, n); case IR_NEG: - return emit_negation(vt, n, prog); + return emit_negation(emitInfo, n); case IR_FLOAT: /* find storage location for this float constant */ - n->Store->Index = _mesa_add_unnamed_constant(prog->Parameters, n->Value, + n->Store->Index = _mesa_add_unnamed_constant(emitInfo->prog->Parameters, n->Value, n->Store->Size, &n->Store->Swizzle); if (n->Store->Index < 0) { @@ -1524,47 +1535,47 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) return NULL; case IR_MOVE: - return emit_move(vt, n, prog); + return emit_move(emitInfo, n); case IR_COND: - return emit_cond(vt, n, prog); + return emit_cond(emitInfo, n); case IR_NOT: - return emit_not(vt, n, prog); + return emit_not(emitInfo, n); case IR_LABEL: - return emit_label(n, prog); + return emit_label(emitInfo, n); case IR_JUMP: - return emit_jump(n, prog); + return emit_jump(emitInfo, n); case IR_CJUMP0: - return emit_cjump(n, prog, 0); + return emit_cjump(emitInfo, n, 0); case IR_CJUMP1: - return emit_cjump(n, prog, 1); + return emit_cjump(emitInfo, n, 1); case IR_KILL: - return emit_kill(prog); + return emit_kill(emitInfo); case IR_IF: - return emit_if(vt, n, prog); + return emit_if(emitInfo, n); case IR_LOOP: - return emit_loop(vt, n, prog); + return emit_loop(emitInfo, n); case IR_BREAK_IF_FALSE: case IR_CONT_IF_FALSE: - return emit_cont_break_if(vt, n, prog, GL_FALSE); + return emit_cont_break_if(emitInfo, n, GL_FALSE); case IR_BREAK_IF_TRUE: case IR_CONT_IF_TRUE: - return emit_cont_break_if(vt, n, prog, GL_TRUE); + return emit_cont_break_if(emitInfo, n, GL_TRUE); case IR_BREAK: /* fall-through */ case IR_CONT: - return emit_cont_break(vt, n, prog); + return emit_cont_break(emitInfo, n); case IR_BEGIN_SUB: - return new_instruction(prog, OPCODE_BGNSUB); + return new_instruction(emitInfo, OPCODE_BGNSUB); case IR_END_SUB: - return new_instruction(prog, OPCODE_ENDSUB); + return new_instruction(emitInfo, OPCODE_ENDSUB); case IR_RETURN: - return new_instruction(prog, OPCODE_RET); + return new_instruction(emitInfo, OPCODE_RET); case IR_NOP: return NULL; @@ -1579,16 +1590,22 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) GLboolean _slang_emit_code(slang_ir_node *n, slang_var_table *vt, - struct gl_program *prog, GLboolean withEnd) + struct gl_program *prog, GLboolean withEnd, + slang_info_log *log) { GLboolean success; + slang_emit_info emitInfo; + + emitInfo.log = log; + emitInfo.vt = vt; + emitInfo.prog = prog; - (void) emit(vt, n, prog); + (void) emit(&emitInfo, n); /* finish up by adding the END opcode to program */ if (withEnd) { struct prog_instruction *inst; - inst = new_instruction(prog, OPCODE_END); + inst = new_instruction(&emitInfo, OPCODE_END); } success = GL_TRUE; -- cgit v1.2.3 From 7f01ef171fa99e9f423fcaae28eff27edefc8d85 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 14:32:29 -0700 Subject: Overhaul of error logging. --- src/mesa/shader/slang/slang_error.h | 47 +++---------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_error.h b/src/mesa/shader/slang/slang_error.h index d35ae83fba..064b11b498 100644 --- a/src/mesa/shader/slang/slang_error.h +++ b/src/mesa/shader/slang/slang_error.h @@ -25,7 +25,7 @@ #ifndef SLANG_ERROR_H #define SLANG_ERROR_H - +#if 0 extern void _slang_reset_error(void); @@ -37,49 +37,8 @@ _slang_record_error(const char *msg1, const char *msg2, extern const char * _slang_error_text(void); - - -/** - * Record a compilation error, single string message. - */ -#define RETURN_ERROR(MSG, POS) \ -do { \ - _slang_record_error(MSG, "", POS, __FILE__, __LINE__); \ - return GL_FALSE; \ -} while (0) - - -/** - * Record a compilation error, two-string message. - */ -#define RETURN_ERROR2(MSG1, MSG2, POS) \ -do { \ - _slang_record_error(MSG1, MSG2, POS, __FILE__, __LINE__); \ - return GL_FALSE; \ -} while (0) - - -/** - * Record a nil error. Either a real error message or out of memory should - * have already been recorded. - */ -#define RETURN_NIL() \ -do { \ - _slang_record_error("unknown", "", -1, __FILE__, __LINE__); \ - return GL_FALSE; \ -} while (0) - - -/** - * Used to report an out of memory condition. - */ -#define RETURN_OUT_OF_MEMORY() \ -do { \ - _slang_record_error("Out of memory", "", -1, __FILE__, __LINE__); \ - return GL_FALSE; \ -} while (0) - - +#endif +foo! #endif /* SLANG_ERROR_H */ -- cgit v1.2.3 From c4ac5ac9d70bf89366f8d8798d038dbbc71d833f Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 14:32:53 -0700 Subject: Overhaul of error handling. --- src/mesa/shader/slang/slang_codegen.c | 37 +++++----- src/mesa/shader/slang/slang_compile.c | 114 ++-------------------------- src/mesa/shader/slang/slang_compile.h | 13 ---- src/mesa/shader/slang/slang_emit.c | 18 +++-- src/mesa/shader/slang/slang_emit.h | 3 +- src/mesa/shader/slang/slang_preprocess.h | 23 +++--- src/mesa/shader/slang/slang_simplify.c | 6 +- src/mesa/shader/slang/slang_simplify.h | 3 +- src/mesa/shader/slang/slang_typeinfo.c | 123 +++++++++++++++++-------------- src/mesa/shader/slang/slang_typeinfo.h | 9 ++- src/mesa/sources | 2 +- 11 files changed, 128 insertions(+), 223 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d239a97500..efd330106b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -47,7 +47,6 @@ #include "slang_typeinfo.h" #include "slang_codegen.h" #include "slang_compile.h" -#include "slang_error.h" #include "slang_label.h" #include "slang_simplify.h" #include "slang_emit.h" @@ -1154,7 +1153,7 @@ make_writemask(const char *field) */ static slang_ir_node * _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, - slang_operation *dest) + slang_operation *dest) { const slang_asm_info *info; slang_ir_node *kids[3], *n; @@ -1280,15 +1279,15 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, * Use 'name' to find the function to call */ fun = _slang_locate_function(A->space.funcs, atom, params, param_count, - &A->space, A->atoms); + &A->space, A->atoms, A->log); if (!fun) { /* A function with exactly the right parameters/types was not found. * Try adapting the parameters. */ fun = _slang_first_function(A->space.funcs, name); - if (!_slang_adapt_call(oper, fun, &A->space, A->atoms)) { - RETURN_ERROR2("Undefined function (or no matching parameters)", - name, 0); + if (!_slang_adapt_call(oper, fun, &A->space, A->atoms, A->log)) { + slang_info_log_error(A->log, "Undefined function '%s'", name); + return NULL; } assert(fun); } @@ -1361,7 +1360,8 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) if (loop->BranchNode == 0 && isConst && constTrue) { /* infinite loop detected */ A->CurLoop = prevLoop; /* clean-up */ - RETURN_ERROR("Infinite loop detected!", 0); + slang_info_log_error(A->log, "Infinite loop detected!"); + return NULL; } /* pop loop, restore prev */ @@ -1816,7 +1816,8 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) assert(oper->num_children == 1); var = new_var(A, oper, oper->a_id); if (!var) { - RETURN_ERROR2("Undefined variable:", varName, 0); + slang_info_log_error(A->log, "undefined variable '%s'", varName); + return NULL; } /* XXX make copy of this initializer? */ rhs = _slang_gen_operation(A, &oper->children[0]); @@ -1829,7 +1830,8 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper) slang_ir_node *var, *init, *rhs; var = new_var(A, oper, oper->a_id); if (!var) { - RETURN_ERROR2("Undefined variable:", varName, 0); + slang_info_log_error(A->log, "undefined variable '%s'", varName); + return NULL; } #if 0 /* XXX make copy of this initializer? */ @@ -1870,7 +1872,8 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; slang_ir_node *n = new_var(A, oper, aVar); if (!n) { - RETURN_ERROR2("Undefined variable:", (char *) aVar, 0); + slang_info_log_error(A->log, "undefined variable '%s'", (char *) aVar); + return NULL; } return n; } @@ -2045,7 +2048,7 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n; GLuint swizzle; if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { - RETURN_ERROR("Bad swizzle", 0); + slang_info_log_error(A->log, "Bad swizzle"); } swizzle = MAKE_SWIZZLE4(swz.swizzle[0], swz.swizzle[1], @@ -2063,7 +2066,7 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n; GLuint swizzle; if (!_slang_is_swizzle((char *) oper->a_id, rows, &swz)) { - RETURN_ERROR("Bad swizzle", 0); + slang_info_log_error(A->log, "Bad swizzle"); } swizzle = MAKE_SWIZZLE4(swz.swizzle[0], swz.swizzle[1], @@ -2122,7 +2125,7 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) index = (GLint) oper->children[1].literal[0]; if (oper->children[1].type != SLANG_OPER_LITERAL_INT || index >= max) { - RETURN_ERROR("Invalid array index for vector type", 0); + slang_info_log_error(A->log, "Invalid array index for vector type"); } n = _slang_gen_operation(A, &oper->children[0]); @@ -2243,12 +2246,12 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return _slang_gen_while(A, oper); case SLANG_OPER_BREAK: if (!A->CurLoop) { - RETURN_ERROR("'break' not in loop", 0); + slang_info_log_error(A->log, "'break' not in loop"); } return new_break(A->CurLoop); case SLANG_OPER_CONTINUE: if (!A->CurLoop) { - RETURN_ERROR("'continue' not in loop", 0); + slang_info_log_error(A->log, "'continue' not in loop"); } return new_cont(A->CurLoop); case SLANG_OPER_DISCARD: @@ -2621,7 +2624,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, n = new_seq(n, init); } - success = _slang_emit_code(n, A->vartable, A->program, GL_FALSE); + success = _slang_emit_code(n, A->vartable, A->program, GL_FALSE, A->log); _slang_free_ir_tree(n); } @@ -2709,7 +2712,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) #endif /* Emit program instructions */ - success = _slang_emit_code(n, A->vartable, A->program, GL_TRUE); + success = _slang_emit_code(n, A->vartable, A->program, GL_TRUE, A->log); _slang_free_ir_tree(n); /* free codegen context */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index a1cae5d338..1a4c7d31f1 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -37,8 +37,8 @@ #include "slang_compile.h" #include "slang_preprocess.h" #include "slang_storage.h" -#include "slang_error.h" #include "slang_emit.h" +#include "slang_log.h" #include "slang_vartable.h" #include "slang_simplify.h" @@ -115,110 +115,6 @@ _slang_code_object_dtr(slang_code_object * self) slang_atom_pool_destruct(&self->atompool); } -/* slang_info_log */ - -static char *out_of_memory = "Error: Out of memory.\n"; - -void -slang_info_log_construct(slang_info_log * log) -{ - log->text = NULL; - log->dont_free_text = 0; -} - -void -slang_info_log_destruct(slang_info_log * log) -{ - if (!log->dont_free_text) - slang_alloc_free(log->text); -} - -static int -slang_info_log_message(slang_info_log * log, const char *prefix, - const char *msg) -{ - GLuint size; - - if (log->dont_free_text) - return 0; - size = slang_string_length(msg) + 2; - if (prefix != NULL) - size += slang_string_length(prefix) + 2; - if (log->text != NULL) { - GLuint old_len = slang_string_length(log->text); - log->text = (char *) - slang_alloc_realloc(log->text, old_len + 1, old_len + size); - } - else { - log->text = (char *) (slang_alloc_malloc(size)); - if (log->text != NULL) - log->text[0] = '\0'; - } - if (log->text == NULL) - return 0; - if (prefix != NULL) { - slang_string_concat(log->text, prefix); - slang_string_concat(log->text, ": "); - } - slang_string_concat(log->text, msg); - slang_string_concat(log->text, "\n"); -#if 1 - abort(); /* XXX temporary */ -#endif - return 1; -} - -int -slang_info_log_print(slang_info_log * log, const char *msg, ...) -{ - va_list va; - char buf[1024]; - - va_start(va, msg); - _mesa_vsprintf(buf, msg, va); - va_end(va); - return slang_info_log_message(log, NULL, buf); -} - -int -slang_info_log_error(slang_info_log * log, const char *msg, ...) -{ - va_list va; - char buf[1024]; - - va_start(va, msg); - _mesa_vsprintf(buf, msg, va); - va_end(va); - if (slang_info_log_message(log, "Error", buf)) - return 1; - slang_info_log_memory(log); - return 0; -} - -int -slang_info_log_warning(slang_info_log * log, const char *msg, ...) -{ - va_list va; - char buf[1024]; - - va_start(va, msg); - _mesa_vsprintf(buf, msg, va); - va_end(va); - if (slang_info_log_message(log, "Warning", buf)) - return 1; - slang_info_log_memory(log); - return 0; -} - -void -slang_info_log_memory(slang_info_log * log) -{ - if (!slang_info_log_message(log, "Error", "Out of memory.")) { - log->dont_free_text = 1; - log->text = out_of_memory; - } - abort(); /* XXX temporary */ -} /* slang_parse_ctx */ @@ -1838,8 +1734,7 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, A.space.vars = O->vars; A.program = O->program; A.vartable = O->vartable; - - _slang_reset_error(); + A.log = C->L; _slang_codegen_function(&A, *parsed_func_ret); } @@ -2002,7 +1897,7 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, slang_string_free(&preprocessed); grammar_get_last_error((byte *) (buf), sizeof(buf), &pos); slang_info_log_error(infolog, buf); - RETURN_ERROR("syntax error (possibly in library code)", 0); + /* syntax error (possibly in library code) */ } slang_string_free(&preprocessed); @@ -2175,7 +2070,7 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) success = compile_shader(ctx, &obj, type, &info_log, shader); - if (success) { + if (success && !info_log.text) { #if 0 slang_create_uniforms(&object->expdata, shader); _mesa_print_program(program); @@ -2183,6 +2078,7 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) #endif } else { + success = GL_FALSE; /* XXX more work on info log needed here */ if (info_log.text) { if (shader->InfoLog) { diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 7abb92bd3b..086e2d8dc4 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -88,19 +88,6 @@ _slang_code_object_ctr (slang_code_object *); extern GLvoid _slang_code_object_dtr (slang_code_object *); -typedef struct slang_info_log_ -{ - char *text; - int dont_free_text; -} slang_info_log; - -void slang_info_log_construct (slang_info_log *); -void slang_info_log_destruct (slang_info_log *); -int slang_info_log_print (slang_info_log *, const char *, ...); -int slang_info_log_error (slang_info_log *, const char *, ...); -int slang_info_log_warning (slang_info_log *, const char *, ...); -void slang_info_log_memory (slang_info_log *); - extern GLboolean _slang_compile (GLcontext *ctx, struct gl_shader *shader); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index f5b6fb4d65..b0776e9340 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -45,7 +45,6 @@ #include "prog_print.h" #include "slang_builtin.h" #include "slang_emit.h" -#include "slang_error.h" #define PEEPHOLE_OPTIMIZATIONS 1 @@ -1421,14 +1420,20 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) assert(n->Store->Index < 0); if (!n->Var || n->Var->isTemp) { /* a nameless/temporary variable, will be freed after first use */ - if (!_slang_alloc_temp(emitInfo->vt, n->Store)) - RETURN_ERROR("Ran out of registers, too many temporaries", 0); + if (!_slang_alloc_temp(emitInfo->vt, n->Store)) { + slang_info_log_error(emitInfo->log, + "Ran out of registers, too many temporaries"); + return NULL; + } } else { /* a regular variable */ _slang_add_variable(emitInfo->vt, n->Var); - if (!_slang_alloc_var(emitInfo->vt, n->Store)) - RETURN_ERROR("Ran out of registers, too many variables", 0); + if (!_slang_alloc_var(emitInfo->vt, n->Store)) { + slang_info_log_error(emitInfo->log, + "Ran out of registers, too many variables"); + return NULL; + } /* printf("IR_VAR_DECL %s %d store %p\n", (char*) n->Var->a_name, n->Store->Index, (void*) n->Store); @@ -1530,7 +1535,8 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) n->Store->Size, &n->Store->Swizzle); if (n->Store->Index < 0) { - RETURN_ERROR("Ran out of space for constants.", 0); + slang_info_log_error(emitInfo->log, "Ran out of space for constants"); + return NULL; } return NULL; diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 1b792402da..13ba6d7d6c 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -42,7 +42,8 @@ _slang_new_ir_storage(enum register_file file, GLint index, GLint size); extern GLboolean _slang_emit_code(slang_ir_node *n, slang_var_table *vartable, - struct gl_program *prog, GLboolean withEnd); + struct gl_program *prog, GLboolean withEnd, + slang_info_log *log); #endif /* SLANG_EMIT_H */ diff --git a/src/mesa/shader/slang/slang_preprocess.h b/src/mesa/shader/slang/slang_preprocess.h index f83e6e6e3f..d8eb12e4ff 100644 --- a/src/mesa/shader/slang/slang_preprocess.h +++ b/src/mesa/shader/slang/slang_preprocess.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.6 + * Version: 6.5.3 * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,24 +22,19 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !defined SLANG_PREPROCESS_H +#ifndef SLANG_PREPROCESS_H #define SLANG_PREPROCESS_H #include "slang_compile.h" +#include "slang_log.h" -#if defined __cplusplus -extern "C" { -#endif -GLboolean +extern GLboolean _slang_preprocess_version (const char *, GLuint *, GLuint *, slang_info_log *); -GLboolean -_slang_preprocess_directives (slang_string *output, const char *input, slang_info_log *); +extern GLboolean +_slang_preprocess_directives (slang_string *output, const char *input, + slang_info_log *); -#ifdef __cplusplus -} -#endif - -#endif +#endif /* SLANG_PREPROCESS_H */ diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index 07b4ae2760..87b117874f 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -292,7 +292,7 @@ _slang_simplify(slang_operation *oper, GLboolean _slang_adapt_call(slang_operation *callOper, const slang_function *fun, const slang_name_space * space, - slang_atom_pool * atoms) + slang_atom_pool * atoms, slang_info_log *log) { const GLboolean haveRetValue = _slang_function_has_return_value(fun); const int numParams = fun->param_count - haveRetValue; @@ -317,7 +317,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, if (!slang_typeinfo_construct(&argType)) return GL_FALSE; if (!_slang_typeof_operation_(&callOper->children[i], space, - &argType, atoms)) { + &argType, atoms, log)) { slang_typeinfo_destruct(&argType); return GL_FALSE; } @@ -392,7 +392,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, if (!slang_typeinfo_construct(&argType)) return GL_FALSE; if (!_slang_typeof_operation_(&callOper->children[i], space, - &argType, atoms)) { + &argType, atoms, log)) { slang_typeinfo_destruct(&argType); return GL_FALSE; } diff --git a/src/mesa/shader/slang/slang_simplify.h b/src/mesa/shader/slang/slang_simplify.h index d6979a800a..b3840ee9df 100644 --- a/src/mesa/shader/slang/slang_simplify.h +++ b/src/mesa/shader/slang/slang_simplify.h @@ -16,8 +16,7 @@ _slang_simplify(slang_operation *oper, extern GLboolean _slang_adapt_call(slang_operation *callOper, const slang_function *fun, const slang_name_space * space, - slang_atom_pool * atoms); - + slang_atom_pool * atoms, slang_info_log *log); #endif /* SLANG_SIMPLIFY_H */ diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index bbcc1c740c..fe3834994d 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -31,7 +31,7 @@ #include "imports.h" #include "slang_typeinfo.h" #include "slang_compile.h" -#include "slang_error.h" +#include "slang_log.h" #include "prog_instruction.h" @@ -302,14 +302,15 @@ typeof_existing_function(const char *name, const slang_operation * params, GLuint num_params, const slang_name_space * space, slang_type_specifier * spec, - slang_atom_pool * atoms) + slang_atom_pool * atoms, + slang_info_log *log) { slang_atom atom; GLboolean exists; atom = slang_atom_pool_atom(atoms, name); if (!_slang_typeof_function(atom, params, num_params, space, spec, - &exists, atoms)) + &exists, atoms, log)) return GL_FALSE; return exists; } @@ -319,7 +320,7 @@ _slang_typeof_operation(const slang_assemble_ctx * A, const slang_operation * op, slang_typeinfo * ti) { - return _slang_typeof_operation_(op, &A->space, ti, A->atoms); + return _slang_typeof_operation_(op, &A->space, ti, A->atoms, A->log); } @@ -335,7 +336,8 @@ GLboolean _slang_typeof_operation_(const slang_operation * op, const slang_name_space * space, slang_typeinfo * ti, - slang_atom_pool * atoms) + slang_atom_pool * atoms, + slang_info_log *log) { ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; @@ -364,7 +366,7 @@ _slang_typeof_operation_(const slang_operation * op, case SLANG_OPER_DIVASSIGN: case SLANG_OPER_PREINCREMENT: case SLANG_OPER_PREDECREMENT: - if (!_slang_typeof_operation_(op->children, space, ti, atoms)) + if (!_slang_typeof_operation_(op->children, space, ti, atoms, log)) return GL_FALSE; break; case SLANG_OPER_LITERAL_BOOL: @@ -431,18 +433,24 @@ _slang_typeof_operation_(const slang_operation * op, { slang_variable *var; var = _slang_locate_variable(op->locals, op->a_id, GL_TRUE); - if (var == NULL) - RETURN_ERROR2("undefined variable", (char *) op->a_id, 0); - if (!slang_type_specifier_copy(&ti->spec, &var->type.specifier)) - RETURN_OUT_OF_MEMORY(); + if (!var) { + slang_info_log_error(log, "undefined variable '%s'", + (char *) op->a_id); + return GL_FALSE; + } + if (!slang_type_specifier_copy(&ti->spec, &var->type.specifier)) { + slang_info_log_memory(log); + return GL_FALSE; + } ti->can_be_referenced = GL_TRUE; ti->array_len = var->array_len; } break; case SLANG_OPER_SEQUENCE: /* TODO: check [0] and [1] if they match */ - if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) - RETURN_NIL(); + if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms, log)) { + return GL_FALSE; + } ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; @@ -454,8 +462,9 @@ _slang_typeof_operation_(const slang_operation * op, /*case SLANG_OPER_ANDASSIGN: */ case SLANG_OPER_SELECT: /* TODO: check [1] and [2] if they match */ - if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms)) - RETURN_NIL(); + if (!_slang_typeof_operation_(&op->children[1], space, ti, atoms, log)) { + return GL_FALSE; + } ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; @@ -466,35 +475,35 @@ _slang_typeof_operation_(const slang_operation * op, /*case SLANG_OPER_RSHIFT: */ case SLANG_OPER_ADD: if (!typeof_existing_function("+", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); + &ti->spec, atoms, log)) + return GL_FALSE; break; case SLANG_OPER_SUBTRACT: if (!typeof_existing_function("-", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); + &ti->spec, atoms, log)) + return GL_FALSE; break; case SLANG_OPER_MULTIPLY: if (!typeof_existing_function("*", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); + &ti->spec, atoms, log)) + return GL_FALSE; break; case SLANG_OPER_DIVIDE: if (!typeof_existing_function("/", op->children, 2, space, - &ti->spec, atoms)) - RETURN_NIL(); + &ti->spec, atoms, log)) + return GL_FALSE; break; /*case SLANG_OPER_MODULUS: */ case SLANG_OPER_PLUS: - if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - RETURN_NIL(); + if (!_slang_typeof_operation_(op->children, space, ti, atoms, log)) + return GL_FALSE; ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; case SLANG_OPER_MINUS: if (!typeof_existing_function("-", op->children, 1, space, - &ti->spec, atoms)) - RETURN_NIL(); + &ti->spec, atoms, log)) + return GL_FALSE; break; /*case SLANG_OPER_COMPLEMENT: */ case SLANG_OPER_SUBSCRIPT: @@ -502,23 +511,24 @@ _slang_typeof_operation_(const slang_operation * op, slang_typeinfo _ti; if (!slang_typeinfo_construct(&_ti)) - RETURN_NIL(); - if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { + return GL_FALSE; + if (!_slang_typeof_operation_(op->children, space, &_ti, atoms, log)) { slang_typeinfo_destruct(&_ti); - RETURN_NIL(); + return GL_FALSE; } ti->can_be_referenced = _ti.can_be_referenced; if (_ti.spec.type == SLANG_SPEC_ARRAY) { if (!slang_type_specifier_copy(&ti->spec, _ti.spec._array)) { slang_typeinfo_destruct(&_ti); - RETURN_NIL(); + return GL_FALSE; } } else { if (!_slang_type_is_vector(_ti.spec.type) && !_slang_type_is_matrix(_ti.spec.type)) { slang_typeinfo_destruct(&_ti); - RETURN_ERROR("cannot index a non-array type", 0); + slang_info_log_error(log, "cannot index a non-array type"); + return GL_FALSE; } ti->spec.type = _slang_type_base(_ti.spec.type); } @@ -530,8 +540,8 @@ _slang_typeof_operation_(const slang_operation * op, GLboolean exists; if (!_slang_typeof_function(op->a_id, op->children, op->num_children, - space, &ti->spec, &exists, atoms)) - RETURN_NIL(); + space, &ti->spec, &exists, atoms, log)) + return GL_FALSE; if (!exists) { slang_struct *s = slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); @@ -540,14 +550,14 @@ _slang_typeof_operation_(const slang_operation * op, ti->spec._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); if (ti->spec._struct == NULL) - RETURN_NIL(); + return GL_FALSE; if (!slang_struct_construct(ti->spec._struct)) { slang_alloc_free(ti->spec._struct); ti->spec._struct = NULL; - RETURN_NIL(); + return GL_FALSE; } if (!slang_struct_copy(ti->spec._struct, s)) - RETURN_NIL(); + return GL_FALSE; } else { const char *name; @@ -555,8 +565,10 @@ _slang_typeof_operation_(const slang_operation * op, name = slang_atom_pool_id(atoms, op->a_id); type = slang_type_specifier_type_from_string(name); - if (type == SLANG_SPEC_VOID) - RETURN_ERROR2("function not found", name, 0); + if (type == SLANG_SPEC_VOID) { + slang_info_log_error(log, "undefined function '%s'", name); + return GL_FALSE; + } ti->spec.type = type; } } @@ -567,10 +579,10 @@ _slang_typeof_operation_(const slang_operation * op, slang_typeinfo _ti; if (!slang_typeinfo_construct(&_ti)) - RETURN_NIL(); - if (!_slang_typeof_operation_(op->children, space, &_ti, atoms)) { + return GL_FALSE; + if (!_slang_typeof_operation_(op->children, space, &_ti, atoms, log)) { slang_typeinfo_destruct(&_ti); - RETURN_NIL(); + return GL_FALSE; } if (_ti.spec.type == SLANG_SPEC_STRUCT) { slang_variable *field; @@ -579,11 +591,11 @@ _slang_typeof_operation_(const slang_operation * op, GL_FALSE); if (field == NULL) { slang_typeinfo_destruct(&_ti); - RETURN_NIL(); + return GL_FALSE; } if (!slang_type_specifier_copy(&ti->spec, &field->type.specifier)) { slang_typeinfo_destruct(&_ti); - RETURN_NIL(); + return GL_FALSE; } ti->can_be_referenced = _ti.can_be_referenced; } @@ -593,17 +605,19 @@ _slang_typeof_operation_(const slang_operation * op, slang_type_specifier_type base; /* determine the swizzle of the field expression */ -#if 000 +#if 000 /*XXX re-enable? */ if (!_slang_type_is_vector(_ti.spec.type)) { slang_typeinfo_destruct(&_ti); - RETURN_ERROR("Can't swizzle scalar expression", 0); + slang_info_log_error(log, "Can't swizzle scalar expression"); + return GL_FALSE; } #endif rows = _slang_type_dim(_ti.spec.type); swizzle = slang_atom_pool_id(atoms, op->a_id); if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { slang_typeinfo_destruct(&_ti); - RETURN_ERROR("Bad swizzle", 0); + slang_info_log_error(log, "bad swizzle '%s'", swizzle); + return GL_FALSE; } ti->is_swizzled = GL_TRUE; ti->can_be_referenced = _ti.can_be_referenced @@ -674,13 +688,13 @@ _slang_typeof_operation_(const slang_operation * op, break; case SLANG_OPER_POSTINCREMENT: case SLANG_OPER_POSTDECREMENT: - if (!_slang_typeof_operation_(op->children, space, ti, atoms)) - RETURN_NIL(); + if (!_slang_typeof_operation_(op->children, space, ti, atoms, log)) + return GL_FALSE; ti->can_be_referenced = GL_FALSE; ti->is_swizzled = GL_FALSE; break; default: - RETURN_NIL(); + return GL_FALSE; } return GL_TRUE; @@ -693,7 +707,8 @@ _slang_typeof_operation_(const slang_operation * op, slang_function * _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, const slang_operation * args, GLuint num_args, - const slang_name_space * space, slang_atom_pool * atoms) + const slang_name_space * space, slang_atom_pool * atoms, + slang_info_log *log) { GLuint i; @@ -713,7 +728,7 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, if (!slang_typeinfo_construct(&ti)) return NULL; - if (!_slang_typeof_operation_(&args[j], space, &ti, atoms)) { + if (!_slang_typeof_operation_(&args[j], space, &ti, atoms, log)) { slang_typeinfo_destruct(&ti); return NULL; } @@ -737,7 +752,7 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, } if (funcs->outer_scope != NULL) return _slang_locate_function(funcs->outer_scope, a_name, args, - num_args, space, atoms); + num_args, space, atoms, log); return NULL; } @@ -757,10 +772,10 @@ _slang_typeof_function(slang_atom a_name, const slang_operation * params, GLuint num_params, const slang_name_space * space, slang_type_specifier * spec, GLboolean * exists, - slang_atom_pool * atoms) + slang_atom_pool *atoms, slang_info_log *log) { slang_function *fun = _slang_locate_function(space->funcs, a_name, params, - num_params, space, atoms); + num_params, space, atoms, log); *exists = fun != NULL; if (!fun) return GL_TRUE; /* yes, not false */ diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 3115b71e08..62cf0009d3 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -27,6 +27,7 @@ #include "imports.h" #include "mtypes.h" +#include "slang_log.h" #include "slang_utility.h" #include "slang_vartable.h" @@ -60,6 +61,7 @@ typedef struct slang_assemble_ctx_ slang_name_space space; struct gl_program *program; slang_var_table *vartable; + slang_info_log *log; struct slang_function_ *CurFunction; struct slang_ir_node_ *CurLoop; } slang_assemble_ctx; @@ -70,7 +72,7 @@ _slang_locate_function(const struct slang_function_scope_ *funcs, slang_atom name, const struct slang_operation_ *params, GLuint num_params, const slang_name_space *space, - slang_atom_pool *); + slang_atom_pool *atoms, slang_info_log *log); extern GLboolean @@ -170,7 +172,8 @@ _slang_typeof_operation(const slang_assemble_ctx *, extern GLboolean _slang_typeof_operation_(const struct slang_operation_ *, const slang_name_space *, - slang_typeinfo *, slang_atom_pool *); + slang_typeinfo *, slang_atom_pool *, + slang_info_log *log); /** * Retrieves type of a function prototype, if one exists. @@ -182,7 +185,7 @@ _slang_typeof_function(slang_atom a_name, const struct slang_operation_ *params, GLuint num_params, const slang_name_space *, slang_type_specifier *spec, GLboolean *exists, - slang_atom_pool *); + slang_atom_pool *, slang_info_log *log); extern GLboolean _slang_type_is_matrix(slang_type_specifier_type); diff --git a/src/mesa/sources b/src/mesa/sources index a7bbc02012..628599c3c5 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -179,10 +179,10 @@ SLANG_SOURCES = \ shader/slang/slang_compile_struct.c \ shader/slang/slang_compile_variable.c \ shader/slang/slang_emit.c \ - shader/slang/slang_error.c \ shader/slang/slang_label.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_link.c \ + shader/slang/slang_log.c \ shader/slang/slang_preprocess.c \ shader/slang/slang_print.c \ shader/slang/slang_simplify.c \ -- cgit v1.2.3 From ca279b80e686e2e590f1cf08ef22dabdead4d66f Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 14:33:52 -0700 Subject: Remove old error logging code. New slang_log.[ch] files. --- src/mesa/shader/slang/slang_error.c | 78 ---------------------- src/mesa/shader/slang/slang_error.h | 44 ------------- src/mesa/shader/slang/slang_log.c | 128 ++++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_log.h | 56 ++++++++++++++++ 4 files changed, 184 insertions(+), 122 deletions(-) delete mode 100644 src/mesa/shader/slang/slang_error.c delete mode 100644 src/mesa/shader/slang/slang_error.h create mode 100644 src/mesa/shader/slang/slang_log.c create mode 100644 src/mesa/shader/slang/slang_log.h (limited to 'src') diff --git a/src/mesa/shader/slang/slang_error.c b/src/mesa/shader/slang/slang_error.c deleted file mode 100644 index bfa8e80a05..0000000000 --- a/src/mesa/shader/slang/slang_error.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "imports.h" -#include "slang_error.h" - - -static char ErrorText[10000]; -static char FormattedErrorText[10000]; -static int ErrorPos; - - -void -_slang_reset_error(void) -{ - ErrorText[0] = 0; - ErrorPos = -1; -} - - -/** - * Record an error message, if one hasn't been recorded already. - */ -void -_slang_record_error(const char *msg1, const char *msg2, - GLint pos, const char *file, int line) -{ - /* don't overwrite a previously recorded error */ - if (!ErrorText[0]) { - _mesa_sprintf(ErrorText, "%s %s", msg1, msg2); - ErrorPos = -1; -#ifdef DEBUG - fprintf(stderr, "Mesa shader compile error: %s %s at %d (%s line %d)\n", - msg1, msg2, pos, file, line); -#endif - } - abort(); -} - - -/** - * Return formatted error text. - */ -const char * -_slang_error_text(void) -{ - /* - * NVIDIA formats errors like this: - * (LINE_NUMBER) : error ERROR_CODE: ERROR_TEXT - * Example: - * (7) : error C1048: invalid character 'P' in swizzle "P" - */ - _mesa_sprintf(FormattedErrorText, - "(%d) : error: %s", ErrorPos, ErrorText); - return FormattedErrorText; -} - diff --git a/src/mesa/shader/slang/slang_error.h b/src/mesa/shader/slang/slang_error.h deleted file mode 100644 index 064b11b498..0000000000 --- a/src/mesa/shader/slang/slang_error.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef SLANG_ERROR_H -#define SLANG_ERROR_H - -#if 0 -extern void -_slang_reset_error(void); - - -extern void -_slang_record_error(const char *msg1, const char *msg2, - GLint pos, const char *file, int line); - - -extern const char * -_slang_error_text(void); -#endif -foo! - - -#endif /* SLANG_ERROR_H */ diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c new file mode 100644 index 0000000000..b6545b2c2e --- /dev/null +++ b/src/mesa/shader/slang/slang_log.c @@ -0,0 +1,128 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "imports.h" +#include "slang_log.h" +#include "slang_utility.h" + + + +static char *out_of_memory = "Error: Out of memory.\n"; + +void +slang_info_log_construct(slang_info_log * log) +{ + log->text = NULL; + log->dont_free_text = 0; +} + +void +slang_info_log_destruct(slang_info_log * log) +{ + if (!log->dont_free_text) + slang_alloc_free(log->text); +} + +static int +slang_info_log_message(slang_info_log * log, const char *prefix, + const char *msg) +{ + GLuint size; + + if (log->dont_free_text) + return 0; + size = slang_string_length(msg) + 2; + if (prefix != NULL) + size += slang_string_length(prefix) + 2; + if (log->text != NULL) { + GLuint old_len = slang_string_length(log->text); + log->text = (char *) + slang_alloc_realloc(log->text, old_len + 1, old_len + size); + } + else { + log->text = (char *) (slang_alloc_malloc(size)); + if (log->text != NULL) + log->text[0] = '\0'; + } + if (log->text == NULL) + return 0; + if (prefix != NULL) { + slang_string_concat(log->text, prefix); + slang_string_concat(log->text, ": "); + } + slang_string_concat(log->text, msg); + slang_string_concat(log->text, "\n"); + return 1; +} + +int +slang_info_log_print(slang_info_log * log, const char *msg, ...) +{ + va_list va; + char buf[1024]; + + va_start(va, msg); + _mesa_vsprintf(buf, msg, va); + va_end(va); + return slang_info_log_message(log, NULL, buf); +} + +int +slang_info_log_error(slang_info_log * log, const char *msg, ...) +{ + va_list va; + char buf[1024]; + + va_start(va, msg); + _mesa_vsprintf(buf, msg, va); + va_end(va); + if (slang_info_log_message(log, "Error", buf)) + return 1; + slang_info_log_memory(log); + return 0; +} + +int +slang_info_log_warning(slang_info_log * log, const char *msg, ...) +{ + va_list va; + char buf[1024]; + + va_start(va, msg); + _mesa_vsprintf(buf, msg, va); + va_end(va); + if (slang_info_log_message(log, "Warning", buf)) + return 1; + slang_info_log_memory(log); + return 0; +} + +void +slang_info_log_memory(slang_info_log * log) +{ + if (!slang_info_log_message(log, "Error", "Out of memory.")) { + log->dont_free_text = 1; + log->text = out_of_memory; + } +} diff --git a/src/mesa/shader/slang/slang_log.h b/src/mesa/shader/slang/slang_log.h new file mode 100644 index 0000000000..e4ca3a22f1 --- /dev/null +++ b/src/mesa/shader/slang/slang_log.h @@ -0,0 +1,56 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef SLANG_LOG_H +#define SLANG_LOG_H + + +typedef struct slang_info_log_ +{ + char *text; + int dont_free_text; +} slang_info_log; + + +extern void +slang_info_log_construct(slang_info_log *); + +extern void +slang_info_log_destruct(slang_info_log *); + +extern int +slang_info_log_print(slang_info_log *, const char *, ...); + +extern int +slang_info_log_error(slang_info_log *, const char *, ...); + +extern int +slang_info_log_warning(slang_info_log *, const char *, ...); + +extern void +slang_info_log_memory(slang_info_log *); + + +#endif /* SLANG_LOG_H */ -- cgit v1.2.3 From 365f8fb0dd19a8fa43b1de8e89793059095981db Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 15:02:36 -0700 Subject: re-enable some code --- src/mesa/shader/slang/slang_typeinfo.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index fe3834994d..07ec514c67 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -605,13 +605,11 @@ _slang_typeof_operation_(const slang_operation * op, slang_type_specifier_type base; /* determine the swizzle of the field expression */ -#if 000 /*XXX re-enable? */ if (!_slang_type_is_vector(_ti.spec.type)) { slang_typeinfo_destruct(&_ti); slang_info_log_error(log, "Can't swizzle scalar expression"); return GL_FALSE; } -#endif rows = _slang_type_dim(_ti.spec.type); swizzle = slang_atom_pool_id(atoms, op->a_id); if (!_slang_is_swizzle(swizzle, rows, &ti->swz)) { -- cgit v1.2.3 From 6817407d498ff0c5074321b965673f6efdaaeb21 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 15:06:56 -0700 Subject: fix error flagging --- src/mesa/shader/slang/slang_compile.c | 11 ++--------- src/mesa/shader/slang/slang_log.c | 7 +++++-- src/mesa/shader/slang/slang_log.h | 3 ++- 3 files changed, 9 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 1a4c7d31f1..dc2e680e99 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2070,16 +2070,9 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) success = compile_shader(ctx, &obj, type, &info_log, shader); - if (success && !info_log.text) { -#if 0 - slang_create_uniforms(&object->expdata, shader); - _mesa_print_program(program); - _mesa_print_program_parameters(ctx, program); -#endif - } - else { + if (!success || info_log.error_flag) { success = GL_FALSE; - /* XXX more work on info log needed here */ + /* copy info-log string to shader object */ if (info_log.text) { if (shader->InfoLog) { free(shader->InfoLog); diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c index b6545b2c2e..e838744491 100644 --- a/src/mesa/shader/slang/slang_log.c +++ b/src/mesa/shader/slang/slang_log.c @@ -34,7 +34,8 @@ void slang_info_log_construct(slang_info_log * log) { log->text = NULL; - log->dont_free_text = 0; + log->dont_free_text = GL_FALSE; + log->error_flag = GL_FALSE; } void @@ -97,6 +98,7 @@ slang_info_log_error(slang_info_log * log, const char *msg, ...) va_start(va, msg); _mesa_vsprintf(buf, msg, va); va_end(va); + log->error_flag = GL_TRUE; if (slang_info_log_message(log, "Error", buf)) return 1; slang_info_log_memory(log); @@ -122,7 +124,8 @@ void slang_info_log_memory(slang_info_log * log) { if (!slang_info_log_message(log, "Error", "Out of memory.")) { - log->dont_free_text = 1; + log->dont_free_text = GL_TRUE; + log->error_flag = GL_TRUE; log->text = out_of_memory; } } diff --git a/src/mesa/shader/slang/slang_log.h b/src/mesa/shader/slang/slang_log.h index e4ca3a22f1..dcaba0285a 100644 --- a/src/mesa/shader/slang/slang_log.h +++ b/src/mesa/shader/slang/slang_log.h @@ -30,7 +30,8 @@ typedef struct slang_info_log_ { char *text; - int dont_free_text; + GLboolean dont_free_text; + GLboolean error_flag; } slang_info_log; -- cgit v1.2.3 From f446e58e45d7317173497eddbd8b26ea6c28fcb4 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 15:13:34 -0700 Subject: disable execute bit --- src/mesa/shader/grammar/grammar_crt.c | 0 src/mesa/shader/grammar/grammar_crt.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/mesa/shader/grammar/grammar_crt.c mode change 100755 => 100644 src/mesa/shader/grammar/grammar_crt.h (limited to 'src') diff --git a/src/mesa/shader/grammar/grammar_crt.c b/src/mesa/shader/grammar/grammar_crt.c old mode 100755 new mode 100644 diff --git a/src/mesa/shader/grammar/grammar_crt.h b/src/mesa/shader/grammar/grammar_crt.h old mode 100755 new mode 100644 -- cgit v1.2.3 From 4b8d75e2e6ba72bbf772a75d7167c537c6e630f7 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 16:32:00 -0700 Subject: fix logic for reporting errors --- src/mesa/shader/slang/slang_compile.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index dc2e680e99..4609de684a 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1898,6 +1898,17 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, grammar_get_last_error((byte *) (buf), sizeof(buf), &pos); slang_info_log_error(infolog, buf); /* syntax error (possibly in library code) */ +#if 0 + { + int line, col; + char *s; + s = (char *) _mesa_find_line_column((const GLubyte *) source, + (const GLubyte *) source + pos, + &line, &col); + printf("Error on line %d, col %d: %s\n", line, col, s); + } +#endif + return GL_FALSE; } slang_string_free(&preprocessed); @@ -2070,16 +2081,19 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) success = compile_shader(ctx, &obj, type, &info_log, shader); - if (!success || info_log.error_flag) { - success = GL_FALSE; + /* free shader's prev info log */ + if (shader->InfoLog) { + _mesa_free(shader->InfoLog); + shader->InfoLog = NULL; + } + + if (info_log.text) { /* copy info-log string to shader object */ - if (info_log.text) { - if (shader->InfoLog) { - free(shader->InfoLog); - shader->InfoLog = NULL; - } - shader->InfoLog = strdup(info_log.text); - } + shader->InfoLog = _mesa_strdup(info_log.text); + } + + if (info_log.error_flag) { + success = GL_FALSE; } slang_info_log_destruct(&info_log); -- cgit v1.2.3 From b58ea057feb7a00329fe92fe41e1d408e7c76065 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 17:00:06 -0700 Subject: fix mem leak in _mesa_ShaderSourceARB() --- src/mesa/main/shaders.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index 73f27ed2d3..5bd4a3f5ff 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -422,6 +422,8 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, source[offsets[count - 1]] = '\0'; ctx->Driver.ShaderSource(ctx, shaderObj, source); + + _mesa_free(offsets); } -- cgit v1.2.3 From aa6f4241f8d9e301e056968a1eb85bb27b7fa55a Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 17:32:45 -0700 Subject: formatting fixes --- src/mesa/shader/slang/slang_utility.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 9b98a2c76c..0fbfcc5840 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -31,11 +31,13 @@ #include "imports.h" #include "slang_utility.h" -char *slang_string_concat (char *dst, const char *src) +char * +slang_string_concat (char *dst, const char *src) { - return _mesa_strcpy (dst + _mesa_strlen (dst), src); + return _mesa_strcpy (dst + _mesa_strlen (dst), src); } + /* slang_string */ GLvoid @@ -156,8 +158,8 @@ slang_atom_pool_destruct (slang_atom_pool * pool) slang_alloc_free(entry->id); slang_alloc_free(entry); entry = next; - } - } + } + } } /* @@ -211,11 +213,11 @@ slang_atom_pool_atom(slang_atom_pool * pool, const char * id) return (slang_atom) (**entry).id; } -/* +/** * Return the name of a given atom. */ const char * slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom) { - return (const char *) (atom); + return (const char *) (atom); } -- cgit v1.2.3 From 553fe132d4dec3283afd59f81357ebb3c2b94c06 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 18:07:26 -0700 Subject: Fix a few bugs in slang_operation variable scoping. Seems to fix a double-free. --- src/mesa/shader/slang/slang_codegen.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index efd330106b..26be14a056 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -457,7 +457,6 @@ new_float_literal(const float v[4]) * Conditional jump. * \param zeroOrOne indicates if the jump is to be taken on zero, or non-zero * condition code state. - * XXX maybe pass an IR node as second param to indicate the jump target??? */ static slang_ir_node * new_cjump(slang_label *dest, GLuint zeroOrOne) @@ -470,7 +469,6 @@ new_cjump(slang_label *dest, GLuint zeroOrOne) /** * Unconditional jump. - * XXX maybe pass an IR node as second param to indicate the jump target??? */ static slang_ir_node * new_jump(slang_label *dest) @@ -641,12 +639,7 @@ slang_inline_asm_function(slang_assemble_ctx *A, inlined->a_id = fun->body->children[0].a_id; inlined->num_children = numArgs; inlined->children = slang_operation_new(numArgs); -#if 0 - inlined->locals = slang_variable_scope_copy(oper->locals); -#else - assert(inlined->locals); inlined->locals->outer_scope = oper->locals->outer_scope; -#endif for (i = 0; i < numArgs; i++) { slang_operation_copy(inlined->children + i, args + i); @@ -747,17 +740,19 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, blockOper = slang_operation_new(1); blockOper->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; blockOper->num_children = 2; + blockOper->locals->outer_scope = oper->locals->outer_scope; blockOper->children = slang_operation_new(2); assignOper = blockOper->children + 0; returnOper = blockOper->children + 1; assignOper->type = SLANG_OPER_ASSIGN; assignOper->num_children = 2; + assignOper->locals->outer_scope = blockOper->locals; assignOper->children = slang_operation_new(2); assignOper->children[0].type = SLANG_OPER_IDENTIFIER; assignOper->children[0].a_id = slang_atom_pool_atom(A->atoms, "__retVal"); - assignOper->children[0].locals->outer_scope = oper->locals; - assignOper->locals = oper->locals; + assignOper->children[0].locals->outer_scope = assignOper->locals; + slang_operation_copy(&assignOper->children[1], &oper->children[0]); @@ -872,11 +867,10 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, declOper = &commaSeq->children[0]; declOper->type = SLANG_OPER_VARIABLE_DECL; declOper->a_id = resultVar->a_name; - declOper->locals->outer_scope = commaSeq->locals; /*** ??? **/ + declOper->locals->outer_scope = commaSeq->locals; /* child[1] = function body */ inlined = &commaSeq->children[1]; - /* XXXX this may be inappropriate!!!!: */ inlined->locals->outer_scope = commaSeq->locals; /* child[2] = __resultTmp reference */ @@ -884,7 +878,6 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, returnOper->type = SLANG_OPER_IDENTIFIER; returnOper->a_id = resultVar->a_name; returnOper->locals->outer_scope = commaSeq->locals; - declOper->locals->outer_scope = commaSeq->locals; top = commaSeq; } @@ -993,7 +986,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, */ decl->type = SLANG_OPER_VARIABLE_DECL; assert(decl->locals); - decl->locals = fun->parameters; + decl->locals->outer_scope = inlined->locals; decl->a_id = p->a_name; decl->num_children = 1; decl->children = slang_operation_new(1); @@ -1027,13 +1020,12 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, inlined->num_children); ass->type = SLANG_OPER_ASSIGN; ass->num_children = 2; - ass->locals = _slang_variable_scope_new(inlined->locals); - assert(ass->locals); + ass->locals->outer_scope = inlined->locals; ass->children = slang_operation_new(2); ass->children[0] = args[i]; /*XXX copy */ ass->children[1].type = SLANG_OPER_IDENTIFIER; ass->children[1].a_id = p->a_name; - ass->children[1].locals = _slang_variable_scope_new(ass->locals); + ass->children[1].locals->outer_scope = ass->locals; } } @@ -1753,10 +1745,10 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) block = slang_operation_new(1); block->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE; - block->num_children = 2; - block->children = slang_operation_new(2); assert(block->locals); block->locals->outer_scope = oper->locals->outer_scope; + block->num_children = 2; + block->children = slang_operation_new(2); /* child[0]: __retVal = expr; */ assign = &block->children[0]; -- cgit v1.2.3 From 4f26a52908d14b753199a529fd4c24da608ead29 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 18:08:09 -0700 Subject: re-enable var scope destruct in slang_operation_destruct() --- src/mesa/shader/slang/slang_compile_operation.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 288de2d4bf..aa66be8895 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -60,12 +60,8 @@ slang_operation_destruct(slang_operation * oper) for (i = 0; i < oper->num_children; i++) slang_operation_destruct(oper->children + i); slang_alloc_free(oper->children); - /*#define FREE_MEMORY*/ -#ifdef FREE_MEMORY - /* XXX revisit and fix memory coruption here ! */ slang_variable_scope_destruct(oper->locals); slang_alloc_free(oper->locals); -#endif oper->children = NULL; oper->num_children = 0; oper->locals = NULL; -- cgit v1.2.3 From fa4d0364246d24b3f86bc9a8486a9ad7db60f1b3 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 18:33:50 -0700 Subject: Add EmitHighLevelInstructions, EmitComments booleans to gl_shader_state. These control code generation options. May be overridden by drivers, debuggers, etc. --- src/mesa/main/mtypes.h | 2 ++ src/mesa/shader/shader_api.c | 14 ++++++++------ src/mesa/shader/slang/slang_emit.c | 27 ++++++++++++++++----------- 3 files changed, 26 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index bd9198ef12..26b5c91ada 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2104,6 +2104,8 @@ struct gl_shader_program struct gl_shader_state { struct gl_shader_program *CurrentProgram; /**< The user-bound program */ + GLboolean EmitHighLevelInstructions; /**< Driver-selectable */ + GLboolean EmitComments; /**< Driver-selectable */ }; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 70ceb70fe7..48ba8b657a 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -196,16 +196,20 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name) } +/** + * Initialize context's shader state. + */ void _mesa_init_shader_state(GLcontext * ctx) { - /* no-op */ + /* Device drivers may override these to control what kind of instructions + * are generated by the GLSL compiler. + */ + ctx->Shader.EmitHighLevelInstructions = GL_TRUE; + ctx->Shader.EmitComments = GL_FALSE; } - - - /** * Copy string from to , up to maxLength characters, returning * length of in . @@ -227,8 +231,6 @@ copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src) } - - /** * Called via ctx->Driver.AttachShader() */ diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index b0776e9340..9ead896142 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -52,8 +52,6 @@ /* XXX temporarily here */ -static GLboolean EmitHighLevelInstructions = GL_TRUE; -static GLboolean EmitComments = GL_FALSE; typedef struct @@ -61,6 +59,9 @@ typedef struct slang_info_log *log; slang_var_table *vt; struct gl_program *prog; + /* code-gen options */ + GLboolean EmitHighLevelInstructions; + GLboolean EmitComments; } slang_emit_info; @@ -1111,7 +1112,7 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) emit(emitInfo, n->Children[0]); /* the condition */ ifInstLoc = prog->NumInstructions; - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { ifInst = new_instruction(emitInfo, OPCODE_IF); ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ ifInst->DstReg.CondSwizzle = SWIZZLE_X; @@ -1130,7 +1131,7 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) if (n->Children[2]) { /* have else body */ elseInstLoc = prog->NumInstructions; - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { (void) new_instruction(emitInfo, OPCODE_ELSE); } else { @@ -1151,7 +1152,7 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) ifInst->BranchTarget = prog->NumInstructions + 1; } - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { (void) new_instruction(emitInfo, OPCODE_ENDIF); } @@ -1174,7 +1175,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) /* emit OPCODE_BGNLOOP */ beginInstLoc = prog->NumInstructions; - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { (void) new_instruction(emitInfo, OPCODE_BGNLOOP); } @@ -1182,7 +1183,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) emit(emitInfo, n->Children[0]); endInstLoc = prog->NumInstructions; - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { /* emit OPCODE_ENDLOOP */ endInst = new_instruction(emitInfo, OPCODE_ENDLOOP); } @@ -1194,7 +1195,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) /* end instruction's BranchTarget points to top of loop */ endInst->BranchTarget = beginInstLoc; - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { /* BGNLOOP's BranchTarget points to the ENDLOOP inst */ beginInst = prog->Instructions + beginInstLoc; beginInst->BranchTarget = prog->NumInstructions - 1; @@ -1239,7 +1240,7 @@ emit_cont_break(slang_emit_info *emitInfo, slang_ir_node *n) gl_inst_opcode opcode; struct prog_instruction *inst; n->InstLocation = emitInfo->prog->NumInstructions; - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; } else { @@ -1268,7 +1269,7 @@ emit_cont_break_if(slang_emit_info *emitInfo, slang_ir_node *n, inst->CondUpdate = GL_TRUE; n->InstLocation = emitInfo->prog->NumInstructions; - if (EmitHighLevelInstructions) { + if (emitInfo->EmitHighLevelInstructions) { if (n->Opcode == IR_CONT_IF_TRUE || n->Opcode == IR_CONT_IF_FALSE) opcode = OPCODE_CONT; @@ -1440,7 +1441,7 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) */ assert(n->Var->aux == n->Store); } - if (EmitComments) { + if (emitInfo->EmitComments) { /* emit NOP with comment describing the variable's storage location */ char s[1000]; sprintf(s, "TEMP[%d]%s = %s (size %d)", @@ -1599,6 +1600,7 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, struct gl_program *prog, GLboolean withEnd, slang_info_log *log) { + GET_CURRENT_CONTEXT(ctx); GLboolean success; slang_emit_info emitInfo; @@ -1606,6 +1608,9 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, emitInfo.vt = vt; emitInfo.prog = prog; + emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions; + emitInfo.EmitComments = ctx->Shader.EmitComments; + (void) emit(&emitInfo, n); /* finish up by adding the END opcode to program */ -- cgit v1.2.3 From 2cf8d24131edec78778d7b6ce49ead9157c2b266 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 18:35:34 -0700 Subject: remove unused DriverMgrCtx --- src/mesa/main/mtypes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 26b5c91ada..0a25666846 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2887,7 +2887,6 @@ struct __GLcontextRec struct dd_function_table Driver; void *DriverCtx; /**< Points to device driver context/state */ - void *DriverMgrCtx; /**< Points to device driver manager (optional)*/ /** Core/Driver constants */ struct gl_constants Const; -- cgit v1.2.3 From 0e1bd2302537a9684158cb353b876af4ce6346e7 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 27 Feb 2007 09:54:50 -0700 Subject: s/matrix_stack/gl_matrix_stack/ and s/mesa_list_state/gl_dlist_state/ --- src/mesa/main/matrix.c | 12 ++++++------ src/mesa/main/mtypes.h | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index b2aa83e189..0f96f94909 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.5.3 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -230,7 +230,7 @@ void GLAPIENTRY _mesa_PushMatrix( void ) { GET_CURRENT_CONTEXT(ctx); - struct matrix_stack *stack = ctx->CurrentStack; + struct gl_matrix_stack *stack = ctx->CurrentStack; ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE&VERBOSE_API) @@ -270,7 +270,7 @@ void GLAPIENTRY _mesa_PopMatrix( void ) { GET_CURRENT_CONTEXT(ctx); - struct matrix_stack *stack = ctx->CurrentStack; + struct gl_matrix_stack *stack = ctx->CurrentStack; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (MESA_VERBOSE&VERBOSE_API) @@ -766,7 +766,7 @@ void _mesa_update_modelview_project( GLcontext *ctx, GLuint new_state ) * initialize it. */ static void -init_matrix_stack( struct matrix_stack *stack, +init_matrix_stack( struct gl_matrix_stack *stack, GLuint maxDepth, GLuint dirtyFlag ) { GLuint i; @@ -792,7 +792,7 @@ init_matrix_stack( struct matrix_stack *stack, * frees the array. */ static void -free_matrix_stack( struct matrix_stack *stack ) +free_matrix_stack( struct gl_matrix_stack *stack ) { GLuint i; for (i = 0; i < stack->MaxDepth; i++) { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 0a25666846..410d2d3144 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2584,7 +2584,7 @@ struct gl_extensions /** * A stack of matrices (projection, modelview, color, texture, etc). */ -struct matrix_stack +struct gl_matrix_stack { GLmatrix *Top; /**< points into Stack */ GLmatrix *Stack; /**< array [MaxDepth] of GLmatrix */ @@ -2815,7 +2815,7 @@ struct mesa_display_list /** * State used during display list compilation and execution. */ -struct mesa_list_state +struct gl_dlist_state { struct mesa_display_list *CallStack[MAX_LIST_NESTING]; GLuint CallDepth; /**< Current recursion calling depth */ @@ -2893,19 +2893,19 @@ struct __GLcontextRec /** \name The various 4x4 matrix stacks */ /*@{*/ - struct matrix_stack ModelviewMatrixStack; - struct matrix_stack ProjectionMatrixStack; - struct matrix_stack ColorMatrixStack; - struct matrix_stack TextureMatrixStack[MAX_TEXTURE_COORD_UNITS]; - struct matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES]; - struct matrix_stack *CurrentStack; /**< Points to one of the above stacks */ + struct gl_matrix_stack ModelviewMatrixStack; + struct gl_matrix_stack ProjectionMatrixStack; + struct gl_matrix_stack ColorMatrixStack; + struct gl_matrix_stack TextureMatrixStack[MAX_TEXTURE_COORD_UNITS]; + struct gl_matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES]; + struct gl_matrix_stack *CurrentStack; /**< Points to one of the above stacks */ /*@}*/ /** Combined modelview and projection matrix */ GLmatrix _ModelProjectMatrix; /** \name Display lists */ - struct mesa_list_state ListState; + struct gl_dlist_state ListState; GLboolean ExecuteFlag; /**< Execute GL commands? */ GLboolean CompileFlag; /**< Compile GL commands into display list? */ -- cgit v1.2.3 From c6d930a11467730e1b6fed13d59680acab90b6df Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Mar 2007 11:53:27 -0700 Subject: fix vert/frag typo --- src/mesa/shader/slang/slang_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index f468a8cbc2..8f924739b4 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -570,7 +570,7 @@ _slang_link(GLcontext *ctx, #if 1 printf("************** original vertex program\n"); _mesa_print_program(&vertProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); + _mesa_print_program_parameters(ctx, &vertProg->Base); #endif #if 1 printf("************** linked vertex prog\n"); -- cgit v1.2.3 From 28ab1125c22bcb558e3b5e127d975120de76e103 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Mar 2007 12:15:30 -0700 Subject: more DEBUG_PROG code --- src/mesa/shader/prog_execute.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index a63298ba7d..828a90db44 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -1316,6 +1316,12 @@ _mesa_execute_program(GLcontext * ctx, result[2] = (a[2] == b[2]) ? 1.0F : 0.0F; result[3] = (a[3] == b[3]) ? 1.0F : 0.0F; store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("SEQ (%g %g %g %g) = (%g %g %g %g) == (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } } break; case OPCODE_SFL: /* set false, operands ignored */ @@ -1334,6 +1340,12 @@ _mesa_execute_program(GLcontext * ctx, result[2] = (a[2] >= b[2]) ? 1.0F : 0.0F; result[3] = (a[3] >= b[3]) ? 1.0F : 0.0F; store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("SGE (%g %g %g %g) = (%g %g %g %g) >= (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } } break; case OPCODE_SGT: /* set on greater */ @@ -1347,8 +1359,10 @@ _mesa_execute_program(GLcontext * ctx, result[3] = (a[3] > b[3]) ? 1.0F : 0.0F; store_vector4(inst, machine, result); if (DEBUG_PROG) { - printf("SGT %g %g %g %g\n", - result[0], result[1], result[2], result[3]); + printf("SGT (%g %g %g %g) = (%g %g %g %g) > (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); } } break; @@ -1371,6 +1385,12 @@ _mesa_execute_program(GLcontext * ctx, result[2] = (a[2] <= b[2]) ? 1.0F : 0.0F; result[3] = (a[3] <= b[3]) ? 1.0F : 0.0F; store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("SLE (%g %g %g %g) = (%g %g %g %g) <= (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } } break; case OPCODE_SLT: /* set on less */ @@ -1383,6 +1403,12 @@ _mesa_execute_program(GLcontext * ctx, result[2] = (a[2] < b[2]) ? 1.0F : 0.0F; result[3] = (a[3] < b[3]) ? 1.0F : 0.0F; store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("SLT (%g %g %g %g) = (%g %g %g %g) < (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } } break; case OPCODE_SNE: /* set on not equal */ @@ -1395,6 +1421,12 @@ _mesa_execute_program(GLcontext * ctx, result[2] = (a[2] != b[2]) ? 1.0F : 0.0F; result[3] = (a[3] != b[3]) ? 1.0F : 0.0F; store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("SNE (%g %g %g %g) = (%g %g %g %g) != (%g %g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], a[3], + b[0], b[1], b[2], b[3]); + } } break; case OPCODE_STR: /* set true, operands ignored */ -- cgit v1.2.3 From e10a1457e827f9cfb18a4438f3254151ddf1d60b Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Mar 2007 14:07:48 -0700 Subject: fix some int arithmetic problems --- src/mesa/shader/slang/library/slang_core.gc | 130 ++- src/mesa/shader/slang/library/slang_core_gc.h | 1404 +++++++++++++------------ src/mesa/shader/slang/slang_emit.c | 10 +- 3 files changed, 790 insertions(+), 754 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 811568c7ba..7ff2151ce4 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -537,116 +537,140 @@ mat4 __constructor(const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) int __operator + (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm vec4_add x.x, x.x, y.x; - __asm float_to_int c, x; - return c; +// XXX If we ever have int registers, we'll do something like this: +// XXX For now, mostly treat ints as floats. +// float x, y; +// __asm int_to_float x, a; +// __asm int_to_float y, b; +// __asm vec4_add x.x, x.x, y.x; +// __asm float_to_int __retVal, x; + float x; + __asm vec4_add x, a, b; + __asm float_to_int __retVal, x; } int __operator - (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm float_negate y, y; - __asm vec4_add x.x, x.x, y.x; - __asm float_to_int c, x; - return c; + float x; + __asm vec4_subtract x, a, b; + __asm float_to_int __retVal, x; } int __operator * (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm float_multiply x, x, y; - __asm float_to_int c, x; - return c; + float x; + __asm vec4_multiply x, a, b; + __asm float_to_int __retVal, x; } int __operator / (const int a, const int b) { - float x, y; - int c; - __asm int_to_float x, a; - __asm int_to_float y, b; - __asm float_divide x, x, y; - __asm float_to_int c, x; - return c; + float bInv, x; + __asm float_rcp bInv, b; + __asm vec4_multiply x, a, bInv; + __asm float_to_int __retVal, x; } //// Basic ivec2 operators -ivec2 __operator + (const ivec2 v, const ivec2 u) +ivec2 __operator + (const ivec2 a, const ivec2 b) { - return ivec2 (v.x + u.x, v.y + u.y); + vec2 x; + __asm vec4_add x, a, b; + __asm float_to_int __retVal, x; } -ivec2 __operator - (const ivec2 v, const ivec2 u) +ivec2 __operator - (const ivec2 a, const ivec2 b) { - return ivec2 (v.x - u.x, v.y - u.y); + vec2 x; + __asm vec4_subtract x, a, b; + __asm float_to_int __retVal, x; } -ivec2 __operator * (const ivec2 v, const ivec2 u) +ivec2 __operator * (const ivec2 a, const ivec2 b) { - return ivec2 (v.x * u.x, v.y * u.y); + vec2 x; + __asm vec4_multiply x, a, b; + __asm float_to_int __retVal, x; } -ivec2 __operator / (const ivec2 v, const ivec2 u) +ivec2 __operator / (const ivec2 a, const ivec2 b) { - return ivec2 (v.x / u.x, v.y / u.y); + vec2 bInv, x; + __asm float_rcp bInv.x, b.x; + __asm float_rcp bInv.y, b.y; + __asm vec4_multiply x, a, bInv; + __asm float_to_int __retVal, x; } //// Basic ivec3 operators -ivec3 __operator + (const ivec3 v, const ivec3 u) +ivec3 __operator + (const ivec3 a, const ivec3 b) { - return ivec3 (v.x + u.x, v.y + u.y, v.z + u.z); + vec3 x; + __asm vec4_add x, a, b; + __asm float_to_int __retVal, x; } -ivec3 __operator - (const ivec3 v, const ivec3 u) +ivec3 __operator - (const ivec3 a, const ivec3 b) { - return ivec3 (v.x - u.x, v.y - u.y, v.z - u.z); + vec3 x; + __asm vec4_subtract x, a, b; + __asm float_to_int __retVal, x; } -ivec3 __operator * (const ivec3 v, const ivec3 u) +ivec3 __operator * (const ivec3 a, const ivec3 b) { - return ivec3 (v.x * u.x, v.y * u.y, v.z * u.z); + vec3 x; + __asm vec4_multiply x, a, b; + __asm float_to_int __retVal, x; } -ivec3 __operator / (const ivec3 v, const ivec3 u) +ivec3 __operator / (const ivec3 a, const ivec3 b) { - return ivec3 (v.x / u.x, v.y / u.y, v.z / u.z); + vec3 bInv, x; + __asm float_rcp bInv.x, b.x; + __asm float_rcp bInv.y, b.y; + __asm float_rcp bInv.z, b.z; + __asm vec4_multiply x, a, bInv; + __asm float_to_int __retVal, x; } //// Basic ivec4 operators -ivec4 __operator + (const ivec4 v, const ivec4 u) +ivec4 __operator + (const ivec4 a, const ivec4 b) { - return ivec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w); + vec3 x; + __asm vec4_add x, a, b; + __asm float_to_int __retVal, x; } -ivec4 __operator - (const ivec4 v, const ivec4 u) +ivec4 __operator - (const ivec4 a, const ivec4 b) { - return ivec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w); + vec4 x; + __asm vec4_subtract x, a, b; + __asm float_to_int __retVal, x; } -ivec4 __operator * (const ivec4 v, const ivec4 u) +ivec4 __operator * (const ivec4 a, const ivec4 b) { - return ivec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w); + vec4 x; + __asm vec4_multiply x, a, b; + __asm float_to_int __retVal, x; } -ivec4 __operator / (const ivec4 v, const ivec4 u) +ivec4 __operator / (const ivec4 a, const ivec4 b) { - return ivec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w); + vec4 bInv, x; + __asm float_rcp bInv.x, b.x; + __asm float_rcp bInv.y, b.y; + __asm float_rcp bInv.z, b.z; + __asm float_rcp bInv.w, b.w; + __asm vec4_multiply x, a, bInv; + __asm float_to_int __retVal, x; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 51ec685c26..0e13db0244 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -140,712 +140,720 @@ 114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, 0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95, 114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0, -0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105, -110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4,118,101,99,52,95,97,100,100,0, -18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116,111,95, -105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3, -2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0, -18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0,0,4, -102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,4,118,101,99,52,95,97,100, -100,0,18,120,0,59,120,0,0,18,120,0,59,120,0,0,18,121,0,59,120,0,0,0,4,102,108,111,97,116,95,116, -111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0, -0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,0,0, -0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4, -102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,1, -0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95, -116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97, -116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,120,0, -0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0, -0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117, -0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18, -117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0, -18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22, -1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0, -49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1, -8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59, -121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0, -0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0, -59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7, -117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18, -117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1, -0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121, -0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0, -1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59, -121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0, -59,119,0,46,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118, -0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18, -117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1, -0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121, -0,18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59, -119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0, -59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117, -0,59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9, -98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0, -18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, -97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9, -97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9, -1,98,73,110,118,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0, -59,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0, -0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1, -0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1, -0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, -117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, -97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11, -2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0, -0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117, -0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59, -120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0, -0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95, -114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0, -0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0, -0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1, -0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119, -0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117, -0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0, -10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10, +0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101, +99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0, +1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98, +0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0, +0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105, +110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0, +0,0,1,3,2,0,9,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110, +118,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18, +98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,120,0,0,0,0,1,0,6,2,26,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101, +99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,27,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0, +1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18, +98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +120,0,0,0,0,1,0,6,2,21,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, +95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,22,1,1,0,6,97,0,0,1,1,0, +6,98,0,0,0,1,3,2,0,10,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98, +73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118, +0,59,121,0,0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0, +18,97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101, +116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,26,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0, +4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, +95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,27,1,1,0,7,97,0,0,1,1,0, +7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18, +97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108, +0,0,18,120,0,0,0,0,1,0,7,2,21,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, +116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,22,1,1,0,7,97,0, +0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73, +110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0, +59,122,0,0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18, +97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101, +116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,26,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,11,1,120,0,0,0, +4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, +95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,27,1,1,0,8,97,0,0,1,1,0, +8,98,0,0,0,1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18, +97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108, +0,0,18,120,0,0,0,0,1,0,8,2,21,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,120,0,0,0,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, +116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,22,1,1,0,8,97,0, +0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73, +110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0, +59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,119,0,0, +18,98,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18, +98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,120,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100, +0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108, +0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97, +116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0, +0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,98,73,110,118,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0, +0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, +0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1, +1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108, +0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, +18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108, +111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, +59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1, +0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12, +118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2, +0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, +95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0, +0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120, +120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, +52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0, +59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117, +0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98, +0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0, +18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121, +0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,105,110, +118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0, +0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9, +98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0, +0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1,1,0, +9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11, 118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117, -0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, -9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0, -10,117,0,0,0,1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, -85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59, -121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1, -0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0, -59,120,120,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121, -122,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0, -0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, -116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59, -120,121,122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0, -0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0, -59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1, -0,11,117,0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0, +1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1, +1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0, +1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120, +121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0, +18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110, +118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0, +0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1, +1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118,66,0,59,120,120,120,0,0, +0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1, +1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, +115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0, +18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, +0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, +12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1, +0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, 118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, 59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0, -0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0, -0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105, -110,118,66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, -52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0, -0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0, -12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, -0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4, -118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, -98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0, -0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0, -0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0, -0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120, -0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, -0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, -0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, -0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, -0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, -0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, -0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117, -0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0, -0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, -0,46,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, -0,46,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, -0,47,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, -0,47,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, -0,48,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, -0,48,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117, -0,49,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0, -0,49,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, -0,46,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, -0,46,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, -0,47,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, -0,47,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, -0,48,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, -0,48,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117, -0,49,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0, -0,49,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101, -99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58, -105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0, -8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0, -18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52, -95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27, -1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110, -101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0, -0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114, -101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0, -9,97,0,0,1,1,0,9,98,0,0,0,1,8,18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0, -10,98,0,0,0,1,8,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1, -0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12, -98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0, -0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0, -18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98, -0,0,0,1,9,18,97,0,18,98,0,54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105, -110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1, -0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97, -0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0, -2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59, -121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1, -0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1, -0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0, -18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1, -0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0, -23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0, -18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59, -122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0, +0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,119,0,0,18,117, +0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9, +98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0, +0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6, +117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0, +5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0, +6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1, +0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1, +0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1, +1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1, +1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0, +1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0, +1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0, +0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0, +0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118, +0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97, +0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5, +97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5, +97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8, +118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5, +97,0,0,0,1,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,97,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54, +0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59, +120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58, +105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0, +59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18, +95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101, +99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, +121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12, +118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118, +0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20, +0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0, +15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, +18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, +0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, +97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, +1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, +97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, +54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, +5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, +0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, +117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, +117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, +0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, +118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, +59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, +0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, 0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8, -118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117, -0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0, -23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9, -18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59, -119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97, -100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, -119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10, -118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59, -120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0, -59,120,121,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0, -1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, -59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,0,0,18,118,0,59,120,121,0,0,18,119,0,59,120,121,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, -11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116, -0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0, -18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, -122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120, -121,122,0,0,18,118,0,59,120,121,122,0,0,18,119,0,59,120,121,122,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0, -1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2, -2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1, -0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, +0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, +120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, +0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, +120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, +1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, +0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, +18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, +0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, +22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, +18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, +122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, +0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, +121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, +1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, +97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, +117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1, +0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0, +18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121, +0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, +99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,3,1,0, +2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0, +10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, 117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,118,0,0,18,118,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0, -1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, -120,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0, -2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,9,18,118,0,59,120,0,18,97,0,23,0,9,18, -118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18, -97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118, -101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120, -120,120,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, -97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0, -1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1, -0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0, -9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95, -97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1, -1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0, -59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2, -8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9, -18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120, -0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, -116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, -0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118, -0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118, -65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, -120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0, -59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0, -18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, -0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0, -0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118, -0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, -0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0, -1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97, -0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120, -120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0, -13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0, -10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, -16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, -9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, -121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120, -0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82, -111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, -121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1, -0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, -20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0, -0,1,1,0,14,110,0,0,0,1,2,3,2,0,11,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18, -109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0, -20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, -119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, -0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82, -111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, -111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18, -109,0,16,10,50,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100, -111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0, -0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,50,0, -59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0, -57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0, -16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0, -18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,0,1,0, -14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, -110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0, +0,18,119,0,59,120,121,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1, +0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11, +118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, +120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59, +121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0, +18,119,0,59,120,121,122,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1, +4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1, +0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18, +117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, +119,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, +5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59, +120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59, +120,120,0,0,0,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2, +6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1, +0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122, +0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5, +97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0, +59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4, +118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121, +122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, +120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1, +0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59, +120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118, +0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0, +18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, +0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119, +0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0, +59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0, +2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112, +0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120, +120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1, +0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, +120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0, +0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18, +97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0, +59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4, +118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1, +0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18, +118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, +0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1, +1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, +110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, -0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,2,3,2,0,12,1,109,82,111,119,48,0,0,0,9,18,109, -82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18, -109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120, -0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82, -111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, -120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51, -0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16, -8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9, -18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, -119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, -0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, -57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82, -111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, -121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109, -82,111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109, -82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18, -109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, -50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, -100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111, -119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,51,0,0,0,9,18,109,82,111, -119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0, -16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0, -9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119, -51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0, -58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0, -57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26, -1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110, -0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49, -0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13, -109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, -20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0, -13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13, -2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2, +21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, +0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2, +26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, +50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,2,3,2,0,11,1,109,82,111,119,48, +0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48, +0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10, +50,0,57,59,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, +109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18, +109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, +20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111, +119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121, +0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82, +111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82, +111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18, +109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100, +111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0, +0,18,110,0,16,10,50,0,57,0,0,20,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20, +0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, +0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0, +0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, +110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, +0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, +10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,2,3, +2,0,12,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, +20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48, +0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10, +51,0,57,59,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, +109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, +16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0, +18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,49,0,0,0,9, +18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0, +57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0, +16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0, +18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, +0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0, +18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59, +122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111, +119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0, +16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0, +18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2, +0,12,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20, +0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0, +59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51, +0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18, +109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0, +16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0, +18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9, +98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2, +27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13, 109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0, -14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97, -0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0, -16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0, -57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0, -1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0, -15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48, +20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, +0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0, +14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1, +0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, 57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2, -27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0, -15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, -0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0, -0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, -110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, -10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, -48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, -18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0, -10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0, -59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120, -0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0, -16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, -0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18, -114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11, -2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,2,3,2,0,11,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109, -0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114, -48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,0,2,3,2,0,11,1,114,49,0,0,0,9,18,114,49, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0, +1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, +0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50, +0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109, +0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0, +1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2, +22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, +8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49, +20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, +0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0, +16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0, +57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0, +57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, +110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, +110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0, +0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, +49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0, +13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, +109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, +0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3, +2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9, +18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48, +0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0, +0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8, +48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0, +16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18, +109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,2,3,2, +0,11,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59, +121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0, +20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, +114,48,0,0,0,0,2,3,2,0,11,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20, +0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16, +10,50,0,57,59,121,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121, +0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,11,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48, +0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59, +122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116, +86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118, +0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0, +18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0, +57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10, +51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,2,3,2,0,12,1,114, +48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, +0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114, +48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,0,2,3,2,0,12,1,114,49,0,0,0,9,18,114,49, 0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59, -121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,4,118,101,99,51,95,100,111, -116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,11,1,114,50, -0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0, -16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101, -99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,0, -1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -100,111,116,0,18,109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121, -0,58,100,111,116,0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -59,122,0,58,100,111,116,0,18,109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,119,0,58,100,111,116,0,18,109,0,16,10,51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12, -118,0,0,1,1,0,15,109,0,0,0,1,2,3,2,0,12,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0, -57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122, -0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0, -4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48, -0,0,0,0,2,3,2,0,12,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18, -114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0, -57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,12, -1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0, -18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9, -18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, -95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,2,3,2,0,12,1,114,51,0,0,0,9,18, -114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0, -57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119, -0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97, -108,0,59,119,0,0,18,118,0,0,18,114,51,0,0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13, -110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18, -110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10, -50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2, -2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22, -0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0, -0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18, -109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0, -2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, -18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109, -0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, -9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0, -23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109, -0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1, -1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18, -109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0, -0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9, -18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109, -0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0, -9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0, -24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2, -10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0, -1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15, -109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0, -16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0, -1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16, -10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0, -0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0, -58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1, -0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18, -118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, -0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99, -50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0, -17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14, -109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48, -0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109, -0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, -101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1, -0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, -101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1, -0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97, -0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18, -118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0, -0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, -0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58, -118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118, -101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101, -99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99, -52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95, -112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0, -9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,6,118,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0, -16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0, -47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0, -9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58, -118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2, -11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99, -51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49, -0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101, -99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99, -50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58, -118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118, -101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57, -58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58, -118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9, -97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0, -1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,11,0, -95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,12,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, -9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115,116, -73,110,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97, -0,16,10,49,0,46,20,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0, -46,20,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0, -8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0,13,0,95,95, -112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,3,2,0,13,1,110,0,2,18,109,0,0,0,9,18,109,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,14,0, -95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,3,2,0,14,1,110,0,2,18,109,0,0,0,9,18, -109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0, -15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,3,2,0,15,1,110,0,2,18,109,0,0,0,9, -18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, -51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,1, -2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108, -111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1, -0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18, -97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18, -97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3, -2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97, -0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18, -101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58, -102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103, -0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102, -108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0, -1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, -97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0, -1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111, -114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111, -116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0, -0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1, +121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18, +109,0,16,10,51,0,57,59,121,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108, +0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,12,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109, +0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114, +50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57, +59,122,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118, +0,0,18,114,50,0,0,0,0,2,3,2,0,12,1,114,51,0,0,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59, +119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18, +109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4, +118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0, +0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13, +110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0, +16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, +48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, +0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0, +14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109, +0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1, +0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109, +0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0, +57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1, +0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9, +18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, +1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, +57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16, +10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48, +20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1, +0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10, +49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, +0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0, +1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18, +109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0, +1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, +10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9, +97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0, +16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109, +0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18, +109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9, +18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, +8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0, +9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0, +18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18, +109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20, +0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86, +97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0, +16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0, +0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86, +97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0, +16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0, +0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1, +0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18, +118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, +57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0, +0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52, +0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, +49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, +48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9, +18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1, +0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, +101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1, +0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18, +118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0, +0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1, +9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58, +118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0, +14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, +48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, +0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, +10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95, +112,111,115,116,68,101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115, +116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118, +0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99, +114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58, +105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9, +97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47, +20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0, +11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95, +112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111, +115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18, +109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0, +16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95, +95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109, +0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15, +0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97, +0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2, +10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99, +50,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49, +0,48,0,0,0,0,46,20,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0, +46,20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,6,0,95,95,112,111,115,116,73, +110,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, +118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114, +0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, +118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51, +0,16,10,49,0,0,0,46,20,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,3,2, +0,13,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49, +0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48, +0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1, +3,2,0,14,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0, +17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0, +48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0, +0,1,3,2,0,15,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52, +0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, +48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,46,20,0,8,18,110,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, +103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5, +97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0, +0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95, +108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5, +98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1, +2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108, +101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101, +0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1, +8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0, +9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115, +115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18, +97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58, +102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111, +103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0, +0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97, +0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116, +0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1, +4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, 9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83, -65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105, +65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, +18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, -14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0, -16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0, -0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110, -116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0, -0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, -0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, +0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, +18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, +83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, +105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, +110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, +101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, +110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 9ead896142..9532e070f7 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1482,9 +1482,13 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) return emit_swizzle(emitInfo, n); case IR_I_TO_F: - { - n->Store = n->Children[0]->Store; - } + /* just move */ + emit(emitInfo, n->Children[0]); + inst = new_instruction(emitInfo, OPCODE_MOV); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + if (emitInfo->EmitComments) + inst->Comment = _mesa_strdup("int to float"); return NULL; /* Simple arithmetic */ -- cgit v1.2.3 From 6cb0aa12b82bf29e0306de7a2baa1c398732688c Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 6 Mar 2007 16:32:03 -0700 Subject: more integer arithmetic updates --- src/mesa/shader/slang/library/slang_core.gc | 217 ++++++++++---------- src/mesa/shader/slang/library/slang_core_gc.h | 272 ++++++++++++++------------ 2 files changed, 259 insertions(+), 230 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 7ff2151ce4..0c45515163 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -932,106 +932,130 @@ vec4 __operator / (const vec4 v, const float b) //// Basic ivec2/int operators -ivec2 __operator + (const int a, const ivec2 u) { - return ivec2 (a) + u; +ivec2 __operator + (const int a, const ivec2 u) +{ + __retVal = ivec2(a) + u; } -ivec2 __operator + (const ivec2 v, const int b) { - return v + ivec2 (b); +ivec2 __operator + (const ivec2 v, const int b) +{ + __retVal = v + ivec2(b); } -ivec2 __operator - (const int a, const ivec2 u) { - return ivec2 (a) - u; +ivec2 __operator - (const int a, const ivec2 u) +{ + __retVal = ivec2(a) - u; } -ivec2 __operator - (const ivec2 v, const int b) { - return v - ivec2 (b); +ivec2 __operator - (const ivec2 v, const int b) +{ + __retVal = v - ivec2(b); } -ivec2 __operator * (const int a, const ivec2 u) { - return ivec2 (a) * u; +ivec2 __operator * (const int a, const ivec2 u) +{ + __retVal = ivec2(a) * u; } -ivec2 __operator * (const ivec2 v, const int b) { - return v * ivec2 (b); +ivec2 __operator * (const ivec2 v, const int b) +{ + __retVal = v * ivec2(b); } -ivec2 __operator / (const int a, const ivec2 u) { - return ivec2 (a) / u; +ivec2 __operator / (const int a, const ivec2 u) +{ + __retVal = ivec2(a) / u; } -ivec2 __operator / (const ivec2 v, const int b) { - return v / ivec2 (b); +ivec2 __operator / (const ivec2 v, const int b) +{ + __retVal = v / ivec2(b); } //// Basic ivec3/int operators -ivec3 __operator + (const int a, const ivec3 u) { - return ivec3 (a) + u; +ivec3 __operator + (const int a, const ivec3 u) +{ + __retVal = ivec3(a) + u; } -ivec3 __operator + (const ivec3 v, const int b) { - return v + ivec3 (b); +ivec3 __operator + (const ivec3 v, const int b) +{ + __retVal = v + ivec3(b); } -ivec3 __operator - (const int a, const ivec3 u) { - return ivec3 (a) - u; +ivec3 __operator - (const int a, const ivec3 u) +{ + __retVal = ivec3(a) - u; } -ivec3 __operator - (const ivec3 v, const int b) { - return v - ivec3 (b); +ivec3 __operator - (const ivec3 v, const int b) +{ + __retVal = v - ivec3(b); } -ivec3 __operator * (const int a, const ivec3 u) { - return ivec3 (a) * u; +ivec3 __operator * (const int a, const ivec3 u) +{ + __retVal = ivec3(a) * u; } -ivec3 __operator * (const ivec3 v, const int b) { - return v * ivec3 (b); +ivec3 __operator * (const ivec3 v, const int b) +{ + __retVal = v * ivec3(b); } -ivec3 __operator / (const int a, const ivec3 u) { - return ivec3 (a) / u; +ivec3 __operator / (const int a, const ivec3 u) +{ + __retVal = ivec3(a) / u; } -ivec3 __operator / (const ivec3 v, const int b) { - return v / ivec3 (b); +ivec3 __operator / (const ivec3 v, const int b) +{ + __retVal = v / ivec3(b); } //// Basic ivec4/int operators -ivec4 __operator + (const int a, const ivec4 u) { - return ivec4 (a) + u; +ivec4 __operator + (const int a, const ivec4 u) +{ + __retVal = ivec4(a) + u; } -ivec4 __operator + (const ivec4 v, const int b) { - return v + ivec4 (b); +ivec4 __operator + (const ivec4 v, const int b) +{ + __retVal = v + ivec4(b); } -ivec4 __operator - (const int a, const ivec4 u) { - return ivec4 (a) - u; +ivec4 __operator - (const int a, const ivec4 u) +{ + __retVal = ivec4(a) - u; } -ivec4 __operator - (const ivec4 v, const int b) { - return v - ivec4 (b); +ivec4 __operator - (const ivec4 v, const int b) +{ + __retVal = v - ivec4(b); } -ivec4 __operator * (const int a, const ivec4 u) { - return ivec4 (a) * u; +ivec4 __operator * (const int a, const ivec4 u) +{ + __retVal = ivec4(a) * u; } -ivec4 __operator * (const ivec4 v, const int b) { - return v * ivec4 (b); +ivec4 __operator * (const ivec4 v, const int b) +{ + __retVal = v * ivec4(b); } -ivec4 __operator / (const int a, const ivec4 u) { - return ivec4 (a) / u; +ivec4 __operator / (const int a, const ivec4 u) +{ + __retVal = ivec4(a) / u; } -ivec4 __operator / (const ivec4 v, const int b) { - return v / ivec4 (b); +ivec4 __operator / (const ivec4 v, const int b) +{ + __retVal = v / ivec4(b); } @@ -1041,25 +1065,22 @@ ivec4 __operator / (const ivec4 v, const int b) { int __operator - (const int a) { - __asm float_negate __retVal.x, a; + __asm vec4_negate __retVal.x, a; } ivec2 __operator - (const ivec2 v) { -// XXX redo - return ivec2 (-v.x, -v.y); + __asm vec4_negate __retVal, v; } ivec3 __operator - (const ivec3 v) { -// XXX redo - return ivec3 (-v.x, -v.y, -v.z); + __asm vec4_negate __retVal, v; } ivec4 __operator - (const ivec4 v) { -// XXX redo - return ivec4 (-v.x, -v.y, -v.z, -v.w); + __asm vec4_negate __retVal, v; } float __operator - (const float a) @@ -1109,12 +1130,12 @@ mat4 __operator - (const mat4 m) float dot(const float a, const float b) { - return a * b; + __retVal = a * b; } float dot(const vec2 a, const vec2 b) { - return a.x * b.x + a.y * b.y; + __retVal = a.x * b.x + a.y * b.y; } float dot(const vec3 a, const vec3 b) @@ -1133,22 +1154,24 @@ float dot(const vec4 a, const vec4 b) void __operator += (inout int a, const int b) { - a = int (float (a) + float (b)); + __asm vec4_add a, a, b; } void __operator -= (inout int a, const int b) { - a += -b; + __asm vec4_subtract a, a, b; } void __operator *= (inout int a, const int b) { - a = int (float (a) * float (b)); + __asm vec4_multiply a, a, b; } void __operator /= (inout int a, const int b) { - a = int (float (a) / float (b)); + float invB; + __asm float_rcp invB, b; + __asm vec4_multiply a, a, invB; } @@ -1156,26 +1179,26 @@ void __operator /= (inout int a, const int b) void __operator += (inout ivec2 v, const ivec2 u) { - v.x += u.x; - v.y += u.y; + __asm vec4_add v, v, u; } void __operator -= (inout ivec2 v, const ivec2 u) { - v.x -= u.x; - v.y -= u.y; + __asm vec4_subtract v, v, u; } void __operator *= (inout ivec2 v, const ivec2 u) { - v.x *= u.x; - v.y *= u.y; + __asm vec4_multiply v, v, u; } void __operator /= (inout ivec2 v, const ivec2 u) { - v.x /= u.x; - v.y /= u.y; + ivec2 inv, z; + __asm float_rcp inv.x, u.x; + __asm float_rcp inv.y, u.y; + __asm vec4_multiply z, v, inv; + __asm float_to_int __retVal, z; } @@ -1183,61 +1206,53 @@ void __operator /= (inout ivec2 v, const ivec2 u) void __operator += (inout ivec3 v, const ivec3 u) { - v.x += u.x; - v.y += u.y; - v.z += u.z; + __asm vec4_add v, v, u; } void __operator -= (inout ivec3 v, const ivec3 u) { - v.x -= u.x; - v.y -= u.y; - v.z -= u.z; + __asm vec4_subtract v, v, u; } void __operator *= (inout ivec3 v, const ivec3 u) { - v.x *= u.x; - v.y *= u.y; - v.z *= u.z; + __asm vec4_multiply v, v, u; } void __operator /= (inout ivec3 v, const ivec3 u) { - v.x /= u.x; - v.y /= u.y; - v.z /= u.z; + ivec3 inv, z; + __asm float_rcp inv.x, u.x; + __asm float_rcp inv.y, u.y; + __asm vec4_multiply z, v, inv; + __asm float_to_int __retVal, z; } //// ivec4 assignment operators -void __operator += (inout ivec4 v, const ivec4 u) { - v.x += u.x; - v.y += u.y; - v.z += u.z; - v.w += u.w; +void __operator += (inout ivec4 v, const ivec4 u) +{ + __asm vec4_add v, v, u; } -void __operator -= (inout ivec4 v, const ivec4 u) { - v.x -= u.x; - v.y -= u.y; - v.z -= u.z; - v.w -= u.w; +void __operator -= (inout ivec4 v, const ivec4 u) +{ + __asm vec4_subtract v, v, u; } -void __operator *= (inout ivec4 v, const ivec4 u) { - v.x *= u.x; - v.y *= u.y; - v.z *= u.z; - v.w *= u.w; +void __operator *= (inout ivec4 v, const ivec4 u) +{ + __asm vec4_multiply v, v, u; } -void __operator /= (inout ivec4 v, const ivec4 u) { - v.x /= u.x; - v.y /= u.y; - v.z /= u.z; - v.w /= u.w; +void __operator /= (inout ivec4 v, const ivec4 u) +{ + ivec4 inv, z; + __asm float_rcp inv.x, u.x; + __asm float_rcp inv.y, u.y; + __asm vec4_multiply z, v, inv; + __asm float_to_int __retVal, z; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 0e13db0244..9bfa4729b5 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -287,136 +287,150 @@ 98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0, 0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, 0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6, -117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0, -5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0, -6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1, -0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1, -0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1, -1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1, -1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,1,0,6,2,22,1,1,0,6,118,0,0, -1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,1,0,7,2,26,1,1,0,5,97,0,0, -1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,1,0,7,2,26,1,1,0,7,118,0, -0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,1,0,7,2,27,1,1,0,5,97,0, -0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,1,0,7,2,27,1,1,0,7,118, -0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,1,0,7,2,21,1,1,0,5,97, -0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,1,0,7,2,21,1,1,0,7, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,1,0,7,2,22,1,1,0,5, -97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,1,0,7,2,22,1,1,0,7, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,1,0,8,2,26,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,1,0,8,2,26,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,1,0,8,2,27,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,1,0,8,2,27,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,1,0,8,2,21,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,1,0,8,2,21,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,1,0,8,2,22,1,1,0,5, -97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,1,0,8,2,22,1,1,0,8, -118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,1,0,5,2,27,1,1,0,5, -97,0,0,0,1,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,97,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54, -0,18,118,0,59,121,0,54,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59, -120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58, -105,118,101,99,52,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0, -59,119,0,54,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101, -99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120, -121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12, -118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118, -0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20, -0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0, -15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,8, -18,97,0,18,98,0,48,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,8,18,97,0,59,120, -0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,0,0,1,0,9,0,100,111,116,0,1,1,0,11, -97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95, -100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0, -1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111, -97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,18,98,0, -54,21,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97, -116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0, -5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116, -0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18, -117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6, -117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0, -0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18, -118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0, -59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118, -0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0, -0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118, -0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59, -120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117, -0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59, -120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0, -1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118, -0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0, -18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117, -0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0, -22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9, -18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59, -122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0, -0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59, -121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0, -1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18, -97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1, -0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0, -18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121, -0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97, -99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,3,1,0, -2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0, -10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, -117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0, -0,18,119,0,59,120,121,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, -97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1, -0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11, -118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, -120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59, -121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0, -18,119,0,59,120,121,122,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, -97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1, +117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,20,0, +0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105, +118,101,99,50,0,18,98,0,0,0,46,20,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,20,0,0,1,0,6,2,27,1,1,0,6,118,0, +0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0, +0,47,20,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58, +105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,20,0,0,1,0,6,2,22, +1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,18,97, +0,0,0,18,117,0,49,20,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,20,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7, +117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,20,0, +0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105, +118,101,99,51,0,18,98,0,0,0,46,20,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,20,0,0,1,0,7,2,27,1,1,0,7,118,0, +0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0, +0,47,20,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58, +105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,20,0,0,1,0,7,2,22, +1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,18,97, +0,0,0,18,117,0,49,20,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,20,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8, +117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,20,0, +0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105, +118,101,99,52,0,18,98,0,0,0,46,20,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,20,0,0,1,0,8,2,27,1,1,0,8,118,0, +0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0, +0,47,20,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58, +105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,20,0,0,1,0,8,2,22, +1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,18,97, +0,0,0,18,117,0,49,20,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,20,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,4,118, +101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1, +0,6,2,27,1,1,0,6,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86, +97,108,0,0,18,118,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101, +0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,4,118,101,99,52, +95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,9,2,27,1,1,0,9, +97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0, +18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0, +0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103, +97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, +50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0, +1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0, +18,98,0,48,20,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,20,0,0,1, +0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95, +114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12, +98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0, +0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,0,18,97,0, +0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,5, +97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, +105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18, +97,0,0,18,105,110,118,66,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0, +2,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,3,2,0,6,1,105,110,118,0,0,1,1, +122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,120,0,0,18,117,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,122,0,0,18,118,0,0,18,105,110,118,0,0,0,4,102,108,111, +97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1,1,0, +2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,7,118,0, +0,1,1,0,7,117,0,0,0,1,3,2,0,7,1,105,110,118,0,0,1,1,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,105,110,118,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +118,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,122, +0,0,18,118,0,0,18,105,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114, +101,116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1, 4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1, -0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18, -117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, -119,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0, -5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59, -120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59, -120,120,0,0,0,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2, -6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1, -0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122, -0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5, -97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0, -59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121, -122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59, -120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1, -0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59, -120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118, -0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0, -18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, -0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119, -0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, +0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,3,2,0,8,1,105,110,118,0,0, +1,1,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,120,0,0,18,117,0,59,120,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,122,0,0,18,118,0,0,18,105,110,118,0,0,0,4,102,108, +111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1, +1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,59, +120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0, +0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, +99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0, +1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,3,1,0,2,10,118, +0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121, +0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0, +0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59, +120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101, +99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,119, +0,59,120,121,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100, +0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1, +0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, +117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, +4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,119,0, +59,120,121,122,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100, +100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, +12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119, +0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117, +0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,119,0, +0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120, +121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120, +121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, +120,0,0,0,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6, +118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0, +0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0, +0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,59, +120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122, +0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, +0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2, +8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120, +120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0, +1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, +97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0, +18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, 118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0, 0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0, 59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108, -- cgit v1.2.3 From 55821d021d87fba6551509f5612ee16d9ece977f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 07:52:24 -0700 Subject: Generate an error if the vertex shader does not write to gl_Position. --- src/mesa/shader/slang/slang_link.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 8f924739b4..e564d6d576 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -548,8 +548,19 @@ _slang_link(GLcontext *ctx, } } - if (shProg->VertexProgram) + if (shProg->VertexProgram) { _slang_update_inputs_outputs(&shProg->VertexProgram->Base); + if (!(shProg->VertexProgram->Base.OutputsWritten & VERT_RESULT_HPOS)) { + /* the vertex program did not compute a vertex position */ + if (shProg->InfoLog) { + _mesa_free(shProg->InfoLog); + } + shProg->InfoLog + = _mesa_strdup("gl_Position was not written by vertex shader"); + shProg->LinkStatus = GL_FALSE; + return; + } + } if (shProg->FragmentProgram) _slang_update_inputs_outputs(&shProg->FragmentProgram->Base); -- cgit v1.2.3 From cec81eef313cea94ffdbd8e62c18ff8d3f651dbd Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 08:04:06 -0700 Subject: check for null program ptrs in _mesa_uniform() --- src/mesa/shader/shader_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 48ba8b657a..924c9d5e94 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -961,8 +961,10 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, } if (shProg->Uniforms->Parameters[location].Type == PROGRAM_SAMPLER) { - _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); - _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); + if (shProg->VertexProgram) + _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base); + if (shProg->FragmentProgram) + _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base); FLUSH_VERTICES(ctx, _NEW_TEXTURE); } } -- cgit v1.2.3 From e61ec95deb6e7edb2b003036773d57cc70d2c275 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 08:55:42 -0700 Subject: additional error detection --- src/mesa/shader/slang/slang_codegen.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 26be14a056..b2c9c72710 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2077,6 +2077,10 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) GLint size = 4; /* XXX fix? */ base = _slang_gen_operation(A, &oper->children[0]); + if (!base) { + /* error previously found */ + return NULL; + } n = new_node1(IR_FIELD, base); if (n) { @@ -2118,6 +2122,7 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) if (oper->children[1].type != SLANG_OPER_LITERAL_INT || index >= max) { slang_info_log_error(A->log, "Invalid array index for vector type"); + return NULL; } n = _slang_gen_operation(A, &oper->children[0]); @@ -2143,7 +2148,11 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) slang_typeinfo_construct(&elem_ti); _slang_typeof_operation(A, oper, &elem_ti); elemSize = _slang_sizeof_type_specifier(&elem_ti.spec); - assert(elemSize >= 1); + if (elemSize <= 0) { + /* unknown var or type */ + slang_info_log_error(A->log, "Undefined var or type"); + return NULL; + } array = _slang_gen_operation(A, &oper->children[0]); index = _slang_gen_operation(A, &oper->children[1]); -- cgit v1.2.3 From d25046b6487aaaa55cc2e3cfa57fe75a1c9d6de1 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 08:56:09 -0700 Subject: fix incorrect HPOS write test --- src/mesa/shader/slang/slang_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index e564d6d576..a3cc2333ec 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -550,13 +550,13 @@ _slang_link(GLcontext *ctx, if (shProg->VertexProgram) { _slang_update_inputs_outputs(&shProg->VertexProgram->Base); - if (!(shProg->VertexProgram->Base.OutputsWritten & VERT_RESULT_HPOS)) { + if (!(shProg->VertexProgram->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) { /* the vertex program did not compute a vertex position */ if (shProg->InfoLog) { _mesa_free(shProg->InfoLog); } shProg->InfoLog - = _mesa_strdup("gl_Position was not written by vertex shader"); + = _mesa_strdup("gl_Position was not written by vertex shader\n"); shProg->LinkStatus = GL_FALSE; return; } -- cgit v1.2.3 From f3da222839151bc8cbedbbe1e84f771deb31148c Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 09:58:45 -0700 Subject: remove bogus assertion --- src/mesa/shader/slang/slang_vartable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index 1299696670..e3efa17908 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -299,7 +299,7 @@ _slang_free_temp(slang_var_table *vt, slang_ir_storage *store) t->Temps[r * 4 + comp] = FREE; } else { - assert(store->Swizzle == SWIZZLE_NOOP); + /*assert(store->Swizzle == SWIZZLE_NOOP);*/ assert(t->ValSize[r*4] == store->Size); for (i = 0; i < store->Size; i++) { assert(t->Temps[r * 4 + i] == TEMP); -- cgit v1.2.3 From 3efd0c7b8d1aaa8abd78b35e4cb92dae4279dd77 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 09:59:26 -0700 Subject: fix swizzled writemask bug --- src/mesa/shader/slang/slang_codegen.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index b2c9c72710..5c2ee3c438 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1878,26 +1878,32 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) * v.xy = vec2(a, b); * Hard example: * vec3 v; - * v.yz = vec2(a, b); - * this would have to be transformed/swizzled into: - * v.yz = vec2(a, b).*xy* (* = don't care) - * Instead, we'll effectively do this: - * v.y = vec2(a, b).xxxx; - * v.z = vec2(a, b).yyyy; - * + * v.zy = vec2(a, b); + * this gets transformed/swizzled into: + * v.zy = vec2(a, b).*yx* (* = don't care) + * This function helps to determine simple vs. non-simple. */ static GLboolean -_slang_simple_writemask(GLuint writemask) +_slang_simple_writemask(GLuint writemask, GLuint swizzle) { switch (writemask) { case WRITEMASK_X: + return GET_SWZ(swizzle, 0) == SWIZZLE_X; case WRITEMASK_Y: + return GET_SWZ(swizzle, 1) == SWIZZLE_Y; case WRITEMASK_Z: + return GET_SWZ(swizzle, 2) == SWIZZLE_Z; case WRITEMASK_W: + return GET_SWZ(swizzle, 3) == SWIZZLE_W; case WRITEMASK_XY: + return (GET_SWZ(swizzle, 0) == SWIZZLE_X) + && (GET_SWZ(swizzle, 1) == SWIZZLE_Y); case WRITEMASK_XYZ: + return (GET_SWZ(swizzle, 0) == SWIZZLE_X) + && (GET_SWZ(swizzle, 1) == SWIZZLE_Y) + && (GET_SWZ(swizzle, 2) == SWIZZLE_Z); case WRITEMASK_XYZW: - return GL_TRUE; + return swizzle == SWIZZLE_NOOP; default: return GL_FALSE; } @@ -1948,7 +1954,7 @@ swizzle_to_writemask(GLuint swizzle, newSwizzle[2], newSwizzle[3]); - if (_slang_simple_writemask(mask)) { + if (_slang_simple_writemask(mask, *swizzleOut)) { if (size >= 1) assert(GET_SWZ(*swizzleOut, 0) == SWIZZLE_X); if (size >= 2) -- cgit v1.2.3 From 1dca0891492dc5d2974239f04883a41a1738d91f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 10:42:44 -0700 Subject: fix deferredTexture bug --- src/mesa/swrast/s_span.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 724cf616e8..a2044d0042 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1351,7 +1351,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) } else if (shaderOrTexture) { if (ctx->FragmentProgram._Current) { - if (ctx->FragmentProgram.Current->Base.OutputsWritten + if (ctx->FragmentProgram._Current->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { /* Z comes from fragment program/shader */ deferredTexture = GL_FALSE; -- cgit v1.2.3 From ab673c852724e81365ab9d979881da7464131854 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 11:25:37 -0700 Subject: fix broken __postDecr() --- src/mesa/shader/slang/library/slang_core.gc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 0c45515163..25afccf13f 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -2333,8 +2333,8 @@ ivec4 __postDecr(inout ivec4 v) float __postDecr(inout float a) { - __retVal = v; - v = v - 1.0; + __retVal = a; + a = a - 1.0; } vec2 __postDecr(inout vec2 v) -- cgit v1.2.3 From 5b5a80d011d143f1bbd9be39dc4ca6a0af4bad7c Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 11:26:47 -0700 Subject: s/equal/EQUAL/, fix bugs in logical or/and code. --- src/mesa/shader/slang/slang_codegen.c | 12 ++++++------ src/mesa/shader/slang/slang_compile.c | 4 ++-- src/mesa/shader/slang/slang_compile_operation.c | 3 +++ src/mesa/shader/slang/slang_compile_operation.h | 4 ++-- src/mesa/shader/slang/slang_print.c | 4 ++-- src/mesa/shader/slang/slang_typeinfo.c | 4 ++-- 6 files changed, 17 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 5c2ee3c438..d1e3544b54 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1650,8 +1650,8 @@ _slang_gen_logical_and(slang_assemble_ctx *A, slang_operation *oper) slang_operation_copy(&select->children[0], &oper->children[0]); slang_operation_copy(&select->children[1], &oper->children[1]); select->children[2].type = SLANG_OPER_LITERAL_BOOL; - ASSIGN_4V(select->children[2].literal, 0, 0, 0, 0); - select->children[2].literal_size = 2; + ASSIGN_4V(select->children[2].literal, 0, 0, 0, 0); /* false */ + select->children[2].literal_size = 1; n = _slang_gen_select(A, select); @@ -1680,9 +1680,9 @@ _slang_gen_logical_or(slang_assemble_ctx *A, slang_operation *oper) slang_operation_copy(&select->children[0], &oper->children[0]); select->children[1].type = SLANG_OPER_LITERAL_BOOL; - ASSIGN_4V(select->children[2].literal, 1, 1, 1, 1); + ASSIGN_4V(select->children[1].literal, 1, 1, 1, 1); /* true */ + select->children[1].literal_size = 1; slang_operation_copy(&select->children[2], &oper->children[1]); - select->children[2].literal_size = 2; n = _slang_gen_select(A, select); @@ -2281,11 +2281,11 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return new_node2(IR_SGT, _slang_gen_operation(A, &oper->children[1]), _slang_gen_operation(A, &oper->children[0])); - case SLANG_OPER_GREATERequal: + case SLANG_OPER_GREATEREQUAL: return new_node2(IR_SGE, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); - case SLANG_OPER_LESSequal: + case SLANG_OPER_LESSEQUAL: /* child[0] <= child[1] ----> child[1] >= child[0] */ return new_node2(IR_SGE, _slang_gen_operation(A, &oper->children[1]), diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 4609de684a..e183752025 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1037,12 +1037,12 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, return 0; break; case OP_LESSEQUAL: - op->type = SLANG_OPER_LESSequal; + op->type = SLANG_OPER_LESSEQUAL; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; case OP_GREATEREQUAL: - op->type = SLANG_OPER_GREATERequal; + op->type = SLANG_OPER_GREATEREQUAL; if (!handle_nary_expression(C, op, &ops, &num_ops, 2)) return 0; break; diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index aa66be8895..cf82080066 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -42,6 +42,7 @@ slang_operation_construct(slang_operation * oper) oper->children = NULL; oper->num_children = 0; oper->literal[0] = 0.0; + oper->literal_size = 1; oper->a_id = SLANG_ATOM_NULL; oper->locals = _slang_variable_scope_new(NULL); if (oper->locals == NULL) @@ -104,6 +105,8 @@ slang_operation_copy(slang_operation * x, const slang_operation * y) z.literal[2] = y->literal[2]; z.literal[3] = y->literal[3]; z.literal_size = y->literal_size; + assert(y->literal_size >= 1); + assert(y->literal_size <= 4); z.a_id = y->a_id; if (y->locals) { if (!slang_variable_scope_copy(z.locals, y->locals)) { diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index 4adcd2ab0e..02f677f813 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -77,8 +77,8 @@ typedef enum slang_operation_type_ SLANG_OPER_NOTEQUAL, /* [expr] "!=" [expr] */ SLANG_OPER_LESS, /* [expr] "<" [expr] */ SLANG_OPER_GREATER, /* [expr] ">" [expr] */ - SLANG_OPER_LESSequal, /* [expr] "<=" [expr] */ - SLANG_OPER_GREATERequal, /* [expr] ">=" [expr] */ + SLANG_OPER_LESSEQUAL, /* [expr] "<=" [expr] */ + SLANG_OPER_GREATEREQUAL, /* [expr] ">=" [expr] */ /*SLANG_OPER_LSHIFT, */ /*SLANG_OPER_RSHIFT, */ SLANG_OPER_ADD, /* [expr] "+" [expr] */ diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index e53378e461..a2f3691ddb 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -499,11 +499,11 @@ slang_print_tree(const slang_operation *op, int indent) print_binary(op, ">", indent); break; - case SLANG_OPER_LESSequal: + case SLANG_OPER_LESSEQUAL: print_binary(op, "<=", indent); break; - case SLANG_OPER_GREATERequal: + case SLANG_OPER_GREATEREQUAL: print_binary(op, ">=", indent); break; diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index 07ec514c67..6a358d66d8 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -392,8 +392,8 @@ _slang_typeof_operation_(const slang_operation * op, case SLANG_OPER_NOTEQUAL: case SLANG_OPER_LESS: case SLANG_OPER_GREATER: - case SLANG_OPER_LESSequal: - case SLANG_OPER_GREATERequal: + case SLANG_OPER_LESSEQUAL: + case SLANG_OPER_GREATEREQUAL: case SLANG_OPER_NOT: ti->spec.type = SLANG_SPEC_BOOL; break; -- cgit v1.2.3 From 35d25c0ce4104d41feead679573543427f99a031 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 12:59:01 -0700 Subject: Fix problem with nested function calls such as y = f(f(x)) Replace CurFunction with curFuncEndLabel. --- src/mesa/shader/slang/slang_codegen.c | 43 +++++++++++++++++----------------- src/mesa/shader/slang/slang_emit.c | 4 ++++ src/mesa/shader/slang/slang_typeinfo.h | 2 +- 3 files changed, 26 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index d1e3544b54..fc000dbf7b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -437,6 +437,7 @@ static slang_ir_node * new_label(slang_label *label) { slang_ir_node *n = new_node0(IR_LABEL); + assert(label); if (n) n->Label = label; return n; @@ -474,6 +475,7 @@ static slang_ir_node * new_jump(slang_label *dest) { slang_ir_node *n = new_node0(IR_JUMP); + assert(dest); if (n) n->Label = dest; return n; @@ -1007,7 +1009,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun, &inlined->children, inlined->num_children); lab->type = SLANG_OPER_LABEL; - lab->label = A->CurFunction->end_label; + lab->label = A->curFuncEndLabel; } for (i = 0; i < totalArgs; i++) { @@ -1049,16 +1051,13 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, { slang_ir_node *n; slang_operation *inlined; - slang_function *prevFunc; + slang_label *prevFuncEndLabel; + char name[200]; - prevFunc = A->CurFunction; - A->CurFunction = fun; - - if (!A->CurFunction->end_label) { - char name[200]; - sprintf(name, "__endOfFunc_%s_", (char *) A->CurFunction->header.a_name); - A->CurFunction->end_label = _slang_label_new(name); - } + prevFuncEndLabel = A->curFuncEndLabel; + sprintf(name, "__endOfFunc_%s_", (char *) fun->header.a_name); + A->curFuncEndLabel = _slang_label_new(name); + assert(A->curFuncEndLabel); if (slang_is_asm_function(fun) && !dest) { /* assemble assembly function - tree style */ @@ -1088,9 +1087,9 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, n = _slang_gen_operation(A, oper); - A->CurFunction->end_label = NULL; /* XXX delete/free? */ - - A->CurFunction = prevFunc; + /*_slang_label_delete(A->curFuncEndLabel);*/ + A->curFuncEndLabel = prevFuncEndLabel; + assert(A->curFuncEndLabel); return n; } @@ -1712,7 +1711,8 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) slang_operation gotoOp; slang_operation_construct(&gotoOp); gotoOp.type = SLANG_OPER_GOTO; - gotoOp.label = A->CurFunction->end_label; + gotoOp.label = A->curFuncEndLabel; + assert(gotoOp.label); /* assemble the new code */ n = _slang_gen_operation(A, &gotoOp); @@ -1767,9 +1767,10 @@ _slang_gen_return(slang_assemble_ctx * A, slang_operation *oper) /* child[1]: goto __endOfFunction */ jump = &block->children[1]; jump->type = SLANG_OPER_GOTO; - assert(A->CurFunction->end_label); + assert(A->curFuncEndLabel); /* XXX don't call function? */ - jump->label = A->CurFunction->end_label; + jump->label = A->curFuncEndLabel; + assert(jump->label); #if 0 /* debug */ printf("NEW RETURN:\n"); @@ -2679,11 +2680,8 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* fold constant expressions, etc. */ _slang_simplify(fun->body, &A->space, A->atoms); - A->CurFunction = fun; - /* Create an end-of-function label */ - if (!A->CurFunction->end_label) - A->CurFunction->end_label = _slang_label_new("__endOfFunc__main"); + A->curFuncEndLabel = _slang_label_new("__endOfFunc__main"); /* push new vartable scope */ _slang_push_var_table(A->vartable); @@ -2702,9 +2700,10 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) } /* append an end-of-function-label to IR tree */ - n = new_seq(n, new_label(fun->end_label)); + n = new_seq(n, new_label(A->curFuncEndLabel)); - A->CurFunction = NULL; + /*_slang_label_delete(A->curFuncEndLabel);*/ + A->curFuncEndLabel = NULL; #if 0 printf("************* New AST for %s *****\n", (char*)fun->header.a_name); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 9532e070f7..55338d6459 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -899,6 +899,8 @@ static struct prog_instruction * emit_jump(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; + assert(n); + assert(n->Label); inst = new_instruction(emitInfo, OPCODE_BRA); inst->DstReg.CondMask = COND_TR; /* always branch */ inst->BranchTarget = _slang_label_get_location(n->Label); @@ -1557,6 +1559,8 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) case IR_LABEL: return emit_label(emitInfo, n); case IR_JUMP: + assert(n); + assert(n->Label); return emit_jump(emitInfo, n); case IR_CJUMP0: return emit_cjump(emitInfo, n, 0); diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 62cf0009d3..bde2e67ae2 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -62,7 +62,7 @@ typedef struct slang_assemble_ctx_ struct gl_program *program; slang_var_table *vartable; slang_info_log *log; - struct slang_function_ *CurFunction; + struct slang_label_ *curFuncEndLabel; struct slang_ir_node_ *CurLoop; } slang_assemble_ctx; -- cgit v1.2.3 From faeea574afcdd45200aea4a78fb7d80b2aa56552 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 13:00:06 -0700 Subject: remove end_label field --- src/mesa/shader/slang/slang_compile_function.c | 1 - src/mesa/shader/slang/slang_compile_function.h | 5 ----- 2 files changed, 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index 9b0bdaf406..2f74050b86 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -86,7 +86,6 @@ slang_function_construct(slang_function * func) func->param_count = 0; func->body = NULL; func->address = ~0; - func->end_label = 0; slang_fixup_table_init(&func->fixups); return 1; } diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 09fbfd9090..a59b094e08 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -66,11 +66,6 @@ typedef struct slang_function_ slang_operation *body; /**< The instruction tree */ unsigned int address; /**< Address of this func in memory */ slang_fixup_table fixups; /**< Mem locations which need func's address */ -#if 0 - slang_atom end_label; /**< The end-of-function label */ -#else - struct slang_label_ *end_label; -#endif } slang_function; extern int slang_function_construct(slang_function *); -- cgit v1.2.3 From 842c782ceede0548546a7a015c6e04a4626f7b37 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 13:07:07 -0700 Subject: use 2.0, 2.1 version strings --- src/mesa/main/getstring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index f033ddc895..e41e9899ef 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -54,8 +54,8 @@ _mesa_GetString( GLenum name ) static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING; static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING; static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING; - static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING; - static const char *version_2_1 = "1.5 Mesa " MESA_VERSION_STRING; + static const char *version_2_0 = "2.0 Mesa " MESA_VERSION_STRING; + static const char *version_2_1 = "2.1 Mesa " MESA_VERSION_STRING; #if FEATURE_ARB_shading_language_100 static const char *sl_version_110 = "1.10 Mesa " MESA_VERSION_STRING; -- cgit v1.2.3 From c3412e9a082a0c23b865b58c8bfab64adf404946 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 13:07:40 -0700 Subject: regenerated --- src/mesa/shader/slang/library/slang_core_gc.h | 42 +++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 9bfa4729b5..ea0f32f62d 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -766,27 +766,27 @@ 0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99, 114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58, 105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9, -97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,17,49,0,48,0,0,47, -20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0, -11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95, -112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111, -115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18, -109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95, -95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15, -0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0, -95,95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97, -0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2, +97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20, +0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11, +0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112, +111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, +9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116, +68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112, +111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0, +9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95, +95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109, +0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, +0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0, +20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2, 10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99, 50,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0, 0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49, -- cgit v1.2.3 From 29bc4b8974c163507be06b4991a23368e69b177a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 13:35:49 -0700 Subject: s/diffuset/diffuse/ --- src/mesa/shader/slang/slang_builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index b01b74d359..2db7b7983b 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -221,7 +221,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, if (strcmp(field, "ambient") == 0) { tokens[3] = STATE_AMBIENT; } - else if (strcmp(field, "diffuset") == 0) { + else if (strcmp(field, "diffuse") == 0) { tokens[3] = STATE_DIFFUSE; } else if (strcmp(field, "specular") == 0) { -- cgit v1.2.3 From da899d190e6835c46dc09e401098c660886e0c4c Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 16:13:22 -0700 Subject: add missing gl_Point state, fix IR storage bug --- src/mesa/shader/slang/slang_builtin.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 2db7b7983b..8b5434c908 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -104,7 +104,33 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[0] = STATE_POINT_SIZE; *swizzleOut = SWIZZLE_XXXX; } - /* XXX finish */ + else if (strcmp(field, "sizeMin") == 0) { + tokens[0] = STATE_POINT_SIZE; + *swizzleOut = SWIZZLE_YYYY; + } + else if (strcmp(field, "sizeMax") == 0) { + tokens[0] = STATE_POINT_SIZE; + *swizzleOut = SWIZZLE_ZZZZ; + } + else if (strcmp(field, "fadeThresholdSize") == 0) { + tokens[0] = STATE_POINT_SIZE; + *swizzleOut = SWIZZLE_WWWW; + } + else if (strcmp(field, "distanceConstantAttenuation") == 0) { + tokens[0] = STATE_POINT_ATTENUATION; + *swizzleOut = SWIZZLE_XXXX; + } + else if (strcmp(field, "distanceLinearAttenuation") == 0) { + tokens[0] = STATE_POINT_ATTENUATION; + *swizzleOut = SWIZZLE_YYYY; + } + else if (strcmp(field, "distanceQuadraticAttenuation") == 0) { + tokens[0] = STATE_POINT_ATTENUATION; + *swizzleOut = SWIZZLE_ZZZZ; + } + else { + return -1; + } } else if (strcmp(var, "gl_FrontMaterial") == 0 || strcmp(var, "gl_BackMaterial") == 0) { @@ -343,6 +369,7 @@ GLint _slang_alloc_statevar(slang_ir_node *n, struct gl_program_parameter_list *paramList) { + slang_ir_node *n0 = n; const char *field = NULL, *var; GLint index1 = -1, index2 = -1, pos; GLuint swizzle; @@ -372,8 +399,8 @@ _slang_alloc_statevar(slang_ir_node *n, pos = lookup_statevar(var, index1, index2, field, &swizzle, paramList); assert(pos >= 0); if (pos >= 0) { - n->Store->Index = pos; - n->Store->Swizzle = swizzle; + n0->Store->Index = pos; + n0->Store->Swizzle = swizzle; } return pos; } -- cgit v1.2.3 From 0aec2bb8f218b7e419806149a2c50f598cd07a6a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 16:13:33 -0700 Subject: remove unneeded return stmt --- src/mesa/shader/slang/slang_emit.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 55338d6459..df53c013b1 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1381,7 +1381,6 @@ emit_struct_field(slang_emit_info *emitInfo, slang_ir_node *n) { if (n->Store->File == PROGRAM_STATE_VAR) { n->Store->Index = _slang_alloc_statevar(n, emitInfo->prog->Parameters); - return NULL; } else { _mesa_problem(NULL, "structs/fields not supported yet"); -- cgit v1.2.3 From fb3f0beb42868cef6ee78385164fb9605820c365 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 17:37:24 -0700 Subject: update comments --- src/mesa/shader/prog_statevars.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 8b4903ea01..953fbb9b9f 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -278,14 +278,12 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], case STATE_MVP_MATRIX: case STATE_TEXTURE_MATRIX: case STATE_PROGRAM_MATRIX: - /*case STATE_MATRIX:*/ { - /* state[1] = modelview, projection, texture, etc. */ - /* state[2] = which texture matrix or program matrix */ - /* state[3] = first row to fetch */ - /* state[4] = last row to fetch */ - /* state[5] = transpose, inverse or invtrans */ - + /* state[0] = modelview, projection, texture, etc. */ + /* state[1] = which texture matrix or program matrix */ + /* state[2] = first row to fetch */ + /* state[3] = last row to fetch */ + /* state[4] = transpose, inverse or invtrans */ const GLmatrix *matrix; const gl_state_index mat = state[0]; const GLuint index = (GLuint) state[1]; -- cgit v1.2.3 From 9637c963f59192aaccf68e7690f5ffb1e17ba077 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 7 Mar 2007 17:40:57 -0700 Subject: more DEBUG_PROG --- src/mesa/shader/prog_execute.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 828a90db44..092c07f7b6 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -1651,6 +1651,11 @@ _mesa_execute_program(GLcontext * ctx, result[2] = a[0] * b[1] - a[1] * b[0]; result[3] = 1.0; store_vector4(inst, machine, result); + if (DEBUG_PROG) { + printf("XPD (%g %g %g %g) = (%g %g %g) X (%g %g %g)\n", + result[0], result[1], result[2], result[3], + a[0], a[1], a[2], b[0], b[1], b[2]); + } } break; case OPCODE_X2D: /* 2-D matrix transform */ -- cgit v1.2.3 From 7e66cad998d7f8d51f373c5b45e9fd74f350d12e Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 07:51:39 -0700 Subject: fix gl_TextureMatrix indexing --- src/mesa/shader/slang/slang_builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 8b5434c908..2d09f6b64f 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -76,8 +76,8 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, } else if (strcmp(var, "gl_TextureMatrix") == 0) { tokens[0] = STATE_TEXTURE_MATRIX; - if (index2 >= 0) - tokens[1] = index2; + if (index1 >= 0) + tokens[1] = index1; isMatrix = GL_TRUE; } else if (strcmp(var, "gl_DepthRange") == 0) { -- cgit v1.2.3 From 6ff0a04f7ccc6a7049bccedb3dc52382e854848b Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 07:53:30 -0700 Subject: fix ProjectionMatrix typo --- src/mesa/shader/slang/slang_builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 2d09f6b64f..8ff54c0e56 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -62,7 +62,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[0] = STATE_MODELVIEW_MATRIX; isMatrix = GL_TRUE; } - else if (strcmp(var, "gl_ModelProjectionMatrix") == 0) { + else if (strcmp(var, "gl_ProjectionMatrix") == 0) { tokens[0] = STATE_PROJECTION_MATRIX; isMatrix = GL_TRUE; } -- cgit v1.2.3 From de8172673e23bad1186553b91a7c22e65d93692a Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 09:38:35 -0700 Subject: Rework matrix-related code. GLSL matrices are stored in column-major order while GL_ARB_vertex/fragment_program use row-major. So, need to use STATE_MATRIX_TRANSPOSE for built-in matrices. Unfortunately, this means that the expression M * V isn't very efficient since we need to extract the rows out of M. And that's the typical expression for vertex transformation: gl_ModelViewProjectionMatrix * gl_Position. Solve this inefficiency by looking for M*V expressions and replacing them with V*Transpose(M). Also, add support for GLSL 1.20's MatrixTranspose, Inverse and InverseTranspose matrices. --- .../shader/slang/library/slang_common_builtin.gc | 1 + .../shader/slang/library/slang_common_builtin_gc.h | 213 +++++----- src/mesa/shader/slang/library/slang_core.gc | 54 +-- src/mesa/shader/slang/library/slang_core_gc.h | 465 ++++++++++----------- src/mesa/shader/slang/slang_builtin.c | 73 +++- src/mesa/shader/slang/slang_codegen.c | 43 ++ src/mesa/shader/slang/slang_compile_operation.c | 10 + src/mesa/shader/slang/slang_compile_operation.h | 3 + 8 files changed, 477 insertions(+), 385 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index c8931d259e..476608fb06 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -47,6 +47,7 @@ uniform mat4 gl_ModelViewProjectionMatrix; uniform mat4 gl_TextureMatrix[gl_MaxTextureCoords]; uniform mat3 gl_NormalMatrix; +uniform mat3 __NormalMatrixTranspose; // Mesa only uniform mat4 gl_ModelViewMatrixInverse; uniform mat4 gl_ProjectionMatrixInverse; diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index cfb9f58b9b..3f1871a930 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -21,113 +21,114 @@ 119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,4,15,1,103,108,95,84,101, 120,116,117,114,101,77,97,116,114,105,120,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101, 67,111,111,114,100,115,0,0,0,2,2,4,14,1,103,108,95,78,111,114,109,97,108,77,97,116,114,105,120,0,0, -0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114, -115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73, -110,118,101,114,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111, -106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,2,4,15,1,103, -108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,0,3,18,103,108, -95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95,77,111, -100,101,108,86,105,101,119,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15, -1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,111, -115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116, -105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84, -101,120,116,117,114,101,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,3,18,103,108,95, -77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95,77,111,100, -101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111, -115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73, -110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100, -101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101, -114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84,101,120,116,117,114, -101,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,3,18,103, -108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,9,1,103,108,95,78, -111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,0,22,103,108,95,68,101,112,116,104,82,97,110,103,101, -80,97,114,97,109,101,116,101,114,115,0,9,110,101,97,114,0,0,0,1,9,102,97,114,0,0,0,1,9,100,105,102, -102,0,0,0,0,0,0,2,2,4,23,103,108,95,68,101,112,116,104,82,97,110,103,101,80,97,114,97,109,101,116, -101,114,115,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101,0,0,0,2,2,4,12,1,103,108,95,67,108, -105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120,67,108,105,112,80,108,97,110,101,115,0,0,0,2, -2,0,22,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,9,115,105,122,101,0,0, -0,1,9,115,105,122,101,77,105,110,0,0,0,1,9,115,105,122,101,77,97,120,0,0,0,1,9,102,97,100,101,84, -104,114,101,115,104,111,108,100,83,105,122,101,0,0,0,1,9,100,105,115,116,97,110,99,101,67,111,110, -115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105,115,116,97,110,99, -101,76,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105,115,116,97, -110,99,101,81,117,97,100,114,97,116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,2, -2,4,23,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,80,111, -105,110,116,0,0,0,2,2,0,22,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101, -114,115,0,12,101,109,105,115,115,105,111,110,0,0,0,1,12,97,109,98,105,101,110,116,0,0,0,1,12,100, -105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,9,115,104,105,110,105,110, -101,115,115,0,0,0,0,0,0,2,2,4,23,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116, -101,114,115,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0,0,2,2,4,23,103,108, -95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,66,97,99,107, -77,97,116,101,114,105,97,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80, -97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12,100,105,102,102,117, -115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,12,112,111,115,105,116,105,111,110,0,0,0, -1,12,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,115,112,111,116,68,105,114,101,99,116,105,111, -110,0,0,0,1,9,115,112,111,116,69,120,112,111,110,101,110,116,0,0,0,1,9,115,112,111,116,67,117,116, -111,102,102,0,0,0,1,9,115,112,111,116,67,111,115,67,117,116,111,102,102,0,0,0,1,9,99,111,110,115, -116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,108,105,110,101,97,114,65,116, -116,101,110,117,97,116,105,111,110,0,0,0,1,9,113,117,97,100,114,97,116,105,99,65,116,116,101,110, -117,97,116,105,111,110,0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80, -97,114,97,109,101,116,101,114,115,0,1,103,108,95,76,105,103,104,116,83,111,117,114,99,101,0,3,18, -103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,77,111, -100,101,108,80,97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,0,0,0,2,2,4, -23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,1,103, -108,95,76,105,103,104,116,77,111,100,101,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,77,111, -100,101,108,80,114,111,100,117,99,116,115,0,12,115,99,101,110,101,67,111,108,111,114,0,0,0,0,0,0,2, -2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,1,103,108, -95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,2,4, -23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,1,103,108,95, -66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,2,0,22,103, -108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12, -100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,0,0,0,2,2,4,23,103,108, -95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,70,114,111,110,116,76,105,103, -104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,4, -23,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,66,97,99,107,76,105, -103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2, -4,12,1,103,108,95,84,101,120,116,117,114,101,69,110,118,67,111,108,111,114,0,3,18,103,108,95,77,97, -120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,0,0,2,2,4,12,1,103,108,95,69, -121,101,80,108,97,110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114, -100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84, -101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97, -110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2, -4,12,1,103,108,95,69,121,101,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,116,117, -114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101, -83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1, -103,108,95,79,98,106,101,99,116,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,101,120,116, -117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110, -101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4, -12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120, -116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,0,22,103,108,95,70,111,103,80,97,114,97,109,101, -116,101,114,115,0,12,99,111,108,111,114,0,0,0,1,9,100,101,110,115,105,116,121,0,0,0,1,9,115,116,97, -114,116,0,0,0,1,9,101,110,100,0,0,0,1,9,115,99,97,108,101,0,0,0,0,0,0,2,2,4,23,103,108,95,70,111, -103,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,70,111,103,0,0,0,1,0,9,0,114,97,100,105,97, -110,115,0,1,1,0,9,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56, -48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,100,101,103,0,0,18,99,0,0,0,0,1,0,10,0,114,97,100,105,97,110,115,0,1,1,0,10, -100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,100,101,103,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,0,11,0,114,97,100,105,97,110,115,0, -1,1,0,11,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0, -0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,100,101,103,0,59,120,121,122,0,0,18,99,0,59,120,120,120,0,0,0,0,1,0,12,0,114,97, -100,105,97,110,115,0,1,1,0,12,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0, -0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,100,101,103,0,0,18,99,0,59,120,120,120,120,0,0,0,0,1,0,9,0,100,101,103, -114,101,101,115,0,1,1,0,9,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52, -49,53,57,50,54,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,114,97,100,0,0,18,99,0,0,0,0,1,0,10,0,100,101,103,114,101,101,115,0, -1,1,0,10,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0, -49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,114,97,100,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,0,11,0,100,101,103,114,101, -101,115,0,1,1,0,11,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56, -48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,114,97,100,0,59,120,121,122,0,0,18,99,0,59,120,120,120,0,0,0,0,1,0,12, -0,100,101,103,114,101,101,115,0,1,1,0,12,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53, +0,2,2,4,14,1,95,95,78,111,114,109,97,108,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0, +0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101, +114,115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105, +120,73,110,118,101,114,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80, +114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,2,4,15, +1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,0,3,18, +103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95, +77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2, +2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115, +112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101, +99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103, +108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,3,18, +103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95, +77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110, +115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116, +114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108, +95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120, +73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84,101, +120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115, +101,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,9,1, +103,108,95,78,111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,0,22,103,108,95,68,101,112,116,104,82, +97,110,103,101,80,97,114,97,109,101,116,101,114,115,0,9,110,101,97,114,0,0,0,1,9,102,97,114,0,0,0, +1,9,100,105,102,102,0,0,0,0,0,0,2,2,4,23,103,108,95,68,101,112,116,104,82,97,110,103,101,80,97,114, +97,109,101,116,101,114,115,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101,0,0,0,2,2,4,12,1, +103,108,95,67,108,105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120,67,108,105,112,80,108,97, +110,101,115,0,0,0,2,2,0,22,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,9, +115,105,122,101,0,0,0,1,9,115,105,122,101,77,105,110,0,0,0,1,9,115,105,122,101,77,97,120,0,0,0,1,9, +102,97,100,101,84,104,114,101,115,104,111,108,100,83,105,122,101,0,0,0,1,9,100,105,115,116,97,110, +99,101,67,111,110,115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105, +115,116,97,110,99,101,76,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9, +100,105,115,116,97,110,99,101,81,117,97,100,114,97,116,105,99,65,116,116,101,110,117,97,116,105, +111,110,0,0,0,0,0,0,2,2,4,23,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0, +1,103,108,95,80,111,105,110,116,0,0,0,2,2,0,22,103,108,95,77,97,116,101,114,105,97,108,80,97,114, +97,109,101,116,101,114,115,0,12,101,109,105,115,115,105,111,110,0,0,0,1,12,97,109,98,105,101,110, +116,0,0,0,1,12,100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,9,115, +104,105,110,105,110,101,115,115,0,0,0,0,0,0,2,2,4,23,103,108,95,77,97,116,101,114,105,97,108,80,97, +114,97,109,101,116,101,114,115,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0, +0,2,2,4,23,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,1,103, +108,95,66,97,99,107,77,97,116,101,114,105,97,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,83, +111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12, +100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,12,112,111,115,105, +116,105,111,110,0,0,0,1,12,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,115,112,111,116,68,105, +114,101,99,116,105,111,110,0,0,0,1,9,115,112,111,116,69,120,112,111,110,101,110,116,0,0,0,1,9,115, +112,111,116,67,117,116,111,102,102,0,0,0,1,9,115,112,111,116,67,111,115,67,117,116,111,102,102,0,0, +0,1,9,99,111,110,115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,108,105, +110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,113,117,97,100,114,97,116,105, +99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,83, +111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,76,105,103,104,116,83,111, +117,114,99,101,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,0,22,103,108,95,76,105, +103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116, +0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101, +114,115,0,1,103,108,95,76,105,103,104,116,77,111,100,101,108,0,0,0,2,2,0,22,103,108,95,76,105,103, +104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,12,115,99,101,110,101,67,111,108,111, +114,0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99, +116,115,0,1,103,108,95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117, +99,116,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116, +115,0,1,103,108,95,66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0, +0,0,2,2,0,22,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,97,109,98,105,101, +110,116,0,0,0,1,12,100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,0,0, +0,2,2,4,23,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,70,114,111, +110,116,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104, +116,115,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95, +66,97,99,107,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103, +104,116,115,0,0,0,2,2,4,12,1,103,108,95,84,101,120,116,117,114,101,69,110,118,67,111,108,111,114,0, +3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,0,0,2, +2,4,12,1,103,108,95,69,121,101,80,108,97,110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117, +114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97,110,101,84,0,3,18, +103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95, +69,121,101,80,108,97,110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111, +114,100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97,110,101,81,0,3,18,103,108,95,77,97, +120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99, +116,80,108,97,110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100, +115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,84,0,3,18,103,108,95,77,97, +120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99, +116,80,108,97,110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100, +115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18,103,108,95,77,97, +120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,0,22,103,108,95,70,111,103,80,97, +114,97,109,101,116,101,114,115,0,12,99,111,108,111,114,0,0,0,1,9,100,101,110,115,105,116,121,0,0,0, +1,9,115,116,97,114,116,0,0,0,1,9,101,110,100,0,0,0,1,9,115,99,97,108,101,0,0,0,0,0,0,2,2,4,23,103, +108,95,70,111,103,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,70,111,103,0,0,0,1,0,9,0,114, +97,100,105,97,110,115,0,1,1,0,9,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54, +0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,100,101,103,0,0,18,99,0,0,0,0,1,0,10,0,114,97,100,105,97,110,115, +0,1,1,0,10,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48, +0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,100,101,103,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,0,11,0,114,97,100,105, +97,110,115,0,1,1,0,11,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49, +56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,122,0,0,18,100,101,103,0,59,120,121,122,0,0,18,99,0,59,120,120,120,0,0,0,0,1,0, +12,0,114,97,100,105,97,110,115,0,1,1,0,12,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53, 57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -95,95,114,101,116,86,97,108,0,0,18,114,97,100,0,0,18,99,0,59,120,120,120,120,0,0,0,0,1,0,9,0,115, -105,110,0,1,1,0,9,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,0,0,0,1,0,10,0,115,105,110, -0,1,1,0,10,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97, +95,95,114,101,116,86,97,108,0,0,18,100,101,103,0,0,18,99,0,59,120,120,120,120,0,0,0,0,1,0,9,0,100, +101,103,114,101,101,115,0,1,1,0,9,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0, +49,52,49,53,57,50,54,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,0,0,18,114,97,100,0,0,18,99,0,0,0,0,1,0,10,0,100,101,103,114,101,101, +115,0,1,1,0,10,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0, +48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, +0,59,120,121,0,0,18,114,97,100,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,0,11,0,100,101,103, +114,101,101,115,0,1,1,0,11,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17, +49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,114,97,100,0,59,120,121,122,0,0,18,99,0,59,120,120,120,0,0,0,0,1, +0,12,0,100,101,103,114,101,101,115,0,1,1,0,12,114,97,100,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49, +53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,0,0,18,99,0,59,120,120,120,120,0,0,0,0,1,0,9,0, +115,105,110,0,1,1,0,9,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,0,0,0,1,0,10,0,115,105, +110,0,1,1,0,10,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95, +95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97, 116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115, 0,59,121,0,0,0,0,1,0,11,0,115,105,110,0,1,1,0,11,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111, 97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110, diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 25afccf13f..964c63fde6 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -1868,71 +1868,64 @@ mat4 __operator / (const mat4 m, const float b) //// matrix / vector products vec2 __operator * (const mat2 m, const vec2 v) -{ - __retVal.x = dot(m[0], v); - __retVal.y = dot(m[1], v); -} - -vec2 __operator * (const vec2 v, const mat2 m) { vec2 r0, r1; r0.x = m[0].x; r0.y = m[1].x; r1.x = m[0].y; r1.y = m[1].y; - __retVal.x = dot(v, r0); - __retVal.y = dot(v, r1); + __retVal.x = dot(r0, v); + __retVal.y = dot(r1, v); } -vec3 __operator * (const mat3 m, const vec3 v) +vec2 __operator * (const vec2 v, const mat2 m) { - __retVal.x = dot(m[0], v); - __retVal.y = dot(m[1], v); - __retVal.z = dot(m[2], v); + __retVal.x = dot(v, m[0]); + __retVal.y = dot(v, m[1]); } -vec3 __operator * (const vec3 v, const mat3 m) +vec3 __operator * (const mat3 m, const vec3 v) { { vec3 r0; r0.x = m[0].x; r0.y = m[1].x; r0.z = m[2].x; - __asm vec3_dot __retVal.x, v, r0; + __asm vec3_dot __retVal.x, r0, v; } { vec3 r1; r1.x = m[0].y; r1.y = m[1].y; r1.z = m[2].y; - __asm vec3_dot __retVal.y, v, r1; + __asm vec3_dot __retVal.y, r1, v; } { vec3 r2; r2.x = m[0].z; r2.y = m[1].z; r2.z = m[2].z; - __asm vec3_dot __retVal.z, v, r2; + __asm vec3_dot __retVal.z, r2, v; } } -vec4 __operator * (const mat4 m, const vec4 v) +vec3 __operator * (const vec3 v, const mat3 m) { - __retVal.x = dot(m[0], v); - __retVal.y = dot(m[1], v); - __retVal.z = dot(m[2], v); - __retVal.w = dot(m[3], v); + __retVal.x = dot(v, m[0]); + __retVal.y = dot(v, m[1]); + __retVal.z = dot(v, m[2]); } -vec4 __operator * (const vec4 v, const mat4 m) +vec4 __operator * (const mat4 m, const vec4 v) { + // extract rows, then do dot product { vec4 r0; r0.x = m[0].x; r0.y = m[1].x; r0.z = m[2].x; r0.w = m[3].x; - __asm vec4_dot __retVal.x, v, r0; + __asm vec4_dot __retVal.x, r0, v; } { vec4 r1; @@ -1940,7 +1933,7 @@ vec4 __operator * (const vec4 v, const mat4 m) r1.y = m[1].y; r1.z = m[2].y; r1.w = m[3].y; - __asm vec4_dot __retVal.y, v, r1; + __asm vec4_dot __retVal.y, r1, v; } { vec4 r2; @@ -1948,7 +1941,7 @@ vec4 __operator * (const vec4 v, const mat4 m) r2.y = m[1].z; r2.z = m[2].z; r2.w = m[3].z; - __asm vec4_dot __retVal.z, v, r2; + __asm vec4_dot __retVal.z, r2, v; } { vec4 r3; @@ -1956,10 +1949,19 @@ vec4 __operator * (const vec4 v, const mat4 m) r3.y = m[1].w; r3.z = m[2].w; r3.w = m[3].w; - __asm vec4_dot __retVal.w, v, r3; + __asm vec4_dot __retVal.w, r3, v; } } +vec4 __operator * (const vec4 v, const mat4 m) +{ + //mm + __retVal.x = dot(v, m[0]); + __retVal.y = dot(v, m[1]); + __retVal.z = dot(v, m[2]); + __retVal.w = dot(v, m[3]); +} + //// mat2 assignment operators diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index ea0f32f62d..bb15e6dbd9 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -627,247 +627,246 @@ 49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, 18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95, 114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0, -13,109,0,0,1,1,0,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18, -109,0,16,8,48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116, -0,18,109,0,16,10,49,0,57,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,3, -2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9, -18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48, -0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,114,48,0,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,114,49,0,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0, -0,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8, -48,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0, -16,10,49,0,57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18, -109,0,16,10,50,0,57,0,18,118,0,0,0,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,2,3,2, -0,11,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59, -121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0, -20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,0,18, -114,48,0,0,0,0,2,3,2,0,11,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20, -0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16, -10,50,0,57,59,121,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121, -0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,11,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48, -0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59, -122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116, -86,97,108,0,59,122,0,0,18,118,0,0,18,114,50,0,0,0,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,109,0,16,8,48,0,57,0,18,118, -0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,109,0,16,10,49,0,57,0, -18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,109,0,16,10,50,0, -57,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,18,109,0,16,10, -51,0,57,0,18,118,0,0,0,20,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,2,3,2,0,12,1,114, -48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109, -0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114, -48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,118,0,0,18,114,48,0,0,0,0,2,3,2,0,12,1,114,49,0,0,0,9,18,114,49, -0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59, -121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18, -109,0,16,10,51,0,57,59,121,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108, -0,59,121,0,0,18,118,0,0,18,114,49,0,0,0,0,2,3,2,0,12,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109, -0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114, -50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57, -59,122,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118, -0,0,18,114,50,0,0,0,0,2,3,2,0,12,1,114,51,0,0,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59, -119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18, -109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4, -118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,0,18,114,51,0, -0,0,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13, -110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, -48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0, -14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109, -0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1, -0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109, -0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0, -57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1, -0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9, -18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0, -1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16, -10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48, -20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1, -0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10, -49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97, -0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0, -1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18, -109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0, -1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, -10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0, -16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57, -18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109, -0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18, -109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9, -18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16, -8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0, -9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0, -18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18, -109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20, -0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86, -97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0, -16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0, -0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86, -97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0, -16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0, -0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1, -0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18, -118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, -0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0, -0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52, -0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, -49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, -48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, -0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9, -18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1, -0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, -101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1, -0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18, -118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0, -0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1, -9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58, -118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0, -14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0, -0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95, -112,111,115,116,68,101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, -0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115, -116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118, -0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58, -105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9, -97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20, -0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11, -0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112, -111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0, -9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116, -68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112, -111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0, -9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95, -95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109, -0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95, -95,112,111,115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0, -20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2, -10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99, -50,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49, -0,48,0,0,0,0,46,20,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0, -46,20,0,0,1,0,5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,6,0,95,95,112,111,115,116,73, -110,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, -118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114, +13,109,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18, +109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, +114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0, +57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,114,48,0,0,18,118, +0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,114,49,0,0,18,118,0,0,0, +20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, +0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, +121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1, +1,0,11,118,0,0,0,1,2,3,2,0,11,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, +20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0, +16,10,50,0,57,59,120,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,114,48,0,0,18,118,0,0,0,0,2,3,2,0,11,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16, +8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0, +59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, +116,86,97,108,0,59,121,0,0,18,114,49,0,0,18,118,0,0,0,0,2,3,2,0,11,1,114,50,0,0,0,9,18,114,50,0,59, +120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, +20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0, +18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,50,0,0,18,118,0,0,0,0,0,1,0,11,2,21,1,1,0,11, +118,0,0,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, +0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18, +118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116, +0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,2, +3,2,0,12,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120, +0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,4,118,101,99,52,95,100,111,116, +0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,48,0,0,18,118,0,0,0,0,2,3,2,0,12,1,114,49,0,0, +0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, +49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59, +119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, +86,97,108,0,59,121,0,0,18,114,49,0,0,18,118,0,0,0,0,2,3,2,0,12,1,114,50,0,0,0,9,18,114,50,0,59,120, +0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0, +9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10, +51,0,57,59,122,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0, +18,114,50,0,0,18,118,0,0,0,0,2,3,2,0,12,1,114,51,0,0,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0, +57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122, +0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0, +4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,51,0,0,18,118, +0,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, +120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,0,1,0,0,2,1,1, +0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, +16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, +0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, +1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, +0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0, +14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, +0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0, +15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, +0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57, +18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, +10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0, +0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2, +15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16, +10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18, +109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109, +0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, +0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, +10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, +9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, +23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, +18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, +18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, +9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, +57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, +0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, +0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, +24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, +51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109, +0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, +1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25, +1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0, +20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0, +18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18, +97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10, +118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, +116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, +51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0, +2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, +109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, +101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101, +99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99, +51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0, +2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, +0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, +10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49, +0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9, +18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118, +101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2, +24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58, +118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0, +13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17, +49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0, +48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0, +0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9, +18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, +0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16, +10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109, +0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68, +101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, +118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114, 0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51, -0,16,10,49,0,0,0,46,20,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,3,2, -0,13,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49, -0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48, -0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1, -3,2,0,14,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0, -17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0, -48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0, -0,1,3,2,0,15,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52, -0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0, -0,0,0,46,20,0,8,18,110,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115, -103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5, -97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0, -0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95, -108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5, -98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1, -2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108, -101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101, -0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1, -8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0, -9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115, -115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18, -97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58, -102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111, -103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0, -0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97, -0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116, -0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1, -4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58, +118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52, +0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95, +95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118, +0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111, +115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, +118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68, +101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, +118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114, +0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, +16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68, +101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115, +116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, +50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0, +57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111, +115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97, +0,18,97,0,16,10,49,0,46,20,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1, +9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48, +0,0,0,0,46,20,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46, +20,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0, +5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0, +2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118, +101,99,50,0,16,10,49,0,0,0,46,20,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16, +10,49,0,0,0,46,20,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46, +20,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,3,2,0,13,1,110,0,2,18, +109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46, +20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0, +8,18,110,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,3,2,0,14,1,110, +0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46, +20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0, +8,18,110,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,3,2,0,15,1,110, +0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46, +20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0, +9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,8,18, +110,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0, +0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16, +1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18, +99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, +108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0, +1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18, +103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18, +98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, +97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9, +98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18, +97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8, +18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18, +97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111, +116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111, +103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111, +103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0, +0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, +114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, 112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, 18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, 118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, 105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105, +59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, 110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110, +121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, 116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, 0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, 58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, 0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0, -0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0, -18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, +114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, +59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, +0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, +83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, +69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, 9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57, -0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114, -105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105, -110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18, -101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105, -110,116,0,18,101,0,0,0,0,0 +83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, +0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, +0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, +112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, +1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, +1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, +116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index 8ff54c0e56..cba11b472b 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -49,6 +49,42 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, GLuint *swizzleOut, struct gl_program_parameter_list *paramList) { + /* + * NOTE: The ARB_vertex_program extension specified that matrices get + * loaded in registers in row-major order. With GLSL, we want column- + * major order. So, we need to transpose all matrices here... + */ + static const struct { + const char *name; + gl_state_index matrix; + gl_state_index modifier; + } matrices[] = { + { "gl_ModelViewMatrix", STATE_MODELVIEW_MATRIX, STATE_MATRIX_TRANSPOSE }, + { "gl_ModelViewMatrixInverse", STATE_MODELVIEW_MATRIX, STATE_MATRIX_INVTRANS }, + { "gl_ModelViewMatrixTranspose", STATE_MODELVIEW_MATRIX, 0 }, + { "gl_ModelViewMatrixInverseTranspose", STATE_MODELVIEW_MATRIX, STATE_MATRIX_INVERSE }, + + { "gl_ProjectionMatrix", STATE_PROJECTION_MATRIX, STATE_MATRIX_TRANSPOSE }, + { "gl_ProjectionMatrixInverse", STATE_PROJECTION_MATRIX, STATE_MATRIX_INVTRANS }, + { "gl_ProjectionMatrixTranpose", STATE_PROJECTION_MATRIX, 0 }, + { "gl_ProjectionMatrixInverseTranpose", STATE_PROJECTION_MATRIX, STATE_MATRIX_INVERSE }, + + { "gl_ModelViewProjectionMatrix", STATE_MVP_MATRIX, STATE_MATRIX_TRANSPOSE }, + { "gl_ModelViewProjectionMatrixInverse", STATE_MVP_MATRIX, STATE_MATRIX_INVTRANS }, + { "gl_ModelViewProjectionMatrixTranspose", STATE_MVP_MATRIX, 0 }, + { "gl_ModelViewProjectionMatrixInverseTranpose", STATE_MVP_MATRIX, STATE_MATRIX_INVERSE }, + + { "gl_TextureMatrix", STATE_TEXTURE_MATRIX, STATE_MATRIX_TRANSPOSE }, + { "gl_TextureMatrixInverse", STATE_TEXTURE_MATRIX, STATE_MATRIX_INVTRANS }, + { "gl_TextureMatrixTranpose", STATE_TEXTURE_MATRIX, 0 }, + { "gl_TextureMatrixInverseTranspose", STATE_TEXTURE_MATRIX, STATE_MATRIX_INVERSE }, + + /* XXX verify these!!! */ + { "gl_NormalMatrix", STATE_MODELVIEW_MATRIX, STATE_MATRIX_TRANSPOSE }, + { "__NormalMatrixTranspose", STATE_MODELVIEW_MATRIX, 0 }, + + { NULL, 0, 0 } + }; gl_state_index tokens[STATE_LENGTH]; GLuint i; GLboolean isMatrix = GL_FALSE; @@ -58,27 +94,24 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, } *swizzleOut = SWIZZLE_NOOP; - if (strcmp(var, "gl_ModelViewMatrix") == 0) { - tokens[0] = STATE_MODELVIEW_MATRIX; - isMatrix = GL_TRUE; - } - else if (strcmp(var, "gl_ProjectionMatrix") == 0) { - tokens[0] = STATE_PROJECTION_MATRIX; - isMatrix = GL_TRUE; - } - else if (strcmp(var, "gl_ModelViewProjectionMatrix") == 0) { - tokens[0] = STATE_MVP_MATRIX; - isMatrix = GL_TRUE; - } - else if (strcmp(var, "gl_NormalMatrix") == 0) { - tokens[0] = STATE_MODELVIEW_MATRIX; - isMatrix = GL_TRUE; + /* first, look if var is a pre-defined matrix */ + for (i = 0; matrices[i].name; i++) { + if (strcmp(var, matrices[i].name) == 0) { + tokens[0] = matrices[i].matrix; + /* tokens[1], [2] and [3] filled below */ + tokens[4] = matrices[i].modifier; + isMatrix = GL_TRUE; + break; + } } - else if (strcmp(var, "gl_TextureMatrix") == 0) { - tokens[0] = STATE_TEXTURE_MATRIX; - if (index1 >= 0) - tokens[1] = index1; - isMatrix = GL_TRUE; + + if (isMatrix) { + if (tokens[0] == STATE_TEXTURE_MATRIX) { + if (index1 >= 0) { + tokens[1] = index1; + index1 = 0; /* prevent extra addition at end of function */ + } + } } else if (strcmp(var, "gl_DepthRange") == 0) { tokens[0] = STATE_DEPTH_RANGE; diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index fc000dbf7b..1c037d4304 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2178,6 +2178,48 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) } +/** + * Look for expressions such as: gl_ModelviewMatrix * gl_Vertex + * and replace with this: gl_Vertex * gl_ModelviewMatrixTranpose + * Since matrices are stored in column-major order, the second form of + * multiplication is much more efficient (just 4 dot products). + */ +static void +_slang_check_matmul_optimization(slang_assemble_ctx *A, slang_operation *oper) +{ + static const struct { + const char *orig; + const char *tranpose; + } matrices[] = { + {"gl_ModelViewMatrix", "gl_ModelViewMatrixTranspose"}, + {"gl_ProjectionMatrix", "gl_ProjectionMatrixTranspose"}, + {"gl_ModelViewProjectionMatrix", "gl_ModelViewProjectionMatrixTranspose"}, + {"gl_TextureMatrix", "gl_TextureMatrixTranspose"}, + {"gl_NormalMatrix", "__NormalMatrixTranspose"}, + { NULL, NULL } + }; + + assert(oper->type == SLANG_OPER_MULTIPLY); + if (oper->children[0].type == SLANG_OPER_IDENTIFIER) { + GLuint i; + for (i = 0; matrices[i].orig; i++) { + if (oper->children[0].a_id + == slang_atom_pool_atom(A->atoms, matrices[i].orig)) { + /* + _mesa_printf("Replace %s with %s\n", + matrices[i].orig, matrices[i].tranpose); + */ + assert(oper->children[0].type == SLANG_OPER_IDENTIFIER); + oper->children[0].a_id + = slang_atom_pool_atom(A->atoms, matrices[i].tranpose); + /* finally, swap the operands */ + _slang_operation_swap(&oper->children[0], &oper->children[1]); + return; + } + } + } +} + /** * Generate IR tree for a slang_operation (AST node) @@ -2309,6 +2351,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; assert(oper->num_children == 2); + _slang_check_matmul_optimization(A, oper); n = _slang_gen_function_call_name(A, "*", oper, NULL); return n; } diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index cf82080066..410d215a8d 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -212,3 +212,13 @@ slang_operation_insert(GLuint *numChildren, slang_operation **children, return NULL; } + +void +_slang_operation_swap(slang_operation *oper0, slang_operation *oper1) +{ + slang_operation tmp = *oper0; + *oper0 = *oper1; + *oper1 = tmp; +} + + diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h index 02f677f813..3bed3218a6 100644 --- a/src/mesa/shader/slang/slang_compile_operation.h +++ b/src/mesa/shader/slang/slang_compile_operation.h @@ -144,5 +144,8 @@ extern slang_operation * slang_operation_insert(GLuint *numChildren, slang_operation **children, GLuint pos); +extern void +_slang_operation_swap(slang_operation *oper0, slang_operation *oper1); + #endif /* SLANG_COMPILE_OPERATION_H */ -- cgit v1.2.3 From bf86ddaa2018d58c894da27d7a7a7b5449d1338e Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 10:40:25 -0700 Subject: check for attempted writes to read-only vars --- src/mesa/shader/slang/slang_codegen.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 1c037d4304..b1b4616f63 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2007,6 +2007,12 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) else { slang_ir_node *n, *lhs, *rhs; lhs = _slang_gen_operation(A, &oper->children[0]); + if (lhs->Store->File != PROGRAM_OUTPUT && + lhs->Store->File != PROGRAM_TEMPORARY) { + slang_info_log_error(A->log, "Assignment to read-only variable"); + return NULL; + } + rhs = _slang_gen_operation(A, &oper->children[1]); if (lhs && rhs) { /* convert lhs swizzle into writemask */ -- cgit v1.2.3 From c9f486c38f80a71b89152bde78be628b531101ef Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 10:40:37 -0700 Subject: remove old assertion --- src/mesa/shader/slang/slang_emit.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index df53c013b1..1d18929b4d 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1021,7 +1021,6 @@ emit_move(slang_emit_info *emitInfo, slang_ir_node *n) char *srcAnnot, *dstAnnot; inst = new_instruction(emitInfo, OPCODE_MOV); assert(n->Children[0]->Store->Index >= 0); - assert(n->Children[0]->Store->Index < 16); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); dstAnnot = storage_annotation(n->Children[0], emitInfo->prog); -- cgit v1.2.3 From 609306de17583a0780cb7db314429371706915fb Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 10:43:57 -0700 Subject: s/_slang_gen_hl_if/_slang_gen_if/ --- src/mesa/shader/slang/slang_codegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index b1b4616f63..cbe86fab3e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1461,7 +1461,7 @@ is_operation_type(const const slang_operation *oper, slang_operation_type type) * IR_IF instruction. */ static slang_ir_node * -_slang_gen_hl_if(slang_assemble_ctx * A, const slang_operation *oper) +_slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) { /* * eval expr (child[0]), updating condcodes @@ -2462,7 +2462,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) case SLANG_OPER_IDENTIFIER: return _slang_gen_variable(A, oper); case SLANG_OPER_IF: - return _slang_gen_hl_if(A, oper); + return _slang_gen_if(A, oper); case SLANG_OPER_FIELD: return _slang_gen_field(A, oper); case SLANG_OPER_SUBSCRIPT: -- cgit v1.2.3 From b3dd49429b6cbd87b67a0277127c24fb534c69a6 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 10:53:50 -0700 Subject: s/_slang_gen_hl_if/_slang_gen_if/ --- src/mesa/shader/slang/slang_codegen.c | 50 ++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index cbe86fab3e..f05c8eba25 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1631,6 +1631,54 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) } +static slang_ir_node * +_slang_gen_hl_select(slang_assemble_ctx *A, slang_operation *oper) +{ + slang_ir_node *cond, *ifNode, *trueExpr, *falseExpr, *trueNode, *falseNode; + slang_ir_node *tmpDecl, *tmpVar, *tree; + slang_typeinfo type; + int size; + + assert(oper->type == SLANG_OPER_SELECT); + assert(oper->num_children == 3); + + /* size of x or y's type */ + slang_typeinfo_construct(&type); + _slang_typeof_operation(A, &oper->children[1], &type); + size = _slang_sizeof_type_specifier(&type.spec); + assert(size > 0); + + /* temporary var */ + tmpDecl = _slang_gen_temporary(size); + + /* the condition (child 0) */ + cond = _slang_gen_operation(A, &oper->children[0]); + cond = new_cond(cond); + + /* if-true body (child 1) */ + tmpVar = new_node0(IR_VAR); + tmpVar->Store = tmpDecl->Store; + trueExpr = _slang_gen_operation(A, &oper->children[1]); + trueNode = new_node2(IR_MOVE, tmpVar, trueExpr); + + /* if-false body (child 2) */ + tmpVar = new_node0(IR_VAR); + tmpVar->Store = tmpDecl->Store; + falseExpr = _slang_gen_operation(A, &oper->children[2]); + falseNode = new_node2(IR_MOVE, tmpVar, falseExpr); + + ifNode = new_if(cond, trueNode, falseNode); + + /* tmp var value */ + tmpVar = new_node0(IR_VAR); + tmpVar->Store = tmpDecl->Store; + + tree = new_seq(ifNode, tmpVar); + tree = new_seq(tmpDecl, tree); + return tree; +} + + /** * Generate code for &&. */ @@ -2444,7 +2492,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; assert(oper->num_children == 3); - n = _slang_gen_select(A, oper); + n = _slang_gen_hl_select(A, oper); return n; } -- cgit v1.2.3 From 63772e2a2c0d67a88816bfb52a250b86ecd97f20 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 11:07:52 -0700 Subject: rewrite _slang_gen_select() to use IF node --- src/mesa/shader/slang/slang_codegen.c | 80 ++++------------------------------- 1 file changed, 8 insertions(+), 72 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index f05c8eba25..570a946aa7 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1559,80 +1559,12 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) /** * Generate code for a selection expression: b ? x : y - * XXX in some cases we could implement a selection expression + * XXX In some cases we could implement a selection expression * with an LRP instruction (use the boolean as the interpolant). + * Otherwise, we use an IF/ELSE/ENDIF construct. */ static slang_ir_node * _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) -{ - slang_label *altLabel, *endLabel; - slang_ir_node *altLab, *endLab; - slang_ir_node *tree, *tmpDecl, *tmpVar, *cond, *cjump, *jump; - slang_ir_node *bodx, *body, *assignx, *assigny; - slang_typeinfo type; - int size; - - assert(oper->type == SLANG_OPER_SELECT); - assert(oper->num_children == 3); - - altLabel = _slang_label_new("selectAlt"); - endLabel = _slang_label_new("selectEnd"); - - /* size of x or y's type */ - slang_typeinfo_construct(&type); - _slang_typeof_operation(A, &oper->children[1], &type); - size = _slang_sizeof_type_specifier(&type.spec); - assert(size > 0); - - /* temporary var */ - tmpDecl = _slang_gen_temporary(size); - - /* eval condition */ - cond = _slang_gen_operation(A, &oper->children[0]); - cond = new_cond(cond); - tree = new_seq(tmpDecl, cond); - - /* jump if false to "alt" label */ - cjump = new_cjump(altLabel, 0); - tree = new_seq(tree, cjump); - - /* evaluate child 1 (x) and assign to tmp */ - tmpVar = new_node0(IR_VAR); - tmpVar->Store = tmpDecl->Store; - body = _slang_gen_operation(A, &oper->children[1]); - assigny = new_node2(IR_MOVE, tmpVar, body); - tree = new_seq(tree, assigny); - - /* jump to "end" label */ - jump = new_jump(endLabel); - tree = new_seq(tree, jump); - - /* "alt" label */ - altLab = new_label(altLabel); - tree = new_seq(tree, altLab); - - /* evaluate child 2 (y) and assign to tmp */ - tmpVar = new_node0(IR_VAR); - tmpVar->Store = tmpDecl->Store; - bodx = _slang_gen_operation(A, &oper->children[2]); - assignx = new_node2(IR_MOVE, tmpVar, bodx); - tree = new_seq(tree, assignx); - - /* "end" label */ - endLab = new_label(endLabel); - tree = new_seq(tree, endLab); - - /* tmp var value */ - tmpVar = new_node0(IR_VAR); - tmpVar->Store = tmpDecl->Store; - tree = new_seq(tree, tmpVar); - - return tree; -} - - -static slang_ir_node * -_slang_gen_hl_select(slang_assemble_ctx *A, slang_operation *oper) { slang_ir_node *cond, *ifNode, *trueExpr, *falseExpr, *trueNode, *falseNode; slang_ir_node *tmpDecl, *tmpVar, *tree; @@ -1675,6 +1607,8 @@ _slang_gen_hl_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(ifNode, tmpVar); tree = new_seq(tmpDecl, tree); + + slang_print_ir(tree, 10); return tree; } @@ -2056,7 +1990,9 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) slang_ir_node *n, *lhs, *rhs; lhs = _slang_gen_operation(A, &oper->children[0]); if (lhs->Store->File != PROGRAM_OUTPUT && - lhs->Store->File != PROGRAM_TEMPORARY) { + lhs->Store->File != PROGRAM_TEMPORARY && + lhs->Store->File != PROGRAM_VARYING && + lhs->Store->File != PROGRAM_UNDEFINED) { slang_info_log_error(A->log, "Assignment to read-only variable"); return NULL; } @@ -2492,7 +2428,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) { slang_ir_node *n; assert(oper->num_children == 3); - n = _slang_gen_hl_select(A, oper); + n = _slang_gen_select(A, oper); return n; } -- cgit v1.2.3 From cce4e505690f3d5aef630bd4c4c4a455f08519a1 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 11:16:13 -0700 Subject: IR_CJUMP0/1 no longer used/needed --- src/mesa/shader/slang/slang_emit.c | 35 +---------------------------------- src/mesa/shader/slang/slang_ir.h | 2 -- 2 files changed, 1 insertion(+), 36 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 1d18929b4d..f07ad66223 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -122,8 +122,6 @@ static const slang_ir_info IrInfo[] = { { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 }, { IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 }, { IR_JUMP, "IR_JUMP", OPCODE_NOP, 0, 0 }, - { IR_CJUMP0, "IR_CJUMP0", OPCODE_NOP, 0, 0 }, - { IR_CJUMP1, "IR_CJUMP1", OPCODE_NOP, 0, 0 }, { IR_IF, "IR_IF", OPCODE_NOP, 0, 0 }, { IR_KILL, "IR_KILL", OPCODE_NOP, 0, 0 }, { IR_COND, "IR_COND", OPCODE_NOP, 0, 0 }, @@ -303,14 +301,6 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_JUMP: printf("JUMP %s\n", n->Label->Name); break; - case IR_CJUMP0: - printf("CJUMP0 %s\n", n->Label->Name); - slang_print_ir(n->Children[0], indent+3); - break; - case IR_CJUMP1: - printf("CJUMP1 %s\n", n->Label->Name); - slang_print_ir(n->Children[0], indent+3); - break; case IR_IF: printf("IF \n"); @@ -876,25 +866,6 @@ emit_label(slang_emit_info *emitInfo, const slang_ir_node *n) } -static struct prog_instruction * -emit_cjump(slang_emit_info *emitInfo, slang_ir_node *n, GLuint zeroOrOne) -{ - struct prog_instruction *inst; - assert(n->Opcode == IR_CJUMP0 || n->Opcode == IR_CJUMP1); - inst = new_instruction(emitInfo, OPCODE_BRA); - if (zeroOrOne) - inst->DstReg.CondMask = COND_NE; /* branch if non-zero */ - else - inst->DstReg.CondMask = COND_EQ; /* branch if equal to zero */ - inst->DstReg.CondSwizzle = SWIZZLE_X; - inst->BranchTarget = _slang_label_get_location(n->Label); - if (inst->BranchTarget < 0) { - _slang_label_add_reference(n->Label, emitInfo->prog->NumInstructions - 1); - } - return inst; -} - - static struct prog_instruction * emit_jump(slang_emit_info *emitInfo, slang_ir_node *n) { @@ -1039,7 +1010,7 @@ emit_cond(slang_emit_info *emitInfo, slang_ir_node *n) { /* Conditional expression (in if/while/for stmts). * Need to update condition code register. - * Next instruction is typically an IR_CJUMP0/1. + * Next instruction is typically an IR_IF. */ /* last child expr instruction: */ struct prog_instruction *inst = emit(emitInfo, n->Children[0]); @@ -1560,10 +1531,6 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) assert(n); assert(n->Label); return emit_jump(emitInfo, n); - case IR_CJUMP0: - return emit_cjump(emitInfo, n, 0); - case IR_CJUMP1: - return emit_cjump(emitInfo, n, 1); case IR_KILL: return emit_kill(emitInfo); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index cd1f606012..d2985eabfe 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -50,8 +50,6 @@ typedef enum IR_LABEL, /* target of a jump or cjump */ IR_JUMP, /* unconditional jump */ - IR_CJUMP0, /* conditional jump if zero */ - IR_CJUMP1, /* conditional jump if one (or non-zero) */ IR_COND, /* conditional expression/predicate */ IR_IF, /* high-level IF/then/else */ -- cgit v1.2.3 From ec89aba7c6de29e1dc24b04740b0716e18028b12 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 11:29:22 -0700 Subject: remove unused new_cjump() --- src/mesa/shader/slang/slang_codegen.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 570a946aa7..de78c2b8c7 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -454,20 +454,6 @@ new_float_literal(const float v[4]) return n; } -/** - * Conditional jump. - * \param zeroOrOne indicates if the jump is to be taken on zero, or non-zero - * condition code state. - */ -static slang_ir_node * -new_cjump(slang_label *dest, GLuint zeroOrOne) -{ - slang_ir_node *n = new_node0(zeroOrOne ? IR_CJUMP1 : IR_CJUMP0); - if (n) - n->Label = dest; - return n; -} - /** * Unconditional jump. */ -- cgit v1.2.3 From ee931f8d4de7c3f04ea80cfaa556d1058942e523 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 14:48:34 -0700 Subject: ; and {} statements were broken --- src/mesa/shader/slang/slang_codegen.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index de78c2b8c7..5da98550dc 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2260,7 +2260,10 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) #endif return tree; } - break; + else { + return new_node0(IR_NOP); + } + case SLANG_OPER_EXPRESSION: return _slang_gen_operation(A, &oper->children[0]); @@ -2485,9 +2488,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) } case SLANG_OPER_NONE: - return NULL; case SLANG_OPER_VOID: - return NULL; + /* returning NULL here would generate an error */ + return new_node0(IR_NOP); default: printf("Unhandled node type %d\n", oper->type); -- cgit v1.2.3 From 19a90505487e69a50a947ed932b024c0f5ff2c5d Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 15:19:34 -0700 Subject: fix assertion --- src/mesa/shader/slang/slang_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index f07ad66223..a134bb9711 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -450,7 +450,7 @@ storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st, WRITEMASK_X | WRITEMASK_Y | WRITEMASK_Z, WRITEMASK_X | WRITEMASK_Y | WRITEMASK_Z | WRITEMASK_W }; - assert(st->Index >= 0 && st->Index <= 16); + assert(st->Index >= 0); dst->File = st->File; dst->Index = st->Index; assert(st->File != PROGRAM_UNDEFINED); -- cgit v1.2.3 From 3e0fbc7efcebdbef5698a270bd0192335a2d556b Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 15:45:25 -0700 Subject: fix tmp storage problem for IR_I_TO_F --- src/mesa/shader/slang/slang_emit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index a134bb9711..c90bf34183 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1456,6 +1456,10 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) /* just move */ emit(emitInfo, n->Children[0]); inst = new_instruction(emitInfo, OPCODE_MOV); + if (!n->Store) { + if (!alloc_temp_storage(emitInfo, n, 1)) + return NULL; + } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); if (emitInfo->EmitComments) -- cgit v1.2.3 From 5761a93bba11e8a47660f465b27485e130150242 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 15:52:22 -0700 Subject: Added IR_SLE and IR_SLT for <= and < operations. Using IR_SGE and IR_SGT with transposed args doesn't work since the __asm calls don't do argument matching by name, but by position. This fixes the broken lessThan() and lessThanEqual() functions. --- src/mesa/shader/slang/slang_codegen.c | 17 +++++++++-------- src/mesa/shader/slang/slang_emit.c | 4 ++++ src/mesa/shader/slang/slang_ir.h | 2 ++ 3 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 5da98550dc..ffc9b3eaf0 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -327,6 +327,8 @@ static slang_asm_info AsmInfo[] = { { "vec4_seq", IR_SEQ, 1, 2 }, { "vec4_sge", IR_SGE, 1, 2 }, { "vec4_sgt", IR_SGT, 1, 2 }, + { "vec4_sle", IR_SLE, 1, 2 }, + { "vec4_slt", IR_SLT, 1, 2 }, /* vec4 unary */ { "vec4_floor", IR_FLOOR, 1, 1 }, { "vec4_frac", IR_FRAC, 1, 1 }, @@ -609,6 +611,7 @@ _slang_is_noop(const slang_operation *oper) /** * Produce inline code for a call to an assembly instruction. + * XXX Note: children are passed as asm args in-order, not by name! */ static slang_operation * slang_inline_asm_function(slang_assemble_ctx *A, @@ -2299,19 +2302,17 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_LESS: - /* child[0] < child[1] ----> child[1] > child[0] */ - return new_node2(IR_SGT, - _slang_gen_operation(A, &oper->children[1]), - _slang_gen_operation(A, &oper->children[0])); + return new_node2(IR_SLT, + _slang_gen_operation(A, &oper->children[0]), + _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_GREATEREQUAL: return new_node2(IR_SGE, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_LESSEQUAL: - /* child[0] <= child[1] ----> child[1] >= child[0] */ - return new_node2(IR_SGE, - _slang_gen_operation(A, &oper->children[1]), - _slang_gen_operation(A, &oper->children[0])); + return new_node2(IR_SLE, + _slang_gen_operation(A, &oper->children[0]), + _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_ADD: { slang_ir_node *n; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index c90bf34183..8ad61d8a3b 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -95,6 +95,8 @@ static const slang_ir_info IrInfo[] = { { IR_SNEQUAL, "IR_SNEQUAL", OPCODE_SNE, 4, 2 }, { IR_SGE, "IR_SGE", OPCODE_SGE, 4, 2 }, { IR_SGT, "IR_SGT", OPCODE_SGT, 4, 2 }, + { IR_SLE, "IR_SLE", OPCODE_SLE, 4, 2 }, + { IR_SLT, "IR_SLT", OPCODE_SLT, 4, 2 }, { IR_POW, "IR_POW", OPCODE_POW, 1, 2 }, /* unary ops */ { IR_I_TO_F, "IR_I_TO_F", OPCODE_NOP, 1, 1 }, @@ -1495,6 +1497,8 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) case IR_SNEQUAL: case IR_SGE: case IR_SGT: + case IR_SLE: + case IR_SLT: case IR_POW: case IR_EXP: case IR_EXP2: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index d2985eabfe..b733d100dd 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -84,6 +84,8 @@ typedef enum IR_SNEQUAL, /* Set if args are not equal */ IR_SGE, /* Set if greater or equal */ IR_SGT, /* Set if greater than */ + IR_SLE, /* Set if less or equal */ + IR_SLT, /* Set if less than */ IR_POW, /* x^y */ IR_EXP, /* e^x */ IR_EXP2, /* 2^x */ -- cgit v1.2.3 From 2f35a17f38e3974b0a6e00017408efd417afd4e8 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 15:53:05 -0700 Subject: Update lessThan(), lessThanEqual() functions, improve some matrix constructors. --- .../shader/slang/library/slang_common_builtin.gc | 144 ++++++------ .../shader/slang/library/slang_common_builtin_gc.h | 130 +++++----- src/mesa/shader/slang/library/slang_core.gc | 74 +++--- src/mesa/shader/slang/library/slang_core_gc.h | 261 ++++++++++----------- 4 files changed, 289 insertions(+), 320 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 476608fb06..42a5d723b4 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -1329,199 +1329,199 @@ mat4 matrixCompMult (mat4 m, mat4 n) { //// lessThan -bvec2 lessThan(const vec2 v, const vec2 u) +bvec2 lessThan(const vec2 u, const vec2 v) { - __asm vec4_sgt __retVal.xy, u, v; + __asm vec4_slt __retVal.xy, u, v; } -bvec3 lessThan(const vec3 v, const vec3 u) +bvec3 lessThan(const vec3 u, const vec3 v) { - __asm vec4_sgt __retVal.xyz, u, v; + __asm vec4_slt __retVal.xyz, u, v; } -bvec4 lessThan(const vec4 v, const vec4 u) +bvec4 lessThan(const vec4 u, const vec4 v) { - __asm vec4_sgt __retVal, u, v; + __asm vec4_slt __retVal, u, v; } -bvec2 lessThan(const ivec2 v, const ivec2 u) +bvec2 lessThan(const ivec2 u, const ivec2 v) { - __asm vec4_sgt __retVal.xy, u, v; + __asm vec4_slt __retVal.xy, u, v; } -bvec3 lessThan(const ivec3 v, const ivec3 u) +bvec3 lessThan(const ivec3 u, const ivec3 v) { - __asm vec4_sgt __retVal.xyz, u, v; + __asm vec4_slt __retVal.xyz, u, v; } -bvec4 lessThan(const ivec4 v, const ivec4 u) +bvec4 lessThan(const ivec4 u, const ivec4 v) { - __asm vec4_sgt __retVal, u, v; + __asm vec4_slt __retVal, u, v; } //// lessThanEqual -bvec2 lessThanEqual(const vec2 v, const vec2 u) +bvec2 lessThanEqual(const vec2 u, const vec2 v) { - __asm vec4_sge __retVal.xy, u, v; + __asm vec4_sle __retVal.xy, u, v; } -bvec3 lessThanEqual(const vec3 v, const vec3 u) +bvec3 lessThanEqual(const vec3 u, const vec3 v) { - __asm vec4_sge __retVal.xyz, u, v; + __asm vec4_sle __retVal.xyz, u, v; } -bvec4 lessThanEqual(const vec4 v, const vec4 u) +bvec4 lessThanEqual(const vec4 u, const vec4 v) { - __asm vec4_sge __retVal, u, v; + __asm vec4_sle __retVal, u, v; } -bvec2 lessThanEqual(const ivec2 v, const ivec2 u) +bvec2 lessThanEqual(const ivec2 u, const ivec2 v) { - __asm vec4_sge __retVal.xy, u, v; + __asm vec4_sle __retVal.xy, u, v; } -bvec3 lessThanEqual(const ivec3 v, const ivec3 u) +bvec3 lessThanEqual(const ivec3 u, const ivec3 v) { - __asm vec4_sge __retVal.xyz, u, v; + __asm vec4_sle __retVal.xyz, u, v; } -bvec4 lessThanEqual(const ivec4 v, const ivec4 u) +bvec4 lessThanEqual(const ivec4 u, const ivec4 v) { - __asm vec4_sge __retVal, u, v; + __asm vec4_sle __retVal, u, v; } //// greaterThan -bvec2 greaterThan(const vec2 v, const vec2 u) +bvec2 greaterThan(const vec2 u, const vec2 v) { - __asm vec4_sgt __retVal.xy, v, u; + __asm vec4_sgt __retVal.xy, u, v; } -bvec3 greaterThan(const vec3 v, const vec3 u) +bvec3 greaterThan(const vec3 u, const vec3 v) { - __asm vec4_sgt __retVal.xyz, v, u; + __asm vec4_sgt __retVal.xyz, u, v; } -bvec4 greaterThan(const vec4 v, const vec4 u) +bvec4 greaterThan(const vec4 u, const vec4 v) { - __asm vec4_sgt __retVal, v, u; + __asm vec4_sgt __retVal, u, v; } -bvec2 greaterThan(const ivec2 v, const ivec2 u) +bvec2 greaterThan(const ivec2 u, const ivec2 v) { - __asm vec4_sgt __retVal.xy, v, u; + __asm vec4_sgt __retVal.xy, u, v; } -bvec3 greaterThan(const ivec3 v, const ivec3 u) +bvec3 greaterThan(const ivec3 u, const ivec3 v) { - __asm vec4_sgt __retVal.xyz, v, u; + __asm vec4_sgt __retVal.xyz, u, v; } -bvec4 greaterThan(const ivec4 v, const ivec4 u) +bvec4 greaterThan(const ivec4 u, const ivec4 v) { - __asm vec4_sgt __retVal, v, u; + __asm vec4_sgt __retVal, u, v; } //// greaterThanEqual -bvec2 greaterThanEqual(const vec2 v, const vec2 u) +bvec2 greaterThanEqual(const vec2 u, const vec2 v) { - __asm vec4_sge __retVal.xy, v, u; + __asm vec4_sge __retVal.xy, u, v; } -bvec3 greaterThanEqual(const vec3 v, const vec3 u) +bvec3 greaterThanEqual(const vec3 u, const vec3 v) { - __asm vec4_sge __retVal.xyz, v, u; + __asm vec4_sge __retVal.xyz, u, v; } -bvec4 greaterThanEqual(const vec4 v, const vec4 u) +bvec4 greaterThanEqual(const vec4 u, const vec4 v) { - __asm vec4_sge __retVal, v, u; + __asm vec4_sge __retVal, u, v; } -bvec2 greaterThanEqual(const ivec2 v, const ivec2 u) +bvec2 greaterThanEqual(const ivec2 u, const ivec2 v) { - __asm vec4_sge __retVal.xy, v, u; + __asm vec4_sge __retVal.xy, u, v; } -bvec3 greaterThanEqual(const ivec3 v, const ivec3 u) +bvec3 greaterThanEqual(const ivec3 u, const ivec3 v) { - __asm vec4_sge __retVal.xyz, v, u; + __asm vec4_sge __retVal.xyz, u, v; } -bvec4 greaterThanEqual(const ivec4 v, const ivec4 u) +bvec4 greaterThanEqual(const ivec4 u, const ivec4 v) { - __asm vec4_sge __retVal, v, u; + __asm vec4_sge __retVal, u, v; } //// equal -bvec2 equal(const vec2 v, const vec2 u) +bvec2 equal(const vec2 u, const vec2 v) { - __asm vec4_seq __retVal.xy, v, u; + __asm vec4_seq __retVal.xy, u, v; } -bvec3 equal(const vec3 v, const vec3 u) +bvec3 equal(const vec3 u, const vec3 v) { - __asm vec4_seq __retVal.xyz, v, u; + __asm vec4_seq __retVal.xyz, u, v; } -bvec4 equal(const vec4 v, const vec4 u) +bvec4 equal(const vec4 u, const vec4 v) { - __asm vec4_seq __retVal, v, u; + __asm vec4_seq __retVal, u, v; } -bvec2 equal(const ivec2 v, const ivec2 u) +bvec2 equal(const ivec2 u, const ivec2 v) { - __asm vec4_seq __retVal.xy, v, u; + __asm vec4_seq __retVal.xy, u, v; } -bvec3 equal(const ivec3 v, const ivec3 u) +bvec3 equal(const ivec3 u, const ivec3 v) { - __asm vec4_seq __retVal.xyz, v, u; + __asm vec4_seq __retVal.xyz, u, v; } -bvec4 equal(const ivec4 v, const ivec4 u) +bvec4 equal(const ivec4 u, const ivec4 v) { - __asm vec4_seq __retVal, v, u; + __asm vec4_seq __retVal, u, v; } //// notEqual -bvec2 notEqual(const vec2 v, const vec2 u) +bvec2 notEqual(const vec2 u, const vec2 v) { - __asm vec4_sne __retVal.xy, v, u; + __asm vec4_sne __retVal.xy, u, v; } -bvec3 notEqual(const vec3 v, const vec3 u) +bvec3 notEqual(const vec3 u, const vec3 v) { - __asm vec4_sne __retVal.xyz, v, u; + __asm vec4_sne __retVal.xyz, u, v; } -bvec4 notEqual(const vec4 v, const vec4 u) +bvec4 notEqual(const vec4 u, const vec4 v) { - __asm vec4_sne __retVal, v, u; + __asm vec4_sne __retVal, u, v; } -bvec2 notEqual(const ivec2 v, const ivec2 u) +bvec2 notEqual(const ivec2 u, const ivec2 v) { - __asm vec4_sne __retVal.xy, v, u; + __asm vec4_sne __retVal.xy, u, v; } -bvec3 notEqual(const ivec3 v, const ivec3 u) +bvec3 notEqual(const ivec3 u, const ivec3 v) { - __asm vec4_sne __retVal.xyz, v, u; + __asm vec4_sne __retVal.xyz, u, v; } -bvec4 notEqual(const ivec4 v, const ivec4 u) +bvec4 notEqual(const ivec4 u, const ivec4 v) { - __asm vec4_sne __retVal, v, u; + __asm vec4_sne __retVal, u, v; } diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 3f1871a930..0bf1371c0b 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -565,76 +565,76 @@ 120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18, 109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0, 18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57, -48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, -0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115, -103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0, -108,101,115,115,84,104,97,110,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103, +48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,1,0,10,117,0,0,1,1,0,10,118,0,0,0,1,4,118,101, +99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, +0,3,0,108,101,115,115,84,104,97,110,0,1,1,0,11,117,0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115, +108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0, +108,101,115,115,84,104,97,110,0,1,1,0,12,117,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,108, 116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104, -97,110,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116, +97,110,0,1,1,0,6,117,0,0,1,1,0,6,118,0,0,0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116, 86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,1,0, -7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,8,118,0,0, -1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0, -18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,11,118,0,0, -1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +7,117,0,0,1,1,0,7,118,0,0,0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,0,1,1,0,8,117,0,0, +1,1,0,8,118,0,0,0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0, +18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,10,117,0,0,1,1,0,10, +118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,11,117,0,0, +1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, 122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0, -12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0, -0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,6,118, -0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120, +12,117,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0, +0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,6,117, +0,0,1,1,0,6,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120, 121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0, -7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59, +7,117,0,0,1,1,0,7,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59, 120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108, -0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97, -108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,10,118, -0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,11,118, -0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,12, -118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,6,118,0,0,1,1,0, -6,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,7,118,0,0,1,1,0,7, -117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,8,118,0,0,1,1,0, -8,117,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,10,118,0,0, -1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0, -1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97, -110,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84, -104,97,110,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,103,101, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,103,114,101,97, -116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52, -95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0, -4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0, -1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,2,0,101,113,117,97,108,0,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,101,113,117,97, -108,0,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,118, -0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101, -99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1, -0,3,0,101,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,101,113,117,97, -108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86, -97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0,10,118,0,0,1,1, -0,10,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,11,118,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118, -0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,2, -0,110,111,116,69,113,117,97,108,0,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,110, -101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,3,0,110,111, -116,69,113,117,97,108,0,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,4,0,110,111,116,69,113, -117,97,108,0,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115, +0,1,1,0,8,117,0,0,1,1,0,8,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97, +108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,10,117, +0,0,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,11,117, +0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,12, +117,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0, +18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,6,117,0,0,1,1,0, +6,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +117,0,0,18,118,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,7,117,0,0,1,1,0,7, +118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, +18,117,0,0,18,118,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,8,117,0,0,1,1,0, +8,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18, +118,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,10,117,0,0, +1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0, +1,1,0,11,117,0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97, +110,69,113,117,97,108,0,1,1,0,12,117,0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18, +95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84, +104,97,110,69,113,117,97,108,0,1,1,0,6,117,0,0,1,1,0,6,118,0,0,0,1,4,118,101,99,52,95,115,103,101, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,103,114,101,97, +116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,7,117,0,0,1,1,0,7,118,0,0,0,1,4,118,101,99,52, +95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0, +4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,8,117,0,0,1,1,0,8,118,0,0,0, +1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1, +0,2,0,101,113,117,97,108,0,1,1,0,10,117,0,0,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,101,113,117,97, +108,0,1,1,0,11,117,0,0,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,1,0,12,117, +0,0,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18, +117,0,0,18,118,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,1,0,6,117,0,0,1,1,0,6,118,0,0,0,1,4,118,101, +99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, +0,3,0,101,113,117,97,108,0,1,1,0,7,117,0,0,1,1,0,7,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18, +95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,101,113,117,97, +108,0,1,1,0,8,117,0,0,1,1,0,8,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86, +97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2,0,110,111,116,69,113,117,97,108,0,1,1,0,10,117,0,0,1,1, +0,10,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, +18,117,0,0,18,118,0,0,0,0,1,0,3,0,110,111,116,69,113,117,97,108,0,1,1,0,11,117,0,0,1,1,0,11,118,0, +0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117, +0,0,18,118,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,1,0,12,117,0,0,1,1,0,12,118,0,0,0,1,4, +118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,2, +0,110,111,116,69,113,117,97,108,0,1,1,0,6,117,0,0,1,1,0,6,118,0,0,0,1,4,118,101,99,52,95,115,110, +101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,0,3,0,110,111, +116,69,113,117,97,108,0,1,1,0,7,117,0,0,1,1,0,7,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,0,4,0,110,111,116,69,113, +117,97,108,0,1,1,0,8,117,0,0,1,1,0,8,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101, +116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,2,118,0,0,0,1,3,2,0,9,1,115, 117,109,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18, 118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, 115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,0,1,0,97,110,121,0,1,1,0,3,118,0,0,0,1,3,2,0,9,1, diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 964c63fde6..63a980c6d0 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -113,23 +113,23 @@ int __constructor(const float f) bool __constructor(const int i) { const float zero = 0.0; - __asm vec4_seq __retVal.x, i.x, zero; + __asm vec4_seq __retVal, i, zero; } bool __constructor(const float f) { const float zero = 0.0; - __asm vec4_seq __retVal.x, i.x, zero; + __asm vec4_seq __retVal, i, zero; } int __constructor(const bool b) { - __retVal.x = b.x; + __retVal = b; } float __constructor(const bool b) { - __retVal.x = b.x; + __retVal = b; } float __constructor(const int i) @@ -139,17 +139,17 @@ float __constructor(const int i) bool __constructor(const bool b) { - __retVal = b.x; + __retVal = b; } int __constructor(const int i) { - __retVal = i.x; + __retVal = i; } float __constructor(const float f) { - __retVal = f.x; + __retVal = f; } @@ -386,7 +386,6 @@ bvec4 __constructor(const int i) mat2 __constructor(const float m00, const float m10, const float m01, const float m11) { - // xxx verify: __retVal[0].x = m00; __retVal[0].y = m10; __retVal[1].x = m01; @@ -411,10 +410,10 @@ mat2 __constructor(const bool b) return mat2(float(b)); } -mat2 __constructor(const vec2 r0, const vec2 r1) +mat2 __constructor(const vec2 c0, const vec2 c1) { - __retVal[0] = r0; - __retVal[1] = r1; + __retVal[0] = c0; + __retVal[1] = c1; } @@ -424,7 +423,6 @@ mat3 __constructor(const float m00, const float m10, const float m20, const float m01, const float m11, const float m21, const float m02, const float m12, const float m22) { - // xxx verify: __retVal[0].x = m00; __retVal[0].y = m10; __retVal[0].z = m20; @@ -438,15 +436,10 @@ mat3 __constructor(const float m00, const float m10, const float m20, mat3 __constructor(const float f) { - __retVal[0].x = f; - __retVal[0].y = 0.0; - __retVal[0].z = 0.0; - __retVal[1].x = 0.0; - __retVal[1].y = f; - __retVal[1].z = 0.0; - __retVal[2].x = 0.0; - __retVal[2].y = 0.0; - __retVal[2].z = f; + vec2 v = vec2(f, 0.0); + __retVal[0] = v.xyy; + __retVal[1] = v.yxy; + __retVal[2] = v.yyx; } mat3 __constructor(const int i) @@ -459,11 +452,11 @@ mat3 __constructor(const bool b) return mat3(float(b)); } -mat3 __constructor(const vec3 r0, const vec3 r1, const vec3 r2) +mat3 __constructor(const vec3 c0, const vec3 c1, const vec3 c2) { - __retVal[0] = r0; - __retVal[1] = r1; - __retVal[2] = r2; + __retVal[0] = c0; + __retVal[1] = c1; + __retVal[2] = c2; } @@ -495,22 +488,11 @@ mat4 __constructor(const float m00, const float m10, const float m20, const floa mat4 __constructor(const float f) { - __retVal[0].x = f; - __retVal[0].y = 0.0; - __retVal[0].z = 0.0; - __retVal[0].w = 0.0; - __retVal[1].x = 0.0; - __retVal[1].y = f; - __retVal[1].z = 0.0; - __retVal[1].w = 0.0; - __retVal[2].x = 0.0; - __retVal[2].y = 0.0; - __retVal[2].z = f; - __retVal[2].w = 0.0; - __retVal[3].x = 0.0; - __retVal[3].y = 0.0; - __retVal[3].z = 0.0; - __retVal[3].w = f; + vec2 v = vec2(f, 0.0); + __retVal[0] = v.xyyy; + __retVal[1] = v.yxyy; + __retVal[2] = v.yyxy; + __retVal[3] = v.yyyx; } mat4 __constructor(const int i) @@ -523,12 +505,12 @@ mat4 __constructor(const bool b) return mat4(float(b)); } -mat4 __constructor(const vec4 r0, const vec4 r1, const vec4 r2, const vec4 r3) +mat4 __constructor(const vec4 c0, const vec4 c1, const vec4 c2, const vec4 c3) { - __retVal[0] = r0; - __retVal[1] = r1; - __retVal[2] = r2; - __retVal[3] = r3; + __retVal[0] = c0; + __retVal[1] = c1; + __retVal[2] = c2; + __retVal[3] = c3; } diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index bb15e6dbd9..4379eef345 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -4,16 +4,15 @@ 3,1,0,5,1,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101, 116,86,97,108,0,0,18,102,0,0,0,0,1,0,1,1,1,1,0,5,105,0,0,0,1,3,2,1,9,1,122,101,114,111,0,2,17,48,0, -48,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,105,0, -59,120,0,0,18,122,101,114,111,0,0,0,0,1,0,1,1,1,1,0,9,102,0,0,0,1,3,2,1,9,1,122,101,114,111,0,2,17, -48,0,48,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -105,0,59,120,0,0,18,122,101,114,111,0,0,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,59,120,0,18,98,0,59,120,0,20,0,0,1,0,9,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,18,98,0,59,120,0,20,0,0,1,0,9,1,1,1,0,5,105,0,0,0,1,4,105,110,116,95,116,111,95,102, -108,111,97,116,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,98,0,59,120,0,20,0,0,1,0,5,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,105,0,59,120,0,20,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,18,102,0,59,120,0,20,0,0,1,0,10,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,9,18,95,95,114,101, +48,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,18,122, +101,114,111,0,0,0,0,1,0,1,1,1,1,0,9,102,0,0,0,1,3,2,1,9,1,122,101,114,111,0,2,17,48,0,48,0,0,0,0,4, +118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,18,122,101,114,111,0, +0,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,20,0,0,1,0,9,1,1,1,0,1, +98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,20,0,0,1,0,9,1,1,1,0,5,105,0,0,0,1,4,105,110, +116,95,116,111,95,102,108,111,97,116,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,0,1,1,1, +1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,20,0,0,1,0,5,1,1,1,0,5,105,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,18,105,0,20,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,18,102,0,20,0,0,1,0,10,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,0,1,9,18,95,95,114,101, 116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0, 1,0,10,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,102,0,59,120,120,0, 20,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,105,0,59, @@ -82,140 +81,128 @@ 116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, 10,49,0,57,59,121,0,18,102,0,20,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,50,0,58,102,108, 111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,58,102,108,111, -97,116,0,18,98,0,0,0,0,0,0,0,1,0,13,1,1,1,0,10,114,48,0,0,1,1,0,10,114,49,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,114,49,0,20,0,0,1,0,14,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1, -0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0,9,109,50,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49, -50,0,0,1,1,0,9,109,50,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109, +97,116,0,18,98,0,0,0,0,0,0,0,1,0,13,1,1,1,0,10,99,48,0,0,1,1,0,10,99,49,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +99,49,0,20,0,0,1,0,14,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1,0,9, +109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0,9,109,50,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50, +0,0,1,1,0,9,109,50,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48, +48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, +121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50,49,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,3,2,0,10,1,118,0,2,58, +118,101,99,50,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,118,0,59,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121, +120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,118,0,59,121,121,120,0,20,0,0,1, +0,14,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0, +14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,14,1, +1,1,0,11,99,48,0,0,1,1,0,11,99,49,0,0,1,1,0,11,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,0,15,1,1,1,0,9,109,48,48,0,0,1,1,0,9, +109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1,0,9,109,51,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49, +0,0,1,1,0,9,109,50,49,0,0,1,1,0,9,109,51,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50,0,0,1,1,0, +9,109,50,50,0,0,1,1,0,9,109,51,50,0,0,1,1,0,9,109,48,51,0,0,1,1,0,9,109,49,51,0,0,1,1,0,9,109,50, +51,0,0,1,1,0,9,109,51,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109, 48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95, 95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50, -49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,17,48,0, -48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, -0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,17,48,0,48,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,0,20,0,0,1,0,14,1,1,1,0,5,105,0, -0,0,1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0, -1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,14,1,1,1,0,11,114,48,0,0,1, -1,0,11,114,49,0,0,1,1,0,11,114,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,114, -48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,0,1,0,15,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0, -1,1,0,9,109,50,48,0,0,1,1,0,9,109,51,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0,9, -109,50,49,0,0,1,1,0,9,109,51,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50,0,0,1,1,0,9,109,50,50, -0,0,1,1,0,9,109,51,50,0,0,1,1,0,9,109,48,51,0,0,1,1,0,9,109,49,51,0,0,1,1,0,9,109,50,51,0,0,1,1,0, -9,109,51,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,59,119,0,18,109,51,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109, -48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,119,0,18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -59,120,0,18,109,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49, -50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,59,120,0,18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -59,121,0,18,109,49,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,18,109,50, -51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51,51,0,20,0,0,1,0,15,1, -1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59, -119,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,59,119,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0, -17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,17,48,0,48,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,59,119,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, -57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,17,48,0, -48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,17,48,0,48,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,102,0,20,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,8, -58,109,97,116,52,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58, -109,97,116,52,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,15,1,1,1,0,12,114,48,0,0,1,1,0,12, -114,49,0,0,1,1,0,12,114,50,0,0,1,1,0,12,114,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,114,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,114,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,114,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,114,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101, +108,0,16,8,48,0,57,59,119,0,18,109,51,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49, +49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50, +50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,59,121,0,18,109,49,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, +59,122,0,18,109,50,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51, +51,0,20,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,3,2,0,10,1,118,0,2,58,118,101,99,50,0,18,102,0,0,17,48,0, +48,0,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,121,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121,120,121,121,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,118,0,59,121,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,51,0,57,18,118,0,59,121,121,121,120,0,20,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,8,58,109,97, +116,52,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116, +52,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,15,1,1,1,0,12,99,48,0,0,1,1,0,12,99,49,0,0,1, +1,0,12,99,50,0,0,1,1,0,12,99,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20, +0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,97,100,100, +0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114, +101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, +0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108, +111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2, +21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, +95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0, +9,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,0,18, +98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110, +118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +120,0,0,0,0,1,0,6,2,26,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95, +97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, +95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,27,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0, +10,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0, +4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0, +1,0,6,2,21,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,22,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0, +1,3,2,0,10,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118, +0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0, +0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0, +18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,120,0,0,0,0,1,0,7,2,26,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101, 99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0, -1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98, -0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0, -0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105, -110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0, -0,0,1,3,2,0,9,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110, -118,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18, -98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, -108,0,0,18,120,0,0,0,0,1,0,6,2,26,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,27,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0, +1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18, +98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +120,0,0,0,0,1,0,7,2,21,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, +95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,22,1,1,0,7,97,0,0,1,1,0, +7,98,0,0,0,1,3,2,0,11,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98, +73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118, +0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,122,0, +0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0, +18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, +108,0,0,18,120,0,0,0,0,1,0,8,2,26,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101, 99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,27,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0, -1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,27,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0, +1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18, 98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -120,0,0,0,0,1,0,6,2,21,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95, +120,0,0,0,0,1,0,8,2,21,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95, 109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, -95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,22,1,1,0,6,97,0,0,1,1,0, -6,98,0,0,0,1,3,2,0,10,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98, +95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,22,1,1,0,8,97,0,0,1,1,0, +8,98,0,0,0,1,3,2,0,12,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98, 73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118, -0,59,121,0,0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0, -18,97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101, -116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,26,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0, -4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, -95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,27,1,1,0,7,97,0,0,1,1,0, -7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18, -97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108, -0,0,18,120,0,0,0,0,1,0,7,2,21,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,22,1,1,0,7,97,0, -0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73, -110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0, -59,122,0,0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18, -97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101, -116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,26,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,11,1,120,0,0,0, -4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, -95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,27,1,1,0,8,97,0,0,1,1,0, -8,98,0,0,0,1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18, -97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108, -0,0,18,120,0,0,0,0,1,0,8,2,21,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,120,0,0,0,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95, -116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,22,1,1,0,8,97,0, -0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73, -110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0, -59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,119,0,0, -18,98,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18, -98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, -108,0,0,18,120,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100, -0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97, -116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0, -0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,98,73,110,118,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0, -0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10, -117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118, -0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1, -1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4, -118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, -18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, -59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,122,0, +0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,119,0,0,18,98,0, +59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73, +110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0, +18,120,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, +95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9, +2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,98,73,110,118,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,0, +10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0, +0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, +0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11, +118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, +112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, +122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, 101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1, 0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, 117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -- cgit v1.2.3 From 05b74e4ae4e772e63702bb6b14977c8b09f389a6 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 15:59:20 -0700 Subject: fix broken vec4_seq, vec4_sne instructions --- src/mesa/shader/slang/slang_codegen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index ffc9b3eaf0..6587629ebb 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -324,7 +324,8 @@ static slang_asm_info AsmInfo[] = { { "vec4_min", IR_MIN, 1, 2 }, { "vec4_max", IR_MAX, 1, 2 }, { "vec4_clamp", IR_CLAMP, 1, 3 }, - { "vec4_seq", IR_SEQ, 1, 2 }, + { "vec4_seq", IR_SEQUAL, 1, 2 }, + { "vec4_sne", IR_SNEQUAL, 1, 2 }, { "vec4_sge", IR_SGE, 1, 2 }, { "vec4_sgt", IR_SGT, 1, 2 }, { "vec4_sle", IR_SLE, 1, 2 }, -- cgit v1.2.3 From a706b0b8bd87bb85541ac0c474da4c6559312cde Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Mar 2007 16:08:55 -0700 Subject: added missing bvec2/3/4 constructors --- src/mesa/shader/slang/library/slang_core.gc | 21 + src/mesa/shader/slang/library/slang_core_gc.h | 1578 +++++++++++++------------ 2 files changed, 814 insertions(+), 785 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index 63a980c6d0..a0abef0eda 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -322,6 +322,12 @@ ivec4 __constructor(const bool b) //// bvec2 constructors +bvec2 __constructor(const bool b1, const bool b2) +{ + __retVal.x = b1; + __retVal.y = b2; +} + bvec2 __constructor(const bool b) { __retVal.xy = b.xx; @@ -342,6 +348,13 @@ bvec2 __constructor(const int i) //// bvec3 constructors +bvec3 __constructor(const bool b1, const bool b2, const bool b3) +{ + __retVal.x = b1; + __retVal.y = b2; + __retVal.z = b3; +} + bvec3 __constructor(const bool b) { __retVal.xyz = b.xxx; @@ -362,6 +375,14 @@ bvec3 __constructor(const int i) //// bvec4 constructors +bvec4 __constructor(const bool b1, const bool b2, const bool b3, const bool b4) +{ + __retVal.x = b1; + __retVal.y = b2; + __retVal.z = b3; + __retVal.w = b4; +} + bvec4 __constructor(const bool b) { __retVal.xyzw = b.xxxx; diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 4379eef345..6cb13300b0 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -52,808 +52,816 @@ 0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,105,0,59,120,120,120,120,0,20,0,0,1,0,8,1,1,1,0,9,102, 0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,102, 0,59,120,120,120,120,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0, -59,120,120,120,120,0,20,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,18,98,0,59,120,120,0,20,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,3,2,1,10,1,122,101,114,111,0,2,58, -118,101,99,50,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,102,0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,2,1, -1,1,0,5,105,0,0,0,1,3,2,1,6,1,122,101,114,111,0,2,58,105,118,101,99,50,0,16,8,48,0,0,16,8,48,0,0,0, -0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,59, -120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,3,2,1,11,1,122,101, -114,111,0,2,58,118,101,99,51,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101, -99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,102,0,59,120,120,120, -0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,3,2,1,7,1,122,101,114,111,0,2,58,105, -118,101,99,51,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0, -0,1,0,4,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,18,98,0,59, -120,120,120,120,0,20,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,3,2,1,12,1,122,101,114,111,0,2,58,118,101,99, -52,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95, -115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,102,0,59,120,120,120,120,0,0,18,122,101,114, -111,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,3,2,1,8,1,122,101,114,111,0,2,58,105,118,101,99,52,0,16,8, -48,0,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101, -116,86,97,108,0,0,18,105,0,59,120,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,13,1,1,1,0,9,109, -48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18, -109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,0,1, -0,13,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,59,121,0,18,102,0,20,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,50,0,58,102,108, -111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,58,102,108,111, -97,116,0,18,98,0,0,0,0,0,0,0,1,0,13,1,1,1,0,10,99,48,0,0,1,1,0,10,99,49,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -99,49,0,20,0,0,1,0,14,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1,0,9, -109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0,9,109,50,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50, -0,0,1,1,0,9,109,50,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48, -48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, -121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50,49,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,0,1,0,14,1,1,1,0,9,102,0,0,0,1,3,2,0,10,1,118,0,2,58, -118,101,99,50,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,118,0,59,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121, -120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,118,0,59,121,121,120,0,20,0,0,1, -0,14,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0, -14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,14,1, -1,1,0,11,99,48,0,0,1,1,0,11,99,49,0,0,1,1,0,11,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,0,15,1,1,1,0,9,109,48,48,0,0,1,1,0,9, -109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1,0,9,109,51,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49, -0,0,1,1,0,9,109,50,49,0,0,1,1,0,9,109,51,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50,0,0,1,1,0, -9,109,50,50,0,0,1,1,0,9,109,51,50,0,0,1,1,0,9,109,48,51,0,0,1,1,0,9,109,49,51,0,0,1,1,0,9,109,50, -51,0,0,1,1,0,9,109,51,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109, -48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,59,119,0,18,109,51,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49, -49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50, -50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,59,121,0,18,109,49,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -59,122,0,18,109,50,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51, -51,0,20,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,3,2,0,10,1,118,0,2,58,118,101,99,50,0,18,102,0,0,17,48,0, -48,0,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,121,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121,120,121,121,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,118,0,59,121,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,118,0,59,121,121,121,120,0,20,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,8,58,109,97, -116,52,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116, -52,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,15,1,1,1,0,12,99,48,0,0,1,1,0,12,99,49,0,0,1, -1,0,12,99,50,0,0,1,1,0,12,99,51,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20, -0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,97,100,100, -0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114, -101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0, -0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108, -111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2, -21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, -95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0, -9,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,0,18, -98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110, -118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -120,0,0,0,0,1,0,6,2,26,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95, -97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, -95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,27,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0, -10,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0, -4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0, -1,0,6,2,21,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,22,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0, -1,3,2,0,10,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118, -0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0, -0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0, -18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, -108,0,0,18,120,0,0,0,0,1,0,7,2,26,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101, -99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,27,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0, -1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18, -98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -120,0,0,0,0,1,0,7,2,21,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, -95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,22,1,1,0,7,97,0,0,1,1,0, -7,98,0,0,0,1,3,2,0,11,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98, -73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118, -0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,122,0, -0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0, -18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97, -108,0,0,18,120,0,0,0,0,1,0,8,2,26,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101, -99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, -116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,27,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0, -1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18, -98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, -120,0,0,0,0,1,0,8,2,21,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111, -95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,22,1,1,0,8,97,0,0,1,1,0, -8,98,0,0,0,1,3,2,0,12,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98, -73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118, -0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,122,0, -0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,119,0,0,18,98,0, -59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73, -110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0, -18,120,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, -95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, -0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9, -2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,98,73,110,118,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,0, -10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0, -0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11, -118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, -122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1, -0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12, -118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2, -0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0, -0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120, -120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99, -52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0, -59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117, -0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98, -0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0, -18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121, -0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,105,110, -118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0, -0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4, -118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0, -18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,9, -98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0, -0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,59,120,120,0,0,0,0,1,0,11,2,26,1,1,0, -9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,26,1,1,0,11, +59,120,120,120,120,0,20,0,0,1,0,2,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,0, +1,0,2,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,0,59,120,120,0,20, +0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,3,2,1,10,1,122,101,114,111,0,2,58,118,101,99,50,0,17,48,0,48,0,0,0, +17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,102,0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,3,2,1,6,1, +122,101,114,111,0,2,58,105,118,101,99,50,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115, +101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,59,120,120,0,0,18,122,101,114, +111,0,0,0,0,1,0,3,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,1,1,0,1,98,51,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,98,50,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,3,1,1,1,0,9,102,0, +0,0,1,3,2,1,11,1,122,101,114,111,0,2,58,118,101,99,51,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0, +48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, +0,18,102,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,3,2,1,7,1,122, +101,114,111,0,2,58,105,118,101,99,51,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52, +95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0,0, +18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,1,1,0,1,98,51,0,0,1,1,0,1, +98,52,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,59,119,0,18,98,52,0,20,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,59,120,121,122,119,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,4,1,1,1,0,9, +102,0,0,0,1,3,2,1,12,1,122,101,114,111,0,2,58,118,101,99,52,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17, +48,0,48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97, +108,0,0,18,102,0,59,120,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,3,2, +1,8,1,122,101,114,111,0,2,58,105,118,101,99,52,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0, +0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,59,120,120,120, +120,0,0,18,122,101,114,111,0,0,0,0,1,0,13,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9, +109,48,49,0,0,1,1,0,9,109,49,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0, +18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,0,1,0,13,1,1,1,0,9,102,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0, +17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,0,1,0, +13,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,50,0,58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,13, +1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,50,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,13,1,1,1, +0,10,99,48,0,0,1,1,0,10,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,0,14,1,1,1,0,9,109,48,48, +0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0, +9,109,50,49,0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50,0,0,1,1,0,9,109,50,50,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122, +0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0, +18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0, +0,1,0,14,1,1,1,0,9,102,0,0,0,1,3,2,0,10,1,118,0,2,58,118,101,99,50,0,18,102,0,0,17,48,0,48,0,0,0,0, +0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,118,0,59,121,121,120,0,20,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,51,0, +58,102,108,111,97,116,0,18,105,0,0,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,58, +102,108,111,97,116,0,18,98,0,0,0,0,0,0,0,1,0,14,1,1,1,0,11,99,48,0,0,1,1,0,11,99,49,0,0,1,1,0,11, +99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +99,50,0,20,0,0,1,0,15,1,1,1,0,9,109,48,48,0,0,1,1,0,9,109,49,48,0,0,1,1,0,9,109,50,48,0,0,1,1,0,9, +109,51,48,0,0,1,1,0,9,109,48,49,0,0,1,1,0,9,109,49,49,0,0,1,1,0,9,109,50,49,0,0,1,1,0,9,109,51,49, +0,0,1,1,0,9,109,48,50,0,0,1,1,0,9,109,49,50,0,0,1,1,0,9,109,50,50,0,0,1,1,0,9,109,51,50,0,0,1,1,0, +9,109,48,51,0,0,1,1,0,9,109,49,51,0,0,1,1,0,9,109,50,51,0,0,1,1,0,9,109,51,51,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122, +0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,18,109,51,48,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0, +18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0, +18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,18,109,49,51,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,18,109,50,51,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51,51,0,20,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,3,2,0,10, +1,118,0,2,58,118,101,99,50,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,118,0,59,120,121,121,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,118,0,59,121,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,118,0,59, +121,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,118,0,59,121,121,121, +120,0,20,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,8,58,109,97,116,52,0,58,102,108,111,97,116,0,18,105,0,0, +0,0,0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,58,102,108,111,97,116,0,18,98,0,0,0,0,0, +0,0,1,0,15,1,1,1,0,12,99,48,0,0,1,1,0,12,99,49,0,0,1,1,0,12,99,50,0,0,1,1,0,12,99,51,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,0,5,2,26,1,1,0,5,97,0,0,1,1,0,5,98, +0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102, +108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5, +2,27,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, +95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0, +9,1,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0, +0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0, +0,1,0,5,2,22,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108, +111,97,116,95,114,99,112,0,18,98,73,110,118,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105, +110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,26,1,1,0,6,97,0,0,1,1,0,6,98,0, +0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102, +108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6, +2,27,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,120,0,0,0,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18, +95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,6,2,21,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0, +10,1,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,0,0, +0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0, +0,1,0,6,2,22,1,1,0,6,97,0,0,1,1,0,6,98,0,0,0,1,3,2,0,10,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116, +111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,26,1,1,0,7,97,0,0,1, +1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0, +0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0, +0,0,1,0,7,2,27,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,115,117, +98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,7,2,21,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0, +1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0, +18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +120,0,0,0,0,1,0,7,2,22,1,1,0,7,97,0,0,1,1,0,7,98,0,0,0,1,3,2,0,11,1,98,73,110,118,0,0,1,1,120,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116, +111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,26,1,1,0,8,97,0,0,1, +1,0,8,98,0,0,0,1,3,2,0,11,1,120,0,0,0,4,118,101,99,52,95,97,100,100,0,18,120,0,0,18,97,0,0,18,98,0, +0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0, +0,0,1,0,8,2,27,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95,115,117, +98,116,114,97,99,116,0,18,120,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110, +116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,8,2,21,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0, +1,3,2,0,12,1,120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,97,0,0, +18,98,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18, +120,0,0,0,0,1,0,8,2,22,1,1,0,8,97,0,0,1,1,0,8,98,0,0,0,1,3,2,0,12,1,98,73,110,118,0,0,1,1,120,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,98,73,110,118,0,59,119,0,0,18,98,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105, +110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0, +0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98, +0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0, +0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, +116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, +98,73,110,118,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59, +120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118, +101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,21,1,1,0, +10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,0,10,2,22,1,1,0,10,118,0,0,1,1,0,10, +117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0, +59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118, +101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, +118,0,0,18,119,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100, +100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,27,1, +1,0,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1, +0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, +108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,11,117,0,0,0, +1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0, +0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,119,0,0,0, +0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, +101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1, +4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116, +105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,0,12,2,22,1,1,0, +12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0, +59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0, +59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102, +108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109, +117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,0,10, +2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86, +97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,26,1,1,0,10, 118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,27,1,1,0,9,97,0,0, -1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,27,1, -1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0, -1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120, -121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0, -18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,105,110, -118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0, -0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1, -1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, -118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105,110,118,66,0,59,120,120,120,0,0, -0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1, -1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, -98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, -115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0, -18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1, -0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,21,1,1,0, -12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1, -0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, +121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,27,1,1,0,9,97,0,0,1,1,0,10,117, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120, +121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,0,1,1,0,10,117, +0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, +120,121,0,0,18,97,0,59,120,120,0,0,18,117,0,59,120,121,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0, +9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0, +10,117,0,0,0,1,3,2,0,10,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, +85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59, +121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, +101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,120,0,0,18,105,110,118,85,0,59,120,121,0,0,0,0,1, +0,10,2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0, +59,120,120,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0, +18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59,120,121, +122,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0, +0,0,0,1,0,11,2,27,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,117,0,59, +120,121,122,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98, +116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0, +0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0, +59,120,120,120,0,0,18,117,0,59,120,121,122,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,59,120,120,120,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1, +0,11,117,0,0,0,1,3,2,0,11,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, 118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, 59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0, -0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,119,0,0,18,117, -0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9, -98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0, -0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120,0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6, -117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,20,0, -0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105, -118,101,99,50,0,18,98,0,0,0,46,20,0,0,1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,20,0,0,1,0,6,2,27,1,1,0,6,118,0, -0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0, -0,47,20,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58, -105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,20,0,0,1,0,6,2,22, -1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,18,97, -0,0,0,18,117,0,49,20,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,20,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7, -117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,20,0, -0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105, -118,101,99,51,0,18,98,0,0,0,46,20,0,0,1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,20,0,0,1,0,7,2,27,1,1,0,7,118,0, -0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0, -0,47,20,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58, -105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,20,0,0,1,0,7,2,22, -1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,18,97, -0,0,0,18,117,0,49,20,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,20,0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8, -117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,20,0, -0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105, -118,101,99,52,0,18,98,0,0,0,46,20,0,0,1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,20,0,0,1,0,8,2,27,1,1,0,8,118,0, -0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0, -0,47,20,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58, -105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,20,0,0,1,0,8,2,22, -1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,18,97, -0,0,0,18,117,0,49,20,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,20,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,4,118, -101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1, -0,6,2,27,1,1,0,6,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86, -97,108,0,0,18,118,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101, -0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,4,118,101,99,52, -95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,9,2,27,1,1,0,9, -97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0, -18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0, -0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,4,118,101,99,52,95,110,101,103, -97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10, -50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0, -1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0, -18,98,0,48,20,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1,1,0,10,98,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,0,48,46,20,0,0,1, -0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4,118,101,99,51,95,100,111,116,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0,100,111,116,0,1,1,0,12,97,0,0,1,1,0,12, -98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0, -0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,0,18,97,0, -0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, -97,99,116,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,5, -97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18, -97,0,0,18,105,110,118,66,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95, -97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,4, +0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, +86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0, +0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,105, +110,118,66,0,59,120,120,120,0,0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, +52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0, +0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, +116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0, +12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0, +0,18,97,0,59,120,120,120,120,0,0,18,117,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4, +118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18, +98,0,59,120,120,120,120,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0, +0,18,117,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108, +116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,59,120,120,120,120,0,0, +0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,105,110,118,85,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114, +99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +18,105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, +108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,120,120,120,0,0,18,105,110,118,85,0,0, +0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,59,120,120,120,120, +0,0,0,0,1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105, +118,101,99,50,0,18,97,0,0,0,18,117,0,46,20,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,20,0,0,1,0,6,2,27,1,1, +0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,18,97,0,0, +0,18,117,0,47,20,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,20,0,0,1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,20,0,0,1, +0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118, +101,99,50,0,18,98,0,0,0,48,20,0,0,1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,20,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1, +1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49, +20,0,0,1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118, +101,99,51,0,18,97,0,0,0,18,117,0,46,20,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,20,0,0,1,0,7,2,27,1,1,0, +5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,18,97,0,0,0, +18,117,0,47,20,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,20,0,0,1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,7, +2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101, +99,51,0,18,98,0,0,0,48,20,0,0,1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,20,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0, +5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,20, +0,0,1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118, +101,99,52,0,18,97,0,0,0,18,117,0,46,20,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,20,0,0,1,0,8,2,27,1,1,0, +5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,18,97,0,0,0, +18,117,0,47,20,0,0,1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,20,0,0,1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0, +0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,20,0,0,1,0,8, +2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101, +99,52,0,18,98,0,0,0,48,20,0,0,1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,20,0,0,1,0,8,2,22,1,1,0,8,118,0,0,1,1,0, +5,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,20, +0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116, +86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,0,1,4,118,101,99,52,95,110,101,103, +97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,4, +118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,0,8, +2,27,1,1,0,8,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97, +108,0,0,18,118,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0, +18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,0,1,4,118, +101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59, +120,121,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95, +95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,0,12,2,27,1,1,0,12, +118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118, +0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20, +0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8, +48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,0,1,0,15,2,27,1,1,0, +15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,54,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,0,9,0,100,111,116,0,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,48,20,0,0,1,0,9,0,100,111,116,0,1,1,0,10,97,0,0,1, +1,0,10,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0, +59,121,0,18,98,0,59,121,0,48,46,20,0,0,1,0,9,0,100,111,116,0,1,1,0,11,97,0,0,1,1,0,11,98,0,0,0,1,4, +118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,0, +100,111,116,0,1,1,0,12,97,0,0,1,1,0,12,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,18,95,95,114, +101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,1,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118, +101,99,52,95,97,100,100,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0, +0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2, +3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,0, +18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,105,110,118,66,0,0,0, +4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,105,110,118,66,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0, +1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2, +1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0, +18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6, +117,0,0,0,1,3,2,0,6,1,105,110,118,0,0,1,1,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105, +110,118,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,0, +59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,122,0,0, +18,118,0,0,18,105,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101, +116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,4, 118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0, -2,6,118,0,0,1,1,0,6,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,3,2,0,6,1,105,110,118,0,0,1,1, +2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,3,2,0,7,1,105,110,118,0,0,1,1, 122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,120,0,0,18,117,0,59,120,0,0,0,4, 102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99, 52,95,109,117,108,116,105,112,108,121,0,18,122,0,0,18,118,0,0,18,105,110,118,0,0,0,4,102,108,111, 97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1,1,0, -2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0, -0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,7,118,0, -0,1,1,0,7,117,0,0,0,1,3,2,0,7,1,105,110,118,0,0,1,1,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, +2,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0, +0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0, +0,1,1,0,8,117,0,0,0,1,3,2,0,8,1,105,110,118,0,0,1,1,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0, 18,105,110,118,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110, 118,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,122, 0,0,18,118,0,0,18,105,110,118,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114, -101,116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1, -4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1, -0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0, -18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,3,2,0,8,1,105,110,118,0,0, -1,1,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,120,0,0,18,117,0,59,120,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,122,0,0,18,118,0,0,18,105,110,118,0,0,0,4,102,108, -111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1, -1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,59, -120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98, -116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98, -0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0, -0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,119,0,0,0,4,102,108,111,97,116,95,114, -99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, -97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101, -99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0, -1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, -18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,3,1,0,2,10,118, -0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121, -0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0, -0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59, -120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,119, -0,59,120,121,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100, -0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18, -117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1, -0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, -117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,119,0, -59,120,121,122,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100, -100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2, -12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18, -118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102, +101,116,86,97,108,0,0,18,122,0,0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52, +95,97,100,100,0,18,97,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0, +9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,97,0,59,120,0,0,18,97,0,0,18,98, +0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, +121,0,18,97,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0, +9,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52, +95,109,117,108,116,105,112,108,121,0,18,97,0,59,120,0,0,18,97,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2, +10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0, +59,120,121,0,0,18,117,0,59,120,121,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118, +101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117, +0,59,120,121,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,117,0,59,120,121,0,0, +0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,3,2,0,10,1,119,0,0,0,4,102,108,111,97,116,95, +114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119, +0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,119,0,59,120,121,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1, +0,11,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0, +0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11, +117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18, +118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,3,2,0,11,1,119,0,0,0,4,102, 108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, 114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119, -0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117, -0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,119,0, -0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120, -121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120, -121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95, +0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,119,0,59,120,121,122,0,0,0,0,1,0,0,2,1,1,0,2,12, +118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0, +1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0, +18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,4,118,101,99, +52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,117,0,0,0,0,1,0,0,2,4,1,0,2,12, +118,0,0,1,1,0,12,117,0,0,0,1,3,2,0,12,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59, +120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59, +121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108, +111,97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,119,0,0,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,1,0,5, +97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0, +59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, +114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2, +3,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, +59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,9,18,118,0,59,120,0,18,97,0,23,0,9, +18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, +18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118, +101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120, +120,120,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114, +97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0, +1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, +18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1, +0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0, +9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95, +97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1, +1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0, +59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2, +8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9, +18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0, +9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120, +0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, +116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1, +0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118, +0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118, +65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95, 109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120, -120,0,0,0,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,6, -118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,0,1,0, -0,2,1,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0, -0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,5,97, -0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,59, -120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122, -0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120, -0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2, -8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120, -120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,8,118,0,0, -1,1,0,5,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18, -97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,5,97,0,0,0,1,9,18,118,0,59,120,0, -18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,18,97,0,24,0,9,18,118,0,59,119,0, -18,97,0,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18, -118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,9,97,0, -0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0, -59,120,120,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,118,0,59,120,121,0,0,18,118,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,4,1,0, -2,10,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0, -59,120,121,0,0,18,118,0,59,120,121,0,0,18,97,0,59,120,120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0, -9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120, -120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116, -114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1, -0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59, -120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0, -0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18, -97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0, -59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4, -118,101,99,52,95,97,100,100,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1, -0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18, -118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101, -99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0, -0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1, -1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2, -21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0,10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0, -0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0, -59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2, -26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0, -57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10, -50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,2,3,2,0,11,1,109,82,111,119,48, -0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10, -50,0,57,59,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, -109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0, -20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111, -119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121, -0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82, -111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82, -111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18, -109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100, -111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0, -0,18,110,0,16,10,50,0,57,0,0,20,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20, -0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0, -0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,2,3, -2,0,12,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, -20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48, -0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10, -51,0,57,59,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18, -109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0, -16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0, -18,109,82,111,119,48,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,49,0,0,0,9, -18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, -121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0, -57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0, -16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0, -18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110, -0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0, -18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59, -122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111, -119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0, -16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0, -18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -51,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2, -0,12,1,109,82,111,119,51,0,0,0,9,18,109,82,111,119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20, -0,9,18,109,82,111,119,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0, -59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51, -0,57,59,119,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18, -109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0, -16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0, -18,109,82,111,119,51,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15, +120,0,0,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0, +59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,97, +0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,118,0,59,120,121,122,0,0,18,118,0,0, +18,97,0,59,120,120,120,0,0,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,0,18,97,0,59,120,120,120,0, +0,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111, +97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97,0,0,0,4,118,101,99,52,95,109,117,108,116,105, +112,108,121,0,18,118,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,97,0,59,120,120,120,0,0,0, +0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,118,0,0,18,118, +0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99, +52,95,115,117,98,116,114,97,99,116,0,18,118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0, +0,2,3,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18, +118,0,0,18,118,0,0,18,97,0,59,120,120,120,120,0,0,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0, +1,3,2,0,9,1,105,110,118,65,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,65,0,0,18,97, +0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,118,0,0,18,118,0,0,18,97,0,59,120, +120,120,120,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,27,1,1,0, +13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,3,2,0, +10,1,109,82,111,119,48,0,0,1,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18,109,0, +16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0, +9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120, +0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100,111,116,0,18,109,82, +111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59, +121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0,0,1,0,13,2,22,1,1, +0,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48, +0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, +49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46, +20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,21,1,1,0,14,109,0, +0,1,1,0,14,110,0,0,0,1,2,3,2,0,11,1,109,82,111,119,48,0,0,0,9,18,109,82,111,119,48,0,59,120,0,18, +109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0, +20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0,57, +0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82,111, +119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120, +0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82, +111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,109,82, +111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,122,0,18, +109,0,16,10,50,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,58,100, +111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0,57,0,0,20,0, +9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0, +0,18,110,0,16,10,50,0,57,0,0,20,0,0,2,3,2,0,11,1,109,82,111,119,50,0,0,0,9,18,109,82,111,119,50,0, +59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,121,0,18,109,0,16,10,49,0, +57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0, +16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58,100,111,116,0, +18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0,0,20,0,0,0,1,0, +14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, +0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,15, 110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48, -0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, -110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2, -27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13, +0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16, +10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110, +0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18, +110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0, +0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,2,3,2,0,12,1,109,82,111,119,48,0,0,0,9,18,109, +82,111,119,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,121,0,18, +109,0,16,10,49,0,57,59,120,0,20,0,9,18,109,82,111,119,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120, +0,20,0,9,18,109,82,111,119,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,8,48,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,58,100,111,116,0,18,109,82, +111,119,48,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59, +120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,59,120,0,58,100,111,116,0,18,109,82,111,119,48,0,0,18,110,0,16,10,51, +0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,49,0,0,0,9,18,109,82,111,119,49,0,59,120,0,18,109,0,16, +8,48,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9, +18,109,82,111,119,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,109,82,111,119,49,0,59, +119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121, +0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,59,121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,49,0, +57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,58,100,111,116,0,18,109,82, +111,119,49,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59, +121,0,58,100,111,116,0,18,109,82,111,119,49,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109, +82,111,119,50,0,0,0,9,18,109,82,111,119,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,109, +82,111,119,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,122,0,18, +109,0,16,10,50,0,57,59,122,0,20,0,9,18,109,82,111,119,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119, +50,0,0,18,110,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,58, +100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,50,0,57,59,122,0,58,100,111,116,0,18,109,82,111,119,50,0,0,18,110,0,16,10,50,0,57,0, +0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,58,100,111,116,0,18,109,82,111, +119,50,0,0,18,110,0,16,10,51,0,57,0,0,20,0,0,2,3,2,0,12,1,109,82,111,119,51,0,0,0,9,18,109,82,111, +119,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,121,0,18,109,0, +16,10,49,0,57,59,119,0,20,0,9,18,109,82,111,119,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0, +9,18,109,82,111,119,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,8,48,0,57,0,0, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119, +51,0,0,18,110,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,119,0, +58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,51,0,57,59,119,0,58,100,111,116,0,18,109,82,111,119,51,0,0,18,110,0,16,10,51,0, +57,0,0,20,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,0,1,0,13,2,26, +1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110, +0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49, +0,57,46,20,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18, +95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,0,13,2,27,1,1,0,13, 109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48, -20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13,2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0, -14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1, -0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, +0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, +0,18,110,0,16,10,49,0,57,48,20,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114, +101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86, +97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0, +13,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20, +0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,0,1,0,13, +2,22,1,1,0,13,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, +16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, +57,18,98,0,49,20,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97, +108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, +49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, +97,0,18,110,0,16,10,50,0,57,46,20,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116, +86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108, +0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114, +101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,0,14,2,27,1,1,0,14, +109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, +18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,0,1,0, +14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97, +0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0, +16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0, +57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, +8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, +16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97, +108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0, +1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, +116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,0,15,2,26,1,1,0,9,97,0,0, +1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95, +114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,0,15,2,26,1,1,0, +15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, 57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0, -1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, -0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50, -0,57,47,20,0,0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109, -0,16,10,50,0,57,18,98,0,47,20,0,0,1,0,14,2,21,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,9,98,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,0,14,2,22,1,1,0,9,97,0,0, -1,1,0,14,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,0,1,0,14,2, -22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, -8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49, -20,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0, -16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0, -57,46,20,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0, -57,18,98,0,46,20,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18, -110,0,16,10,51,0,57,47,20,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15, -110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0, -0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0, -13,109,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,114,48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18, -109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18, -114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0, -57,59,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,114,48,0,0,18,118, -0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,114,49,0,0,18,118,0,0,0, -20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120, -0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1, -1,0,11,118,0,0,0,1,2,3,2,0,11,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0, -20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0, -16,10,50,0,57,59,120,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,114,48,0,0,18,118,0,0,0,0,2,3,2,0,11,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16, -8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0, -59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101, -116,86,97,108,0,59,121,0,0,18,114,49,0,0,18,118,0,0,0,0,2,3,2,0,11,1,114,50,0,0,0,9,18,114,50,0,59, -120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0, -20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,50,0,0,18,118,0,0,0,0,0,1,0,11,2,21,1,1,0,11, -118,0,0,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0, -0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18, -118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116, -0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,2, -3,2,0,12,1,114,48,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0, -59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120, -0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,20,0,4,118,101,99,52,95,100,111,116, -0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,48,0,0,18,118,0,0,0,0,2,3,2,0,12,1,114,49,0,0, -0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10, -49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59, -119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116, -86,97,108,0,59,121,0,0,18,114,49,0,0,18,118,0,0,0,0,2,3,2,0,12,1,114,50,0,0,0,9,18,114,50,0,59,120, -0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18,114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0, -9,18,114,50,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10, -51,0,57,59,122,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0, -18,114,50,0,0,18,118,0,0,0,0,2,3,2,0,12,1,114,51,0,0,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0, -57,59,119,0,20,0,9,18,114,51,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122, -0,18,109,0,16,10,50,0,57,59,119,0,20,0,9,18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0, -4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,51,0,0,18,118, -0,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, -120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,119,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,0,1,0,0,2,1,1, -0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0, -0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4, -1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0, -9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0, -14,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49, -0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0, -15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110, -0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57, -18,110,0,16,10,51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0, -0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2, -15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18, -109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109, +46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,9, +18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,46,20,0,0,1,0,15,2, +27,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, +110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, +49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47, +20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,0, +15,2,27,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, +0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49, +0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98, +0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0, +0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, +18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18, +110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16, +10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57, +48,20,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, +10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57, +18,98,0,48,20,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, +0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, +57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, +18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, +16,10,51,0,57,49,20,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16, +10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, +18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0, +16,10,51,0,57,18,98,0,49,20,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,0,1,3,2,0,10,1,114, +48,0,0,1,1,114,49,0,0,0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0, +59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121, +0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,95,95,114,101,116,86,97, +108,0,59,120,0,58,100,111,116,0,18,114,48,0,0,18,118,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, +59,121,0,58,100,111,116,0,18,114,49,0,0,18,118,0,0,0,20,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13, +109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8, +48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0, +16,10,49,0,57,0,0,20,0,0,1,0,11,2,21,1,1,0,14,109,0,0,1,1,0,11,118,0,0,0,1,2,3,2,0,11,1,114,48,0,0, +0,9,18,114,48,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10, +49,0,57,59,120,0,20,0,9,18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,4,118,101,99,51, +95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,48,0,0,18,118,0,0,0,0,2,3,2,0, +11,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,20,0,9,18,114,49,0,59,121, +0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,20,0, +4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,49,0,0,18,118, +0,0,0,0,2,3,2,0,11,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18, +114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0, +57,59,122,0,20,0,4,118,101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18, +114,50,0,0,18,118,0,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,95,95,114,101, +116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114, +101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95, +95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0, +1,0,12,2,21,1,1,0,15,109,0,0,1,1,0,12,118,0,0,0,1,2,3,2,0,12,1,114,48,0,0,0,9,18,114,48,0,59,120,0, +18,109,0,16,8,48,0,57,59,120,0,20,0,9,18,114,48,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,20,0,9, +18,114,48,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,20,0,9,18,114,48,0,59,119,0,18,109,0,16,10,51, +0,57,59,120,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, +114,48,0,0,18,118,0,0,0,0,2,3,2,0,12,1,114,49,0,0,0,9,18,114,49,0,59,120,0,18,109,0,16,8,48,0,57, +59,121,0,20,0,9,18,114,49,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,20,0,9,18,114,49,0,59,122,0, +18,109,0,16,10,50,0,57,59,121,0,20,0,9,18,114,49,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,20,0,4, +118,101,99,52,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,49,0,0,18,118,0, +0,0,0,2,3,2,0,12,1,114,50,0,0,0,9,18,114,50,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,20,0,9,18, +114,50,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,20,0,9,18,114,50,0,59,122,0,18,109,0,16,10,50,0, +57,59,122,0,20,0,9,18,114,50,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,20,0,4,118,101,99,52,95, +100,111,116,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,50,0,0,18,118,0,0,0,0,2,3,2,0,12, +1,114,51,0,0,0,9,18,114,51,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,20,0,9,18,114,51,0,59,121,0, +18,109,0,16,10,49,0,57,59,119,0,20,0,9,18,114,51,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,20,0,9, +18,114,51,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,20,0,4,118,101,99,52,95,100,111,116,0,18,95, +95,114,101,116,86,97,108,0,59,119,0,0,18,114,51,0,0,18,118,0,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0, +1,1,0,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,18,118,0,0,18, +109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,18,118,0, +0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,18, +118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116, +0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9, +18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13, +110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, +24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, +57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16, +10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,18,109,0,18, +110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, +16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18, +110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57, +18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10, +50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,0,0,2, +2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18, +109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22, +0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0, +0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18, +109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0, +9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, +57,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18, +109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8, +48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97, +0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0, +2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18, +97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, +18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109, 0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0, -0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16, -10,49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14, -109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, -23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18, -97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9, -18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57, -18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0, -9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0, -57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23, -0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51, -0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0, -24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10, -51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109, -0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0, -1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25, -1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0, -20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0, -18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,0,1,0,8,2,25,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18, -97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10, -118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0, -2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, -109,0,20,0,0,1,0,14,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, -101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101, -99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99, -51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0, -2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, -0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47, -20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18, -95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16, -10,49,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,0,1,0,7,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49, -0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -18,118,0,20,0,0,1,0,9,2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95, -114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118, -101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2, -24,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58, -118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0, -13,2,24,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0, -0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9, -18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, -0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,0,1,0,5,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, -118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114, -0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,16,10,49,0,0,0,47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52, -0,16,10,49,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95, -95,112,111,115,116,68,101,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118, -0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111, -115,116,68,101,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, -118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18, -118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114, -0,1,0,2,13,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68, -101,99,114,0,1,0,2,14,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115, -116,68,101,99,114,0,1,0,2,15,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109, -0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16, -10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10, -50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0, -57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111, -115,116,73,110,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97, -0,18,97,0,16,10,49,0,46,20,0,0,1,0,10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48, -0,0,0,0,46,20,0,0,1,0,11,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46, -20,0,0,1,0,12,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0, -5,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0, -2,6,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118, -101,99,50,0,16,10,49,0,0,0,46,20,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16, -10,49,0,0,0,46,20,0,0,1,0,8,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46, -20,0,0,1,0,13,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,3,2,0,13,1,110,0,2,18, -109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46, -20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0, -8,18,110,0,0,0,1,0,14,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,3,2,0,14,1,110, -0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46, -20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0, -8,18,110,0,0,0,1,0,15,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,3,2,0,15,1,110, -0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46, -20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0, -9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,8,18, -110,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95, -114,101,116,86,97,108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0, -0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16, -1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18, -99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102, -108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0, -1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18, -103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18, -98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111, -97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9, -98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18, -97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8, -18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18, -97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111, -116,0,1,1,0,1,97,0,0,0,1,10,18,97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111, -103,105,99,97,108,88,111,114,0,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111, -103,105,99,97,108,78,111,116,0,18,98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0, -0,112,114,105,110,116,77,69,83,65,0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, -105,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112, -114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9, -58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, +9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0, +16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0, +23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109, +0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1, +1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18, +109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,15,109,0, +0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9, +18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,15,109, +0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0, +9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,15, +109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0, +24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,0,0,2,3,1,0,2, +10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,11,118,0,0, +1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,15, +109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,5,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0, +16,10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,25,1,0,2,6,118,0,0,0, +1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,0,1,0,7,2,25,1,0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16, +10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,25,1,0,2,8,118,0,0, +0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97, +108,0,18,118,0,20,0,0,1,0,9,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,0,10,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0, +58,118,101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1, +0,11,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9, +18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,12,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,18, +118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20, +0,0,1,0,13,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99, +50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0, +17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,25,1,0,2,14, +109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47, +20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0, +9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18, +95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,15,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48, +0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57, +18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18, +109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109, +0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,109,0,20,0,0,1,0,5,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,97,0,20,0,0,1,0,6,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, +101,99,50,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,7,2,24,1, +0,2,7,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114, +101,116,86,97,108,0,18,118,0,20,0,0,1,0,8,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118, +101,99,52,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,9,2,24,1, +0,2,9,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97, +0,20,0,0,1,0,10,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0, +0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,11,2,24,1,0,2,11,118,0,0,0,1,9,18, +118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,0,1,0,12,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0, +0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,0,13,2,24,1,0,2,13,109,0,0,0,1, +9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18, +109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95, +95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,14,2,24,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0, +57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18, +109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109, +0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, +18,109,0,20,0,0,1,0,15,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58, +118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118, +101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101, +99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99, +52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,0,5,0,95,95, +112,111,115,116,68,101,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0, +9,18,97,0,18,97,0,16,10,49,0,47,20,0,0,1,0,6,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,6,118,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0, +16,10,49,0,0,0,47,20,0,0,1,0,7,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95, +95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0, +47,20,0,0,1,0,8,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116, +86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,16,10,49,0,0,0,47,20,0,0,1,0, +9,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,9,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,0,1,0,10,0,95,95,112,111,115,116,68,101,99,114, +0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118, +101,99,50,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,11,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,11, +118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51, +0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,12,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,12,118,0,0,0,1, +9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,17,49,0,48, +0,0,0,0,47,20,0,0,1,0,13,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,13,109,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99, +50,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0, +17,49,0,48,0,0,0,0,47,20,0,0,1,0,14,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,14,109,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58, +118,101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118, +101,99,51,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101, +99,51,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,15,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,15,109,0, +0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0, +57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, +58,118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58, +118,101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118, +101,99,52,0,17,49,0,48,0,0,0,0,47,20,0,0,1,0,9,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,9,97, +0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,0, +10,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,10,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, +18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,11,0,95,95, +112,111,115,116,73,110,99,114,0,1,0,2,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, +20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,12,0,95,95,112,111, +115,116,73,110,99,114,0,1,0,2,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, +118,0,18,118,0,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,0,1,0,5,0,95,95,112,111,115,116,73, +110,99,114,0,1,0,2,5,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0, +16,10,49,0,46,20,0,0,1,0,6,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,6,118,0,0,0,1,9,18,95,95, +114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,16,10,49,0,0,0,46, +20,0,0,1,0,7,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,7,118,0,0,0,1,9,18,95,95,114,101,116,86, +97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0,8,0, +95,95,112,111,115,116,73,110,99,114,0,1,0,2,8,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, +118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,16,10,49,0,0,0,46,20,0,0,1,0,13,0,95,95,112, +111,115,116,73,110,99,114,0,1,0,2,13,109,0,0,0,1,3,2,0,13,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8, +48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0, +57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,14,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,14,109,0,0,0,1,3,2,0,14,1,110,0,2,18,109,0,0,0,9,18,109,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, +49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0, +57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,15,0,95, +95,112,111,115,116,73,110,99,114,0,1,0,2,15,109,0,0,0,1,3,2,0,15,1,110,0,2,18,109,0,0,0,9,18,109,0, +16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10, +49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0, +57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57, +18,109,0,16,10,51,0,57,58,118,101,99,52,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,0,1,2,15,1,1, +0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59, +120,0,0,18,98,0,0,18,97,0,0,0,0,1,0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97, +116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98, +0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0, +0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0, +58,102,108,111,97,116,0,18,98,0,0,0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1, +103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4, +102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32, +0,0,1,0,1,2,18,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108, +111,97,116,0,18,98,0,0,0,43,0,0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1, +101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111, +97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2, +17,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0, +18,98,0,0,0,42,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,78,111,116,0,1,1,0,1,97,0,0,0,1,10,18, +97,0,0,8,15,2,48,0,0,9,14,0,8,15,2,49,0,0,0,1,0,1,0,95,95,108,111,103,105,99,97,108,88,111,114,0,1, +1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,10,18,97,0,0,8,58,95,95,108,111,103,105,99,97,108,78,111,116,0,18, +98,0,0,0,0,9,14,0,8,18,98,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,9,102,0,0,0,1,4, +102,108,111,97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65, +0,1,1,0,5,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,1,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1, +0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,10,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65, +0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, 118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105, -110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, -121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0, -0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116, -77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, +105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,12,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59, +122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105, +110,116,77,69,83,65,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0, +0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,7,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9, 58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65, -0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18, -118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112, -114,105,110,116,77,69,83,65,0,1,1,0,3,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0, -59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110, -116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118, -0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,13,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77, -69,83,65,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0, -9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69, -83,65,0,18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0, -57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105, -110,116,77,69,83,65,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1, -0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116, -0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0, -1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,20,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 +0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,8,118,0,0,0,1,9,58,112, +114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18, +118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114, +105,110,116,77,69,83,65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,2,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105, +110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,3, +118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0, +0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,77, +69,83,65,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,121,0,0,0,0, +9,58,112,114,105,110,116,77,69,83,65,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,13,109,0,0,0,1,9,58, +112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65, +0,18,109,0,16,10,49,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,14,109,0,0,0,1,9, +58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83, +65,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0, +0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,110,116,77, +69,83,65,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,49,0, +57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110, +116,77,69,83,65,0,18,109,0,16,10,51,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, +16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116, +77,69,83,65,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0, +112,114,105,110,116,77,69,83,65,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18, +101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,19,101,0,0,0,1,4,105,110,116,95,112, +114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,20,101,0,0,0,1,4, +105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, +0,21,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0 -- cgit v1.2.3 From 9f44247acf62b91669f77974a4bbad687d58859e Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Mar 2007 11:34:18 -0700 Subject: fix _mesa_uniform_matrix() transpose bug --- src/mesa/shader/shader_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 924c9d5e94..271464e9f1 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1005,7 +1005,7 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, for (col = 0; col < cols; col++) { GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; for (row = 0; row < rows; row++) { - v[row] = values[col * rows + row]; + v[row] = values[row * cols + col]; } } } @@ -1014,7 +1014,7 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, for (col = 0; col < cols; col++) { GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; for (row = 0; row < rows; row++) { - v[row] = values[row * cols + col]; + v[row] = values[col * rows + row]; } } } -- cgit v1.2.3 From b9ea9361500979b318574ac69ce656ea3af6a197 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Mar 2007 15:41:25 -0700 Subject: added GL_CURRENT_PROGRAM --- src/mesa/main/get.c | 12 ++++++++++++ src/mesa/main/get_gen.py | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 4cd07cb7b1..d09e0610ab 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1888,6 +1888,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) CHECK_EXT1(ARB_vertex_shader, "GetBooleanv"); params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS); break; + case GL_CURRENT_PROGRAM: + CHECK_EXT1(ARB_shader_objects, "GetBooleanv"); + params[0] = INT_TO_BOOLEAN(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0); + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname); } @@ -3715,6 +3719,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) CHECK_EXT1(ARB_vertex_shader, "GetFloatv"); params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS); break; + case GL_CURRENT_PROGRAM: + CHECK_EXT1(ARB_shader_objects, "GetFloatv"); + params[0] = (GLfloat)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0); + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname); } @@ -5542,6 +5550,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) CHECK_EXT1(ARB_vertex_shader, "GetIntegerv"); params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS; break; + case GL_CURRENT_PROGRAM: + CHECK_EXT1(ARB_shader_objects, "GetIntegerv"); + params[0] = ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0; + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname); } diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 2f07cc5192..3e66946b92 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -993,7 +993,14 @@ StateVars = [ ( "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB", GLint, ["ctx->Const.MaxVertexTextureImageUnits"], "", ["ARB_vertex_shader"] ), ( "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB", GLint, - ["MAX_COMBINED_TEXTURE_IMAGE_UNITS"], "", ["ARB_vertex_shader"] ) + ["MAX_COMBINED_TEXTURE_IMAGE_UNITS"], "", ["ARB_vertex_shader"] ), + + # GL_ARB_shader_objects + # Actually, this token isn't part of GL_ARB_shader_objects, but is + # close enough for now. + ( "GL_CURRENT_PROGRAM", GLint, + ["ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0"], + "", ["ARB_shader_objects"] ) ] -- cgit v1.2.3 From ff95925e70877b9cfe65f66c21ea5ee9ae117ca4 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Mar 2007 16:53:44 -0700 Subject: add NULL ptr check --- src/mesa/shader/slang/slang_codegen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6587629ebb..64bb9141bc 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1167,6 +1167,8 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, kids[0] = kids[1] = kids[2] = NULL; for (j = 0; j < info->NumParams; j++) { kids[j] = _slang_gen_operation(A, &oper->children[firstOperand + j]); + if (!kids[j]) + return NULL; } n = new_node3(info->Opcode, kids[0], kids[1], kids[2]); -- cgit v1.2.3 From 46bd63819e0fb108d13df0672372e500cf56bbbe Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Mar 2007 17:02:12 -0700 Subject: use gl_ModelViewProjectionMatrixTranspose in ftransform() --- .../shader/slang/library/slang_vertex_builtin.gc | 2 +- .../shader/slang/library/slang_vertex_builtin_gc.h | 140 ++++++++++----------- 2 files changed, 71 insertions(+), 71 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin.gc b/src/mesa/shader/slang/library/slang_vertex_builtin.gc index 84f747075f..20c924a30d 100644 --- a/src/mesa/shader/slang/library/slang_vertex_builtin.gc +++ b/src/mesa/shader/slang/library/slang_vertex_builtin.gc @@ -57,7 +57,7 @@ varying float gl_FogFragCoord; vec4 ftransform() { - __retVal = gl_ModelViewProjectionMatrix * gl_Vertex; + __retVal = gl_Vertex * gl_ModelViewProjectionMatrixTranspose; } diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h index d23d7c2ddf..d47d62f909 100644 --- a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h @@ -19,75 +19,75 @@ 107,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,84,101,120,67, 111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0, 0,2,2,3,9,1,103,108,95,70,111,103,70,114,97,103,67,111,111,114,100,0,0,0,1,0,12,0,102,116,114,97, -110,115,102,111,114,109,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,103,108,95,77,111,100,101,108, -86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,18,103,108,95,86,101, -114,116,101,120,0,48,20,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,76,111,100,0,1,1,0,16,115, -97,109,112,108,101,114,0,0,1,1,0,9,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1, -99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0,20,0,9, -18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100, -0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0, -0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0,16,115,97,109, -112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99, -111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18, -99,111,111,114,100,0,59,121,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0, -4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112, -108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80, -114,111,106,76,111,100,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1, -1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59, -120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111, -111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0, -12,0,116,101,120,116,117,114,101,50,68,76,111,100,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0, -10,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18, -99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,20,0,9,18,99,111,111,114, -100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114, -101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0, -116,101,120,116,117,114,101,50,68,80,114,111,106,76,111,100,0,1,1,0,17,115,97,109,112,108,101,114, -0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100, -0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111, -111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118, -101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111, -106,76,111,100,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9, -108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120, -121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99, -111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95, -95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1, -0,12,0,116,101,120,116,117,114,101,51,68,76,111,100,0,1,1,0,18,115,97,109,112,108,101,114,0,0,1,1, -0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9, -18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99, -111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,51,100,0,18, -95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0, -1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,76,111,100,0,1,1,0,18,115,97,109,112,108, -101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111, -114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121, -122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111, -100,0,20,0,4,118,101,99,52,95,116,101,120,98,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97, -109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67, -117,98,101,76,111,100,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1, -1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59, -120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0, -20,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97, -109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,76, -111,100,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111, -100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0, +110,115,102,111,114,109,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,103,108,95,86,101,114,116,101, +120,0,18,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97, +116,114,105,120,84,114,97,110,115,112,111,115,101,0,48,20,0,0,1,0,12,0,116,101,120,116,117,114,101, +49,68,76,111,100,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,9,99,111,111,114,100,0,0,1,1,0,9, +108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0, 18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101, 99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,76,111, -100,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100, -0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111, -111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59, -122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100, -0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,76,111, -100,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100, -0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99, -111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52, -95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, -99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,76,111,100,0,1, -1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1, -3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111, -114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59, -122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100, -0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,0 +0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76, +111,100,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,1,1,0,9,108,111, +100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99, +111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,121,0,49,20,0,9,18,112,99,111,111,114,100,0, +59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101, +120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0,16,115,97,109,112,108,101,114,0,0,1,1, +0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9, +18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59, +122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, +101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99, +111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,76,111,100,0,1,1,0,17,115,97, +109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99, +111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120, +121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101, +120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111, +114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,76,111,100,0,1,1,0,17, +115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0, +12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100, +0,59,120,121,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18, +108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0, +18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117, +114,101,50,68,80,114,111,106,76,111,100,0,1,1,0,17,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111, +111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99, +111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,122, +0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101, +120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111, +111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,76,111,100,0,1,1,0,18,115,97,109, +112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111, +111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120, +121,122,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, +101,120,98,51,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, +111,114,100,52,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,76,111,100,0,1,1, +0,18,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3, +2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,111,111, +114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0, +59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,51,100,0,18,95,95,114,101,116,86, +97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101, +120,116,117,114,101,67,117,98,101,76,111,100,0,1,1,0,19,115,97,109,112,108,101,114,0,0,1,1,0,11,99, +111,111,114,100,0,0,1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111, +111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119, +0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,95,95,114,101,116,86,97, +108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100, +111,119,49,68,76,111,100,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0, +1,1,0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59, +120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0, +20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, +112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114, +111,106,76,111,100,0,1,1,0,20,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0, +9,108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120, +0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111, +114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18, +108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,49,100,0,18,95,95,114,101,116,86,97,108,0,0, +18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,115,104,97,100,111, +119,50,68,76,111,100,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,1,1, +0,9,108,111,100,0,0,0,1,3,2,0,12,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120, +121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0, +4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112, +108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111, +106,76,111,100,0,1,1,0,21,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,1,1,0,9, +108,111,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120, +121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99, +111,111,114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59, +119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97, +108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,0 -- cgit v1.2.3 From c9872b80c874ce7891c6b07c2d4f2fe099fdd8cd Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 10 Mar 2007 10:37:18 -0700 Subject: add NULL ptr check in emit_cond() --- src/mesa/shader/slang/slang_emit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 8ad61d8a3b..6d39354d75 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1014,8 +1014,12 @@ emit_cond(slang_emit_info *emitInfo, slang_ir_node *n) * Need to update condition code register. * Next instruction is typically an IR_IF. */ - /* last child expr instruction: */ - struct prog_instruction *inst = emit(emitInfo, n->Children[0]); + struct prog_instruction *inst; + + if (!n->Children[0]) + return NULL; + + inst = emit(emitInfo, n->Children[0]); if (inst) { /* set inst's CondUpdate flag */ inst->CondUpdate = GL_TRUE; -- cgit v1.2.3 From 1fcb4ecc07685872c9c42569ba13faa1cad54d3c Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 10 Mar 2007 10:56:06 -0700 Subject: clean-up formatting --- src/mesa/swrast/s_context.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 031d74f31b..8864c217a5 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -125,27 +125,28 @@ _swrast_update_rasterflags( GLcontext *ctx ) static void _swrast_update_polygon( GLcontext *ctx ) { - GLfloat backface_sign = 1; + GLfloat backface_sign; if (ctx->Polygon.CullFlag) { - backface_sign = 1; - switch(ctx->Polygon.CullFaceMode) { + backface_sign = 1.0; + switch (ctx->Polygon.CullFaceMode) { case GL_BACK: - if(ctx->Polygon.FrontFace==GL_CCW) - backface_sign = -1; + if (ctx->Polygon.FrontFace == GL_CCW) + backface_sign = -1.0; break; case GL_FRONT: - if(ctx->Polygon.FrontFace!=GL_CCW) - backface_sign = -1; + if (ctx->Polygon.FrontFace != GL_CCW) + backface_sign = -1.0; break; - default: case GL_FRONT_AND_BACK: - backface_sign = 0; + /* fallthrough */ + default: + backface_sign = 0.0; break; } } else { - backface_sign = 0; + backface_sign = 0.0; } SWRAST_CONTEXT(ctx)->_BackfaceSign = backface_sign; -- cgit v1.2.3 From 10b5895597d5e069183cb647d17eb412effceb4f Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 10 Mar 2007 11:30:19 -0700 Subject: Implement gl_FrontFacing for fragment shaders. For the time being, we put the gl_FrontFacing value in the FOGC.Y input register. Combining FOGC and FrontFacing in one register is a bit of a hack and may need to be changed someday. --- src/mesa/shader/slang/slang_codegen.c | 60 +++++++++++++++++++++-------------- src/mesa/swrast/s_fragprog.c | 4 +++ src/mesa/swrast_setup/ss_triangle.c | 4 ++- src/mesa/swrast_setup/ss_tritmp.h | 3 +- 4 files changed, 44 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 64bb9141bc..640b87a34d 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -209,35 +209,37 @@ sampler_to_texture_index(const slang_type_specifier_type type) * XXX return size too */ static GLint -_slang_input_index(const char *name, GLenum target) +_slang_input_index(const char *name, GLenum target, GLuint *swizzleOut) { struct input_info { const char *Name; GLuint Attrib; + GLuint Swizzle; }; static const struct input_info vertInputs[] = { - { "gl_Vertex", VERT_ATTRIB_POS }, - { "gl_Normal", VERT_ATTRIB_NORMAL }, - { "gl_Color", VERT_ATTRIB_COLOR0 }, - { "gl_SecondaryColor", VERT_ATTRIB_COLOR1 }, - { "gl_FogCoord", VERT_ATTRIB_FOG }, - { "gl_MultiTexCoord0", VERT_ATTRIB_TEX0 }, - { "gl_MultiTexCoord1", VERT_ATTRIB_TEX1 }, - { "gl_MultiTexCoord2", VERT_ATTRIB_TEX2 }, - { "gl_MultiTexCoord3", VERT_ATTRIB_TEX3 }, - { "gl_MultiTexCoord4", VERT_ATTRIB_TEX4 }, - { "gl_MultiTexCoord5", VERT_ATTRIB_TEX5 }, - { "gl_MultiTexCoord6", VERT_ATTRIB_TEX6 }, - { "gl_MultiTexCoord7", VERT_ATTRIB_TEX7 }, - { NULL, 0 } + { "gl_Vertex", VERT_ATTRIB_POS, SWIZZLE_NOOP }, + { "gl_Normal", VERT_ATTRIB_NORMAL, SWIZZLE_NOOP }, + { "gl_Color", VERT_ATTRIB_COLOR0, SWIZZLE_NOOP }, + { "gl_SecondaryColor", VERT_ATTRIB_COLOR1, SWIZZLE_NOOP }, + { "gl_FogCoord", VERT_ATTRIB_FOG, SWIZZLE_XXXX }, + { "gl_MultiTexCoord0", VERT_ATTRIB_TEX0, SWIZZLE_NOOP }, + { "gl_MultiTexCoord1", VERT_ATTRIB_TEX1, SWIZZLE_NOOP }, + { "gl_MultiTexCoord2", VERT_ATTRIB_TEX2, SWIZZLE_NOOP }, + { "gl_MultiTexCoord3", VERT_ATTRIB_TEX3, SWIZZLE_NOOP }, + { "gl_MultiTexCoord4", VERT_ATTRIB_TEX4, SWIZZLE_NOOP }, + { "gl_MultiTexCoord5", VERT_ATTRIB_TEX5, SWIZZLE_NOOP }, + { "gl_MultiTexCoord6", VERT_ATTRIB_TEX6, SWIZZLE_NOOP }, + { "gl_MultiTexCoord7", VERT_ATTRIB_TEX7, SWIZZLE_NOOP }, + { NULL, 0, SWIZZLE_NOOP } }; static const struct input_info fragInputs[] = { - { "gl_FragCoord", FRAG_ATTRIB_WPOS }, - { "gl_Color", FRAG_ATTRIB_COL0 }, - { "gl_SecondaryColor", FRAG_ATTRIB_COL1 }, - { "gl_FogFragCoord", FRAG_ATTRIB_FOGC }, - { "gl_TexCoord", FRAG_ATTRIB_TEX0 }, - { NULL, 0 } + { "gl_FragCoord", FRAG_ATTRIB_WPOS, SWIZZLE_NOOP }, + { "gl_Color", FRAG_ATTRIB_COL0, SWIZZLE_NOOP }, + { "gl_SecondaryColor", FRAG_ATTRIB_COL1, SWIZZLE_NOOP }, + { "gl_FogFragCoord", FRAG_ATTRIB_FOGC, SWIZZLE_XXXX }, + { "gl_TexCoord", FRAG_ATTRIB_TEX0, SWIZZLE_NOOP }, + { "gl_FrontFacing", FRAG_ATTRIB_FOGC, SWIZZLE_YYYY }, /*XXX*/ + { NULL, 0, SWIZZLE_NOOP } }; GLuint i; const struct input_info *inputs @@ -248,6 +250,7 @@ _slang_input_index(const char *name, GLenum target) for (i = 0; inputs[i].Name; i++) { if (strcmp(inputs[i].Name, name) == 0) { /* found */ + *swizzleOut = inputs[i].Swizzle; return inputs[i].Attrib; } } @@ -2571,9 +2574,12 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, else { /* pre-defined varying, like gl_Color or gl_TexCoord */ if (type == SLANG_UNIT_FRAGMENT_BUILTIN) { - GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLuint swizzle; + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB, + &swizzle); assert(index >= 0); store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + store->Swizzle = swizzle; assert(index < FRAG_ATTRIB_MAX); } else { @@ -2600,17 +2606,23 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, } else { /* pre-defined vertex attrib */ - GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB); + GLuint swizzle; + GLint index = _slang_input_index(varName, GL_VERTEX_PROGRAM_ARB, + &swizzle); GLint size = 4; /* XXX? */ assert(index >= 0); store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + store->Swizzle = swizzle; } if (dbg) printf("ATTRIB "); } else if (var->type.qualifier == SLANG_QUAL_FIXEDINPUT) { - GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB); + GLuint swizzle; + GLint index = _slang_input_index(varName, GL_FRAGMENT_PROGRAM_ARB, + &swizzle); GLint size = 4; /* XXX? */ store = _slang_new_ir_storage(PROGRAM_INPUT, index, size); + store->Swizzle = swizzle; if (dbg) printf("INPUT "); } else if (var->type.qualifier == SLANG_QUAL_FIXEDOUTPUT) { diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 698925cdba..dbfc1b8c0c 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -113,6 +113,10 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine, /* Setup pointer to input attributes */ machine->Attribs = span->array->attribs; + + /* Store front/back facing value in register FOGC.Y */ + machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) ctx->_Facing; + machine->CurElement = col; /* init condition codes */ diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c index 09244d9c4b..628e9288e8 100644 --- a/src/mesa/swrast_setup/ss_triangle.c +++ b/src/mesa/swrast_setup/ss_triangle.c @@ -290,8 +290,10 @@ void _swsetup_choose_trifuncs( GLcontext *ctx ) ctx->Polygon.OffsetFill) ind |= SS_OFFSET_BIT; + /* Note: gl_FrontFacing lives in fragment input FOGC.Y at this time */ if ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) || - (ctx->VertexProgram._Enabled && ctx->VertexProgram.TwoSideEnabled)) + (ctx->VertexProgram._Enabled && ctx->VertexProgram.TwoSideEnabled) || + (ctx->FragmentProgram._Current && ctx->FragmentProgram._Current->Base.InputsRead & (1 << FRAG_ATTRIB_FOGC))) ind |= SS_TWOSIDE_BIT; /* We piggyback the two-sided stencil front/back determination on the diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index 61c9b2817e..5b14b283f1 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -55,8 +55,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) if (IND & (SS_TWOSIDE_BIT | SS_UNFILLED_BIT)) { facing = (cc < 0.0) ^ ctx->Polygon._FrontBit; - if (ctx->Stencil.TestTwoSide) - ctx->_Facing = facing; /* for 2-sided stencil test */ + ctx->_Facing = facing; if (IND & SS_UNFILLED_BIT) mode = facing ? ctx->Polygon.BackMode : ctx->Polygon.FrontMode; -- cgit v1.2.3 From 1c09bcfdda4083636a3ac27d804a34ef87875ce7 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 11 Mar 2007 17:00:39 -0600 Subject: Implement support for GL_ARB_draw_buffers with GL_MAX_DRAW_BUFFERS > 1. GL_MAX_DRAW_BUFFERS is currently 4. Added gl_FragData[] output for fragment programs. In _swrast_write_rgba_span() loop over the color outputs/renderbuffers. --- src/mesa/main/config.h | 2 +- src/mesa/main/mtypes.h | 3 +- src/mesa/shader/slang/slang_codegen.c | 1 + src/mesa/swrast/s_context.c | 41 +++++++++ src/mesa/swrast/s_context.h | 4 + src/mesa/swrast/s_fragprog.c | 24 +++++- src/mesa/swrast/s_span.c | 152 ++++++++++++++++++---------------- 7 files changed, 152 insertions(+), 75 deletions(-) (limited to 'src') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 00df084fc8..8ea2d2c615 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -216,7 +216,7 @@ /** For GL_ARB_draw_buffers */ /*@{*/ -#define MAX_DRAW_BUFFERS 1 +#define MAX_DRAW_BUFFERS 4 /*@}*/ diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b08e77ea88..25a5a3cc36 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -306,7 +306,8 @@ enum FRAG_RESULT_COLR = 0, FRAG_RESULT_COLH = 1, FRAG_RESULT_DEPR = 2, - FRAG_RESULT_MAX = 3 + FRAG_RESULT_DATA0 = 3, + FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS) }; diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 640b87a34d..88a4b2d657 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -284,6 +284,7 @@ _slang_output_index(const char *name, GLenum target) static const struct output_info fragOutputs[] = { { "gl_FragColor", FRAG_RESULT_COLR }, { "gl_FragDepth", FRAG_RESULT_DEPR }, + { "gl_FragData", FRAG_RESULT_DATA0 }, { NULL, 0 } }; GLuint i; diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 8864c217a5..00702b4301 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -548,6 +548,44 @@ _swrast_update_fragment_attribs(GLcontext *ctx) } +/** + * Update the swrast->_ColorOutputsMask which indicates which color + * renderbuffers (aka rendertargets) are being written to by the current + * fragment program. + * We also take glDrawBuffers() into account to skip outputs that are + * set to GL_NONE. + */ +static void +_swrast_update_color_outputs(GLcontext *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + const struct gl_framebuffer *fb = ctx->DrawBuffer; + + swrast->_ColorOutputsMask = 0; + swrast->_NumColorOutputs = 0; + + if (ctx->FragmentProgram._Current) { + const GLbitfield outputsWritten + = ctx->FragmentProgram._Current->Base.OutputsWritten; + GLuint output; + for (output = 0; output < ctx->Const.MaxDrawBuffers; output++) { + if ((outputsWritten & (1 << (FRAG_RESULT_DATA0 + output))) + && (fb->_NumColorDrawBuffers[output] > 0)) { + swrast->_ColorOutputsMask |= (1 << output); + swrast->_NumColorOutputs = output + 1; + } + } + } + if (swrast->_ColorOutputsMask == 0x0) { + /* no fragment program, or frag prog didn't write to gl_FragData[] */ + if (fb->_NumColorDrawBuffers[0] > 0) { + swrast->_ColorOutputsMask = 0x1; + swrast->_NumColorOutputs = 1; + } + } +} + + void _swrast_validate_derived( GLcontext *ctx ) { @@ -594,6 +632,9 @@ _swrast_validate_derived( GLcontext *ctx ) _NEW_TEXTURE)) _swrast_update_fragment_attribs(ctx); + if (swrast->NewState & (_NEW_PROGRAM | _NEW_BUFFERS)) + _swrast_update_color_outputs(ctx); + swrast->NewState = 0; swrast->StateChanges = 0; swrast->InvalidateState = _swrast_invalidate_state; diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index a3f61cd5e5..3a9a48922e 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -133,6 +133,10 @@ typedef struct GLboolean _FogEnabled; GLenum _FogMode; /* either GL_FOG_MODE or fragment program's fog mode */ + /** Multiple render targets */ + GLbitfield _ColorOutputsMask; + GLuint _NumColorOutputs; + /** Fragment attributes to compute during rasterization. * Mask of FRAG_BIT_* flags. */ diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index dbfc1b8c0c..7260759306 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -139,7 +139,9 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine, static void run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) { + SWcontext *swrast = SWRAST_CONTEXT(ctx); const struct gl_fragment_program *program = ctx->FragmentProgram._Current; + const GLbitfield outputsWritten = program->Base.OutputsWritten; struct gl_program_machine machine; GLuint i; @@ -148,12 +150,28 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end) init_machine(ctx, &machine, program, span, i); if (_mesa_execute_program(ctx, &program->Base, &machine)) { + /* Store result color */ - COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], - machine.Outputs[FRAG_RESULT_COLR]); + if (outputsWritten & (1 << FRAG_RESULT_COLR)) { + COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i], + machine.Outputs[FRAG_RESULT_COLR]); + } + else { + /* Multiple drawbuffers / render targets + * Note that colors beyond 0 and 1 will overwrite other + * attributes, such as FOGC, TEX0, TEX1, etc. That's OK. + */ + GLuint output; + for (output = 0; output < swrast->_NumColorOutputs; output++) { + if (outputsWritten & (1 << (FRAG_RESULT_DATA0 + output))) { + COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0+output][i], + machine.Outputs[FRAG_RESULT_DATA0 + output]); + } + } + } /* Store result depth/z */ - if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { + if (outputsWritten & (1 << FRAG_RESULT_DEPR)) { const GLfloat depth = machine.Outputs[FRAG_RESULT_DEPR][2]; if (depth <= 0.0) span->array->z[i] = 0; diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index a2044d0042..f9f0a1f813 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1215,24 +1215,31 @@ clamp_colors(SWspan *span) /** * Convert the span's color arrays to the given type. + * The only way 'output' can be greater than one is when we have a fragment + * program that writes to gl_FragData[1] or higher. + * \param output which fragment program color output is being processed */ static INLINE void -convert_color_type(SWspan *span, GLenum newType) +convert_color_type(SWspan *span, GLenum newType, GLuint output) { GLvoid *src, *dst; - if (span->array->ChanType == GL_UNSIGNED_BYTE) { - src = span->array->color.sz1.rgba; + + if (output > 0 || span->array->ChanType == GL_FLOAT) { + src = span->array->attribs[FRAG_ATTRIB_COL0 + output]; + span->array->ChanType = GL_FLOAT; } else if (span->array->ChanType == GL_UNSIGNED_BYTE) { - src = span->array->color.sz2.rgba; + src = span->array->color.sz1.rgba; } else { - src = span->array->attribs[FRAG_ATTRIB_COL0]; + ASSERT(span->array->ChanType == GL_UNSIGNED_SHORT); + src = span->array->color.sz2.rgba; } + if (newType == GL_UNSIGNED_BYTE) { dst = span->array->color.sz1.rgba; } - else if (newType == GL_UNSIGNED_BYTE) { + else if (newType == GL_UNSIGNED_SHORT) { dst = span->array->color.sz2.rgba; } else { @@ -1329,6 +1336,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) const GLboolean shader = (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled); const GLboolean shaderOrTexture = shader || ctx->Texture._EnabledUnits; + struct gl_framebuffer *fb = ctx->DrawBuffer; + GLuint output; GLboolean deferredTexture; /* @@ -1393,10 +1402,10 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) GLuint i; for (i = 0; i < span->end; i++) { if (span->array->mask[i]) { - assert(span->array->x[i] >= ctx->DrawBuffer->_Xmin); - assert(span->array->x[i] < ctx->DrawBuffer->_Xmax); - assert(span->array->y[i] >= ctx->DrawBuffer->_Ymin); - assert(span->array->y[i] < ctx->DrawBuffer->_Ymax); + assert(span->array->x[i] >= fb->_Xmin); + assert(span->array->x[i] < fb->_Xmax); + assert(span->array->y[i] >= fb->_Ymin); + assert(span->array->y[i] < fb->_Ymax); } } } @@ -1428,13 +1437,13 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (span->interpMask & SPAN_Z) _swrast_span_interpolate_z(ctx, span); - if (ctx->Stencil.Enabled && ctx->DrawBuffer->Visual.stencilBits > 0) { + if (ctx->Stencil.Enabled && fb->Visual.stencilBits > 0) { /* Combined Z/stencil tests */ if (!_swrast_stencil_and_ztest_span(ctx, span)) { goto end; } } - else if (ctx->DrawBuffer->Visual.depthBits > 0) { + else if (fb->Visual.depthBits > 0) { /* Just regular depth testing */ ASSERT(ctx->Depth.Test); ASSERT(span->arrayMask & SPAN_Z); @@ -1514,64 +1523,67 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) /* * Write to renderbuffers */ - { - struct gl_framebuffer *fb = ctx->DrawBuffer; - const GLuint output = 0; /* only frag progs can write to other outputs */ - const GLuint numDrawBuffers = fb->_NumColorDrawBuffers[output]; - GLchan rgbaSave[MAX_WIDTH][4]; - GLuint buf; - - if (numDrawBuffers > 0) { - if (fb->_ColorDrawBuffers[output][0]->DataType - != span->array->ChanType) { - convert_color_type(span, - fb->_ColorDrawBuffers[output][0]->DataType); - } - } - - if (numDrawBuffers > 1) { - /* save colors for second, third renderbuffer writes */ - _mesa_memcpy(rgbaSave, span->array->rgba, - 4 * span->end * sizeof(GLchan)); - } - - for (buf = 0; buf < numDrawBuffers; buf++) { - struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[output][buf]; - ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB); - - if (ctx->Color._LogicOpEnabled) { - _swrast_logicop_rgba_span(ctx, rb, span); - } - else if (ctx->Color.BlendEnabled) { - _swrast_blend_span(ctx, rb, span); - } - - if (colorMask != 0xffffffff) { - _swrast_mask_rgba_span(ctx, rb, span); - } - - if (span->arrayMask & SPAN_XY) { - /* array of pixel coords */ - ASSERT(rb->PutValues); - rb->PutValues(ctx, rb, span->end, - span->array->x, span->array->y, - span->array->rgba, span->array->mask); - } - else { - /* horizontal run of pixels */ - ASSERT(rb->PutRow); - rb->PutRow(ctx, rb, span->end, span->x, span->y, span->array->rgba, - span->writeAll ? NULL: span->array->mask); - } - - if (buf + 1 < numDrawBuffers) { - /* restore original span values */ - _mesa_memcpy(span->array->rgba, rgbaSave, - 4 * span->end * sizeof(GLchan)); - } - } /* for buf */ - - } + /* Loop over color outputs (GL_ARB_draw_buffers) written by frag prog */ + for (output = 0; output < swrast->_NumColorOutputs; output++) { + if (swrast->_ColorOutputsMask & (1 << output)) { + const GLuint numDrawBuffers = fb->_NumColorDrawBuffers[output]; + GLchan rgbaSave[MAX_WIDTH][4]; + GLuint buf; + + ASSERT(numDrawBuffers > 0); + + if (fb->_ColorDrawBuffers[output][0]->DataType + != span->array->ChanType || output > 0) { + convert_color_type(span, + fb->_ColorDrawBuffers[output][0]->DataType, + output); + } + + if (numDrawBuffers > 1) { + /* save colors for second, third renderbuffer writes */ + _mesa_memcpy(rgbaSave, span->array->rgba, + 4 * span->end * sizeof(GLchan)); + } + + /* Loop over renderbuffers (i.e. GL_FRONT_AND_BACK) */ + for (buf = 0; buf < numDrawBuffers; buf++) { + struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[output][buf]; + ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB); + + if (ctx->Color._LogicOpEnabled) { + _swrast_logicop_rgba_span(ctx, rb, span); + } + else if (ctx->Color.BlendEnabled) { + _swrast_blend_span(ctx, rb, span); + } + + if (colorMask != 0xffffffff) { + _swrast_mask_rgba_span(ctx, rb, span); + } + + if (span->arrayMask & SPAN_XY) { + /* array of pixel coords */ + ASSERT(rb->PutValues); + rb->PutValues(ctx, rb, span->end, + span->array->x, span->array->y, + span->array->rgba, span->array->mask); + } + else { + /* horizontal run of pixels */ + ASSERT(rb->PutRow); + rb->PutRow(ctx, rb, span->end, span->x, span->y, + span->array->rgba, + span->writeAll ? NULL: span->array->mask); + } + + if (buf + 1 < numDrawBuffers) { + /* restore original span values */ + _mesa_memcpy(span->array->rgba, rgbaSave, + 4 * span->end * sizeof(GLchan)); + } + } /* for buf */ + } /* if output is written to */ + } /* for output */ end: /* restore these values before returning */ -- cgit v1.2.3 From 15aa7aaa9327f528d1edc47d76fcc92e32bf001e Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 11 Mar 2007 17:29:54 -0600 Subject: add NULL ptr check --- src/mesa/shader/slang/slang_codegen.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 88a4b2d657..7b2ca3a437 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1985,12 +1985,15 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) else { slang_ir_node *n, *lhs, *rhs; lhs = _slang_gen_operation(A, &oper->children[0]); - if (lhs->Store->File != PROGRAM_OUTPUT && - lhs->Store->File != PROGRAM_TEMPORARY && - lhs->Store->File != PROGRAM_VARYING && - lhs->Store->File != PROGRAM_UNDEFINED) { - slang_info_log_error(A->log, "Assignment to read-only variable"); - return NULL; + + if (lhs) { + if (lhs->Store->File != PROGRAM_OUTPUT && + lhs->Store->File != PROGRAM_TEMPORARY && + lhs->Store->File != PROGRAM_VARYING && + lhs->Store->File != PROGRAM_UNDEFINED) { + slang_info_log_error(A->log, "Assignment to read-only variable"); + return NULL; + } } rhs = _slang_gen_operation(A, &oper->children[1]); -- cgit v1.2.3 From 8946d7f02938f20f3da46f6a8f7f1196afc271be Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 12 Mar 2007 10:52:52 -0600 Subject: Add array bounds checking, fix memleaks, add null ptr checks. --- src/mesa/shader/slang/slang_codegen.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 7b2ca3a437..e972da459b 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -276,7 +276,7 @@ _slang_output_index(const char *name, GLenum target) { "gl_BackColor", VERT_RESULT_BFC0 }, { "gl_FrontSecondaryColor", VERT_RESULT_COL1 }, { "gl_BackSecondaryColor", VERT_RESULT_BFC1 }, - { "gl_TexCoord", VERT_RESULT_TEX0 }, /* XXX indexed */ + { "gl_TexCoord", VERT_RESULT_TEX0 }, { "gl_FogFragCoord", VERT_RESULT_FOGC }, { "gl_PointSize", VERT_RESULT_PSIZ }, { NULL, 0 } @@ -1953,6 +1953,7 @@ static slang_ir_node * _slang_gen_swizzle(slang_ir_node *child, GLuint swizzle) { slang_ir_node *n = new_node1(IR_SWIZZLE, child); + assert(child); if (n) { n->Store = _slang_new_ir_storage(PROGRAM_UNDEFINED, -1, -1); n->Store->Swizzle = swizzle; @@ -2045,7 +2046,8 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) n = _slang_gen_operation(A, &oper->children[0]); /* create new parent node with swizzle */ - n = _slang_gen_swizzle(n, swizzle); + if (n) + n = _slang_gen_swizzle(n, swizzle); return n; } else if (ti.spec.type == SLANG_SPEC_FLOAT) { @@ -2138,21 +2140,42 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) /* conventional array */ slang_typeinfo elem_ti; slang_ir_node *elem, *array, *index; - GLint elemSize; + GLint elemSize, arrayLen; /* size of array element */ slang_typeinfo_construct(&elem_ti); _slang_typeof_operation(A, oper, &elem_ti); elemSize = _slang_sizeof_type_specifier(&elem_ti.spec); + + if (_slang_type_is_matrix(array_ti.spec.type)) + arrayLen = _slang_type_dim(array_ti.spec.type); + else + arrayLen = array_ti.array_len; + + slang_typeinfo_destruct(&array_ti); + slang_typeinfo_destruct(&elem_ti); + if (elemSize <= 0) { /* unknown var or type */ - slang_info_log_error(A->log, "Undefined var or type"); + slang_info_log_error(A->log, "Undefined variable or type"); return NULL; } array = _slang_gen_operation(A, &oper->children[0]); index = _slang_gen_operation(A, &oper->children[1]); if (array && index) { + /* bounds check */ + if (index->Opcode == IR_FLOAT && + ((int) index->Value[0] < 0 || + (int) index->Value[0] >= arrayLen)) { + slang_info_log_error(A->log, + "Array index out of bounds (index=%d size=%d)", + (int) index->Value[0], arrayLen); + _slang_free_ir_tree(array); + _slang_free_ir_tree(index); + return NULL; + } + elem = new_node2(IR_ELEMENT, array, index); elem->Store = _slang_new_ir_storage(array->Store->File, array->Store->Index, @@ -2161,6 +2184,8 @@ _slang_gen_subscript(slang_assemble_ctx * A, slang_operation *oper) return elem; } else { + _slang_free_ir_tree(array); + _slang_free_ir_tree(index); return NULL; } } -- cgit v1.2.3 From b3a22d0ed61afa9df4d3a02962884d49bc5760a4 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 12 Mar 2007 17:29:50 -0600 Subject: Implement GL_ARB_texture_rectangle support This includes the sampler2DRect and sampler2DRectShadow types and the texture2DRect(), texture2DRectProj(), etc. built-in functions. --- .../shader/slang/library/slang_common_builtin_gc.h | 38 +++++++-------- .../shader/slang/library/slang_fragment_builtin.gc | 43 +++++++++++++++++ .../slang/library/slang_fragment_builtin_gc.h | 54 ++++++++++++++-------- src/mesa/shader/slang/library/slang_shader.syn | 10 +++- src/mesa/shader/slang/library/slang_shader_syn.h | 8 +++- src/mesa/shader/slang/slang_codegen.c | 10 ++++ src/mesa/shader/slang/slang_compile.c | 12 ++++- src/mesa/shader/slang/slang_compile_variable.c | 2 + src/mesa/shader/slang/slang_print.c | 4 ++ src/mesa/shader/slang/slang_storage.c | 2 + src/mesa/shader/slang/slang_typeinfo.h | 2 + 11 files changed, 141 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 0bf1371c0b..417f1fce86 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -41,25 +41,25 @@ 73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84,101, 120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115, 101,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,9,1, -103,108,95,78,111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,0,22,103,108,95,68,101,112,116,104,82, +103,108,95,78,111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,0,24,103,108,95,68,101,112,116,104,82, 97,110,103,101,80,97,114,97,109,101,116,101,114,115,0,9,110,101,97,114,0,0,0,1,9,102,97,114,0,0,0, -1,9,100,105,102,102,0,0,0,0,0,0,2,2,4,23,103,108,95,68,101,112,116,104,82,97,110,103,101,80,97,114, +1,9,100,105,102,102,0,0,0,0,0,0,2,2,4,25,103,108,95,68,101,112,116,104,82,97,110,103,101,80,97,114, 97,109,101,116,101,114,115,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101,0,0,0,2,2,4,12,1, 103,108,95,67,108,105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120,67,108,105,112,80,108,97, -110,101,115,0,0,0,2,2,0,22,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,9, +110,101,115,0,0,0,2,2,0,24,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,9, 115,105,122,101,0,0,0,1,9,115,105,122,101,77,105,110,0,0,0,1,9,115,105,122,101,77,97,120,0,0,0,1,9, 102,97,100,101,84,104,114,101,115,104,111,108,100,83,105,122,101,0,0,0,1,9,100,105,115,116,97,110, 99,101,67,111,110,115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105, 115,116,97,110,99,101,76,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9, 100,105,115,116,97,110,99,101,81,117,97,100,114,97,116,105,99,65,116,116,101,110,117,97,116,105, -111,110,0,0,0,0,0,0,2,2,4,23,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0, -1,103,108,95,80,111,105,110,116,0,0,0,2,2,0,22,103,108,95,77,97,116,101,114,105,97,108,80,97,114, +111,110,0,0,0,0,0,0,2,2,4,25,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0, +1,103,108,95,80,111,105,110,116,0,0,0,2,2,0,24,103,108,95,77,97,116,101,114,105,97,108,80,97,114, 97,109,101,116,101,114,115,0,12,101,109,105,115,115,105,111,110,0,0,0,1,12,97,109,98,105,101,110, 116,0,0,0,1,12,100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,9,115, -104,105,110,105,110,101,115,115,0,0,0,0,0,0,2,2,4,23,103,108,95,77,97,116,101,114,105,97,108,80,97, +104,105,110,105,110,101,115,115,0,0,0,0,0,0,2,2,4,25,103,108,95,77,97,116,101,114,105,97,108,80,97, 114,97,109,101,116,101,114,115,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0, -0,2,2,4,23,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,1,103, -108,95,66,97,99,107,77,97,116,101,114,105,97,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,83, +0,2,2,4,25,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,1,103, +108,95,66,97,99,107,77,97,116,101,114,105,97,108,0,0,0,2,2,0,24,103,108,95,76,105,103,104,116,83, 111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12, 100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,12,112,111,115,105, 116,105,111,110,0,0,0,1,12,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,115,112,111,116,68,105, @@ -67,22 +67,22 @@ 112,111,116,67,117,116,111,102,102,0,0,0,1,9,115,112,111,116,67,111,115,67,117,116,111,102,102,0,0, 0,1,9,99,111,110,115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,108,105, 110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,113,117,97,100,114,97,116,105, -99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,83, +99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,2,2,4,25,103,108,95,76,105,103,104,116,83, 111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,76,105,103,104,116,83,111, -117,114,99,101,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,0,22,103,108,95,76,105, +117,114,99,101,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,0,24,103,108,95,76,105, 103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116, -0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101, -114,115,0,1,103,108,95,76,105,103,104,116,77,111,100,101,108,0,0,0,2,2,0,22,103,108,95,76,105,103, +0,0,0,0,0,0,2,2,4,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101, +114,115,0,1,103,108,95,76,105,103,104,116,77,111,100,101,108,0,0,0,2,2,0,24,103,108,95,76,105,103, 104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,12,115,99,101,110,101,67,111,108,111, -114,0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99, +114,0,0,0,0,0,0,2,2,4,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99, 116,115,0,1,103,108,95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117, -99,116,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116, +99,116,0,0,0,2,2,4,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116, 115,0,1,103,108,95,66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0, -0,0,2,2,0,22,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,97,109,98,105,101, +0,0,2,2,0,24,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,97,109,98,105,101, 110,116,0,0,0,1,12,100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,0,0, -0,2,2,4,23,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,70,114,111, +0,2,2,4,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,70,114,111, 110,116,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104, -116,115,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95, +116,115,0,0,0,2,2,4,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95, 66,97,99,107,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103, 104,116,115,0,0,0,2,2,4,12,1,103,108,95,84,101,120,116,117,114,101,69,110,118,67,111,108,111,114,0, 3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,0,0,2, @@ -97,9 +97,9 @@ 120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99, 116,80,108,97,110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100, 115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18,103,108,95,77,97, -120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,0,22,103,108,95,70,111,103,80,97, +120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,0,24,103,108,95,70,111,103,80,97, 114,97,109,101,116,101,114,115,0,12,99,111,108,111,114,0,0,0,1,9,100,101,110,115,105,116,121,0,0,0, -1,9,115,116,97,114,116,0,0,0,1,9,101,110,100,0,0,0,1,9,115,99,97,108,101,0,0,0,0,0,0,2,2,4,23,103, +1,9,115,116,97,114,116,0,0,0,1,9,101,110,100,0,0,0,1,9,115,99,97,108,101,0,0,0,0,0,0,2,2,4,25,103, 108,95,70,111,103,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,70,111,103,0,0,0,1,0,9,0,114, 97,100,105,97,110,115,0,1,1,0,9,100,101,103,0,0,0,1,3,2,1,9,1,99,0,2,17,51,0,49,52,49,53,57,50,54, 0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/src/mesa/shader/slang/library/slang_fragment_builtin.gc index 40b1207ca8..9a7e17bdaf 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin.gc +++ b/src/mesa/shader/slang/library/slang_fragment_builtin.gc @@ -68,6 +68,8 @@ vec4 texture1DProj(const sampler1D sampler, const vec4 coord, const float bias) } + + vec4 texture2D(const sampler2D sampler, const vec2 coord, const float bias) { vec4 coord4; @@ -95,6 +97,8 @@ vec4 texture2DProj(const sampler2D sampler, const vec4 coord, const float bias) } + + vec4 texture3D(const sampler3D sampler, const vec3 coord, const float bias) { vec4 coord4; @@ -113,6 +117,8 @@ vec4 texture3DProj(const sampler3D sampler, const vec4 coord, const float bias) } + + vec4 textureCube(const samplerCube sampler, const vec3 coord, const float bias) { vec4 coord4; @@ -122,6 +128,8 @@ vec4 textureCube(const samplerCube sampler, const vec3 coord, const float bias) } + + // For shadow textures, we use the regular tex instructions since they should // do the depth comparison step. @@ -142,6 +150,9 @@ vec4 shadow1DProj(const sampler1DShadow sampler, const vec4 coord, const float b __asm vec4_texb1d __retVal, sampler, pcoord; } + + + vec4 shadow2D(const sampler2DShadow sampler, const vec3 coord, const float bias) { vec4 coord4; @@ -161,6 +172,38 @@ vec4 shadow2DProj(const sampler2DShadow sampler, const vec4 coord, const float b +//// GL_ARB_texture_rectangle: +vec4 texture2DRect(const sampler2DRect sampler, const vec2 coord) +{ + __asm vec4_tex_rect __retVal, sampler, coord; +} + +vec4 texture2DRectProj(const sampler2DRect sampler, const vec3 coord) +{ + // do projection here + vec4 pcoord; + pcoord.xy = coord.xy / coord.z; + __asm vec4_texp_rect __retVal, sampler, pcoord; +} + +vec4 texture2DRectProj(const sampler2DRect sampler, const vec4 coord) +{ + // do projection here + vec4 pcoord; + pcoord.xy = coord.xy / coord.w; + __asm vec4_texp_rect __retVal, sampler, pcoord; +} + +vec4 shadow2DRect(const sampler2DRectShadow sampler, const vec3 coord) +{ +// XXX to do +} + +vec4 shadow2DRectProj(const sampler2DRectShadow sampler, const vec4 coord) +{ +// XXX to do +} + // diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h index 8b8202ea2f..88317107b2 100644 --- a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h @@ -77,23 +77,39 @@ 121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111, 111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118, 101,99,52,95,116,101,120,98,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,9,0,100,70,100,120,0,1,1,0,9,112,0,0,0,1,4,118,101, -99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0, -0,0,1,0,10,0,100,70,100,120,0,1,1,0,10,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,112,0,59,120,121,121,121,0,0,0,0,1,0,11,0,100,70,100,120,0,1, -1,0,11,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,112,0,59,120,121,122,122,0,0,0,0,1,0,12,0,100,70,100,120,0,1,1,0,12,112,0,0,0,1,4,118, -101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,0,9,0,100,70,100, -121,0,1,1,0,9,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,0,10,0,100,70,100,121,0,1,1,0,10,112,0,0,0,1,4,118,101, -99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,59,120,121,121,121, -0,0,0,0,1,0,11,0,100,70,100,121,0,1,1,0,11,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95, +114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,82,101,99,116, +0,1,1,0,22,115,97,109,112,108,101,114,0,0,1,1,0,10,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, +116,101,120,95,114,101,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0, +0,18,99,111,111,114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,82,101,99,116,80,114, +111,106,0,1,1,0,22,115,97,109,112,108,101,114,0,0,1,1,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1, +112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, +120,121,0,18,99,111,111,114,100,0,59,122,0,49,20,0,4,118,101,99,52,95,116,101,120,112,95,114,101, +99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111, +114,100,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,82,101,99,116,80,114,111,106,0,1,1,0,22, +115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,3,2,0,12,1,112,99,111,111,114, +100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99, +111,111,114,100,0,59,119,0,49,20,0,4,118,101,99,52,95,116,101,120,112,95,114,101,99,116,0,18,95,95, +114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,0, +12,0,115,104,97,100,111,119,50,68,82,101,99,116,0,1,1,0,23,115,97,109,112,108,101,114,0,0,1,1,0,11, +99,111,111,114,100,0,0,0,1,0,1,0,12,0,115,104,97,100,111,119,50,68,82,101,99,116,80,114,111,106,0, +1,1,0,23,115,97,109,112,108,101,114,0,0,1,1,0,12,99,111,111,114,100,0,0,0,1,0,1,0,9,0,100,70,100, +120,0,1,1,0,9,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120, +0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,0,10,0,100,70,100,120,0,1,1,0,10,112,0,0,0,1,4,118,101, +99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,59,120,121,121,121, +0,0,0,0,1,0,11,0,100,70,100,120,0,1,1,0,11,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95, 114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,59,120,121,122,122,0,0,0,0,1,0,12,0,100,70,100, -121,0,1,1,0,12,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,0,18, -112,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,1,0,9,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100, -120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,10,0,102,119, -105,100,116,104,0,1,1,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97, -98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,119,105,100,116,104,0,1,1,0,11, -112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121, -0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,1,0,12,112,0,0,0,1,8,58,97,98,115,0, -58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,0 +120,0,1,1,0,12,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,0,18, +112,0,0,0,0,1,0,9,0,100,70,100,121,0,1,1,0,9,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95, +114,101,116,86,97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,0,10,0,100,70,100,121,0,1, +1,0,10,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, +0,18,112,0,59,120,121,121,121,0,0,0,0,1,0,11,0,100,70,100,121,0,1,1,0,11,112,0,0,0,1,4,118,101,99, +52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,59,120,121,122, +122,0,0,0,0,1,0,12,0,100,70,100,121,0,1,1,0,12,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95, +95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,1,0,9,112,0,0,0,1, +8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0, +0,0,0,0,46,0,0,1,0,10,0,102,119,105,100,116,104,0,1,1,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70, +100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102, +119,105,100,116,104,0,1,1,0,11,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0, +58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,1, +0,12,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70, +100,121,0,18,112,0,0,0,0,0,46,0,0,0 diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn index bfa6793f06..9389869da2 100644 --- a/src/mesa/shader/slang/library/slang_shader.syn +++ b/src/mesa/shader/slang/library/slang_shader.syn @@ -139,8 +139,10 @@ .emtcode TYPE_SPECIFIER_SAMPLERCUBE 19 .emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20 .emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21 -.emtcode TYPE_SPECIFIER_STRUCT 22 -.emtcode TYPE_SPECIFIER_TYPENAME 23 +.emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22 +.emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23 +.emtcode TYPE_SPECIFIER_STRUCT 24 +.emtcode TYPE_SPECIFIER_TYPENAME 25 /* structure field */ .emtcode FIELD_NONE 0 @@ -884,6 +886,8 @@ type_qualifier | "samplerCube" | "sampler1DShadow" | "sampler2DShadow" + | "sampler2DRect" + | "sampler2DRectShadow" | | */ @@ -910,6 +914,8 @@ type_specifier_space "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or + "sampler2DRect" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or + "sampler2DRectShadow" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or type_name .emit TYPE_SPECIFIER_TYPENAME; type_specifier_nospace struct_specifier .emit TYPE_SPECIFIER_STRUCT; diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h index 58cf1b1390..4863feda5b 100644 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ b/src/mesa/shader/slang/library/slang_shader_syn.h @@ -63,8 +63,10 @@ ".emtcode TYPE_SPECIFIER_SAMPLERCUBE 19\n" ".emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20\n" ".emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21\n" -".emtcode TYPE_SPECIFIER_STRUCT 22\n" -".emtcode TYPE_SPECIFIER_TYPENAME 23\n" +".emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22\n" +".emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23\n" +".emtcode TYPE_SPECIFIER_STRUCT 24\n" +".emtcode TYPE_SPECIFIER_TYPENAME 25\n" ".emtcode FIELD_NONE 0\n" ".emtcode FIELD_NEXT 1\n" ".emtcode FIELD_ARRAY 2\n" @@ -435,6 +437,8 @@ " \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n" " \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n" " \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n" +" \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n" +" \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or\n" " type_name .emit TYPE_SPECIFIER_TYPENAME;\n" "type_specifier_nospace\n" " struct_specifier .emit TYPE_SPECIFIER_STRUCT;\n" diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index e972da459b..e91e0446ad 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -69,6 +69,8 @@ is_sampler_type(const slang_fully_specified_type *t) case SLANG_SPEC_SAMPLERCUBE: case SLANG_SPEC_SAMPLER1DSHADOW: case SLANG_SPEC_SAMPLER2DSHADOW: + case SLANG_SPEC_SAMPLER2DRECT: + case SLANG_SPEC_SAMPLER2DRECTSHADOW: return GL_TRUE; default: return GL_FALSE; @@ -118,6 +120,8 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) case SLANG_SPEC_SAMPLERCUBE: case SLANG_SPEC_SAMPLER1DSHADOW: case SLANG_SPEC_SAMPLER2DSHADOW: + case SLANG_SPEC_SAMPLER2DRECT: + case SLANG_SPEC_SAMPLER2DRECTSHADOW: return 1; /* special case */ case SLANG_SPEC_STRUCT: { @@ -196,6 +200,10 @@ sampler_to_texture_index(const slang_type_specifier_type type) return TEXTURE_1D_INDEX; /* XXX fix */ case SLANG_SPEC_SAMPLER2DSHADOW: return TEXTURE_2D_INDEX; /* XXX fix */ + case SLANG_SPEC_SAMPLER2DRECT: + return TEXTURE_RECT_INDEX; + case SLANG_SPEC_SAMPLER2DRECTSHADOW: + return TEXTURE_RECT_INDEX; /* XXX fix */ default: return -1; } @@ -357,6 +365,8 @@ static slang_asm_info AsmInfo[] = { { "vec4_texb3d", IR_TEXB, 1, 2 }, /* 3d w/ bias */ { "vec4_texp3d", IR_TEXP, 1, 2 }, /* 3d w/ projection */ { "vec4_texcube", IR_TEX, 1, 2 }, /* cubemap */ + { "vec4_tex_rect", IR_TEX, 1, 2 }, /* rectangle */ + { "vec4_texp_rect", IR_TEX, 1, 2 },/* rectangle w/ projection */ /* unary op */ { "int_to_float", IR_I_TO_F, 1, 1 }, diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index e183752025..619b0de0d0 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -487,8 +487,10 @@ parse_type_qualifier(slang_parse_ctx * C, slang_type_qualifier * qual) #define TYPE_SPECIFIER_SAMPLERCUBE 19 #define TYPE_SPECIFIER_SAMPLER1DSHADOW 20 #define TYPE_SPECIFIER_SAMPLER2DSHADOW 21 -#define TYPE_SPECIFIER_STRUCT 22 -#define TYPE_SPECIFIER_TYPENAME 23 +#define TYPE_SPECIFIER_SAMPLER2DRECT 22 +#define TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23 +#define TYPE_SPECIFIER_STRUCT 24 +#define TYPE_SPECIFIER_TYPENAME 25 static int parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O, @@ -555,12 +557,18 @@ parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O, case TYPE_SPECIFIER_SAMPLERCUBE: spec->type = SLANG_SPEC_SAMPLERCUBE; break; + case TYPE_SPECIFIER_SAMPLER2DRECT: + spec->type = SLANG_SPEC_SAMPLER2DRECT; + break; case TYPE_SPECIFIER_SAMPLER1DSHADOW: spec->type = SLANG_SPEC_SAMPLER1DSHADOW; break; case TYPE_SPECIFIER_SAMPLER2DSHADOW: spec->type = SLANG_SPEC_SAMPLER2DSHADOW; break; + case TYPE_SPECIFIER_SAMPLER2DRECTSHADOW: + spec->type = SLANG_SPEC_SAMPLER2DRECTSHADOW; + break; case TYPE_SPECIFIER_STRUCT: spec->type = SLANG_SPEC_STRUCT; if (!parse_struct(C, O, &spec->_struct)) diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 09ca736c20..ae37aed514 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -62,6 +62,8 @@ static const type_specifier_type_name type_specifier_type_names[] = { {"samplerCube", SLANG_SPEC_SAMPLERCUBE}, {"sampler1DShadow", SLANG_SPEC_SAMPLER1DSHADOW}, {"sampler2DShadow", SLANG_SPEC_SAMPLER2DSHADOW}, + {"sampler2DRect", SLANG_SPEC_SAMPLER2DRECT}, + {"sampler2DRectShadow", SLANG_SPEC_SAMPLER2DRECTSHADOW}, {NULL, SLANG_SPEC_VOID} }; diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index a2f3691ddb..c377759bea 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -709,6 +709,10 @@ slang_type_string(slang_type_specifier_type t) return "sampler1DShadow"; case SLANG_SPEC_SAMPLER2DSHADOW: return "sampler2DShadow"; + case SLANG_SPEC_SAMPLER2DRECT: + return "sampler2DRect"; + case SLANG_SPEC_SAMPLER2DRECTSHADOW: + return "sampler2DRectShadow"; case SLANG_SPEC_STRUCT: return "struct"; case SLANG_SPEC_ARRAY: diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 74aff01aad..04995aa842 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -191,6 +191,8 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, case SLANG_SPEC_SAMPLERCUBE: case SLANG_SPEC_SAMPLER1DSHADOW: case SLANG_SPEC_SAMPLER2DSHADOW: + case SLANG_SPEC_SAMPLER2DRECT: + case SLANG_SPEC_SAMPLER2DRECTSHADOW: return aggregate_vector(agg, SLANG_STORE_INT, 1); case SLANG_SPEC_STRUCT: return aggregate_variables(agg, spec->_struct->fields, funcs, structs, diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index bde2e67ae2..f1c9a635b8 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -111,8 +111,10 @@ typedef enum slang_type_specifier_type_ SLANG_SPEC_SAMPLER2D, SLANG_SPEC_SAMPLER3D, SLANG_SPEC_SAMPLERCUBE, + SLANG_SPEC_SAMPLER2DRECT, SLANG_SPEC_SAMPLER1DSHADOW, SLANG_SPEC_SAMPLER2DSHADOW, + SLANG_SPEC_SAMPLER2DRECTSHADOW, SLANG_SPEC_STRUCT, SLANG_SPEC_ARRAY } slang_type_specifier_type; -- cgit v1.2.3 From 7265e6928e873312d53eba4c24fcd3002e806831 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 10:28:26 -0600 Subject: properly compute ctx->Texture._EnabledCoordUnits --- src/mesa/main/texstate.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 7be3a44d59..bed2c1220a 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.1 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -41,8 +41,6 @@ #include "texenvprogram.h" #include "mtypes.h" #include "math/m_xform.h" -/*#include "shaderobjects.h"*/ - #define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X)) @@ -3076,16 +3074,14 @@ update_texture_state( GLcontext *ctx ) ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit); } - /* XXX maybe move this below as an else-clause */ - ctx->Texture._EnabledCoordUnits = ctx->Texture._EnabledUnits; - - /* Fragment programs may need texture coordinates but not the - * corresponding texture images. - */ + /* Determine which texture coordinate sets are actually needed */ if (fprog) { - const GLuint coordMask = (1 << MAX_TEXTURE_UNITS) - 1; + const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1; ctx->Texture._EnabledCoordUnits - |= (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask; + = (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask; + } + else { + ctx->Texture._EnabledCoordUnits = ctx->Texture._EnabledUnits; } } -- cgit v1.2.3 From 8b9842a2560a1254e98b5e01927f73917a0597fc Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 10:49:08 -0600 Subject: Shuffle some code around in the emit_tex() and emit_move() instructions. Note that the inst ptr returned by new_instruction() may become invalid after calling emit_() since the emit functions may allocate new instructions which is done vial realloc(). Also, add some new assertions to try to catch this kind of bug. --- src/mesa/shader/slang/slang_emit.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6d39354d75..71741fbaf5 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -482,12 +482,12 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st) MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W), MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W) }; - assert(st->File >= 0 && st->File <= 16); - src->File = st->File; - src->Index = st->Index; - assert(st->File != PROGRAM_UNDEFINED); + assert(st->File >= 0); + assert(st->File < PROGRAM_UNDEFINED); assert(st->Size >= 1); assert(st->Size <= 4); + src->File = st->File; + src->Index = st->Index; if (st->Swizzle != SWIZZLE_NOOP) src->Swizzle = st->Swizzle; else @@ -520,6 +520,10 @@ new_instruction(slang_emit_info *emitInfo, gl_inst_opcode opcode) _mesa_init_instructions(inst, 1); inst->Opcode = opcode; inst->BranchTarget = -1; /* invalid */ + /* + printf("New inst %d: %p %s\n", prog->NumInstructions-1,(void*)inst, + _mesa_opcode_string(inst->Opcode)); + */ return inst; } @@ -901,6 +905,9 @@ static struct prog_instruction * emit_tex(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; + + (void) emit(emitInfo, n->Children[1]); + if (n->Opcode == IR_TEX) { inst = new_instruction(emitInfo, OPCODE_TEX); } @@ -918,9 +925,9 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n) storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - (void) emit(emitInfo, n->Children[1]); - /* Child[1] is the coord */ + assert(n->Children[1]->Store->File != PROGRAM_UNDEFINED); + assert(n->Children[1]->Store->Index >= 0); storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store); /* Child[0] is the sampler (a uniform which'll indicate the texture unit) */ @@ -941,15 +948,15 @@ emit_move(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; + /* lhs */ + emit(emitInfo, n->Children[0]); + /* rhs */ assert(n->Children[1]); inst = emit(emitInfo, n->Children[1]); assert(n->Children[1]->Store->Index >= 0); - /* lhs */ - emit(emitInfo, n->Children[0]); - assert(!n->Store); n->Store = n->Children[0]->Store; -- cgit v1.2.3 From 17ad1d12ebf04ebf4b2b35c1c37d36bb4d2bb550 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 10:53:16 -0600 Subject: Check if FRAG_RESULT_COLR is written and update span->interpMask, arrayMask. Also, fix an assertion. --- src/mesa/swrast/s_fragprog.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 7260759306..7f7c0d6db5 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -201,12 +201,19 @@ _swrast_exec_fragment_program( GLcontext *ctx, SWspan *span ) const struct gl_fragment_program *program = ctx->FragmentProgram._Current; /* incoming colors should be floats */ - ASSERT(span->array->ChanType == GL_FLOAT); + if (program->Base.InputsRead & FRAG_BIT_COL0) { + ASSERT(span->array->ChanType == GL_FLOAT); + } ctx->_CurrentProgram = GL_FRAGMENT_PROGRAM_ARB; /* or NV, doesn't matter */ run_program(ctx, span, 0, span->end); + if (program->Base.OutputsWritten & (1 << FRAG_RESULT_COLR)) { + span->interpMask &= ~SPAN_RGBA; + span->arrayMask |= SPAN_RGBA; + } + if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { span->interpMask &= ~SPAN_Z; span->arrayMask |= SPAN_Z; -- cgit v1.2.3 From da554309521e8f351eecb30ce197535fb7541f40 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 10:58:23 -0600 Subject: comment about SPAN_* vs FRAG_BIT_* values --- src/mesa/swrast/s_span.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index 26ef399df3..8a9b9eb21c 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -35,6 +35,8 @@ * \defgroup SpanFlags * Bitflags used for interpMask and arrayMask fields below to indicate * which interpolant values and fragment arrays are in use, respectively. + * + * XXX We should replace these flags with the FRAG_BIT_ values someday... */ /*@{*/ #define SPAN_RGBA 0x001 -- cgit v1.2.3 From c000843a14e73d593d87ff6674d0295d2cb64a12 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 10:58:48 -0600 Subject: be smarter about which fragment attribs are interpolated before running frag progs --- src/mesa/swrast/s_span.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index f9f0a1f813..fa7761269d 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -554,7 +554,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span) for (u = 0; u < maxUnit; u++) { if (ctx->Texture._EnabledCoordUnits & (1 << u)) { const GLuint attr = FRAG_ATTRIB_TEX0 + u; - const struct gl_texture_object *obj =ctx->Texture.Unit[u]._Current; + const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; GLfloat texW, texH; GLboolean needLambda; GLfloat (*texcoord)[4] = span->array->attribs[attr]; @@ -1261,8 +1261,18 @@ convert_color_type(SWspan *span, GLenum newType, GLuint output) static INLINE void shade_texture_span(GLcontext *ctx, SWspan *span) { - /* Now we need the rgba array, fill it in if needed */ - if (span->interpMask & SPAN_RGBA) + GLbitfield inputsRead; + + /* Determine which fragment attributes are actually needed */ + if (ctx->FragmentProgram._Current) { + inputsRead = ctx->FragmentProgram._Current->Base.InputsRead; + } + else { + /* XXX we could be a bit smarter about this */ + inputsRead = ~0; + } + + if ((inputsRead & FRAG_BIT_COL0) && (span->interpMask & SPAN_RGBA)) interpolate_colors(span); if (ctx->Texture._EnabledCoordUnits && (span->interpMask & SPAN_TEXTURE)) @@ -1270,35 +1280,35 @@ shade_texture_span(GLcontext *ctx, SWspan *span) if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { - /* use float colors if running a fragment program or shader */ const GLenum oldType = span->array->ChanType; const GLenum newType = GL_FLOAT; - if (oldType != newType) { + + if ((inputsRead & FRAG_BIT_COL0) && (oldType != newType)) { GLvoid *src = (oldType == GL_UNSIGNED_BYTE) ? (GLvoid *) span->array->color.sz1.rgba : (GLvoid *) span->array->color.sz2.rgba; + assert(span->arrayMask & SPAN_RGBA); _mesa_convert_colors(oldType, src, newType, span->array->attribs[FRAG_ATTRIB_COL0], span->end, span->array->mask); - span->array->ChanType = newType; } + span->array->ChanType = newType; /* fragment programs/shaders may need specular, fog and Z coords */ - if (span->interpMask & SPAN_SPEC) + if ((inputsRead & FRAG_BIT_COL1) && (span->interpMask & SPAN_SPEC)) interpolate_specular(span); - if (span->interpMask & SPAN_FOG) + if ((inputsRead & FRAG_BIT_FOGC) && (span->interpMask & SPAN_FOG)) interpolate_fog(ctx, span); if (span->interpMask & SPAN_Z) _swrast_span_interpolate_z (ctx, span); - if (ctx->Shader.CurrentProgram && span->interpMask & SPAN_VARYING) + if ((inputsRead >= FRAG_BIT_VAR0) && (span->interpMask & SPAN_VARYING)) interpolate_varying(ctx, span); - if (ctx->FragmentProgram._Current && - (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_WPOS)) + if (inputsRead & FRAG_BIT_WPOS) interpolate_wpos(ctx, span); /* Run fragment program/shader now */ -- cgit v1.2.3 From d8070889d73479d9dbef27ccf1ed5d26fc8760e5 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 11:00:21 -0600 Subject: alloc an extra byte in _mesa_ShaderSourceARB() to silence a valgrind warning --- src/mesa/main/shaders.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index 5bd4a3f5ff..4c8ba47bcb 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -373,7 +373,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, { GET_CURRENT_CONTEXT(ctx); GLint *offsets; - GLsizei i; + GLsizei i, totalLength; GLcharARB *source; if (string == NULL) { @@ -406,8 +406,12 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, offsets[i] += offsets[i - 1]; } - source = (GLcharARB *) _mesa_malloc((offsets[count - 1] + 1) * - sizeof(GLcharARB)); + /* Total length of source string is sum off all strings plus two. + * One extra byte for terminating zero, another extra byte to silence + * valgrind warnings in the parser/grammer code. + */ + totalLength = offsets[count - 1] + 2; + source = (GLcharARB *) _mesa_malloc(totalLength * sizeof(GLcharARB)); if (source == NULL) { _mesa_free((GLvoid *) offsets); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); @@ -419,7 +423,8 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, _mesa_memcpy(source + start, string[i], (offsets[i] - start) * sizeof(GLcharARB)); } - source[offsets[count - 1]] = '\0'; + source[totalLength - 1] = '\0'; + source[totalLength - 2] = '\0'; ctx->Driver.ShaderSource(ctx, shaderObj, source); -- cgit v1.2.3 From 948c60badc52cf938766964dc90ce574f885b23d Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 15:00:14 -0600 Subject: get rid of float_multiply, float_add, float_divide --- src/mesa/shader/slang/library/slang_core.gc | 2 +- src/mesa/shader/slang/library/slang_core_gc.h | 4 ++-- src/mesa/shader/slang/slang_codegen.c | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc index a0abef0eda..927ca048d7 100644 --- a/src/mesa/shader/slang/library/slang_core.gc +++ b/src/mesa/shader/slang/library/slang_core.gc @@ -691,7 +691,7 @@ float __operator - (const float a, const float b) float __operator * (const float a, const float b) { - __asm float_multiply __retVal, a, b; + __asm vec4_multiply __retVal.x, a, b; } float __operator / (const float a, const float b) diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h index 6cb13300b0..042566696b 100644 --- a/src/mesa/shader/slang/library/slang_core_gc.h +++ b/src/mesa/shader/slang/library/slang_core_gc.h @@ -188,8 +188,8 @@ 0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98, 0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99, 116,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,21,1,1,0,9,97,0, -0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, +0,1,1,0,9,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86, +97,108,0,59,120,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1, 98,73,110,118,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59, 120,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, 120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,4,118, diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index e91e0446ad..5b5de07b4f 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -350,9 +350,6 @@ static slang_asm_info AsmInfo[] = { { "vec4_ddx", IR_DDX, 1, 1 }, { "vec4_ddy", IR_DDY, 1, 1 }, /* float binary op */ - { "float_add", IR_ADD, 1, 2 }, - { "float_multiply", IR_MUL, 1, 2 }, - { "float_divide", IR_DIV, 1, 2 }, { "float_power", IR_POW, 1, 2 }, /* texture / sampler */ { "vec4_tex1d", IR_TEX, 1, 2 }, -- cgit v1.2.3 From a49a865cf53dad5734ca7019406e4ce89702a08f Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 15:55:41 -0600 Subject: better error msg for undefined function, disable some debug output --- src/mesa/shader/slang/slang_codegen.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 5b5de07b4f..45868c725d 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1074,7 +1074,7 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, slang_operation_construct(oper); slang_operation_copy(oper, inlined); #else - *oper = *inlined; + *oper = *inlined; /* XXX slang_operation_copy() */ #endif @@ -1280,7 +1280,7 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name, */ fun = _slang_first_function(A->space.funcs, name); if (!_slang_adapt_call(oper, fun, &A->space, A->atoms, A->log)) { - slang_info_log_error(A->log, "Undefined function '%s'", name); + slang_info_log_error(A->log, "Function '%s' not found (check argument types)", name); return NULL; } assert(fun); @@ -2739,10 +2739,8 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) return GL_TRUE; /* not an error */ } -#if 1 - printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name); -#endif #if 0 + printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name); slang_print_function(fun, 1); #endif @@ -2754,6 +2752,11 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* fold constant expressions, etc. */ _slang_simplify(fun->body, &A->space, A->atoms); +#if 0 + printf("\n*********** simplified %s\n", (char *) fun->header.a_name); + slang_print_function(fun, 1); +#endif + /* Create an end-of-function label */ A->curFuncEndLabel = _slang_label_new("__endOfFunc__main"); @@ -2787,7 +2790,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) printf("************* IR for %s *******\n", (char*)fun->header.a_name); slang_print_ir(n, 0); #endif -#if 1 +#if 0 printf("************* End codegen function ************\n\n"); #endif -- cgit v1.2.3 From 000b2899b92b800f962a52243aa1ca775dd353fa Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 15:55:54 -0600 Subject: disable some debug output --- src/mesa/shader/slang/slang_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 71741fbaf5..7353b98a84 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1612,8 +1612,8 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, } success = GL_TRUE; - printf("*********** End generate code (%u inst):\n", prog->NumInstructions); #if 0 + printf("*********** End emit code (%u inst):\n", prog->NumInstructions); _mesa_print_program(prog); _mesa_print_program_parameters(ctx,prog); #endif -- cgit v1.2.3 From c7b2cce4186974adb86f14c4c62c43fc0332d6f4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 15:57:09 -0600 Subject: improve literal printing --- src/mesa/shader/slang/slang_print.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index c377759bea..4be9041c78 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -387,22 +387,27 @@ slang_print_tree(const slang_operation *op, int indent) case SLANG_OPER_LITERAL_BOOL: spaces(indent); - /*printf("SLANG_OPER_LITERAL_BOOL\n");*/ - printf("%s\n", op->literal[0] ? "TRUE" : "FALSE"); + printf("LITERAL ("); + for (i = 0; i < op->literal_size; i++) + printf("%s ", op->literal[0] ? "TRUE" : "FALSE"); + printf(")\n"); + break; case SLANG_OPER_LITERAL_INT: spaces(indent); - /*printf("SLANG_OPER_LITERAL_INT\n");*/ - printf("(%d %d %d %d)\n", (int) op->literal[0], (int) op->literal[1], - (int) op->literal[2], (int) op->literal[3]); + printf("LITERAL ("); + for (i = 0; i < op->literal_size; i++) + printf("%d ", (int) op->literal[i]); + printf(")\n"); break; case SLANG_OPER_LITERAL_FLOAT: spaces(indent); - /*printf("SLANG_OPER_LITERAL_FLOAT\n");*/ - printf("(%f %f %f %f)\n", op->literal[0], op->literal[1], op->literal[2], - op->literal[3]); + printf("LITERAL ("); + for (i = 0; i < op->literal_size; i++) + printf("%f ", op->literal[i]); + printf(")\n"); break; case SLANG_OPER_IDENTIFIER: -- cgit v1.2.3 From fd08463dea8fd2e8d805d66488368830dbe53264 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 15:58:40 -0600 Subject: Check for, simplify vec2/3/4(x). Only do call adapting for constructors. --- src/mesa/shader/slang/slang_simplify.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index 87b117874f..21d004db88 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -263,8 +263,6 @@ _slang_simplify(slang_operation *oper, /* vec2(flt, flt) constructor */ if (oper->type == SLANG_OPER_CALL) { if (strcmp((char *) oper->a_id, "vec2") == 0) { - printf("SIMPLIFY vec2 constructor scope = %p\n", - (void*) oper->locals); oper->literal[0] = oper->children[0].literal[0]; oper->literal[1] = oper->children[1].literal[0]; oper->literal[2] = oper->literal[1]; @@ -277,6 +275,26 @@ _slang_simplify(slang_operation *oper, } } } + + if (oper->num_children == 1 && isFloat[0]) { + /* vec2/3/4(flt, flt) constructor */ + if (oper->type == SLANG_OPER_CALL) { + const char *func = (const char *) oper->a_id; + if (strncmp(func, "vec", 3) == 0 && func[3] >= '2' && func[3] <= '4') { + oper->literal[0] = + oper->literal[1] = + oper->literal[2] = + oper->literal[3] = oper->children[0].literal[0]; + oper->literal_size = func[3] - '0'; + assert(oper->literal_size >= 2); + assert(oper->literal_size <= 4); + slang_operation_destruct(oper); /* XXX oper->locals goes NULL! */ + oper->type = SLANG_OPER_LITERAL_FLOAT; + assert(oper->num_children == 0); + return; + } + } + } } @@ -302,6 +320,10 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, if (dbg) printf("Adapt %d args to %d parameters\n", callOper->num_children, numParams); + /* Only try adapting for constructors */ + if (fun->kind != SLANG_FUNC_CONSTRUCTOR) + return GL_FALSE; + if (callOper->num_children != numParams) { /* number of arguments doesn't match number of parameters */ @@ -406,7 +428,7 @@ _slang_adapt_call(slang_operation *callOper, const slang_function *fun, slang_operation *child = slang_operation_new(1); slang_operation_copy(child, &callOper->children[i]); - child->locals->outer_scope = callOper->locals; + child->locals->outer_scope = callOper->children[i].locals; callOper->children[i].type = SLANG_OPER_CALL; callOper->children[i].a_id = slang_atom_pool_atom(atoms, constructorName); -- cgit v1.2.3 From 8d9db3dd03b3ec423560b46831071405cb4f6f48 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 16:07:04 -0600 Subject: fix ctx->Pixel.PostConvolutionScale/Bias subscript bugs --- src/mesa/main/pixel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index 4e47cdba89..de5c7fcef0 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1040,16 +1040,16 @@ _mesa_PixelTransferf( GLenum pname, GLfloat param ) ctx->Pixel.PostConvolutionBias[2] = param; break; case GL_POST_CONVOLUTION_ALPHA_SCALE: - if (ctx->Pixel.PostConvolutionScale[2] == param) + if (ctx->Pixel.PostConvolutionScale[3] == param) return; FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionScale[2] = param; + ctx->Pixel.PostConvolutionScale[3] = param; break; case GL_POST_CONVOLUTION_ALPHA_BIAS: - if (ctx->Pixel.PostConvolutionBias[2] == param) + if (ctx->Pixel.PostConvolutionBias[3] == param) return; FLUSH_VERTICES(ctx, _NEW_PIXEL); - ctx->Pixel.PostConvolutionBias[2] = param; + ctx->Pixel.PostConvolutionBias[3] = param; break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glPixelTransfer(pname)" ); -- cgit v1.2.3 From 5186529e57bfab6d70a94329e8265e64095b328e Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 16:31:30 -0600 Subject: remove bogus assertion --- src/mesa/shader/prog_parameter.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 14b272c2c5..4633015de2 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -88,7 +88,6 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, const GLuint sz4 = (size + 3) / 4; /* no. of new param slots needed */ assert(size > 0); - assert(size <= 16); /* XXX anything larger than a matrix??? */ if (oldNum + sz4 > paramList->Size) { /* Need to grow the parameter list array (alloc some extra) */ -- cgit v1.2.3 From 98650bdf897ee8dc1bcf32e28832c1d54acd0d79 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 16:32:48 -0600 Subject: fix a number of issues in _mesa_uniform() --- src/mesa/shader/shader_api.c | 88 ++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 271464e9f1..b916e75b93 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -886,7 +886,7 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, const GLvoid *values, GLenum type) { struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; - GLfloat *uniformVal; + GLint elems, i, k; if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); @@ -912,51 +912,49 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, } } - uniformVal = shProg->Uniforms->ParameterValues[location]; - - /* XXX obey 'count' parameter! */ - - if (type == GL_INT || - type == GL_INT_VEC2 || - type == GL_INT_VEC3 || - type == GL_INT_VEC4) { - const GLint *iValues = (const GLint *) values; - switch (type) { - case GL_INT_VEC4: - uniformVal[3] = (GLfloat) iValues[3]; - /* fall-through */ - case GL_INT_VEC3: - uniformVal[2] = (GLfloat) iValues[2]; - /* fall-through */ - case GL_INT_VEC2: - uniformVal[1] = (GLfloat) iValues[1]; - /* fall-through */ - case GL_INT: - uniformVal[0] = (GLfloat) iValues[0]; - break; - default: - _mesa_problem(ctx, "Invalid type in _mesa_uniform"); - return; - } + switch (type) { + case GL_FLOAT: + case GL_INT: + elems = 1; + break; + case GL_FLOAT_VEC2: + case GL_INT_VEC2: + elems = 2; + break; + case GL_FLOAT_VEC3: + case GL_INT_VEC3: + elems = 3; + break; + case GL_FLOAT_VEC4: + case GL_INT_VEC4: + elems = 4; + break; + default: + _mesa_problem(ctx, "Invalid type in _mesa_uniform"); + return; } - else { - const GLfloat *fValues = (const GLfloat *) values; - switch (type) { - case GL_FLOAT_VEC4: - uniformVal[3] = fValues[3]; - /* fall-through */ - case GL_FLOAT_VEC3: - uniformVal[2] = fValues[2]; - /* fall-through */ - case GL_FLOAT_VEC2: - uniformVal[1] = fValues[1]; - /* fall-through */ - case GL_FLOAT: - uniformVal[0] = fValues[0]; - break; - default: - _mesa_problem(ctx, "Invalid type in _mesa_uniform"); - return; + + if (count * elems > shProg->Uniforms->Parameters[location].Size) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(count too large)"); + return; + } + + for (k = 0; k < count; k++) { + GLfloat *uniformVal = shProg->Uniforms->ParameterValues[location + k]; + if (type == GL_INT || + type == GL_INT_VEC2 || + type == GL_INT_VEC3 || + type == GL_INT_VEC4) { + const GLint *iValues = (const GLint *) values; + for (i = 0; i < elems; i++) { + uniformVal[i] = (GLfloat) iValues[i]; + } + } + else { + const GLfloat *fValues = (const GLfloat *) values; + for (i = 0; i < elems; i++) { + uniformVal[i] = fValues[i]; + } } } -- cgit v1.2.3 From 52363954bfe1f9f5aec6da504e191099f80578ee Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 Mar 2007 16:50:24 -0600 Subject: more bug fixing, error checking --- src/mesa/shader/shader_api.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index b916e75b93..aab522e292 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -912,6 +912,11 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, } } + if (count < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(count < 0)"); + return; + } + switch (type) { case GL_FLOAT: case GL_INT: @@ -945,13 +950,13 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, type == GL_INT_VEC2 || type == GL_INT_VEC3 || type == GL_INT_VEC4) { - const GLint *iValues = (const GLint *) values; + const GLint *iValues = ((const GLint *) values) + k * elems; for (i = 0; i < elems; i++) { uniformVal[i] = (GLfloat) iValues[i]; } } else { - const GLfloat *fValues = (const GLfloat *) values; + const GLfloat *fValues = ((const GLfloat *) values) + k * elems; for (i = 0; i < elems; i++) { uniformVal[i] = fValues[i]; } -- cgit v1.2.3 From b01f146fd066518f93ccbfda1441a9e6ff530260 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 14 Mar 2007 08:56:01 -0600 Subject: remove old assertion --- src/mesa/shader/slang/slang_emit.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 7353b98a84..25c107d1cc 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -970,7 +970,6 @@ emit_move(slang_emit_info *emitInfo, slang_ir_node *n) *n->Children[1]->Store = *n->Children[0]->Store; /* fixup the prev (RHS) instruction */ assert(n->Children[0]->Store->Index >= 0); - assert(n->Children[0]->Store->Index < 16); storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask); return inst; } -- cgit v1.2.3 From b1a955b5186d9d455416534bcdc170373c7393d9 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 14 Mar 2007 10:16:18 -0600 Subject: make _slang_typeof_function() static --- src/mesa/shader/slang/slang_typeinfo.c | 56 +++++++++++++++++----------------- src/mesa/shader/slang/slang_typeinfo.h | 12 -------- 2 files changed, 28 insertions(+), 40 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index 6a358d66d8..a3a37ce378 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -35,6 +35,31 @@ #include "prog_instruction.h" +/** + * Determine the return type of a function. + * \param a_name the function name + * \param param function parameters (overloading) + * \param num_params number of parameters to function + * \param space namespace to search + * \param spec returns the type + * \param exists returns GL_TRUE or GL_FALSE to indicate existance of function + * \return GL_TRUE for success, GL_FALSE if failure (bad function name) + */ +static GLboolean +_slang_typeof_function(slang_atom a_name, const slang_operation * params, + GLuint num_params, + const slang_name_space * space, + slang_type_specifier * spec, GLboolean * exists, + slang_atom_pool *atoms, slang_info_log *log) +{ + slang_function *fun; + fun = _slang_locate_function(space->funcs, a_name, params, + num_params, space, atoms, log); + *exists = fun != NULL; + if (!fun) + return GL_TRUE; /* yes, not false */ + return slang_type_specifier_copy(spec, &fun->header.type.specifier); +} /** @@ -288,7 +313,8 @@ slang_typeinfo_destruct(slang_typeinfo * ti) /** - * Determine the return type of a function. + * Determine the return type of a function. This involves searching for + * the function by name and matching parameter types. * \param name name of the function * \param params array of function parameters * \param num_params number of parameters @@ -543,6 +569,7 @@ _slang_typeof_operation_(const slang_operation * op, space, &ti->spec, &exists, atoms, log)) return GL_FALSE; if (!exists) { + /* Look for struct initializer? */ slang_struct *s = slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); if (s != NULL) { @@ -755,33 +782,6 @@ _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, } - -/** - * Determine the return type of a function. - * \param a_name the function name - * \param param function parameters (overloading) - * \param num_params number of parameters to function - * \param space namespace to search - * \param exists returns GL_TRUE or GL_FALSE to indicate existance of function - * \return GL_TRUE for success, GL_FALSE if failure (bad function name) - */ -GLboolean -_slang_typeof_function(slang_atom a_name, const slang_operation * params, - GLuint num_params, - const slang_name_space * space, - slang_type_specifier * spec, GLboolean * exists, - slang_atom_pool *atoms, slang_info_log *log) -{ - slang_function *fun = _slang_locate_function(space->funcs, a_name, params, - num_params, space, atoms, log); - *exists = fun != NULL; - if (!fun) - return GL_TRUE; /* yes, not false */ - return slang_type_specifier_copy(spec, &fun->header.type.specifier); -} - - - /** * Determine if a type is a matrix. * \return GL_TRUE if is a matrix, GL_FALSE otherwise. diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index f1c9a635b8..12a773dee9 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -177,18 +177,6 @@ _slang_typeof_operation_(const struct slang_operation_ *, slang_typeinfo *, slang_atom_pool *, slang_info_log *log); -/** - * Retrieves type of a function prototype, if one exists. - * Returns GL_TRUE on success, even if the function was not found. - * Returns GL_FALSE otherwise. - */ -extern GLboolean -_slang_typeof_function(slang_atom a_name, - const struct slang_operation_ *params, - GLuint num_params, const slang_name_space *, - slang_type_specifier *spec, GLboolean *exists, - slang_atom_pool *, slang_info_log *log); - extern GLboolean _slang_type_is_matrix(slang_type_specifier_type); -- cgit v1.2.3 From 2dc3e944704dd90eb4324babac070b7e2fff70fc Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 14 Mar 2007 10:49:35 -0600 Subject: After we've found the slang_function ptr for a SLANG_OPER_CALL node, save the ptr in the node for reuse. This can save a tremendous amount of time when resolving types in complex expressions. One particular shader was taking several minutes to compile but now compiles almost instantaneoulsy. --- src/mesa/shader/slang/slang_typeinfo.c | 132 ++++++++++++++++++--------------- src/mesa/shader/slang/slang_typeinfo.h | 6 +- 2 files changed, 76 insertions(+), 62 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index a3a37ce378..a9e1261746 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -35,33 +35,6 @@ #include "prog_instruction.h" -/** - * Determine the return type of a function. - * \param a_name the function name - * \param param function parameters (overloading) - * \param num_params number of parameters to function - * \param space namespace to search - * \param spec returns the type - * \param exists returns GL_TRUE or GL_FALSE to indicate existance of function - * \return GL_TRUE for success, GL_FALSE if failure (bad function name) - */ -static GLboolean -_slang_typeof_function(slang_atom a_name, const slang_operation * params, - GLuint num_params, - const slang_name_space * space, - slang_type_specifier * spec, GLboolean * exists, - slang_atom_pool *atoms, slang_info_log *log) -{ - slang_function *fun; - fun = _slang_locate_function(space->funcs, a_name, params, - num_params, space, atoms, log); - *exists = fun != NULL; - if (!fun) - return GL_TRUE; /* yes, not false */ - return slang_type_specifier_copy(spec, &fun->header.type.specifier); -} - - /** * Checks if a field selector is a general swizzle (an r-value swizzle * with replicated components or an l-value swizzle mask) for a @@ -312,10 +285,36 @@ slang_typeinfo_destruct(slang_typeinfo * ti) } + /** - * Determine the return type of a function. This involves searching for - * the function by name and matching parameter types. - * \param name name of the function + * Determine the return type of a function. + * \param a_name the function name + * \param param function parameters (overloading) + * \param num_params number of parameters to function + * \param space namespace to search + * \param spec returns the type + * \param funFound returns pointer to the function, or NULL if not found. + * \return GL_TRUE for success, GL_FALSE if failure (bad function name) + */ +static GLboolean +_slang_typeof_function(slang_atom a_name, + slang_operation * params, GLuint num_params, + const slang_name_space * space, + slang_type_specifier * spec, + slang_function **funFound, + slang_atom_pool *atoms, slang_info_log *log) +{ + *funFound = _slang_locate_function(space->funcs, a_name, params, + num_params, space, atoms, log); + if (!*funFound) + return GL_TRUE; /* yes, not false */ + return slang_type_specifier_copy(spec, &(*funFound)->header.type.specifier); +} + + +/** + * Determine the type of a math function. + * \param name name of the operator, one of +,-,*,/ or unary - * \param params array of function parameters * \param num_params number of parameters * \param space namespace to use @@ -324,26 +323,41 @@ slang_typeinfo_destruct(slang_typeinfo * ti) * \return GL_TRUE for success, GL_FALSE if failure */ static GLboolean -typeof_existing_function(const char *name, const slang_operation * params, - GLuint num_params, - const slang_name_space * space, - slang_type_specifier * spec, - slang_atom_pool * atoms, - slang_info_log *log) +typeof_math_call(const char *name, slang_operation *call, + const slang_name_space * space, + slang_type_specifier * spec, + slang_atom_pool * atoms, + slang_info_log *log) { - slang_atom atom; - GLboolean exists; + if (call->fun) { + /* we've previously resolved this function call */ + slang_type_specifier_copy(spec, &call->fun->header.type.specifier); + return GL_TRUE; + } + else { + slang_atom atom; + slang_function *fun; - atom = slang_atom_pool_atom(atoms, name); - if (!_slang_typeof_function(atom, params, num_params, space, spec, - &exists, atoms, log)) + /* number of params: */ + assert(call->num_children == 1 || call->num_children == 2); + + atom = slang_atom_pool_atom(atoms, name); + if (!_slang_typeof_function(atom, call->children, call->num_children, + space, spec, &fun, atoms, log)) + return GL_FALSE; + + if (fun) { + /* Save pointer to save time in future */ + call->fun = fun; + return GL_TRUE; + } return GL_FALSE; - return exists; + } } GLboolean _slang_typeof_operation(const slang_assemble_ctx * A, - const slang_operation * op, + slang_operation * op, slang_typeinfo * ti) { return _slang_typeof_operation_(op, &A->space, ti, A->atoms, A->log); @@ -359,7 +373,7 @@ _slang_typeof_operation(const slang_assemble_ctx * A, * \return GL_TRUE for success, GL_FALSE if failure */ GLboolean -_slang_typeof_operation_(const slang_operation * op, +_slang_typeof_operation_(slang_operation * op, const slang_name_space * space, slang_typeinfo * ti, slang_atom_pool * atoms, @@ -500,26 +514,26 @@ _slang_typeof_operation_(const slang_operation * op, /*case SLANG_OPER_LSHIFT: */ /*case SLANG_OPER_RSHIFT: */ case SLANG_OPER_ADD: - if (!typeof_existing_function("+", op->children, 2, space, - &ti->spec, atoms, log)) + assert(op->num_children == 2); + if (!typeof_math_call("+", op, space, &ti->spec, atoms, log)) return GL_FALSE; break; case SLANG_OPER_SUBTRACT: - if (!typeof_existing_function("-", op->children, 2, space, - &ti->spec, atoms, log)) + assert(op->num_children == 2); + if (!typeof_math_call("-", op, space, &ti->spec, atoms, log)) return GL_FALSE; break; case SLANG_OPER_MULTIPLY: - if (!typeof_existing_function("*", op->children, 2, space, - &ti->spec, atoms, log)) + assert(op->num_children == 2); + if (!typeof_math_call("*", op, space, &ti->spec, atoms, log)) return GL_FALSE; break; case SLANG_OPER_DIVIDE: - if (!typeof_existing_function("/", op->children, 2, space, - &ti->spec, atoms, log)) + assert(op->num_children == 2); + if (!typeof_math_call("/", op, space, &ti->spec, atoms, log)) return GL_FALSE; break; - /*case SLANG_OPER_MODULUS: */ + /*case SLANG_OPER_MODULUS: */ case SLANG_OPER_PLUS: if (!_slang_typeof_operation_(op->children, space, ti, atoms, log)) return GL_FALSE; @@ -527,8 +541,8 @@ _slang_typeof_operation_(const slang_operation * op, ti->is_swizzled = GL_FALSE; break; case SLANG_OPER_MINUS: - if (!typeof_existing_function("-", op->children, 1, space, - &ti->spec, atoms, log)) + assert(op->num_children == 1); + if (!typeof_math_call("-", op, space, &ti->spec, atoms, log)) return GL_FALSE; break; /*case SLANG_OPER_COMPLEMENT: */ @@ -563,12 +577,12 @@ _slang_typeof_operation_(const slang_operation * op, break; case SLANG_OPER_CALL: { - GLboolean exists; + slang_function *fun; if (!_slang_typeof_function(op->a_id, op->children, op->num_children, - space, &ti->spec, &exists, atoms, log)) + space, &ti->spec, &fun, atoms, log)) return GL_FALSE; - if (!exists) { + if (!fun) { /* Look for struct initializer? */ slang_struct *s = slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); @@ -731,7 +745,7 @@ _slang_typeof_operation_(const slang_operation * op, */ slang_function * _slang_locate_function(const slang_function_scope * funcs, slang_atom a_name, - const slang_operation * args, GLuint num_args, + slang_operation * args, GLuint num_args, const slang_name_space * space, slang_atom_pool * atoms, slang_info_log *log) { diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 12a773dee9..be2e229b76 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -69,7 +69,7 @@ typedef struct slang_assemble_ctx_ extern struct slang_function_ * _slang_locate_function(const struct slang_function_scope_ *funcs, - slang_atom name, const struct slang_operation_ *params, + slang_atom name, struct slang_operation_ *params, GLuint num_params, const slang_name_space *space, slang_atom_pool *atoms, slang_info_log *log); @@ -168,11 +168,11 @@ slang_typeinfo_destruct(slang_typeinfo *); */ extern GLboolean _slang_typeof_operation(const slang_assemble_ctx *, - const struct slang_operation_ *, + struct slang_operation_ *, slang_typeinfo *); extern GLboolean -_slang_typeof_operation_(const struct slang_operation_ *, +_slang_typeof_operation_(struct slang_operation_ *, const slang_name_space *, slang_typeinfo *, slang_atom_pool *, slang_info_log *log); -- cgit v1.2.3 From 565d097d8feb201a0be2ee41f0413cac2593990f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 14 Mar 2007 11:07:32 -0600 Subject: continue prev check-in: save ptr to slang_function for SLANG_OPER_CALL --- src/mesa/shader/slang/slang_typeinfo.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c index a9e1261746..fef5575631 100644 --- a/src/mesa/shader/slang/slang_typeinfo.c +++ b/src/mesa/shader/slang/slang_typeinfo.c @@ -576,17 +576,24 @@ _slang_typeof_operation_(slang_operation * op, } break; case SLANG_OPER_CALL: - { + if (op->fun) { + /* we've resolved this call before */ + slang_type_specifier_copy(&ti->spec, &op->fun->header.type.specifier); + } + else { slang_function *fun; - if (!_slang_typeof_function(op->a_id, op->children, op->num_children, space, &ti->spec, &fun, atoms, log)) return GL_FALSE; - if (!fun) { - /* Look for struct initializer? */ + if (fun) { + /* save result for future use */ + op->fun = fun; + } + else { slang_struct *s = slang_struct_scope_find(space->structs, op->a_id, GL_TRUE); - if (s != NULL) { + if (s) { + /* struct initializer */ ti->spec.type = SLANG_SPEC_STRUCT; ti->spec._struct = (slang_struct *) slang_alloc_malloc(sizeof(slang_struct)); @@ -601,6 +608,7 @@ _slang_typeof_operation_(slang_operation * op, return GL_FALSE; } else { + /* float, int, vec4, mat3, etc. constructor? */ const char *name; slang_type_specifier_type type; -- cgit v1.2.3 From 62b4601e53438096f362657bec2c4c238279509f Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 14 Mar 2007 13:34:30 -0600 Subject: s/Tranpose/Transpose/ --- src/mesa/shader/slang/slang_builtin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index cba11b472b..6ee0fd33b6 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -66,17 +66,17 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, { "gl_ProjectionMatrix", STATE_PROJECTION_MATRIX, STATE_MATRIX_TRANSPOSE }, { "gl_ProjectionMatrixInverse", STATE_PROJECTION_MATRIX, STATE_MATRIX_INVTRANS }, - { "gl_ProjectionMatrixTranpose", STATE_PROJECTION_MATRIX, 0 }, - { "gl_ProjectionMatrixInverseTranpose", STATE_PROJECTION_MATRIX, STATE_MATRIX_INVERSE }, + { "gl_ProjectionMatrixTranspose", STATE_PROJECTION_MATRIX, 0 }, + { "gl_ProjectionMatrixInverseTranspose", STATE_PROJECTION_MATRIX, STATE_MATRIX_INVERSE }, { "gl_ModelViewProjectionMatrix", STATE_MVP_MATRIX, STATE_MATRIX_TRANSPOSE }, { "gl_ModelViewProjectionMatrixInverse", STATE_MVP_MATRIX, STATE_MATRIX_INVTRANS }, { "gl_ModelViewProjectionMatrixTranspose", STATE_MVP_MATRIX, 0 }, - { "gl_ModelViewProjectionMatrixInverseTranpose", STATE_MVP_MATRIX, STATE_MATRIX_INVERSE }, + { "gl_ModelViewProjectionMatrixInverseTranspose", STATE_MVP_MATRIX, STATE_MATRIX_INVERSE }, { "gl_TextureMatrix", STATE_TEXTURE_MATRIX, STATE_MATRIX_TRANSPOSE }, { "gl_TextureMatrixInverse", STATE_TEXTURE_MATRIX, STATE_MATRIX_INVTRANS }, - { "gl_TextureMatrixTranpose", STATE_TEXTURE_MATRIX, 0 }, + { "gl_TextureMatrixTranspose", STATE_TEXTURE_MATRIX, 0 }, { "gl_TextureMatrixInverseTranspose", STATE_TEXTURE_MATRIX, STATE_MATRIX_INVERSE }, /* XXX verify these!!! */ -- cgit v1.2.3 From 7ed292a4e946fe43b04dd76d5f26df4e70765788 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 15 Mar 2007 16:06:58 -0600 Subject: in _mesa_GetColorTable, return silently if table size is 0 --- src/mesa/main/colortab.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index 9fb0baf4a7..2ad5c309b4 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 6.5.3 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -722,6 +722,10 @@ _mesa_GetColorTable( GLenum target, GLenum format, ASSERT(table); + if (table->Size <= 0) { + return; + } + switch (table->_BaseFormat) { case GL_ALPHA: { -- cgit v1.2.3 From e348016253582e6a31f7ee7149ff4999de33642d Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 15 Mar 2007 16:07:39 -0600 Subject: silently ignore DeleteProgram/Shader(id=0) --- src/mesa/main/shaders.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index 4c8ba47bcb..58be1f46e5 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -110,15 +110,17 @@ _mesa_CreateProgramObjectARB(void) void GLAPIENTRY _mesa_DeleteObjectARB(GLhandleARB obj) { - GET_CURRENT_CONTEXT(ctx); - if (ctx->Driver.IsProgram(ctx, obj)) { - ctx->Driver.DeleteProgram2(ctx, obj); - } - else if (ctx->Driver.IsShader(ctx, obj)) { - ctx->Driver.DeleteShader(ctx, obj); - } - else { - /* error? */ + if (obj) { + GET_CURRENT_CONTEXT(ctx); + if (ctx->Driver.IsProgram(ctx, obj)) { + ctx->Driver.DeleteProgram2(ctx, obj); + } + else if (ctx->Driver.IsShader(ctx, obj)) { + ctx->Driver.DeleteShader(ctx, obj); + } + else { + /* error? */ + } } } @@ -126,16 +128,20 @@ _mesa_DeleteObjectARB(GLhandleARB obj) void GLAPIENTRY _mesa_DeleteProgram(GLuint name) { - GET_CURRENT_CONTEXT(ctx); - ctx->Driver.DeleteProgram2(ctx, name); + if (name) { + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.DeleteProgram2(ctx, name); + } } void GLAPIENTRY _mesa_DeleteShader(GLuint name) { - GET_CURRENT_CONTEXT(ctx); - ctx->Driver.DeleteShader(ctx, name); + if (name) { + GET_CURRENT_CONTEXT(ctx); + ctx->Driver.DeleteShader(ctx, name); + } } -- cgit v1.2.3 From fdcbbeb55ecafe119bb98dcedb8492416f5bc966 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 19 Mar 2007 14:44:15 -0600 Subject: Properly compute render_inputs_bitset when using a vertex program/shader. This fixes a performance regression introduced early in glsl-compiler-1 work. --- src/mesa/tnl/t_context.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 3b2f91acba..f665485f42 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -150,13 +150,19 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) (ctx->VertexProgram._Enabled && ctx->VertexProgram.PointSizeEnabled)) RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POINTSIZE ); -#if 1 /* XXX NEW_SLANG */ - RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, - _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC ); -#else - if (ctx->ShaderObjects._VertexShaderPresent || ctx->ShaderObjects._FragmentShaderPresent) - RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC ); -#endif + /* check for varying vars which are written by the vertex program */ + { + struct gl_vertex_program *vp = ctx->VertexProgram._Current; + if (vp) { + GLuint i; + for (i = 0; i < MAX_VARYING; i++) { + if (vp->Base.OutputsWritten & (1 << (VERT_RESULT_VAR0 + i))) { + RENDERINPUTS_SET(tnl->render_inputs_bitset, + _TNL_ATTRIB_GENERIC(i)); + } + } + } + } } -- cgit v1.2.3 From e02b989ff96cb706b9cbbea519034e3403b3ecfa Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Mar 2007 14:45:34 -0600 Subject: indent --- src/mesa/shader/slang/slang_compile_struct.c | 218 ++++++++++++++------------- 1 file changed, 111 insertions(+), 107 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c index 5d876b248a..89c79d431b 100644 --- a/src/mesa/shader/slang/slang_compile_struct.c +++ b/src/mesa/shader/slang/slang_compile_struct.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.3 * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,139 +31,143 @@ #include "imports.h" #include "slang_compile.h" -/* - * slang_struct_scope - */ GLvoid -_slang_struct_scope_ctr (slang_struct_scope *self) +_slang_struct_scope_ctr(slang_struct_scope * self) { self->structs = NULL; self->num_structs = 0; self->outer_scope = NULL; } -void slang_struct_scope_destruct (slang_struct_scope *scope) +void +slang_struct_scope_destruct(slang_struct_scope * scope) { - unsigned int i; + GLuint i; - for (i = 0; i < scope->num_structs; i++) - slang_struct_destruct (scope->structs + i); - slang_alloc_free (scope->structs); - /* do not free scope->outer_scope */ + for (i = 0; i < scope->num_structs; i++) + slang_struct_destruct(scope->structs + i); + slang_alloc_free(scope->structs); + /* do not free scope->outer_scope */ } -int slang_struct_scope_copy (slang_struct_scope *x, const slang_struct_scope *y) +int +slang_struct_scope_copy(slang_struct_scope * x, const slang_struct_scope * y) { - slang_struct_scope z; - unsigned int i; - - _slang_struct_scope_ctr (&z); - z.structs = (slang_struct *) slang_alloc_malloc (y->num_structs * sizeof (slang_struct)); - if (z.structs == NULL) - { - slang_struct_scope_destruct (&z); - return 0; - } - for (z.num_structs = 0; z.num_structs < y->num_structs; z.num_structs++) - if (!slang_struct_construct (&z.structs[z.num_structs])) - { - slang_struct_scope_destruct (&z); - return 0; - } - for (i = 0; i < z.num_structs; i++) - if (!slang_struct_copy (&z.structs[i], &y->structs[i])) - { - slang_struct_scope_destruct (&z); - return 0; - } - z.outer_scope = y->outer_scope; - slang_struct_scope_destruct (x); - *x = z; - return 1; + slang_struct_scope z; + GLuint i; + + _slang_struct_scope_ctr(&z); + z.structs = + (slang_struct *) slang_alloc_malloc(y->num_structs * + sizeof(slang_struct)); + if (z.structs == NULL) { + slang_struct_scope_destruct(&z); + return 0; + } + for (z.num_structs = 0; z.num_structs < y->num_structs; z.num_structs++) + if (!slang_struct_construct(&z.structs[z.num_structs])) { + slang_struct_scope_destruct(&z); + return 0; + } + for (i = 0; i < z.num_structs; i++) + if (!slang_struct_copy(&z.structs[i], &y->structs[i])) { + slang_struct_scope_destruct(&z); + return 0; + } + z.outer_scope = y->outer_scope; + slang_struct_scope_destruct(x); + *x = z; + return 1; } -slang_struct *slang_struct_scope_find (slang_struct_scope *stru, slang_atom a_name, int all_scopes) +slang_struct * +slang_struct_scope_find(slang_struct_scope * stru, slang_atom a_name, + int all_scopes) { - unsigned int i; - - for (i = 0; i < stru->num_structs; i++) - if (a_name == stru->structs[i].a_name) - return &stru->structs[i]; - if (all_scopes && stru->outer_scope != NULL) - return slang_struct_scope_find (stru->outer_scope, a_name, 1); - return NULL; + GLuint i; + + for (i = 0; i < stru->num_structs; i++) + if (a_name == stru->structs[i].a_name) + return &stru->structs[i]; + if (all_scopes && stru->outer_scope != NULL) + return slang_struct_scope_find(stru->outer_scope, a_name, 1); + return NULL; } /* slang_struct */ -int slang_struct_construct (slang_struct *stru) +int +slang_struct_construct(slang_struct * stru) { - stru->a_name = SLANG_ATOM_NULL; - stru->fields = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope)); - if (stru->fields == NULL) - return 0; - _slang_variable_scope_ctr (stru->fields); - stru->structs = (slang_struct_scope *) slang_alloc_malloc (sizeof (slang_struct_scope)); - if (stru->structs == NULL) - { - slang_variable_scope_destruct (stru->fields); - slang_alloc_free (stru->fields); - return 0; - } - _slang_struct_scope_ctr (stru->structs); - return 1; + stru->a_name = SLANG_ATOM_NULL; + stru->fields = (slang_variable_scope *) + slang_alloc_malloc(sizeof(slang_variable_scope)); + if (stru->fields == NULL) + return 0; + _slang_variable_scope_ctr(stru->fields); + + stru->structs = + (slang_struct_scope *) slang_alloc_malloc(sizeof(slang_struct_scope)); + if (stru->structs == NULL) { + slang_variable_scope_destruct(stru->fields); + slang_alloc_free(stru->fields); + return 0; + } + _slang_struct_scope_ctr(stru->structs); + return 1; } -void slang_struct_destruct (slang_struct *stru) +void +slang_struct_destruct(slang_struct * stru) { - slang_variable_scope_destruct (stru->fields); - slang_alloc_free (stru->fields); - slang_struct_scope_destruct (stru->structs); - slang_alloc_free (stru->structs); + slang_variable_scope_destruct(stru->fields); + slang_alloc_free(stru->fields); + slang_struct_scope_destruct(stru->structs); + slang_alloc_free(stru->structs); } -int slang_struct_copy (slang_struct *x, const slang_struct *y) +int +slang_struct_copy(slang_struct * x, const slang_struct * y) { - slang_struct z; - - if (!slang_struct_construct (&z)) - return 0; - z.a_name = y->a_name; - if (!slang_variable_scope_copy (z.fields, y->fields)) - { - slang_struct_destruct (&z); - return 0; - } - if (!slang_struct_scope_copy (z.structs, y->structs)) - { - slang_struct_destruct (&z); - return 0; - } - slang_struct_destruct (x); - *x = z; - return 1; + slang_struct z; + + if (!slang_struct_construct(&z)) + return 0; + z.a_name = y->a_name; + if (!slang_variable_scope_copy(z.fields, y->fields)) { + slang_struct_destruct(&z); + return 0; + } + if (!slang_struct_scope_copy(z.structs, y->structs)) { + slang_struct_destruct(&z); + return 0; + } + slang_struct_destruct(x); + *x = z; + return 1; } -int slang_struct_equal (const slang_struct *x, const slang_struct *y) +int +slang_struct_equal(const slang_struct * x, const slang_struct * y) { - unsigned int i; - - if (x->fields->num_variables != y->fields->num_variables) - return 0; - for (i = 0; i < x->fields->num_variables; i++) - { - slang_variable *varx = x->fields->variables[i]; - slang_variable *vary = y->fields->variables[i]; - - if (varx->a_name != vary->a_name) - return 0; - if (!slang_type_specifier_equal (&varx->type.specifier, &vary->type.specifier)) - return 0; - if (varx->type.specifier.type == SLANG_SPEC_ARRAY) - if (varx->array_len != vary->array_len) - return GL_FALSE; - } - return 1; + GLuint i; + + if (x->fields->num_variables != y->fields->num_variables) + return 0; + + for (i = 0; i < x->fields->num_variables; i++) { + const slang_variable *varx = x->fields->variables[i]; + const slang_variable *vary = y->fields->variables[i]; + + if (varx->a_name != vary->a_name) + return 0; + if (!slang_type_specifier_equal(&varx->type.specifier, + &vary->type.specifier)) + return 0; + if (varx->type.specifier.type == SLANG_SPEC_ARRAY) + if (varx->array_len != vary->array_len) + return GL_FALSE; + } + return 1; } - -- cgit v1.2.3 From 97c9b3ecc6da6058cf17840f6448617c7dc2be75 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Mar 2007 15:38:46 -0600 Subject: disable apparently unused code --- src/mesa/shader/slang/slang_storage.c | 2 ++ src/mesa/shader/slang/slang_storage.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index 04995aa842..6d6a6d9ac4 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -258,6 +258,7 @@ _slang_sizeof_aggregate(const slang_storage_aggregate * agg) } +#if 0 GLboolean _slang_flatten_aggregate(slang_storage_aggregate * flat, const slang_storage_aggregate * agg) @@ -299,3 +300,4 @@ _slang_flatten_aggregate(slang_storage_aggregate * flat, } return GL_TRUE; } +#endif diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index b02931fcc2..d3047ee516 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -125,6 +125,7 @@ extern GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *); +#if 0 /** * Converts structured aggregate to a flat one, with arrays of generic * type being one-element long. Returns GL_TRUE on success. Returns @@ -134,5 +135,6 @@ extern GLboolean _slang_flatten_aggregate (slang_storage_aggregate *, const slang_storage_aggregate *); +#endif #endif /* SLANG_STORAGE_H */ -- cgit v1.2.3 From 2500d82d0dc5015dc648067455231b7b963b54a5 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Mar 2007 15:40:39 -0600 Subject: Support for user-defined structures. struct == and != operators not finished yet. Struct assignment works though. --- src/mesa/shader/slang/slang_codegen.c | 69 +++++++++++++++++++++++++-------- src/mesa/shader/slang/slang_emit.c | 72 +++++++++++++++++++++++++++++++---- src/mesa/shader/slang/slang_ir.h | 1 + 3 files changed, 119 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 45868c725d..89a891562e 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -78,6 +78,35 @@ is_sampler_type(const slang_fully_specified_type *t) } +/** + * Return the offset (in floats or ints) of the named field within + * the given struct. Return -1 if field not found. + * If field is NULL, return the size of the struct instead. + */ +static GLint +_slang_field_offset(const slang_type_specifier *spec, slang_atom field) +{ + GLint offset = 0; + GLuint i; + for (i = 0; i < spec->_struct->fields->num_variables; i++) { + const slang_variable *v = spec->_struct->fields->variables[i]; + const GLuint sz = _slang_sizeof_type_specifier(&v->type.specifier); + if (sz > 1) { + /* types larger than 1 float are register (4-float) aligned */ + offset = (offset + 3) & ~3; + } + if (field && v->a_name == field) { + return offset; + } + offset += sz; + } + if (field) + return -1; /* field not found */ + else + return offset; /* struct size */ +} + + GLuint _slang_sizeof_type_specifier(const slang_type_specifier *spec) { @@ -122,20 +151,9 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) case SLANG_SPEC_SAMPLER2DSHADOW: case SLANG_SPEC_SAMPLER2DRECT: case SLANG_SPEC_SAMPLER2DRECTSHADOW: - return 1; /* special case */ + return 1; /* a sampler is basically just an integer index */ case SLANG_SPEC_STRUCT: - { - GLuint sum = 0, i; - for (i = 0; i < spec->_struct->fields->num_variables; i++) { - slang_variable *v = spec->_struct->fields->variables[i]; - GLuint sz = _slang_sizeof_type_specifier(&v->type.specifier); - /* XXX verify padding */ - if (sz < 4) - sz = 4; - sum += sz; - } - return sum; - } + return _slang_field_offset(spec, 0); /* special use */ case SLANG_SPEC_ARRAY: return _slang_sizeof_type_specifier(spec->_array); default: @@ -2034,6 +2052,7 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) { slang_typeinfo ti; + /* type of struct */ slang_typeinfo_construct(&ti); _slang_typeof_operation(A, &oper->children[0], &ti); @@ -2079,20 +2098,38 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper) /* oper->children[0] is the base */ /* oper->a_id is the field name */ slang_ir_node *base, *n; - GLint size = 4; /* XXX fix? */ + slang_typeinfo field_ti; + GLint fieldSize, fieldOffset; + /* type of field */ + slang_typeinfo_construct(&field_ti); + _slang_typeof_operation(A, oper, &field_ti); + + fieldSize = _slang_sizeof_type_specifier(&field_ti.spec); + fieldOffset = _slang_field_offset(&ti.spec, oper->a_id); + + if (fieldOffset < 0) { + slang_info_log_error(A->log, + "\"%s\" is not a member of struct \"%s\"", + (char *) oper->a_id, + (char *) ti.spec._struct->a_name); + return NULL; + } + assert(fieldSize >= 0); base = _slang_gen_operation(A, &oper->children[0]); if (!base) { - /* error previously found */ + /* error msg should have already been logged */ return NULL; } n = new_node1(IR_FIELD, base); if (n) { n->Field = (char *) oper->a_id; + n->FieldOffset = fieldOffset; + assert(n->FieldOffset >= 0); n->Store = _slang_new_ir_storage(base->Store->File, base->Store->Index, - size); + fieldSize); } return n; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 25c107d1cc..e578c82995 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -770,6 +770,53 @@ emit_arith(slang_emit_info *emitInfo, slang_ir_node *n) } +/** + * Emit code for == and != operators. These could normally be handled + * by emit_arith() except we need to be able to handle structure comparisons. + */ +static struct prog_instruction * +emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) +{ + struct prog_instruction *inst; + + assert(n->Opcode == IR_SEQUAL || n->Opcode == IR_SNEQUAL); + + /* gen code for children */ + emit(emitInfo, n->Children[0]); + emit(emitInfo, n->Children[1]); + + assert(n->Children[0]->Store->Size == n->Children[1]->Store->Size); + + /* gen this instruction and src registers */ + inst = new_instruction(emitInfo, + (n->Opcode == IR_SEQUAL) ? OPCODE_SEQ : OPCODE_SNE); + if (n->Children[0]->Store->Size > 4) { + /* struct compare */ + _mesa_problem(NULL, "struct compare not implemented!"); + return NULL; + } + else { + /* small/simple types */ + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + } + + /* free temps */ + free_temp_storage(emitInfo->vt, n->Children[0]); + free_temp_storage(emitInfo->vt, n->Children[1]); + + /* result storage */ + if (!n->Store) { + if (!alloc_temp_storage(emitInfo, n, 1)) /* 1 bool */ + return NULL; + } + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + + return inst; +} + + + /** * Generate code for an IR_CLAMP instruction. */ @@ -1337,7 +1384,6 @@ emit_array_element(slang_emit_info *emitInfo, slang_ir_node *n) return NULL; } - if (n->Children[1]->Opcode == IR_FLOAT) { /* Constant index */ const GLint arrayAddr = n->Children[0]->Store->Index; @@ -1365,7 +1411,16 @@ emit_struct_field(slang_emit_info *emitInfo, slang_ir_node *n) n->Store->Index = _slang_alloc_statevar(n, emitInfo->prog->Parameters); } else { - _mesa_problem(NULL, "structs/fields not supported yet"); + GLint offset = n->FieldOffset / 4; + assert(n->Children[0]->Store->Index >= 0); + n->Store->Index = n->Children[0]->Store->Index + offset; + if (n->Store->Size == 1) { + GLint swz = n->FieldOffset % 4; + n->Store->Swizzle = MAKE_SWIZZLE4(swz, swz, swz, swz); + } + else { + n->Store->Swizzle = SWIZZLE_XYZW; + } } return NULL; /* no instruction */ } @@ -1427,10 +1482,10 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) if (emitInfo->EmitComments) { /* emit NOP with comment describing the variable's storage location */ char s[1000]; - sprintf(s, "TEMP[%d]%s = %s (size %d)", + sprintf(s, "TEMP[%d]%s = variable %s (size %d)", n->Store->Index, _mesa_swizzle_string(n->Store->Swizzle, 0, GL_FALSE), - (char *) n->Var->a_name, + (n->Var ? (char *) n->Var->a_name : "anonymous"), n->Store->Size); inst = new_instruction(emitInfo, OPCODE_NOP); inst->Comment = _mesa_strdup(s); @@ -1503,8 +1558,6 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) case IR_CROSS: case IR_MIN: case IR_MAX: - case IR_SEQUAL: - case IR_SNEQUAL: case IR_SGE: case IR_SGT: case IR_SLE: @@ -1515,6 +1568,11 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) /* trinary operators */ case IR_LRP: return emit_arith(emitInfo, n); + + case IR_SEQUAL: + case IR_SNEQUAL: + return emit_compare(emitInfo, n); + case IR_CLAMP: return emit_clamp(emitInfo, n); case IR_TEX: @@ -1600,7 +1658,7 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, emitInfo.prog = prog; emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions; - emitInfo.EmitComments = ctx->Shader.EmitComments; + emitInfo.EmitComments = 1+ctx->Shader.EmitComments; (void) emit(&emitInfo, n); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index b733d100dd..3c5526e3c5 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -152,6 +152,7 @@ typedef struct slang_ir_node_ /** special fields depending on Opcode: */ const char *Field; /**< If Opcode == IR_FIELD */ + int FieldOffset; /**< If Opcode == IR_FIELD */ GLuint Writemask; /**< If Opcode == IR_MOVE */ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; /**< If Opcode == IR_VAR or IR_VAR_DECL */ -- cgit v1.2.3 From 629ec2b06be40a32fa820a105e40e7b894acc84e Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Mar 2007 15:40:54 -0600 Subject: added SWIZZLE_XYZW --- src/mesa/shader/prog_instruction.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index 66abb10cdb..12e8480125 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -57,6 +57,7 @@ #define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7) #define GET_BIT(msk, idx) (((msk) >> (idx)) & 0x1) +#define SWIZZLE_XYZW MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W) #define SWIZZLE_XXXX MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X) #define SWIZZLE_YYYY MAKE_SWIZZLE4(SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y) #define SWIZZLE_ZZZZ MAKE_SWIZZLE4(SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z, SWIZZLE_Z) -- cgit v1.2.3 From 1936b25ebd580c5ef9e8cb471a986da39ef46ca5 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Mar 2007 09:04:18 -0600 Subject: print conditional writemask, if enabled --- src/mesa/shader/prog_print.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 4519f0c030..d290ce0a2a 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -388,6 +388,12 @@ print_dst_reg(const struct prog_dst_register *dstReg, gl_prog_print_mode mode, dstReg->Index, mode, prog), writemask_string(dstReg->WriteMask)); + if (dstReg->CondMask != COND_TR) { + _mesa_printf(" (%s.%s)", + condcode_string(dstReg->CondMask), + _mesa_swizzle_string(dstReg->CondSwizzle, GL_FALSE, GL_FALSE)); + } + #if 0 _mesa_printf("%s[%d]%s", file_string((enum register_file) dstReg->File, mode), -- cgit v1.2.3 From 1bf81e3c5d65b636658d11072f4f027f5c499396 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Mar 2007 09:07:27 -0600 Subject: In _mesa_add_unnamed_constant() and _mesa_lookup_parameter_constant() allow swizzleOut==NULL. There are times when we don't want to allow swizzling when searching for or adding vector constants. Passing NULL for swizzleOut disables swizzling. This fixes a constant/swizzle bug in link_uniform_vars(). --- src/mesa/shader/nvfragparse.c | 8 ++-- src/mesa/shader/prog_parameter.c | 92 +++++++++++++++++++++++--------------- src/mesa/shader/slang/slang_link.c | 4 +- 3 files changed, 61 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index b4e19ce74d..c46d8aa083 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -1040,7 +1040,7 @@ Parse_VectorSrc(struct parse_state *parseState, if (!Parse_ScalarConstant(parseState, values)) RETURN_ERROR; paramIndex = _mesa_add_unnamed_constant(parseState->parameters, - values, 4, &swizzle); + values, 4, NULL); ASSERT(swizzle == SWIZZLE_NOOP); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; @@ -1053,7 +1053,7 @@ Parse_VectorSrc(struct parse_state *parseState, if (!Parse_VectorConstant(parseState, values)) RETURN_ERROR; paramIndex = _mesa_add_unnamed_constant(parseState->parameters, - values, 4, &swizzle); + values, 4, NULL); ASSERT(swizzle == SWIZZLE_NOOP); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; @@ -1145,7 +1145,7 @@ Parse_ScalarSrcReg(struct parse_state *parseState, if (!Parse_VectorConstant(parseState, values)) RETURN_ERROR; paramIndex = _mesa_add_unnamed_constant(parseState->parameters, - values, 4, &swizzle); + values, 4, NULL); ASSERT(swizzle == SWIZZLE_NOOP); srcReg->File = PROGRAM_NAMED_PARAM; srcReg->Index = paramIndex; @@ -1171,7 +1171,7 @@ Parse_ScalarSrcReg(struct parse_state *parseState, if (!Parse_ScalarConstant(parseState, values)) RETURN_ERROR; paramIndex = _mesa_add_unnamed_constant(parseState->parameters, - values, 4, &swizzle); + values, 4, NULL); ASSERT(swizzle == SWIZZLE_NOOP); srcReg->Index = paramIndex; srcReg->File = PROGRAM_NAMED_PARAM; diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 4633015de2..adffafdd71 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -192,9 +192,12 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, /** - * Add a new unnamed constant to the parameter list. - * This will be used when the program contains something like this: + * Add a new unnamed constant to the parameter list. This will be used + * when a fragment/vertex program contains something like this: * MOV r, { 0, 1, 2, 3 }; + * We'll search the parameter list for an existing instance of the + * constant. If swizzleOut is non-null, we'll try swizzling when + * looking for a match. * * \param paramList the parameter list * \param values four float values @@ -219,7 +222,7 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, * to add this constant. This will only work for single-element * constants because we rely on smearing (i.e. .yyyy or .zzzz). */ - if (size == 1) { + if (size == 1 && swizzleOut) { for (pos = 0; pos < (GLint) paramList->NumParameters; pos++) { struct gl_program_parameter *p = paramList->Parameters + pos; if (p->Type == PROGRAM_CONSTANT && p->Size + size <= 4) { @@ -237,10 +240,9 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, /* add a new parameter to store this constant */ pos = _mesa_add_parameter(paramList, PROGRAM_CONSTANT, NULL, size, values, NULL); - if (pos >= 0) { + if (pos >= 0 && swizzleOut) { if (size == 1) - *swizzleOut = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, - SWIZZLE_X, SWIZZLE_X); + *swizzleOut = SWIZZLE_XXXX; else *swizzleOut = SWIZZLE_NOOP; } @@ -460,13 +462,14 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, /** * Look for a float vector in the given parameter list. The float vector - * may be of length 1, 2, 3 or 4. + * may be of length 1, 2, 3 or 4. If swizzleOut is non-null, we'll try + * swizzling to find a match. * \param list the parameter list to search * \param v the float vector to search for * \param size number of element in v * \param posOut returns the position of the constant, if found * \param swizzleOut returns a swizzle mask describing location of the - * vector elements if found + * vector elements if found. * \return GL_TRUE if found, GL_FALSE if not found */ GLboolean @@ -484,43 +487,58 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, for (i = 0; i < list->NumParameters; i++) { if (list->Parameters[i].Type == PROGRAM_CONSTANT) { - if (vSize == 1) { - /* look for v[0] anywhere within float[4] value */ - GLuint j; - for (j = 0; j < 4; j++) { - if (list->ParameterValues[i][j] == v[0]) { - /* found it */ - *posOut = i; - *swizzleOut = MAKE_SWIZZLE4(j, j, j, j); - return GL_TRUE; - } - } - } - else if (vSize <= list->Parameters[i].Size) { - /* see if we can match this constant (with a swizzle) */ - GLuint swz[4]; - GLuint match = 0, j, k; + if (!swizzleOut) { + /* swizzle not allowed */ + GLuint j, match = 0; for (j = 0; j < vSize; j++) { - if (v[j] == list->ParameterValues[i][j]) { - swz[j] = j; + if (v[j] == list->ParameterValues[i][j]) match++; - } - else { - for (k = 0; k < list->Parameters[i].Size; k++) { - if (v[j] == list->ParameterValues[i][k]) { - swz[j] = k; - match++; - break; - } - } - } } if (match == vSize) { *posOut = i; - *swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); return GL_TRUE; } } + else { + /* try matching w/ swizzle */ + if (vSize == 1) { + /* look for v[0] anywhere within float[4] value */ + GLuint j; + for (j = 0; j < 4; j++) { + if (list->ParameterValues[i][j] == v[0]) { + /* found it */ + *posOut = i; + *swizzleOut = MAKE_SWIZZLE4(j, j, j, j); + return GL_TRUE; + } + } + } + else if (vSize <= list->Parameters[i].Size) { + /* see if we can match this constant (with a swizzle) */ + GLuint swz[4]; + GLuint match = 0, j, k; + for (j = 0; j < vSize; j++) { + if (v[j] == list->ParameterValues[i][j]) { + swz[j] = j; + match++; + } + else { + for (k = 0; k < list->Parameters[i].Size; k++) { + if (v[j] == list->ParameterValues[i][k]) { + swz[j] = k; + match++; + break; + } + } + } + } + if (match == vSize) { + *posOut = i; + *swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); + return GL_TRUE; + } + } + } } } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index a3cc2333ec..bcd54d6fe9 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -172,10 +172,10 @@ link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog) j = _mesa_lookup_parameter_index(shProg->Uniforms, -1, p->Name); } else { - GLuint swizzle; + /*GLuint swizzle;*/ ASSERT(p->Type == PROGRAM_CONSTANT); if (_mesa_lookup_parameter_constant(shProg->Uniforms, pVals, - p->Size, &j, &swizzle)) { + p->Size, &j, NULL)) { assert(j >= 0); } else { -- cgit v1.2.3 From 12229f119d754715e0315846fdd8d6e9213e8edf Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Mar 2007 09:11:26 -0600 Subject: use _mesa_copy_instructions() --- src/mesa/shader/nvfragparse.c | 3 +-- src/mesa/shader/nvvertparse.c | 3 +-- src/mesa/shader/program.c | 4 ++-- src/mesa/shader/programopt.c | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index c46d8aa083..ffa7ba4701 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -1545,8 +1545,7 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); return; /* out of memory */ } - _mesa_memcpy(newInst, instBuffer, - parseState.numInst * sizeof(struct prog_instruction)); + _mesa_copy_instructions(newInst, instBuffer, parseState.numInst); /* install the program */ program->Base.Target = target; diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index 0bc0c055da..ac96d4a60e 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -1378,8 +1378,7 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, _mesa_free(programString); return; /* out of memory */ } - _mesa_memcpy(newInst, instBuffer, - parseState.numInst * sizeof(struct prog_instruction)); + _mesa_copy_instructions(newInst, instBuffer, parseState.numInst); /* install the program */ program->Base.Target = target; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index ae26c3cc14..c1606acb1a 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -342,8 +342,8 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) _mesa_delete_program(ctx, clone); return NULL; } - memcpy(clone->Instructions, prog->Instructions, - prog->NumInstructions * sizeof(struct prog_instruction)); + _mesa_copy_instructions(clone->Instructions, prog->Instructions, + prog->NumInstructions); clone->InputsRead = prog->InputsRead; clone->OutputsWritten = prog->OutputsWritten; memcpy(clone->TexturesUsed, prog->TexturesUsed, sizeof(prog->TexturesUsed)); diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index d427ee38f8..f1d8ce3065 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -150,8 +150,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog) } /* Copy orig instructions into new instruction buffer */ - _mesa_memcpy(newInst, fprog->Base.Instructions, - origLen * sizeof(struct prog_instruction)); + _mesa_copy_instructions(newInst, fprog->Base.Instructions, origLen); /* PARAM fogParamsRefOpt = internal optimized fog params; */ fogPRefOpt -- cgit v1.2.3 From 0aad9e262784b0f2ac85afdce88414c986dae2f7 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Mar 2007 09:15:39 -0600 Subject: First pass at implementing structure compares. Need to improve this. There may be holes in a structure so we can't just blindly compare the full 4-float registers. --- src/mesa/shader/slang/slang_emit.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index e578c82995..bc08104ada 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -778,25 +778,48 @@ static struct prog_instruction * emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; + gl_inst_opcode opcode; assert(n->Opcode == IR_SEQUAL || n->Opcode == IR_SNEQUAL); + opcode = n->Opcode == IR_SEQUAL ? OPCODE_SEQ : OPCODE_SNE; + /* gen code for children */ emit(emitInfo, n->Children[0]); emit(emitInfo, n->Children[1]); assert(n->Children[0]->Store->Size == n->Children[1]->Store->Size); - /* gen this instruction and src registers */ - inst = new_instruction(emitInfo, - (n->Opcode == IR_SEQUAL) ? OPCODE_SEQ : OPCODE_SNE); + if (!n->Store) { + if (!alloc_temp_storage(emitInfo, n, 1)) /* 1 bool */ + return NULL; + } + if (n->Children[0]->Store->Size > 4) { /* struct compare */ - _mesa_problem(NULL, "struct compare not implemented!"); - return NULL; + GLint i, num = (n->Children[0]->Store->Size + 3) / 4; + + /*printf("BEGIN COMPARE size %d\n", num);*/ + for (i = 0; i < num; i++) { + inst = new_instruction(emitInfo, opcode); + inst->SrcReg[0].File = n->Children[0]->Store->File; + inst->SrcReg[0].Index = n->Children[0]->Store->Index + i; + inst->SrcReg[1].File = n->Children[1]->Store->File; + inst->SrcReg[1].Index = n->Children[1]->Store->Index + i; + inst->DstReg.File = n->Store->File; + inst->DstReg.Index = n->Store->Index; + if (i == 0) { + inst->CondUpdate = 1; /* update cond code */ + } + else { + inst->DstReg.CondMask = COND_NE; /* update if !=0 */ + } + /*_mesa_print_instruction(inst);*/ + } } else { /* small/simple types */ + inst = new_instruction(emitInfo, opcode); storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); } @@ -806,10 +829,6 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) free_temp_storage(emitInfo->vt, n->Children[1]); /* result storage */ - if (!n->Store) { - if (!alloc_temp_storage(emitInfo, n, 1)) /* 1 bool */ - return NULL; - } storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); return inst; -- cgit v1.2.3 From e6aeb24b23097024ba60e1c49239a18692f781e1 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Mar 2007 16:07:14 -0600 Subject: Overhaul emit_compare() function. Previously, comparing vec2, vec3, vec4 was broken. Added IR_EQUAL, IR_NOTEQUAL nodes/operators to compute boolean equality/inequality vs. IR_SEQUAL/IR_SNEQUAL which work component-wise. Use IR_EQUAL/IR_NOTEQUAL for the == and != operators. To compute vec4 equality, use SNE, DP4, SEQ instruction sequence. --- src/mesa/shader/slang/slang_codegen.c | 4 +- src/mesa/shader/slang/slang_emit.c | 156 ++++++++++++++++++++++++++++------ src/mesa/shader/slang/slang_ir.h | 19 +++-- 3 files changed, 143 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 89a891562e..f1be713c05 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2369,11 +2369,11 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) return new_node0(IR_KILL); case SLANG_OPER_EQUAL: - return new_node2(IR_SEQUAL, + return new_node2(IR_EQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_NOTEQUAL: - return new_node2(IR_SNEQUAL, + return new_node2(IR_NOTEQUAL, _slang_gen_operation(A, &oper->children[0]), _slang_gen_operation(A, &oper->children[1])); case SLANG_OPER_GREATER: diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index bc08104ada..6442a02363 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -462,6 +462,12 @@ storage_to_dst_reg(struct prog_dst_register *dst, const slang_ir_storage *st, GLuint comp = GET_SWZ(st->Swizzle, 0); assert(comp < 4); assert(writemask & WRITEMASK_X); + /* + assert((writemask == WRITEMASK_X) || + (writemask == WRITEMASK_Y) || + (writemask == WRITEMASK_Z) || + (writemask == WRITEMASK_W)); + */ dst->WriteMask = WRITEMASK_X << comp; } else { @@ -778,27 +784,100 @@ static struct prog_instruction * emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; - gl_inst_opcode opcode; - - assert(n->Opcode == IR_SEQUAL || n->Opcode == IR_SNEQUAL); + GLint size; - opcode = n->Opcode == IR_SEQUAL ? OPCODE_SEQ : OPCODE_SNE; + assert(n->Opcode == IR_EQUAL || n->Opcode == IR_NOTEQUAL); /* gen code for children */ emit(emitInfo, n->Children[0]); emit(emitInfo, n->Children[1]); +#if 0 assert(n->Children[0]->Store->Size == n->Children[1]->Store->Size); + size = n->Children[0]->Store->Size; +#else + /* XXX kind of a hack for now... */ + size = MIN2(n->Children[0]->Store->Size, n->Children[1]->Store->Size); +#endif + if (size == 1) { + gl_inst_opcode opcode; - if (!n->Store) { - if (!alloc_temp_storage(emitInfo, n, 1)) /* 1 bool */ - return NULL; + if (!n->Store) { + if (!alloc_temp_storage(emitInfo, n, 1)) /* 1 bool */ + return NULL; + } + + opcode = n->Opcode == IR_EQUAL ? OPCODE_SEQ : OPCODE_SNE; + inst = new_instruction(emitInfo, opcode); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + ASSERT(inst->SrcReg[0].Swizzle != SWIZZLE_XYZW); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + ASSERT(inst->SrcReg[1].Swizzle != SWIZZLE_XYZW); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); } + else if (size <= 4) { + static const GLfloat zero[4] = { 0, 0, 0, 0 }; + GLuint zeroSwizzle, swizzle; + GLint zeroReg = _mesa_add_unnamed_constant(emitInfo->prog->Parameters, + zero, 4, &zeroSwizzle); + gl_inst_opcode dotOp; + + assert(zeroReg >= 0); - if (n->Children[0]->Store->Size > 4) { - /* struct compare */ - GLint i, num = (n->Children[0]->Store->Size + 3) / 4; + if (!n->Store) { + if (!alloc_temp_storage(emitInfo, n, 4)) /* 4 bools */ + return NULL; + } + + if (size == 4) { + dotOp = OPCODE_DP4; + swizzle = SWIZZLE_XYZW; + } + else if (size == 3) { + dotOp = OPCODE_DP3; + swizzle = SWIZZLE_XYZW; + } + else { + assert(size == 2); + dotOp = OPCODE_DP3; + swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Y, SWIZZLE_Y); + } + /* Compute equality, inequality */ + inst = new_instruction(emitInfo, OPCODE_SNE); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + inst->Comment = _mesa_strdup("Compare values"); + /* compute D = DP4(D, D) (reduction) */ + inst = new_instruction(emitInfo, dotOp); + inst->SrcReg[0].File = PROGRAM_TEMPORARY; + inst->SrcReg[0].Index = n->Store->Index; + inst->SrcReg[0].Swizzle = swizzle; + inst->SrcReg[1].File = PROGRAM_TEMPORARY; + inst->SrcReg[1].Index = n->Store->Index; + inst->SrcReg[1].Swizzle = swizzle; + inst->DstReg.File = PROGRAM_TEMPORARY; + inst->DstReg.Index = n->Store->Index; + inst->Comment = _mesa_strdup("Reduce vec to bool"); + /* compute D = (D == 0) actually: D.x = (D.x = 0) */ + if (n->Opcode == IR_EQUAL) { + inst = new_instruction(emitInfo, OPCODE_SEQ); + inst->SrcReg[0].File = PROGRAM_TEMPORARY; + inst->SrcReg[0].Index = n->Store->Index; + inst->SrcReg[1].File = PROGRAM_CONSTANT; + inst->SrcReg[1].Index = zeroReg; + inst->SrcReg[1].Swizzle = zeroSwizzle; + inst->DstReg.File = PROGRAM_TEMPORARY; + inst->DstReg.Index = n->Store->Index; + inst->DstReg.WriteMask = WRITEMASK_X; + inst->Comment = _mesa_strdup("Invert true/false"); + } + } + else { + /* size > 4, struct compare */ +#if 0 + GLint i, num = (n->Children[0]->Store->Size + 3) / 4; /*printf("BEGIN COMPARE size %d\n", num);*/ for (i = 0; i < num; i++) { inst = new_instruction(emitInfo, opcode); @@ -808,29 +887,23 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) inst->SrcReg[1].Index = n->Children[1]->Store->Index + i; inst->DstReg.File = n->Store->File; inst->DstReg.Index = n->Store->Index; - if (i == 0) { - inst->CondUpdate = 1; /* update cond code */ - } - else { + + inst->CondUpdate = 1; /* update cond code */ + if (i > 0) { inst->DstReg.CondMask = COND_NE; /* update if !=0 */ } /*_mesa_print_instruction(inst);*/ } - } - else { - /* small/simple types */ - inst = new_instruction(emitInfo, opcode); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store); + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); +#endif + _mesa_problem(NULL, "struct comparison not implemented yet"); + inst = NULL; } /* free temps */ free_temp_storage(emitInfo->vt, n->Children[0]); free_temp_storage(emitInfo->vt, n->Children[1]); - /* result storage */ - storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - return inst; } @@ -1092,9 +1165,11 @@ emit_cond(slang_emit_info *emitInfo, slang_ir_node *n) return NULL; inst = emit(emitInfo, n->Children[0]); + if (inst) { /* set inst's CondUpdate flag */ inst->CondUpdate = GL_TRUE; + n->Store = n->Children[0]->Store; return inst; /* XXX or null? */ } else { @@ -1161,19 +1236,24 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) GLuint ifInstLoc, elseInstLoc = 0; emit(emitInfo, n->Children[0]); /* the condition */ + +#if 0 + assert(n->Children[0]->Store->Size == 1); /* a bool! */ +#endif + ifInstLoc = prog->NumInstructions; if (emitInfo->EmitHighLevelInstructions) { ifInst = new_instruction(emitInfo, OPCODE_IF); ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ - ifInst->DstReg.CondSwizzle = SWIZZLE_X; } else { /* conditional jump to else, or endif */ ifInst = new_instruction(emitInfo, OPCODE_BRA); ifInst->DstReg.CondMask = COND_EQ; /* BRA if cond is zero */ - ifInst->DstReg.CondSwizzle = SWIZZLE_X; ifInst->Comment = _mesa_strdup("if zero"); } + /* which condition code to use: */ + ifInst->DstReg.CondSwizzle = n->Children[0]->Store->Swizzle; /* if body */ emit(emitInfo, n->Children[1]); @@ -1354,6 +1434,20 @@ fix_swizzle(GLuint swizzle) } +#if 0 +static GLuint +swizzle_size(GLuint swizzle) +{ + GLuint size = 0, i; + for (i = 0; i < 4; i++) { + GLuint swz = GET_SWZ(swizzle, i); + size += (swz >= 0 && swz <= 3); + } + return size; +} +#endif + + static struct prog_instruction * emit_swizzle(slang_emit_info *emitInfo, slang_ir_node *n) { @@ -1380,6 +1474,12 @@ emit_swizzle(slang_emit_info *emitInfo, slang_ir_node *n) } #endif +#if 0 + n->Store->Size = swizzle_size(n->Store->Swizzle); + printf("Emit Swizzle reg %d chSize %d size %d\n", + n->Store->Index, n->Children[0]->Store->Size, + n->Store->Size); +#endif /* apply this swizzle to child's swizzle to get composed swizzle */ n->Store->Swizzle = swizzle_swizzle(n->Children[0]->Store->Swizzle, swizzle); @@ -1577,6 +1677,8 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) case IR_CROSS: case IR_MIN: case IR_MAX: + case IR_SEQUAL: + case IR_SNEQUAL: case IR_SGE: case IR_SGT: case IR_SLE: @@ -1588,8 +1690,8 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) case IR_LRP: return emit_arith(emitInfo, n); - case IR_SEQUAL: - case IR_SNEQUAL: + case IR_EQUAL: + case IR_NOTEQUAL: return emit_compare(emitInfo, n); case IR_CLAMP: diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 3c5526e3c5..cc9df69e72 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -69,6 +69,8 @@ typedef enum IR_CONT_IF_FALSE, IR_MOVE, + + /* vector ops: */ IR_ADD, IR_SUB, IR_MUL, @@ -80,12 +82,12 @@ typedef enum IR_CLAMP, IR_MIN, IR_MAX, - IR_SEQUAL, /* Set if args are equal */ - IR_SNEQUAL, /* Set if args are not equal */ - IR_SGE, /* Set if greater or equal */ - IR_SGT, /* Set if greater than */ - IR_SLE, /* Set if less or equal */ - IR_SLT, /* Set if less than */ + IR_SEQUAL, /* Set if args are equal (vector) */ + IR_SNEQUAL, /* Set if args are not equal (vector) */ + IR_SGE, /* Set if greater or equal (vector) */ + IR_SGT, /* Set if greater than (vector) */ + IR_SLE, /* Set if less or equal (vector) */ + IR_SLT, /* Set if less than (vector) */ IR_POW, /* x^y */ IR_EXP, /* e^x */ IR_EXP2, /* 2^x */ @@ -104,7 +106,10 @@ typedef enum IR_NOISE2, /* noise(x, y) */ IR_NOISE3, /* noise(x, y, z) */ IR_NOISE4, /* noise(x, y, z, w) */ - IR_NOT, /* logical not */ + + IR_EQUAL, /* boolean equality */ + IR_NOTEQUAL,/* boolean inequality */ + IR_NOT, /* boolean not */ IR_VAR, /* variable reference */ IR_VAR_DECL,/* var declaration */ -- cgit v1.2.3 From fe20a619cf382e7d21a31b096311dab8254b2b0c Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 22 Mar 2007 16:07:43 -0600 Subject: updated comment --- src/mesa/shader/prog_instruction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index 12e8480125..c800757aa0 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -298,7 +298,7 @@ struct prog_dst_register /*@{*/ /** * Takes one of the 9 possible condition values (EQ, FL, GT, GE, LE, LT, - * NE, TR, or UN). Destination update is enabled if the matching + * NE, TR, or UN). Dest reg is only written to if the matching * (swizzled) condition code value passes. When a conditional update mask * is not specified, this will be \c COND_TR. */ -- cgit v1.2.3 From 2bdac09d16904334424a53d4c7436408a5cc3ca5 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Mar 2007 10:46:08 -0600 Subject: updated comment --- src/mesa/shader/slang/slang_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6442a02363..16a054b35e 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -860,8 +860,8 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) inst->DstReg.File = PROGRAM_TEMPORARY; inst->DstReg.Index = n->Store->Index; inst->Comment = _mesa_strdup("Reduce vec to bool"); - /* compute D = (D == 0) actually: D.x = (D.x = 0) */ if (n->Opcode == IR_EQUAL) { + /* compute D.x = !D.x via D.x = (D.x == 0) */ inst = new_instruction(emitInfo, OPCODE_SEQ); inst->SrcReg[0].File = PROGRAM_TEMPORARY; inst->SrcReg[0].Index = n->Store->Index; -- cgit v1.2.3 From bf020d8d7f719dfea7ea3c65bd2833df6439b59e Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Mar 2007 14:44:34 -0600 Subject: minor tweaks --- src/mesa/shader/slang/slang_codegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index f1be713c05..4e41aa8700 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1369,7 +1369,7 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) loop->Children[0] = new_seq(breakIf, body); /* Do infinite loop detection */ - if (loop->BranchNode == 0 && isConst && constTrue) { + if (!loop->BranchNode && isConst && constTrue) { /* infinite loop detected */ A->CurLoop = prevLoop; /* clean-up */ slang_info_log_error(A->log, "Infinite loop detected!"); @@ -1485,7 +1485,7 @@ static slang_ir_node * _slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper) { /* - * eval expr (child[0]), updating condcodes + * eval expr (child[0]) * IF expr THEN * if-body code * ELSE -- cgit v1.2.3 From 63556fa9949f543a8134b6b5ff3d216acb71dd9f Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Mar 2007 14:47:46 -0600 Subject: Add the ability to generate programs that doesn't use condition codes. ctx->Shader.EmitCondCodes determines if we use condition codes. If not, IF statement uses first operand's X component as the condition. Added OPCODE_BRK0, OPCODE_BRK1, OPCODE_CONT0, OPCODE_CONT1 to handle the common cases of conditional break/continue. --- src/mesa/main/mtypes.h | 6 +- src/mesa/shader/prog_execute.c | 53 +++++++++++++--- src/mesa/shader/prog_instruction.c | 6 +- src/mesa/shader/prog_instruction.h | 4 ++ src/mesa/shader/prog_print.c | 30 +++++++-- src/mesa/shader/shader_api.c | 1 + src/mesa/shader/slang/slang_emit.c | 123 ++++++++++++++++++++++++++----------- src/mesa/tnl/t_vb_arbprogram.c | 4 ++ 8 files changed, 176 insertions(+), 51 deletions(-) (limited to 'src') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 0c9bf200d8..828b0f2384 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2127,8 +2127,10 @@ struct gl_shader_program struct gl_shader_state { struct gl_shader_program *CurrentProgram; /**< The user-bound program */ - GLboolean EmitHighLevelInstructions; /**< Driver-selectable */ - GLboolean EmitComments; /**< Driver-selectable */ + /** Driver-selectable options: */ + GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */ + GLboolean EmitCondCodes; /**< Use condition codes? */ + GLboolean EmitComments; /**< Annotated instructions */ }; diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 092c07f7b6..f881d477ca 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -720,6 +720,32 @@ _mesa_execute_program(GLcontext * ctx, pc = inst->BranchTarget - 1; } break; + case OPCODE_BRK0: /* Break if zero */ + /* fall-through */ + case OPCODE_CONT0: /* Continue if zero */ + { + GLfloat a[4]; + fetch_vector1(&inst->SrcReg[0], machine, a); + if (a[0] == 0.0) { + /* take branch */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; + } + } + break; + case OPCODE_BRK1: /* Break if non-zero */ + /* fall-through */ + case OPCODE_CONT1: /* Continue if non-zero */ + { + GLfloat a[4]; + fetch_vector1(&inst->SrcReg[0], machine, a); + if (a[0] != 0.0) { + /* take branch */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; + } + } + break; case OPCODE_CAL: /* Call subroutine (conditional) */ if (eval_condition(machine, inst)) { /* call the subroutine */ @@ -914,13 +940,26 @@ _mesa_execute_program(GLcontext * ctx, } break; case OPCODE_IF: - if (eval_condition(machine, inst)) { - /* do if-clause (just continue execution) */ - } - else { - /* go to the instruction after ELSE or ENDIF */ - assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; + { + GLboolean cond; + /* eval condition */ + if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { + GLfloat a[4]; + fetch_vector1(&inst->SrcReg[0], machine, a); + cond = (a[0] != 0.0); + } + else { + cond = eval_condition(machine, inst); + } + /* do if/else */ + if (cond) { + /* do if-clause (just continue execution) */ + } + else { + /* go to the instruction after ELSE or ENDIF */ + assert(inst->BranchTarget >= 0); + pc = inst->BranchTarget - 1; + } } break; case OPCODE_ELSE: diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index ed479a7f61..272caf6c74 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -138,9 +138,13 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = { { OPCODE_BGNSUB, "BGNSUB", 0 }, { OPCODE_BRA, "BRA", 0 }, { OPCODE_BRK, "BRK", 0 }, + { OPCODE_BRK0, "BRK0", 1 }, + { OPCODE_BRK1, "BRK1", 1 }, { OPCODE_CAL, "CAL", 0 }, { OPCODE_CMP, "CMP", 3 }, - { OPCODE_CONT, "CONT", 1 }, + { OPCODE_CONT, "CONT", 0 }, + { OPCODE_CONT0, "CONT0", 1 }, + { OPCODE_CONT1, "CONT1", 1 }, { OPCODE_COS, "COS", 1 }, { OPCODE_DDX, "DDX", 1 }, { OPCODE_DDY, "DDY", 1 }, diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index c800757aa0..dc2d2dc29b 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -153,9 +153,13 @@ typedef enum prog_opcode { OPCODE_BGNSUB, /* opt */ OPCODE_BRA, /* 2 X */ OPCODE_BRK, /* 2 opt */ + OPCODE_BRK0, /* opt */ + OPCODE_BRK1, /* opt */ OPCODE_CAL, /* 2 2 */ OPCODE_CMP, /* X */ OPCODE_CONT, /* opt */ + OPCODE_CONT0, /* opt */ + OPCODE_CONT1, /* opt */ OPCODE_COS, /* X 2 X X */ OPCODE_DDX, /* X X */ OPCODE_DDY, /* X X */ diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index d290ce0a2a..39d2a07812 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -572,10 +572,20 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, print_comment(inst); break; case OPCODE_IF: - _mesa_printf("IF (%s%s); # (if false, goto %d)", - condcode_string(inst->DstReg.CondMask), - _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), - inst->BranchTarget); + if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { + /* Use ordinary register */ + _mesa_printf("IF "); + print_src_reg(&inst->SrcReg[0], mode, prog); + _mesa_printf("; "); + } + else { + /* Use cond codes */ + _mesa_printf("IF (%s%s);", + condcode_string(inst->DstReg.CondMask), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, + 0, GL_FALSE)); + } + _mesa_printf(" # (if false, goto %d)", inst->BranchTarget); print_comment(inst); return indent + 3; case OPCODE_ELSE: @@ -604,6 +614,18 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, inst->BranchTarget); print_comment(inst); break; + + case OPCODE_BRK0: + case OPCODE_BRK1: + case OPCODE_CONT0: + case OPCODE_CONT1: + _mesa_printf("%s ", _mesa_opcode_string(inst->Opcode)); + print_src_reg(&inst->SrcReg[0], mode, prog); + _mesa_printf("; "); + _mesa_printf(" # (goto %d)", inst->BranchTarget); + print_comment(inst); + break; + case OPCODE_BGNSUB: _mesa_printf("SUB"); print_comment(inst); diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index aab522e292..88aa8c50f5 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -206,6 +206,7 @@ _mesa_init_shader_state(GLcontext * ctx) * are generated by the GLSL compiler. */ ctx->Shader.EmitHighLevelInstructions = GL_TRUE; + ctx->Shader.EmitCondCodes = GL_TRUE; /* XXX probably want GL_FALSE... */ ctx->Shader.EmitComments = GL_FALSE; } diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 16a054b35e..9e476b8a0f 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -61,6 +61,7 @@ typedef struct struct gl_program *prog; /* code-gen options */ GLboolean EmitHighLevelInstructions; + GLboolean EmitCondCodes; GLboolean EmitComments; } slang_emit_info; @@ -1155,10 +1156,6 @@ emit_move(slang_emit_info *emitInfo, slang_ir_node *n) static struct prog_instruction * emit_cond(slang_emit_info *emitInfo, slang_ir_node *n) { - /* Conditional expression (in if/while/for stmts). - * Need to update condition code register. - * Next instruction is typically an IR_IF. - */ struct prog_instruction *inst; if (!n->Children[0]) @@ -1166,28 +1163,39 @@ emit_cond(slang_emit_info *emitInfo, slang_ir_node *n) inst = emit(emitInfo, n->Children[0]); - if (inst) { - /* set inst's CondUpdate flag */ - inst->CondUpdate = GL_TRUE; - n->Store = n->Children[0]->Store; - return inst; /* XXX or null? */ + if (emitInfo->EmitCondCodes) { + /* Conditional expression (in if/while/for stmts). + * Need to update condition code register. + * Next instruction is typically an IR_IF. + */ + if (inst) { + /* set inst's CondUpdate flag */ + inst->CondUpdate = GL_TRUE; + n->Store = n->Children[0]->Store; + return inst; /* XXX or null? */ + } + else { + /* This'll happen for things like "if (i) ..." where no code + * is normally generated for the expression "i". + * Generate a move instruction just to set condition codes. + * Note: must use full 4-component vector since all four + * condition codes must be set identically. + */ + if (!alloc_temp_storage(emitInfo, n, 4)) + return NULL; + inst = new_instruction(emitInfo, OPCODE_MOV); + inst->CondUpdate = GL_TRUE; + storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + _slang_free_temp(emitInfo->vt, n->Store); + inst->Comment = _mesa_strdup("COND expr"); + return inst; /* XXX or null? */ + } } else { - /* This'll happen for things like "if (i) ..." where no code - * is normally generated for the expression "i". - * Generate a move instruction just to set condition codes. - * Note: must use full 4-component vector since all four - * condition codes must be set identically. - */ - if (!alloc_temp_storage(emitInfo, n, 4)) - return NULL; - inst = new_instruction(emitInfo, OPCODE_MOV); - inst->CondUpdate = GL_TRUE; - storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask); - storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); - _slang_free_temp(emitInfo->vt, n->Store); - inst->Comment = _mesa_strdup("COND expr"); - return inst; /* XXX or null? */ + /* No-op */ + n->Store = n->Children[0]->Store; + return NULL; } } @@ -1244,7 +1252,13 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) ifInstLoc = prog->NumInstructions; if (emitInfo->EmitHighLevelInstructions) { ifInst = new_instruction(emitInfo, OPCODE_IF); - ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ + if (emitInfo->EmitCondCodes) { + ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */ + } + else { + /* test reg.x */ + storage_to_src_reg(&ifInst->SrcReg[0], n->Children[0]->Store); + } } else { /* conditional jump to else, or endif */ @@ -1252,8 +1266,10 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) ifInst->DstReg.CondMask = COND_EQ; /* BRA if cond is zero */ ifInst->Comment = _mesa_strdup("if zero"); } - /* which condition code to use: */ - ifInst->DstReg.CondSwizzle = n->Children[0]->Store->Swizzle; + if (emitInfo->EmitCondCodes) { + /* which condition code to use: */ + ifInst->DstReg.CondSwizzle = n->Children[0]->Store->Swizzle; + } /* if body */ emit(emitInfo, n->Children[1]); @@ -1342,6 +1358,8 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) ir->Opcode == IR_BREAK_IF_FALSE || ir->Opcode == IR_BREAK_IF_TRUE) { assert(inst->Opcode == OPCODE_BRK || + inst->Opcode == OPCODE_BRK0 || + inst->Opcode == OPCODE_BRK1 || inst->Opcode == OPCODE_BRA); /* go to instruction after end of loop */ inst->BranchTarget = endInstLoc + 1; @@ -1351,6 +1369,8 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) ir->Opcode == IR_CONT_IF_FALSE || ir->Opcode == IR_CONT_IF_TRUE); assert(inst->Opcode == OPCODE_CONT || + inst->Opcode == OPCODE_CONT0 || + inst->Opcode == OPCODE_CONT1 || inst->Opcode == OPCODE_BRA); /* to go instruction at top of loop */ inst->BranchTarget = beginInstLoc; @@ -1361,7 +1381,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) /** - * "Continue" or "break" statement. + * Unconditional "continue" or "break" statement. * Either OPCODE_CONT, OPCODE_BRK or OPCODE_BRA will be emitted. */ static struct prog_instruction * @@ -1393,24 +1413,52 @@ emit_cont_break_if(slang_emit_info *emitInfo, slang_ir_node *n, gl_inst_opcode opcode; struct prog_instruction *inst; + assert(n->Opcode == IR_CONT_IF_TRUE || + n->Opcode == IR_CONT_IF_FALSE || + n->Opcode == IR_BREAK_IF_TRUE || + n->Opcode == IR_BREAK_IF_FALSE); + /* evaluate condition expr, setting cond codes */ inst = emit(emitInfo, n->Children[0]); - assert(inst); - inst->CondUpdate = GL_TRUE; + if (emitInfo->EmitCondCodes) { + assert(inst); + inst->CondUpdate = GL_TRUE; + } n->InstLocation = emitInfo->prog->NumInstructions; + + /* opcode selection */ if (emitInfo->EmitHighLevelInstructions) { - if (n->Opcode == IR_CONT_IF_TRUE || - n->Opcode == IR_CONT_IF_FALSE) - opcode = OPCODE_CONT; - else - opcode = OPCODE_BRK; + if (emitInfo->EmitCondCodes) { + if (n->Opcode == IR_CONT_IF_TRUE || + n->Opcode == IR_CONT_IF_FALSE) + opcode = OPCODE_CONT; + else + opcode = OPCODE_BRK; + } + else { + if (n->Opcode == IR_CONT_IF_TRUE) + opcode = OPCODE_CONT1; + else if (n->Opcode == IR_CONT_IF_FALSE) + opcode = OPCODE_CONT0; + else if (n->Opcode == IR_BREAK_IF_TRUE) + opcode = OPCODE_BRK1; + else if (n->Opcode == IR_BREAK_IF_FALSE) + opcode = OPCODE_BRK0; + } } else { opcode = OPCODE_BRA; } + inst = new_instruction(emitInfo, opcode); - inst->DstReg.CondMask = breakTrue ? COND_NE : COND_EQ; + if (emitInfo->EmitCondCodes) { + inst->DstReg.CondMask = breakTrue ? COND_NE : COND_EQ; + } + else { + /* BRK0, BRK1, CONT0, CONT1 */ + storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); + } return inst; } @@ -1779,7 +1827,8 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, emitInfo.prog = prog; emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions; - emitInfo.EmitComments = 1+ctx->Shader.EmitComments; + emitInfo.EmitCondCodes = 0; /* XXX temporary! */ + emitInfo.EmitComments = ctx->Shader.EmitComments; (void) emit(&emitInfo, n); diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index b322d48b23..425a866994 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -741,9 +741,13 @@ static gpu_function opcode_func[MAX_OPCODE+3] = do_NOP,/*BGNSUB*/ do_NOP,/*BRA*/ do_NOP,/*BRK*/ + do_NOP,/*BRK0*/ + do_NOP,/*BRK1*/ do_NOP,/*CAL*/ do_NOP,/*CMP*/ do_NOP,/*CONT*/ + do_NOP,/*CONT0*/ + do_NOP,/*CONT1*/ do_NOP,/*COS*/ do_NOP,/*DDX*/ do_NOP,/*DDY*/ -- cgit v1.2.3 From 81767eead9e1b1b5d5dfd274c0875fa1332a5983 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Mar 2007 17:45:53 -0600 Subject: consolidate some code --- src/mesa/shader/prog_print.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 39d2a07812..3f7ad47e05 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -601,14 +601,9 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent, _mesa_printf("ENDLOOP; # (goto %d)\n", inst->BranchTarget); break; case OPCODE_BRK: - _mesa_printf("BRK (%s%s); #(goto %d)", - condcode_string(inst->DstReg.CondMask), - _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), - inst->BranchTarget); - print_comment(inst); - break; case OPCODE_CONT: - _mesa_printf("CONT (%s%s); #(goto %d)", + _mesa_printf("%s (%s%s); # (goto %d)", + _mesa_opcode_string(inst->Opcode), condcode_string(inst->DstReg.CondMask), _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), inst->BranchTarget); -- cgit v1.2.3 From d1934c2065751e2c594316c5abd2c49c47bfc1b8 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Mar 2007 17:48:42 -0600 Subject: Fix issues related to the 'continue' statement. IR_LOOP now has two children: the body code, and the tail code. Tail code is the "i++" part of a for-loop, or the expression at the end of a "do {} while(expr);" loop. "continue" translates into: "execute tail code; CONT;" Also, the test for infinite do/while loops was incorrect. --- src/mesa/shader/slang/slang_codegen.c | 88 +++++++++++++++++++---------------- src/mesa/shader/slang/slang_emit.c | 79 ++++++++++++++++++++++++++----- src/mesa/shader/slang/slang_ir.h | 11 ++++- 3 files changed, 126 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 4e41aa8700..2eb509b4d1 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -414,7 +414,7 @@ _slang_free_ir_tree(slang_ir_node *n) return; for (i = 0; i < 3; i++) _slang_free_ir_tree(n->Children[i]); - /* Do not free n->BranchNode since it's a child elsewhere */ + /* Do not free n->List since it's a child elsewhere */ free(n); #endif } @@ -515,8 +515,8 @@ new_break(slang_ir_node *loopNode) assert(loopNode->Opcode == IR_LOOP); if (n) { /* insert this node at head of linked list */ - n->BranchNode = loopNode->BranchNode; - loopNode->BranchNode = n; + n->List = loopNode->List; + loopNode->List = n; } return n; } @@ -534,8 +534,8 @@ new_break_if(slang_ir_node *loopNode, slang_ir_node *cond, GLboolean breakTrue) n = new_node1(breakTrue ? IR_BREAK_IF_TRUE : IR_BREAK_IF_FALSE, cond); if (n) { /* insert this node at head of linked list */ - n->BranchNode = loopNode->BranchNode; - loopNode->BranchNode = n; + n->List = loopNode->List; + loopNode->List = n; } return n; } @@ -553,23 +553,8 @@ new_cont_if(slang_ir_node *loopNode, slang_ir_node *cond, GLboolean contTrue) n = new_node1(contTrue ? IR_CONT_IF_TRUE : IR_CONT_IF_FALSE, cond); if (n) { /* insert this node at head of linked list */ - n->BranchNode = loopNode->BranchNode; - loopNode->BranchNode = n; - } - return n; -} - - -static slang_ir_node * -new_cont(slang_ir_node *loopNode) -{ - slang_ir_node *n = new_node0(IR_CONT); - assert(loopNode); - assert(loopNode->Opcode == IR_LOOP); - if (n) { - /* insert this node at head of linked list */ - n->BranchNode = loopNode->BranchNode; - loopNode->BranchNode = n; + n->List = loopNode->List; + loopNode->List = n; } return n; } @@ -1369,7 +1354,8 @@ _slang_gen_while(slang_assemble_ctx * A, const slang_operation *oper) loop->Children[0] = new_seq(breakIf, body); /* Do infinite loop detection */ - if (!loop->BranchNode && isConst && constTrue) { + /* loop->List is head of linked list of break/continue nodes */ + if (!loop->List && isConst && constTrue) { /* infinite loop detected */ A->CurLoop = prevLoop; /* clean-up */ slang_info_log_error(A->log, "Infinite loop detected!"); @@ -1392,30 +1378,33 @@ _slang_gen_do(slang_assemble_ctx * A, const slang_operation *oper) /* * LOOP: * body code (child[0]) - * BREAK if !expr (child[1]) + * tail code: + * BREAK if !expr (child[1]) */ - slang_ir_node *prevLoop, *loop, *cond, *breakIf, *body; + slang_ir_node *prevLoop, *loop, *cond; GLboolean isConst, constTrue; - /* Check if loop condition is a constant */ - isConst = _slang_is_constant_cond(&oper->children[0], &constTrue); - loop = new_loop(NULL); /* save old, push new loop */ prevLoop = A->CurLoop; A->CurLoop = loop; - body = _slang_gen_operation(A, &oper->children[0]); - cond = new_cond(_slang_gen_operation(A, &oper->children[1])); + /* loop body: */ + loop->Children[0] = _slang_gen_operation(A, &oper->children[0]); + + /* Check if loop condition is a constant */ + isConst = _slang_is_constant_cond(&oper->children[1], &constTrue); if (isConst && constTrue) { - /* while(nonzero constant), no conditional break */ - breakIf = NULL; + /* do { } while(1) ==> no conditional break */ + loop->Children[1] = NULL; /* no tail code */ } else { - breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); + cond = new_cond(_slang_gen_operation(A, &oper->children[1])); + loop->Children[1] = new_break_if(A->CurLoop, cond, GL_FALSE); } - loop->Children[0] = new_seq(body, breakIf); + + /* XXX we should do infinite loop detection, as above */ /* pop loop, restore prev */ A->CurLoop = prevLoop; @@ -1431,11 +1420,12 @@ static slang_ir_node * _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) { /* - * init (child[0]) + * init code (child[0]) * LOOP: * BREAK if !expr (child[1]) * body code (child[3]) - * incr code (child[2]) // XXX continue here + * tail code: + * incr code (child[2]) // XXX continue here */ slang_ir_node *prevLoop, *loop, *cond, *breakIf, *body, *init, *incr; @@ -1450,8 +1440,9 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) breakIf = new_break_if(A->CurLoop, cond, GL_FALSE); body = _slang_gen_operation(A, &oper->children[3]); incr = _slang_gen_operation(A, &oper->children[2]); - loop->Children[0] = new_seq(breakIf, - new_seq(body, incr)); + + loop->Children[0] = new_seq(breakIf, body); + loop->Children[1] = incr; /* tail code */ /* pop loop, restore prev */ A->CurLoop = prevLoop; @@ -1460,6 +1451,25 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper) } +static slang_ir_node * +_slang_gen_continue(slang_assemble_ctx * A, const slang_operation *oper) +{ + slang_ir_node *n, *loopNode; + assert(oper->type == SLANG_OPER_CONTINUE); + loopNode = A->CurLoop; + assert(loopNode); + assert(loopNode->Opcode == IR_LOOP); + n = new_node0(IR_CONT); + if (n) { + n->Parent = loopNode; + /* insert this node at head of linked list */ + n->List = loopNode->List; + loopNode->List = n; + } + return n; +} + + /** * Determine if the given operation is of a specific type. */ @@ -2364,7 +2374,7 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper) if (!A->CurLoop) { slang_info_log_error(A->log, "'continue' not in loop"); } - return new_cont(A->CurLoop); + return _slang_gen_continue(A, oper); case SLANG_OPER_DISCARD: return new_node0(IR_KILL); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 9e476b8a0f..6ec20daabb 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -316,6 +316,7 @@ slang_print_ir(const slang_ir_node *n, int indent) printf("ELSE\n"); slang_print_ir(n->Children[2], indent+3); } + spaces(indent); printf("ENDIF\n"); break; @@ -335,6 +336,11 @@ slang_print_ir(const slang_ir_node *n, int indent) case IR_LOOP: printf("LOOP\n"); slang_print_ir(n->Children[0], indent+3); + if (n->Children[1]) { + spaces(indent); + printf("TAIL:\n"); + slang_print_ir(n->Children[1], indent+3); + } spaces(indent); printf("ENDLOOP\n"); break; @@ -685,6 +691,19 @@ instruction_annotation(gl_inst_opcode opcode, char *dstAnnot, } +/** + * Emit an instruction that's just a comment. + */ +static struct prog_instruction * +emit_comment(slang_emit_info *emitInfo, const char *s) +{ + struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_NOP); + if (inst) { + inst->Comment = _mesa_strdup(s); + } + return inst; +} + /** * Generate code for a simple arithmetic instruction. @@ -1005,9 +1024,16 @@ static struct prog_instruction * emit_label(slang_emit_info *emitInfo, const slang_ir_node *n) { assert(n->Label); +#if 0 + /* XXX this fails in loop tail code - investigate someday */ assert(_slang_label_get_location(n->Label) < 0); _slang_label_set_location(n->Label, emitInfo->prog->NumInstructions, emitInfo->prog); +#else + if (_slang_label_get_location(n->Label) < 0) + _slang_label_set_location(n->Label, emitInfo->prog->NumInstructions, + emitInfo->prog); +#endif return NULL; } @@ -1097,7 +1123,9 @@ emit_move(slang_emit_info *emitInfo, slang_ir_node *n) assert(n->Children[1]->Store->Index >= 0); +#if 0 assert(!n->Store); +#endif n->Store = n->Children[0]->Store; #if PEEPHOLE_OPTIMIZATIONS @@ -1316,9 +1344,11 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) { struct gl_program *prog = emitInfo->prog; struct prog_instruction *beginInst, *endInst; - GLuint beginInstLoc, endInstLoc; + GLuint beginInstLoc, tailInstLoc, endInstLoc; slang_ir_node *ir; + slang_print_ir(n, 10); + /* emit OPCODE_BGNLOOP */ beginInstLoc = prog->NumInstructions; if (emitInfo->EmitHighLevelInstructions) { @@ -1328,6 +1358,14 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) /* body */ emit(emitInfo, n->Children[0]); + /* tail */ + tailInstLoc = prog->NumInstructions; + if (n->Children[1]) { + if (emitInfo->EmitComments) + emit_comment(emitInfo, "Loop tail code:"); + emit(emitInfo, n->Children[1]); + } + endInstLoc = prog->NumInstructions; if (emitInfo->EmitHighLevelInstructions) { /* emit OPCODE_ENDLOOP */ @@ -1338,7 +1376,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) endInst = new_instruction(emitInfo, OPCODE_BRA); endInst->DstReg.CondMask = COND_TR; /* always true */ } - /* end instruction's BranchTarget points to top of loop */ + /* ENDLOOP's BranchTarget points to the BGNLOOP inst */ endInst->BranchTarget = beginInstLoc; if (emitInfo->EmitHighLevelInstructions) { @@ -1351,7 +1389,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) * BREAK and CONT nodes, filling in their BranchTarget fields (which * will point to the ENDLOOP+1 or BGNLOOP instructions, respectively). */ - for (ir = n->BranchNode; ir; ir = ir->BranchNode) { + for (ir = n->List; ir; ir = ir->List) { struct prog_instruction *inst = prog->Instructions + ir->InstLocation; assert(inst->BranchTarget < 0); if (ir->Opcode == IR_BREAK || @@ -1372,8 +1410,8 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) inst->Opcode == OPCODE_CONT0 || inst->Opcode == OPCODE_CONT1 || inst->Opcode == OPCODE_BRA); - /* to go instruction at top of loop */ - inst->BranchTarget = beginInstLoc; + /* go to instruction at tail of loop */ + inst->BranchTarget = endInstLoc; } } return NULL; @@ -1389,13 +1427,28 @@ emit_cont_break(slang_emit_info *emitInfo, slang_ir_node *n) { gl_inst_opcode opcode; struct prog_instruction *inst; - n->InstLocation = emitInfo->prog->NumInstructions; + + if (n->Opcode == IR_CONT) { + /* we need to execute the loop's tail code before doing CONT */ + assert(n->Parent); + assert(n->Parent->Opcode == IR_LOOP); + if (n->Parent->Children[1]) { + /* emit tail code */ + if (emitInfo->EmitComments) { + emit_comment(emitInfo, "continue - tail code:"); + } + emit(emitInfo, n->Parent->Children[1]); + } + } + + /* opcode selection */ if (emitInfo->EmitHighLevelInstructions) { opcode = (n->Opcode == IR_CONT) ? OPCODE_CONT : OPCODE_BRK; } else { opcode = OPCODE_BRA; } + n->InstLocation = emitInfo->prog->NumInstructions; inst = new_instruction(emitInfo, opcode); inst->DstReg.CondMask = COND_TR; /* always true */ return inst; @@ -1456,7 +1509,7 @@ emit_cont_break_if(slang_emit_info *emitInfo, slang_ir_node *n, inst->DstReg.CondMask = breakTrue ? COND_NE : COND_EQ; } else { - /* BRK0, BRK1, CONT0, CONT1 */ + /* BRK0, BRK1, CONT0, CONT1 uses SrcReg[0] as the condition */ storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store); } return inst; @@ -1607,7 +1660,9 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) assert(n->Children[1]); emit(emitInfo, n->Children[0]); inst = emit(emitInfo, n->Children[1]); +#if 0 assert(!n->Store); +#endif n->Store = n->Children[1]->Store; return inst; @@ -1623,10 +1678,11 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Size > 0); - assert(n->Store->Index < 0); + /*assert(n->Store->Index < 0);*/ if (!n->Var || n->Var->isTemp) { /* a nameless/temporary variable, will be freed after first use */ - if (!_slang_alloc_temp(emitInfo->vt, n->Store)) { + /*NEW*/ + if (n->Store->Index < 0 && !_slang_alloc_temp(emitInfo->vt, n->Store)) { slang_info_log_error(emitInfo->log, "Ran out of registers, too many temporaries"); return NULL; @@ -1654,8 +1710,7 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) _mesa_swizzle_string(n->Store->Swizzle, 0, GL_FALSE), (n->Var ? (char *) n->Var->a_name : "anonymous"), n->Store->Size); - inst = new_instruction(emitInfo, OPCODE_NOP); - inst->Comment = _mesa_strdup(s); + inst = emit_comment(emitInfo, s); return inst; } return NULL; @@ -1828,7 +1883,7 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt, emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions; emitInfo.EmitCondCodes = 0; /* XXX temporary! */ - emitInfo.EmitComments = ctx->Shader.EmitComments; + emitInfo.EmitComments = 1 + ctx->Shader.EmitComments; (void) emit(&emitInfo, n); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index cc9df69e72..37dd38eaa5 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -53,6 +53,9 @@ typedef enum IR_COND, /* conditional expression/predicate */ IR_IF, /* high-level IF/then/else */ + /* Children[0] = conditional expression */ + /* Children[1] = if-true part */ + /* Children[2] = if-else part, or NULL */ IR_BEGIN_SUB, /* begin subroutine */ IR_END_SUB, /* end subroutine */ @@ -60,13 +63,18 @@ typedef enum IR_CALL, /* call subroutine */ IR_LOOP, /* high-level loop-begin / loop-end */ + /* Children[0] = loop body */ + /* Children[1] = loop tail code, or NULL */ + IR_CONT, /* continue loop */ + /* n->Parent = ptr to parent IR_LOOP Node */ IR_BREAK, /* break loop */ IR_BREAK_IF_TRUE, IR_BREAK_IF_FALSE, IR_CONT_IF_TRUE, IR_CONT_IF_FALSE, + /* Children[0] = the condition expression */ IR_MOVE, @@ -161,7 +169,8 @@ typedef struct slang_ir_node_ GLuint Writemask; /**< If Opcode == IR_MOVE */ GLfloat Value[4]; /**< If Opcode == IR_FLOAT */ slang_variable *Var; /**< If Opcode == IR_VAR or IR_VAR_DECL */ - struct slang_ir_node_ *BranchNode; /**< Used for branching instructions */ + struct slang_ir_node_ *List; /**< For various linked lists */ + struct slang_ir_node_ *Parent; /**< Pointer to logical parent (ie. loop) */ slang_label *Label; /**< Used for branches */ } slang_ir_node; -- cgit v1.2.3 From b2bc563142c93fd9bfa503f7b9e5e99c7d450ccc Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 09:39:24 -0600 Subject: IR utility functions --- src/mesa/shader/slang/slang_ir.c | 354 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 354 insertions(+) create mode 100644 src/mesa/shader/slang/slang_ir.c (limited to 'src') diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c new file mode 100644 index 0000000000..5790d0ab7f --- /dev/null +++ b/src/mesa/shader/slang/slang_ir.c @@ -0,0 +1,354 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5.3 + * + * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "imports.h" +#include "context.h" +#include "slang_ir.h" +#include "prog_print.h" + + +static const slang_ir_info IrInfo[] = { + /* binary ops */ + { IR_ADD, "IR_ADD", OPCODE_ADD, 4, 2 }, + { IR_SUB, "IR_SUB", OPCODE_SUB, 4, 2 }, + { IR_MUL, "IR_MUL", OPCODE_MUL, 4, 2 }, + { IR_DIV, "IR_DIV", OPCODE_NOP, 0, 2 }, /* XXX broke */ + { IR_DOT4, "IR_DOT_4", OPCODE_DP4, 1, 2 }, + { IR_DOT3, "IR_DOT_3", OPCODE_DP3, 1, 2 }, + { IR_CROSS, "IR_CROSS", OPCODE_XPD, 3, 2 }, + { IR_LRP, "IR_LRP", OPCODE_LRP, 4, 3 }, + { IR_MIN, "IR_MIN", OPCODE_MIN, 4, 2 }, + { IR_MAX, "IR_MAX", OPCODE_MAX, 4, 2 }, + { IR_CLAMP, "IR_CLAMP", OPCODE_NOP, 4, 3 }, /* special case: emit_clamp() */ + { IR_SEQUAL, "IR_SEQUAL", OPCODE_SEQ, 4, 2 }, + { IR_SNEQUAL, "IR_SNEQUAL", OPCODE_SNE, 4, 2 }, + { IR_SGE, "IR_SGE", OPCODE_SGE, 4, 2 }, + { IR_SGT, "IR_SGT", OPCODE_SGT, 4, 2 }, + { IR_SLE, "IR_SLE", OPCODE_SLE, 4, 2 }, + { IR_SLT, "IR_SLT", OPCODE_SLT, 4, 2 }, + { IR_POW, "IR_POW", OPCODE_POW, 1, 2 }, + /* unary ops */ + { IR_I_TO_F, "IR_I_TO_F", OPCODE_NOP, 1, 1 }, + { IR_F_TO_I, "IR_F_TO_I", OPCODE_INT, 4, 1 }, /* 4 floats to 4 ints */ + { IR_EXP, "IR_EXP", OPCODE_EXP, 1, 1 }, + { IR_EXP2, "IR_EXP2", OPCODE_EX2, 1, 1 }, + { IR_LOG2, "IR_LOG2", OPCODE_LG2, 1, 1 }, + { IR_RSQ, "IR_RSQ", OPCODE_RSQ, 1, 1 }, + { IR_RCP, "IR_RCP", OPCODE_RCP, 1, 1 }, + { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, + { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, + { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, + { IR_NEG, "IR_NEG", OPCODE_NOP, 4, 1 }, /* special case: emit_negation() */ + { IR_DDX, "IR_DDX", OPCODE_DDX, 4, 1 }, + { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, + { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, + { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, + { IR_NOISE1, "IR_NOISE1", OPCODE_NOISE1, 1, 1 }, + { IR_NOISE2, "IR_NOISE2", OPCODE_NOISE2, 1, 1 }, + { IR_NOISE3, "IR_NOISE3", OPCODE_NOISE3, 1, 1 }, + { IR_NOISE4, "IR_NOISE4", OPCODE_NOISE4, 1, 1 }, + + /* other */ + { IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 }, + { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 }, + { IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 }, + { IR_JUMP, "IR_JUMP", OPCODE_NOP, 0, 0 }, + { IR_IF, "IR_IF", OPCODE_NOP, 0, 0 }, + { IR_KILL, "IR_KILL", OPCODE_NOP, 0, 0 }, + { IR_COND, "IR_COND", OPCODE_NOP, 0, 0 }, + { IR_CALL, "IR_CALL", OPCODE_NOP, 0, 0 }, + { IR_MOVE, "IR_MOVE", OPCODE_NOP, 0, 1 }, + { IR_NOT, "IR_NOT", OPCODE_NOP, 1, 1 }, + { IR_VAR, "IR_VAR", OPCODE_NOP, 0, 0 }, + { IR_VAR_DECL, "IR_VAR_DECL", OPCODE_NOP, 0, 0 }, + { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, + { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 1 }, + { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 1 }, + { IR_FLOAT, "IR_FLOAT", OPCODE_NOP, 0, 0 }, /* float literal */ + { IR_FIELD, "IR_FIELD", OPCODE_NOP, 0, 0 }, + { IR_ELEMENT, "IR_ELEMENT", OPCODE_NOP, 0, 0 }, + { IR_SWIZZLE, "IR_SWIZZLE", OPCODE_NOP, 0, 0 }, + { IR_NOP, NULL, OPCODE_NOP, 0, 0 } +}; + + +const slang_ir_info * +_slang_ir_info(slang_ir_opcode opcode) +{ + GLuint i; + for (i = 0; IrInfo[i].IrName; i++) { + if (IrInfo[i].IrOpcode == opcode) { + return IrInfo + i; + } + } + return NULL; +} + +static const char * +slang_ir_name(slang_ir_opcode opcode) +{ + return _slang_ir_info(opcode)->IrName; +} + + + +/** + * Recursively free an IR tree. + */ +void +_slang_free_ir_tree(slang_ir_node *n) +{ +#if 1 + GLuint i; + if (!n) + return; + for (i = 0; i < 3; i++) + _slang_free_ir_tree(n->Children[i]); + /* Do not free n->List since it's a child elsewhere */ + free(n); +#endif +} + + + + + + +static const char * +swizzle_string(GLuint swizzle) +{ + static char s[6]; + GLuint i; + s[0] = '.'; + for (i = 1; i < 5; i++) { + s[i] = "xyzw"[GET_SWZ(swizzle, i-1)]; + } + s[i] = 0; + return s; +} + +static const char * +writemask_string(GLuint writemask) +{ + static char s[6]; + GLuint i, j = 0; + s[j++] = '.'; + for (i = 0; i < 4; i++) { + if (writemask & (1 << i)) + s[j++] = "xyzw"[i]; + } + s[j] = 0; + return s; +} + +static const char * +storage_string(const slang_ir_storage *st) +{ + static const char *files[] = { + "TEMP", + "LOCAL_PARAM", + "ENV_PARAM", + "STATE", + "INPUT", + "OUTPUT", + "NAMED_PARAM", + "CONSTANT", + "UNIFORM", + "WRITE_ONLY", + "ADDRESS", + "SAMPLER", + "UNDEFINED" + }; + static char s[100]; +#if 0 + if (st->Size == 1) + sprintf(s, "%s[%d]", files[st->File], st->Index); + else + sprintf(s, "%s[%d..%d]", files[st->File], st->Index, + st->Index + st->Size - 1); +#endif + assert(st->File < (GLint) (sizeof(files) / sizeof(files[0]))); + sprintf(s, "%s[%d]", files[st->File], st->Index); + return s; +} + + +static void +spaces(int n) +{ + while (n-- > 0) { + printf(" "); + } +} + + +#define IND 0 + + +void +_slang_print_ir_tree(const slang_ir_node *n, int indent) +{ + if (!n) + return; +#if !IND + if (n->Opcode != IR_SEQ) +#else + printf("%3d:", indent); +#endif + spaces(indent); + + switch (n->Opcode) { + case IR_SEQ: +#if IND + printf("SEQ at %p\n", (void*) n); +#endif + assert(n->Children[0]); + assert(n->Children[1]); + _slang_print_ir_tree(n->Children[0], indent + IND); + _slang_print_ir_tree(n->Children[1], indent + IND); + break; + case IR_SCOPE: + printf("NEW SCOPE\n"); + assert(!n->Children[1]); + _slang_print_ir_tree(n->Children[0], indent + 3); + break; + case IR_MOVE: + printf("MOVE (writemask = %s)\n", writemask_string(n->Writemask)); + _slang_print_ir_tree(n->Children[0], indent+3); + _slang_print_ir_tree(n->Children[1], indent+3); + break; + case IR_LABEL: + printf("LABEL: %s\n", n->Label->Name); + break; + case IR_COND: + printf("COND\n"); + _slang_print_ir_tree(n->Children[0], indent + 3); + break; + case IR_JUMP: + printf("JUMP %s\n", n->Label->Name); + break; + + case IR_IF: + printf("IF \n"); + _slang_print_ir_tree(n->Children[0], indent+3); + spaces(indent); + printf("THEN\n"); + _slang_print_ir_tree(n->Children[1], indent+3); + if (n->Children[2]) { + spaces(indent); + printf("ELSE\n"); + _slang_print_ir_tree(n->Children[2], indent+3); + } + spaces(indent); + printf("ENDIF\n"); + break; + + case IR_BEGIN_SUB: + printf("BEGIN_SUB\n"); + break; + case IR_END_SUB: + printf("END_SUB\n"); + break; + case IR_RETURN: + printf("RETURN\n"); + break; + case IR_CALL: + printf("CALL\n"); + break; + + case IR_LOOP: + printf("LOOP\n"); + _slang_print_ir_tree(n->Children[0], indent+3); + if (n->Children[1]) { + spaces(indent); + printf("TAIL:\n"); + _slang_print_ir_tree(n->Children[1], indent+3); + } + spaces(indent); + printf("ENDLOOP\n"); + break; + case IR_CONT: + printf("CONT\n"); + break; + case IR_BREAK: + printf("BREAK\n"); + break; + case IR_BREAK_IF_FALSE: + printf("BREAK_IF_FALSE\n"); + _slang_print_ir_tree(n->Children[0], indent+3); + break; + case IR_BREAK_IF_TRUE: + printf("BREAK_IF_TRUE\n"); + _slang_print_ir_tree(n->Children[0], indent+3); + break; + case IR_CONT_IF_FALSE: + printf("CONT_IF_FALSE\n"); + _slang_print_ir_tree(n->Children[0], indent+3); + break; + case IR_CONT_IF_TRUE: + printf("CONT_IF_TRUE\n"); + _slang_print_ir_tree(n->Children[0], indent+3); + break; + + case IR_VAR: + printf("VAR %s%s at %s store %p\n", + (n->Var ? (char *) n->Var->a_name : "TEMP"), + swizzle_string(n->Store->Swizzle), + storage_string(n->Store), (void*) n->Store); + break; + case IR_VAR_DECL: + printf("VAR_DECL %s (%p) at %s store %p\n", + (n->Var ? (char *) n->Var->a_name : "TEMP"), + (void*) n->Var, storage_string(n->Store), + (void*) n->Store); + break; + case IR_FIELD: + printf("FIELD %s of\n", n->Field); + _slang_print_ir_tree(n->Children[0], indent+3); + break; + case IR_FLOAT: + printf("FLOAT %g %g %g %g\n", + n->Value[0], n->Value[1], n->Value[2], n->Value[3]); + break; + case IR_I_TO_F: + printf("INT_TO_FLOAT\n"); + _slang_print_ir_tree(n->Children[0], indent+3); + break; + case IR_F_TO_I: + printf("FLOAT_TO_INT\n"); + _slang_print_ir_tree(n->Children[0], indent+3); + break; + case IR_SWIZZLE: + printf("SWIZZLE %s of (store %p) \n", + swizzle_string(n->Store->Swizzle), (void*) n->Store); + _slang_print_ir_tree(n->Children[0], indent + 3); + break; + default: + printf("%s (%p, %p) (store %p)\n", slang_ir_name(n->Opcode), + (void*) n->Children[0], (void*) n->Children[1], (void*) n->Store); + _slang_print_ir_tree(n->Children[0], indent+3); + _slang_print_ir_tree(n->Children[1], indent+3); + } +} -- cgit v1.2.3 From dc3015f1574f26704c3498c56915b5570d777da4 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 09:40:20 -0600 Subject: move some code into new slang_ir.c file --- src/mesa/shader/slang/slang_codegen.c | 22 +-- src/mesa/shader/slang/slang_emit.c | 315 +--------------------------------- src/mesa/shader/slang/slang_ir.h | 26 +++ src/mesa/sources | 1 + 4 files changed, 30 insertions(+), 334 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 2eb509b4d1..2210b95ef2 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -402,24 +402,6 @@ static slang_asm_info AsmInfo[] = { }; -/** - * Recursively free an IR tree. - */ -static void -_slang_free_ir_tree(slang_ir_node *n) -{ -#if 1 - GLuint i; - if (!n) - return; - for (i = 0; i < 3; i++) - _slang_free_ir_tree(n->Children[i]); - /* Do not free n->List since it's a child elsewhere */ - free(n); -#endif -} - - static slang_ir_node * new_node3(slang_ir_opcode op, slang_ir_node *c0, slang_ir_node *c1, slang_ir_node *c2) @@ -1639,7 +1621,7 @@ _slang_gen_select(slang_assemble_ctx *A, slang_operation *oper) tree = new_seq(ifNode, tmpVar); tree = new_seq(tmpDecl, tree); - slang_print_ir(tree, 10); + /*_slang_print_ir_tree(tree, 10);*/ return tree; } @@ -2835,7 +2817,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) #endif #if 0 printf("************* IR for %s *******\n", (char*)fun->header.a_name); - slang_print_ir(n, 0); + _slang_print_ir_tree(n, 0); #endif #if 0 printf("************* End codegen function ************\n\n"); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 6ec20daabb..ace68d1f05 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -66,102 +66,6 @@ typedef struct } slang_emit_info; -/** - * Assembly and IR info - */ -typedef struct -{ - slang_ir_opcode IrOpcode; - const char *IrName; - gl_inst_opcode InstOpcode; - GLuint ResultSize, NumParams; -} slang_ir_info; - - - -static const slang_ir_info IrInfo[] = { - /* binary ops */ - { IR_ADD, "IR_ADD", OPCODE_ADD, 4, 2 }, - { IR_SUB, "IR_SUB", OPCODE_SUB, 4, 2 }, - { IR_MUL, "IR_MUL", OPCODE_MUL, 4, 2 }, - { IR_DIV, "IR_DIV", OPCODE_NOP, 0, 2 }, /* XXX broke */ - { IR_DOT4, "IR_DOT_4", OPCODE_DP4, 1, 2 }, - { IR_DOT3, "IR_DOT_3", OPCODE_DP3, 1, 2 }, - { IR_CROSS, "IR_CROSS", OPCODE_XPD, 3, 2 }, - { IR_LRP, "IR_LRP", OPCODE_LRP, 4, 3 }, - { IR_MIN, "IR_MIN", OPCODE_MIN, 4, 2 }, - { IR_MAX, "IR_MAX", OPCODE_MAX, 4, 2 }, - { IR_CLAMP, "IR_CLAMP", OPCODE_NOP, 4, 3 }, /* special case: emit_clamp() */ - { IR_SEQUAL, "IR_SEQUAL", OPCODE_SEQ, 4, 2 }, - { IR_SNEQUAL, "IR_SNEQUAL", OPCODE_SNE, 4, 2 }, - { IR_SGE, "IR_SGE", OPCODE_SGE, 4, 2 }, - { IR_SGT, "IR_SGT", OPCODE_SGT, 4, 2 }, - { IR_SLE, "IR_SLE", OPCODE_SLE, 4, 2 }, - { IR_SLT, "IR_SLT", OPCODE_SLT, 4, 2 }, - { IR_POW, "IR_POW", OPCODE_POW, 1, 2 }, - /* unary ops */ - { IR_I_TO_F, "IR_I_TO_F", OPCODE_NOP, 1, 1 }, - { IR_F_TO_I, "IR_F_TO_I", OPCODE_INT, 4, 1 }, /* 4 floats to 4 ints */ - { IR_EXP, "IR_EXP", OPCODE_EXP, 1, 1 }, - { IR_EXP2, "IR_EXP2", OPCODE_EX2, 1, 1 }, - { IR_LOG2, "IR_LOG2", OPCODE_LG2, 1, 1 }, - { IR_RSQ, "IR_RSQ", OPCODE_RSQ, 1, 1 }, - { IR_RCP, "IR_RCP", OPCODE_RCP, 1, 1 }, - { IR_FLOOR, "IR_FLOOR", OPCODE_FLR, 4, 1 }, - { IR_FRAC, "IR_FRAC", OPCODE_FRC, 4, 1 }, - { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, - { IR_NEG, "IR_NEG", OPCODE_NOP, 4, 1 }, /* special case: emit_negation() */ - { IR_DDX, "IR_DDX", OPCODE_DDX, 4, 1 }, - { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, - { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, - { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, - { IR_NOISE1, "IR_NOISE1", OPCODE_NOISE1, 1, 1 }, - { IR_NOISE2, "IR_NOISE2", OPCODE_NOISE2, 1, 1 }, - { IR_NOISE3, "IR_NOISE3", OPCODE_NOISE3, 1, 1 }, - { IR_NOISE4, "IR_NOISE4", OPCODE_NOISE4, 1, 1 }, - - /* other */ - { IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 }, - { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 }, - { IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 }, - { IR_JUMP, "IR_JUMP", OPCODE_NOP, 0, 0 }, - { IR_IF, "IR_IF", OPCODE_NOP, 0, 0 }, - { IR_KILL, "IR_KILL", OPCODE_NOP, 0, 0 }, - { IR_COND, "IR_COND", OPCODE_NOP, 0, 0 }, - { IR_CALL, "IR_CALL", OPCODE_NOP, 0, 0 }, - { IR_MOVE, "IR_MOVE", OPCODE_NOP, 0, 1 }, - { IR_NOT, "IR_NOT", OPCODE_NOP, 1, 1 }, - { IR_VAR, "IR_VAR", OPCODE_NOP, 0, 0 }, - { IR_VAR_DECL, "IR_VAR_DECL", OPCODE_NOP, 0, 0 }, - { IR_TEX, "IR_TEX", OPCODE_TEX, 4, 1 }, - { IR_TEXB, "IR_TEXB", OPCODE_TXB, 4, 1 }, - { IR_TEXP, "IR_TEXP", OPCODE_TXP, 4, 1 }, - { IR_FLOAT, "IR_FLOAT", OPCODE_NOP, 0, 0 }, /* float literal */ - { IR_FIELD, "IR_FIELD", OPCODE_NOP, 0, 0 }, - { IR_ELEMENT, "IR_ELEMENT", OPCODE_NOP, 0, 0 }, - { IR_SWIZZLE, "IR_SWIZZLE", OPCODE_NOP, 0, 0 }, - { IR_NOP, NULL, OPCODE_NOP, 0, 0 } -}; - - -static const slang_ir_info * -slang_find_ir_info(slang_ir_opcode opcode) -{ - GLuint i; - for (i = 0; IrInfo[i].IrName; i++) { - if (IrInfo[i].IrOpcode == opcode) { - return IrInfo + i; - } - } - return NULL; -} - -static const char * -slang_ir_name(slang_ir_opcode opcode) -{ - return slang_find_ir_info(opcode)->IrName; -} - /** * Swizzle a swizzle. That is, return swz2(swz1) @@ -194,221 +98,6 @@ _slang_new_ir_storage(enum register_file file, GLint index, GLint size) } -static const char * -swizzle_string(GLuint swizzle) -{ - static char s[6]; - GLuint i; - s[0] = '.'; - for (i = 1; i < 5; i++) { - s[i] = "xyzw"[GET_SWZ(swizzle, i-1)]; - } - s[i] = 0; - return s; -} - -static const char * -writemask_string(GLuint writemask) -{ - static char s[6]; - GLuint i, j = 0; - s[j++] = '.'; - for (i = 0; i < 4; i++) { - if (writemask & (1 << i)) - s[j++] = "xyzw"[i]; - } - s[j] = 0; - return s; -} - -static const char * -storage_string(const slang_ir_storage *st) -{ - static const char *files[] = { - "TEMP", - "LOCAL_PARAM", - "ENV_PARAM", - "STATE", - "INPUT", - "OUTPUT", - "NAMED_PARAM", - "CONSTANT", - "UNIFORM", - "WRITE_ONLY", - "ADDRESS", - "SAMPLER", - "UNDEFINED" - }; - static char s[100]; -#if 0 - if (st->Size == 1) - sprintf(s, "%s[%d]", files[st->File], st->Index); - else - sprintf(s, "%s[%d..%d]", files[st->File], st->Index, - st->Index + st->Size - 1); -#endif - assert(st->File < (GLint) (sizeof(files) / sizeof(files[0]))); - sprintf(s, "%s[%d]", files[st->File], st->Index); - return s; -} - - -static void -spaces(int n) -{ - while (n-- > 0) { - printf(" "); - } -} - -#define IND 0 -void -slang_print_ir(const slang_ir_node *n, int indent) -{ - if (!n) - return; -#if !IND - if (n->Opcode != IR_SEQ) -#else - printf("%3d:", indent); -#endif - spaces(indent); - - switch (n->Opcode) { - case IR_SEQ: -#if IND - printf("SEQ at %p\n", (void*) n); -#endif - assert(n->Children[0]); - assert(n->Children[1]); - slang_print_ir(n->Children[0], indent + IND); - slang_print_ir(n->Children[1], indent + IND); - break; - case IR_SCOPE: - printf("NEW SCOPE\n"); - assert(!n->Children[1]); - slang_print_ir(n->Children[0], indent + 3); - break; - case IR_MOVE: - printf("MOVE (writemask = %s)\n", writemask_string(n->Writemask)); - slang_print_ir(n->Children[0], indent+3); - slang_print_ir(n->Children[1], indent+3); - break; - case IR_LABEL: - printf("LABEL: %s\n", n->Label->Name); - break; - case IR_COND: - printf("COND\n"); - slang_print_ir(n->Children[0], indent + 3); - break; - case IR_JUMP: - printf("JUMP %s\n", n->Label->Name); - break; - - case IR_IF: - printf("IF \n"); - slang_print_ir(n->Children[0], indent+3); - spaces(indent); - printf("THEN\n"); - slang_print_ir(n->Children[1], indent+3); - if (n->Children[2]) { - spaces(indent); - printf("ELSE\n"); - slang_print_ir(n->Children[2], indent+3); - } - spaces(indent); - printf("ENDIF\n"); - break; - - case IR_BEGIN_SUB: - printf("BEGIN_SUB\n"); - break; - case IR_END_SUB: - printf("END_SUB\n"); - break; - case IR_RETURN: - printf("RETURN\n"); - break; - case IR_CALL: - printf("CALL\n"); - break; - - case IR_LOOP: - printf("LOOP\n"); - slang_print_ir(n->Children[0], indent+3); - if (n->Children[1]) { - spaces(indent); - printf("TAIL:\n"); - slang_print_ir(n->Children[1], indent+3); - } - spaces(indent); - printf("ENDLOOP\n"); - break; - case IR_CONT: - printf("CONT\n"); - break; - case IR_BREAK: - printf("BREAK\n"); - break; - case IR_BREAK_IF_FALSE: - printf("BREAK_IF_FALSE\n"); - slang_print_ir(n->Children[0], indent+3); - break; - case IR_BREAK_IF_TRUE: - printf("BREAK_IF_TRUE\n"); - slang_print_ir(n->Children[0], indent+3); - break; - case IR_CONT_IF_FALSE: - printf("CONT_IF_FALSE\n"); - slang_print_ir(n->Children[0], indent+3); - break; - case IR_CONT_IF_TRUE: - printf("CONT_IF_TRUE\n"); - slang_print_ir(n->Children[0], indent+3); - break; - - case IR_VAR: - printf("VAR %s%s at %s store %p\n", - (n->Var ? (char *) n->Var->a_name : "TEMP"), - swizzle_string(n->Store->Swizzle), - storage_string(n->Store), (void*) n->Store); - break; - case IR_VAR_DECL: - printf("VAR_DECL %s (%p) at %s store %p\n", - (n->Var ? (char *) n->Var->a_name : "TEMP"), - (void*) n->Var, storage_string(n->Store), - (void*) n->Store); - break; - case IR_FIELD: - printf("FIELD %s of\n", n->Field); - slang_print_ir(n->Children[0], indent+3); - break; - case IR_FLOAT: - printf("FLOAT %g %g %g %g\n", - n->Value[0], n->Value[1], n->Value[2], n->Value[3]); - break; - case IR_I_TO_F: - printf("INT_TO_FLOAT\n"); - slang_print_ir(n->Children[0], indent+3); - break; - case IR_F_TO_I: - printf("FLOAT_TO_INT\n"); - slang_print_ir(n->Children[0], indent+3); - break; - case IR_SWIZZLE: - printf("SWIZZLE %s of (store %p) \n", - swizzle_string(n->Store->Swizzle), (void*) n->Store); - slang_print_ir(n->Children[0], indent + 3); - break; - default: - printf("%s (%p, %p) (store %p)\n", slang_ir_name(n->Opcode), - (void*) n->Children[0], (void*) n->Children[1], (void*) n->Store); - slang_print_ir(n->Children[0], indent+3); - slang_print_ir(n->Children[1], indent+3); - } -} - - /** * Allocate temporary storage for an intermediate result (such as for * a multiply or add, etc. @@ -713,7 +402,7 @@ static struct prog_instruction * emit_arith(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; - const slang_ir_info *info = slang_find_ir_info(n->Opcode); + const slang_ir_info *info = _slang_ir_info(n->Opcode); char *srcAnnot[3], *dstAnnot; GLuint i; @@ -1347,8 +1036,6 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) GLuint beginInstLoc, tailInstLoc, endInstLoc; slang_ir_node *ir; - slang_print_ir(n, 10); - /* emit OPCODE_BGNLOOP */ beginInstLoc = prog->NumInstructions; if (emitInfo->EmitHighLevelInstructions) { diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 37dd38eaa5..2b7d822932 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -175,4 +175,30 @@ typedef struct slang_ir_node_ } slang_ir_node; + +/** + * Assembly and IR info + */ +typedef struct +{ + slang_ir_opcode IrOpcode; + const char *IrName; + gl_inst_opcode InstOpcode; + GLuint ResultSize, NumParams; +} slang_ir_info; + + + +extern const slang_ir_info * +_slang_ir_info(slang_ir_opcode opcode); + + +extern void +_slang_free_ir_tree(slang_ir_node *n); + + +extern void +_slang_print_ir_tree(const slang_ir_node *n, int indent); + + #endif /* SLANG_IR_H */ diff --git a/src/mesa/sources b/src/mesa/sources index 628599c3c5..73fd58125a 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -179,6 +179,7 @@ SLANG_SOURCES = \ shader/slang/slang_compile_struct.c \ shader/slang/slang_compile_variable.c \ shader/slang/slang_emit.c \ + shader/slang/slang_ir.c \ shader/slang/slang_label.c \ shader/slang/slang_library_noise.c \ shader/slang/slang_link.c \ -- cgit v1.2.3 From b50b036ffb795a12106bd59b1a08b0287a8b3388 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 10:16:49 -0600 Subject: When computing render_inputs_bitset, omit primary color if we have a fragment program and it doesn't need FRAG_ATTRIB_COL0. Silences valgrind warnings. --- src/mesa/tnl/t_context.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index f665485f42..fa42a3df98 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -102,6 +102,8 @@ void _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) { TNLcontext *tnl = TNL_CONTEXT(ctx); + const struct gl_vertex_program *vp = ctx->VertexProgram._Current; + const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; if (new_state & (_NEW_HINT)) { ASSERT(tnl->AllowVertexFog || tnl->AllowPixelFog); @@ -118,7 +120,9 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) RENDERINPUTS_ZERO( tnl->render_inputs_bitset ); RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS ); - RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 ); + if (!fp || fp->Base.InputsRead & FRAG_BIT_COL0) { + RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 ); + } for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { if (ctx->Texture._EnabledCoordUnits & (1 << i)) { RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) ); @@ -151,15 +155,12 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POINTSIZE ); /* check for varying vars which are written by the vertex program */ - { - struct gl_vertex_program *vp = ctx->VertexProgram._Current; - if (vp) { - GLuint i; - for (i = 0; i < MAX_VARYING; i++) { - if (vp->Base.OutputsWritten & (1 << (VERT_RESULT_VAR0 + i))) { - RENDERINPUTS_SET(tnl->render_inputs_bitset, - _TNL_ATTRIB_GENERIC(i)); - } + if (vp) { + GLuint i; + for (i = 0; i < MAX_VARYING; i++) { + if (vp->Base.OutputsWritten & (1 << (VERT_RESULT_VAR0 + i))) { + RENDERINPUTS_SET(tnl->render_inputs_bitset, + _TNL_ATTRIB_GENERIC(i)); } } } -- cgit v1.2.3 From 0e71d08e8df7f59da74e78212fe8433ceb7c7315 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 10:18:14 -0600 Subject: Properly free the slang_ir_node->Store data (use ref counting). --- src/mesa/shader/slang/slang_ir.c | 57 +++++++++++++++++++++++++++++++--------- src/mesa/shader/slang/slang_ir.h | 1 + 2 files changed, 46 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index 5790d0ab7f..11c09d33a2 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -106,33 +106,65 @@ _slang_ir_info(slang_ir_opcode opcode) return NULL; } + static const char * -slang_ir_name(slang_ir_opcode opcode) +_slang_ir_name(slang_ir_opcode opcode) { return _slang_ir_info(opcode)->IrName; } - /** - * Recursively free an IR tree. + * Since many IR nodes might point to the same IR storage info, we need + * to be careful when deleting things. + * Before deleting an IR tree, traverse it and do refcounting on the + * IR storage nodes. Use the refcount info during delete to free things + * properly. */ -void -_slang_free_ir_tree(slang_ir_node *n) +static void +_slang_refcount_storage(slang_ir_node *n) { -#if 1 GLuint i; if (!n) return; + if (n->Store) + n->Store->RefCount++; + for (i = 0; i < 3; i++) + _slang_refcount_storage(n->Children[i]); +} + + +static void +_slang_free_ir(slang_ir_node *n) +{ + GLuint i; + if (!n) + return; + + if (n->Store) { + n->Store->RefCount--; + if (n->Store->RefCount == 0) { + free(n->Store); + n->Store = NULL; + } + } + for (i = 0; i < 3; i++) _slang_free_ir_tree(n->Children[i]); /* Do not free n->List since it's a child elsewhere */ free(n); -#endif } - +/** + * Recursively free an IR tree. + */ +void +_slang_free_ir_tree(slang_ir_node *n) +{ + _slang_refcount_storage(n); + _slang_free_ir(n); +} @@ -149,6 +181,7 @@ swizzle_string(GLuint swizzle) return s; } + static const char * writemask_string(GLuint writemask) { @@ -163,6 +196,7 @@ writemask_string(GLuint writemask) return s; } + static const char * storage_string(const slang_ir_storage *st) { @@ -204,12 +238,11 @@ spaces(int n) } -#define IND 0 - - void _slang_print_ir_tree(const slang_ir_node *n, int indent) { +#define IND 0 + if (!n) return; #if !IND @@ -346,7 +379,7 @@ _slang_print_ir_tree(const slang_ir_node *n, int indent) _slang_print_ir_tree(n->Children[0], indent + 3); break; default: - printf("%s (%p, %p) (store %p)\n", slang_ir_name(n->Opcode), + printf("%s (%p, %p) (store %p)\n", _slang_ir_name(n->Opcode), (void*) n->Children[0], (void*) n->Children[1], (void*) n->Store); _slang_print_ir_tree(n->Children[0], indent+3); _slang_print_ir_tree(n->Children[1], indent+3); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 2b7d822932..2e90409caf 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -147,6 +147,7 @@ struct _slang_ir_storage GLint Index; /**< -1 means unallocated */ GLint Size; /**< number of floats */ GLuint Swizzle; + GLint RefCount; /**< Used during IR tree delete */ }; typedef struct _slang_ir_storage slang_ir_storage; -- cgit v1.2.3 From 49134e8e53d4ae114044ff90174a6777ffbecc60 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 15:29:10 -0600 Subject: fix mistake in _slang_free_ir() --- src/mesa/shader/slang/slang_ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index 11c09d33a2..59aac731d2 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -150,7 +150,7 @@ _slang_free_ir(slang_ir_node *n) } for (i = 0; i < 3; i++) - _slang_free_ir_tree(n->Children[i]); + _slang_free_ir(n->Children[i]); /* Do not free n->List since it's a child elsewhere */ free(n); } -- cgit v1.2.3 From 3493e867e9f2421425627a15eb5d2a2c554fbe8a Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 16:18:13 -0600 Subject: free prog->Attributes in _mesa_delete_program() --- src/mesa/shader/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index c1606acb1a..e872d78611 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -288,10 +288,12 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog) if (prog->Parameters) { _mesa_free_parameter_list(prog->Parameters); } - if (prog->Varying) { _mesa_free_parameter_list(prog->Varying); } + if (prog->Attributes) { + _mesa_free_parameter_list(prog->Attributes); + } /* XXX this is a little ugly */ if (prog->Target == GL_VERTEX_PROGRAM_ARB) { -- cgit v1.2.3 From 935f93f966aa298c4d4115ac766cb2ff46ad6514 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 16:20:02 -0600 Subject: Free shader-related context state: _mesa_free_shader_state() --- src/mesa/main/context.c | 1 + src/mesa/shader/shader_api.c | 16 ++++++++++++++++ src/mesa/shader/shader_api.h | 3 +++ 3 files changed, 20 insertions(+) (limited to 'src') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 0cff90c77a..72c85de7ba 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1439,6 +1439,7 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_free_viewport_data( ctx ); _mesa_free_colortables_data( ctx ); _mesa_free_program_data(ctx); + _mesa_free_shader_state(ctx); _mesa_free_query_data(ctx); #if FEATURE_ARB_vertex_buffer_object diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 88aa8c50f5..002b42721d 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -211,6 +211,22 @@ _mesa_init_shader_state(GLcontext * ctx) } +/** + * Free the per-context shader-related state. + */ +void +_mesa_free_shader_state(GLcontext *ctx) +{ + if (ctx->Shader.CurrentProgram) { + ctx->Shader.CurrentProgram->RefCount--; + if (ctx->Shader.CurrentProgram->RefCount <= 0) { + _mesa_free_shader_program(ctx, ctx->Shader.CurrentProgram); + ctx->Shader.CurrentProgram = NULL; + } + } +} + + /** * Copy string from to , up to maxLength characters, returning * length of in . diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h index 315f60a35f..16ed1a0c10 100644 --- a/src/mesa/shader/shader_api.h +++ b/src/mesa/shader/shader_api.h @@ -38,6 +38,9 @@ extern void _mesa_init_shader_state(GLcontext * ctx); +extern void +_mesa_free_shader_state(GLcontext *ctx); + extern struct gl_shader_program * _mesa_new_shader_program(GLcontext *ctx, GLuint name); -- cgit v1.2.3 From 1968444bed931eeafdbe948a30bb871bfcf11b42 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 16:22:35 -0600 Subject: fix some mem leaks --- src/mesa/shader/slang/slang_compile.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 619b0de0d0..85dd158698 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -691,7 +691,7 @@ parse_fully_specified_type(slang_parse_ctx * C, slang_output_ctx * O, /** * When parsing a compound production, this function is used to parse the * children. - * For example, a a while-loop compound will have two children, the + * For example, a while-loop compound will have two children, the * while condition expression and the loop body. So, this function will * be called twice to parse those two sub-expressions. * \param C the parsing context @@ -758,7 +758,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O, if (first_var < O->vars->num_variables) { const unsigned int num_vars = O->vars->num_variables - first_var; unsigned int i; - + assert(oper->num_children == 0); oper->num_children = num_vars; oper->children = slang_operation_new(num_vars); if (oper->children == NULL) { @@ -864,16 +864,18 @@ handle_nary_expression(slang_parse_ctx * C, slang_operation * op, { unsigned int i; - op->children = - (slang_operation *) slang_alloc_malloc(n * sizeof(slang_operation)); + op->children = slang_operation_new(n); if (op->children == NULL) { slang_info_log_memory(C->L); return 0; } op->num_children = n; - for (i = 0; i < n; i++) + for (i = 0; i < n; i++) { + slang_operation_destruct(&op->children[i]); op->children[i] = (*ops)[*total_ops - (n + 1 - i)]; + } + (*ops)[*total_ops - (n + 1)] = (*ops)[*total_ops - 1]; *total_ops -= n; @@ -1153,7 +1155,8 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O, } C->I++; - *oper = *ops; + slang_operation_destruct(oper); + *oper = *ops; /* struct copy */ slang_alloc_free(ops); return 1; -- cgit v1.2.3 From cfdd07d7d394a2a595a545c0ef81d00dd6156742 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 16:26:51 -0600 Subject: fix mem leak --- src/mesa/shader/slang/slang_compile_variable.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index ae37aed514..e099ecb067 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -272,6 +272,9 @@ slang_variable_destruct(slang_variable * var) slang_operation_destruct(var->initializer); slang_alloc_free(var->initializer); } + if (var->aux) { + _mesa_free(var->aux); + } } -- cgit v1.2.3 From 9fe342d1e6d3fbd150a1369380a1a4ecf82d6773 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 16:43:44 -0600 Subject: disable free(var->aux) -- can lead to segfault --- src/mesa/shader/slang/slang_compile_variable.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index e099ecb067..9a0b985507 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -272,9 +272,11 @@ slang_variable_destruct(slang_variable * var) slang_operation_destruct(var->initializer); slang_alloc_free(var->initializer); } +#if 0 if (var->aux) { _mesa_free(var->aux); } +#endif } -- cgit v1.2.3 From bb0393a0cdcabcb29ab7924cd4b3c4622fc2d787 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Mar 2007 16:44:20 -0600 Subject: fix mem leak --- src/mesa/shader/slang/slang_codegen.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 2210b95ef2..fa57ef8666 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1055,13 +1055,9 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, } /* Replace the function call with the inlined block */ -#if 0 - slang_operation_construct(oper); - slang_operation_copy(oper, inlined); -#else - *oper = *inlined; /* XXX slang_operation_copy() */ -#endif - + slang_operation_destruct(oper); + *oper = *inlined; + /* XXX slang_operation_destruct(inlined) ??? */ #if 0 assert(inlined->locals); -- cgit v1.2.3 From b9fbedd6012ac20fc14fda2cd18bdd86463d0527 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Mar 2007 09:23:44 -0600 Subject: fix mem leak, add comments --- src/mesa/shader/shader_api.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 002b42721d..1831d0fb2e 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -67,6 +67,10 @@ _mesa_new_shader_program(GLcontext *ctx, GLuint name) } +/** + * Free the data that hangs off a shader program object, but not the object + * itself. + */ void _mesa_free_shader_program_data(GLcontext *ctx, struct gl_shader_program *shProg) @@ -104,11 +108,17 @@ _mesa_free_shader_program_data(GLcontext *ctx, } - +/** + * Free/delete a shader program object. + */ void _mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) { _mesa_free_shader_program_data(ctx, shProg); + if (shProg->Shaders) { + _mesa_free(shProg->Shaders); + shProg->Shaders = NULL; + } _mesa_free(shProg); } @@ -431,6 +441,10 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) /* found it */ shProg->Shaders[i]->RefCount--; + if (shProg->Shaders[i]->RefCount == 0) { + /* delete now */ + _mesa_free_shader(ctx, shProg->Shaders[i]); + } /* alloc new, smaller array */ newList = (struct gl_shader **) @@ -446,8 +460,6 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) newList[j++] = shProg->Shaders[i]; _mesa_free(shProg->Shaders); - /* XXX refcounting! */ - shProg->Shaders = newList; return; } -- cgit v1.2.3 From e71c34aaa173ca451fa02e526ead77758f7eeb74 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Mar 2007 09:24:30 -0600 Subject: disable free() until other issues can be fixed... --- src/mesa/shader/slang/slang_ir.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index 59aac731d2..14a7b694bd 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -144,7 +144,9 @@ _slang_free_ir(slang_ir_node *n) if (n->Store) { n->Store->RefCount--; if (n->Store->RefCount == 0) { +#if 0 free(n->Store); +#endif n->Store = NULL; } } -- cgit v1.2.3